diff --git a/.editorconfig b/.editorconfig index 558648d..62f065a 100644 --- a/.editorconfig +++ b/.editorconfig @@ -2,4 +2,5 @@ end_of_line=lf [*.cs] csharp_indent_case_contents=true -csharp_space_after_cast=true \ No newline at end of file +csharp_space_after_cast=true +csharp_indent_case_contents_when_block=false \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d64f784..8e0f3b5 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,13 +5,21 @@ on: # branches: # - 'release_*' workflow_dispatch: + inputs: + sqlite_storage: + description: Build SQLite Vault storage + type: boolean + required: false + default: false + cli: + description: Build CLI package + type: boolean + required: false + default: false - jobs: - build: runs-on: windows-latest - steps: - name: Setup product versions run: | @@ -31,61 +39,105 @@ jobs: echo "BUILD_VERSION=${buildVersion}" >> $Env:GITHUB_ENV shell: powershell - - uses: actions/checkout@v2 - - uses: actions/setup-dotnet@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-dotnet@v4 with: - dotnet-version: 5.0.x - - uses: microsoft/setup-msbuild@v1.0.2 + dotnet-version: '8.0.x' + - uses: microsoft/setup-msbuild@v2 - - uses: nuget/setup-nuget@v1 + - uses: nuget/setup-nuget@v2 - run: nuget restore KeeperSdk.sln + + - name: Load signing certificate + run: | + if (Test-Path -Path certificate.txt) { Remove-Item certificate.txt } + if (Test-Path -Path certificate.pfx) { Remove-Item certificate.pfx } + Set-Content -Path certificate.txt -Value '${{ secrets.PFX_CERT }}' + certutil -decode certificate.txt certificate.pfx + Remove-Item certificate.txt + shell: powershell + - name: Build Keeper SDK Nuget package working-directory: ./KeeperSdk run: | if (Test-Path bin) { Remove-Item -Force -Recurse bin } - dotnet restore /P:Configuration=Release - dotnet clean /P:Configuration=Release - dotnet build /P:Configuration=Release /P:Version=${Env:SDK_VERSION} /P:AssemblyVersion=${Env:BUILD_VERSION} /P:FileVersion=${Env:BUILD_VERSION} - echo "TODO binaries signing" - dotnet pack --no-build --no-restore /P:Configuration=Release /P:Version=${Env:PACKAGE_VERSION} /P:IncludeSymbols=true /P:SymbolPackageFormat=snupkg + dotnet build /P:Configuration=Release /P:Version=${Env:PACKAGE_VERSION} /P:AssemblyVersion=${Env:BUILD_VERSION} /P:FileVersion=${Env:BUILD_VERSION} + & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ..\certificate.pfx /t "http://timestamp.digicert.com" /v /p "${{ secrets.PFX_PASS }}" /d ".NET Keeper SDK" "bin\Release\net452\KeeperSdk.dll" + & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ..\certificate.pfx /t "http://timestamp.digicert.com" /v /p "${{ secrets.PFX_PASS }}" /d ".NET Keeper SDK" "bin\Release\netstandard2.0\KeeperSdk.dll" + dotnet pack --no-build --no-restore --no-dependencies /P:Configuration=Release /P:Version=${Env:PACKAGE_VERSION} /P:IncludeSymbols=true /P:SymbolPackageFormat=snupkg shell: powershell - - name: Build Security Key library for Windows - working-directory: ./WinWebAuthn + - name: Build SQLite Vault Storage + working-directory: ./OfflineStorageSqlite run: | if (Test-Path bin) { Remove-Item -Force -Recurse bin } - msbuild /T:Restore,Clean /P:Configuration=Release - msbuild /T:Build /P:Configuration=Release /P:Version=${Env:SDK_VERSION} /P:AssemblyVersion=${Env:BUILD_VERSION} /P:FileVersion=${Env:BUILD_VERSION} + dotnet build --configuration=Release --no-dependencies + & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ..\certificate.pfx /t "http://timestamp.digicert.com" /v /p "${{ secrets.PFX_PASS }}" /d ".NET Keeper SDK Offline SQLite Storage" "bin\Release\\netstandard2.0\OfflineStorageSqlite.dll" + dotnet pack --no-build --no-restore --configuration=Release /P:IncludeSymbols=true /P:SymbolPackageFormat=snupkg + shell: powershell - echo "TODO binaries signing" + - name: Build CLI library + working-directory: ./Cli + run: | + if (Test-Path bin) { Remove-Item -Force -Recurse bin } + dotnet build --configuration=Release --no-dependencies + & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ..\certificate.pfx /t "http://timestamp.digicert.com" /v /p "${{ secrets.PFX_PASS }}" /d ".NET Keeper SDK" "bin\Release\net472\Cli.dll" + & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ..\certificate.pfx /t "http://timestamp.digicert.com" /v /p "${{ secrets.PFX_PASS }}" /d ".NET Keeper SDK" "bin\Release\netstandard2.0\Cli.dll" + dotnet pack --no-build --no-restore --no-dependencies --configuration=Release /P:IncludeSymbols=true /P:SymbolPackageFormat=snupkg shell: powershell - name: Build .Net Commander working-directory: ./Commander run: | if (Test-Path bin) { Remove-Item -Force -Recurse bin } - msbuild /T:Restore,Clean /P:Configuration=Release - msbuild /T:Build /P:Configuration=Release /P:Version=${Env:SDK_VERSION} /P:AssemblyVersion=${Env:BUILD_VERSION} /P:FileVersion=${Env:BUILD_VERSION} - - echo "TODO binaries signing" + msbuild /T:Restore /P:Configuration=Release + msbuild /T:Build /P:Configuration=Release /p:BuildProjectReferences=false + & 'C:/Program Files (x86)/Windows Kits/10/bin/10.0.17763.0/x86/signtool.exe' sign /f ..\certificate.pfx /t "http://timestamp.digicert.com" /v /p "${{ secrets.PFX_PASS }}" /d ".NET Keeper SDK" "bin\Release\Commander.exe" shell: powershell + - name: Zip Commander + run: | + $params = @{ + Path = "Commander/bin/Release/*.exe", "Commander/bin/Release/Commander.exe.config", "Commander/bin/Release/*.dll", "OfflineStorageSqlite/bin/Release/netstandard2.0/OfflineStorageSqlite.dll" + CompressionLevel = "Fastest" + DestinationPath = "Commander-${Env:PACKAGE_VERSION}.zip" + } + Compress-Archive @params + shell: powershell + - name: Store SDK Nuget artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: KeeperSdk-${{ env.PACKAGE_VERSION }}-Nuget-Package path: | KeeperSdk/bin/Release/Keeper.Sdk.${{ env.PACKAGE_VERSION }}.nupkg KeeperSdk/bin/Release/Keeper.Sdk.${{ env.PACKAGE_VERSION }}.snupkg + retention-days: 1 - name: Store Commander artifacts - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Commander-${{ env.PACKAGE_VERSION }} + path: Commander-${{ env.PACKAGE_VERSION }}.zip + retention-days: 1 + + - name: Store SQLite Offline Storage artifacts + if: ${{ inputs.sqlite_storage }} + uses: actions/upload-artifact@v4 + with: + name: OfflineStorageSqlite + path: | + OfflineStorageSqlite/bin/Release/Keeper.Storage.Sqlite.*.nupkg + OfflineStorageSqlite/bin/Release/Keeper.Storage.Sqlite.*.snupkg + retention-days: 1 + + - name: Store artifacts + if: ${{ inputs.cli }} + uses: actions/upload-artifact@v4 + with: + name: Cli path: | - Commander/bin/Release/Commander.exe - Commander/bin/Release/Commander.exe.config - Commander/bin/Release/CommandLine.dll - WinWebAuthn/bin/Release/WinWebAuthn.dll - KeeperSdk/bin/Release/net45/*.dll + Cli/bin/Release/Keeper.Cli.*.nupkg + Cli/bin/Release/Keeper.Cli.*.snupkg + retention-days: 1 diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 1fd26e4..76dc983 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -11,15 +11,14 @@ # name: "Code Analysis" -on: -# push: -# branches: [code_analysis] - workflow_dispatch: - +on: + schedule: + - cron: '17 23 * * 3' + jobs: analyze: name: Analyze - runs-on: ubuntu-latest + runs-on: windows-latest strategy: fail-fast: false @@ -35,7 +34,7 @@ jobs: # Initializes the CodeQL tools for scanning. - name: Initialize Code Analysis - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v2 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -46,7 +45,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -60,4 +59,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/power-commander.yml b/.github/workflows/power-commander.yml new file mode 100644 index 0000000..f6e4aee --- /dev/null +++ b/.github/workflows/power-commander.yml @@ -0,0 +1,37 @@ +name: Publish PowerCommander + +on: [workflow_dispatch] + +jobs: + build: + runs-on: windows-latest + environment: prod + + steps: + - uses: actions/checkout@v2 + + - name: Load signing certificate + run: | + if (Test-Path -Path certificate.txt) { Remove-Item certificate.txt } + if (Test-Path -Path certificate.pfx) { Remove-Item certificate.pfx } + Set-Content -Path certificate.txt -Value '${{ secrets.PFX_CERT }}' + certutil -decode certificate.txt certificate.pfx + Remove-Item certificate.txt + shell: powershell + + - name: Sign PowerShell scripts + working-directory: ./PowerCommander + run: | + $certPassword = ConvertTo-SecureString -String "${{ secrets.PFX_PASS }}" -AsPlainText -Force + $certData = Get-PfxData -FilePath "..\certificate.pfx" -Password $certPassword + $cert = $certData.EndEntityCertificates[0] + Set-AuthenticodeSignature -FilePath *.ps1 -Certificate $cert + Set-AuthenticodeSignature -FilePath *.ps1xml -Certificate $cert + Set-AuthenticodeSignature -FilePath PowerCommander.psd1 -Certificate $cert + Set-AuthenticodeSignature -FilePath PowerCommander.psm1 -Certificate $cert + shell: powershell + + - name: Publish to PowerShell Gallery + run: | + Publish-Module -Path .\PowerCommander\ -NuGetApiKey "${{ secrets.POWERSHELL_PUBLISH_KEY }}" + shell: powershell diff --git a/.gitignore b/.gitignore index cae5e40..afa517d 100644 --- a/.gitignore +++ b/.gitignore @@ -48,4 +48,7 @@ project.lock.json UpgradeLog.htm nuget.config -Help/ \ No newline at end of file +Help/ +.vscode/ + +packages.config \ No newline at end of file diff --git a/Cli/Cli.csproj b/Cli/Cli.csproj new file mode 100644 index 0000000..09a061c --- /dev/null +++ b/Cli/Cli.csproj @@ -0,0 +1,33 @@ + + + + netstandard2.0;net472 + Cli + 1.0.2 + Keeper.Cli + 1.0.2.3 + 1.0.2.3 + https://github.com/Keeper-Security/keeper-sdk-dotnet + https://github.com/Keeper-Security/keeper-sdk-dotnet/Cli + Keeper Security Inc. + Cli for .NET Keeper Sdk + MIT + Github + en-US + true + snupkg + false + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Cli/Commands.cs b/Cli/Commands.cs new file mode 100644 index 0000000..fe0b98d --- /dev/null +++ b/Cli/Commands.cs @@ -0,0 +1,456 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; +using CommandLine; +using CommandLine.Text; + +namespace Cli +{ + public class CommandMeta + { + public int Order { get; set; } + public string Description { get; set; } + } + + public interface ICommand + { + Task ExecuteCommand(string args); + } + + public interface ICancellableCommand + { + Task ExecuteCommand(string args, CancellationToken token); + } + + public class SimpleCommand : CommandMeta, ICommand + { + public Func Action { get; set; } + + public async Task ExecuteCommand(string args) + { + if (Action != null) + { + await Action(args); + } + } + } + + public class SimpleCancellableCommand : CommandMeta, ICancellableCommand + { + public Func Action { get; set; } + + public async Task ExecuteCommand(string args, CancellationToken token) + { + if (Action != null) + { + await Action(args, token); + } + } + } + + + public static class CommandExtensions + { + public static bool IsWhiteSpace(char ch) + { + return char.IsWhiteSpace(ch); + } + + public static bool IsPathDelimiter(char ch) + { + return ch == '/'; + } + + public static IEnumerable TokenizeArguments(this string args) + { + return TokenizeArguments(args, IsWhiteSpace); + } + + public static IEnumerable TokenizeArguments(this string args, Func isDelimiter) + { + var sb = new StringBuilder(); + var pos = 0; + var isQuote = false; + var isEscape = false; + while (pos < args.Length) + { + var ch = args[pos]; + + if (isEscape) + { + isEscape = false; + sb.Append(ch); + } + else + { + switch (ch) + { + case '\\': + isEscape = true; + break; + case '"': + isQuote = !isQuote; + break; + default: + { + if (!isQuote && isDelimiter(ch)) + { + if (sb.Length > 0) + { + yield return sb.ToString(); + sb.Length = 0; + } + } + else + { + sb.Append(ch); + } + + break; + } + } + } + + pos++; + } + + if (sb.Length > 0) + { + yield return sb.ToString(); + } + } + public static string GetCommandUsage(int width = 120) + { + var parser = new Parser(with => with.HelpWriter = null); + var result = parser.ParseArguments(new[] { "--help" }); + return HelpText.AutoBuild(result, h => + { + h.AdditionalNewLineAfterOption = false; + return h; + }, width); + } + } + + public class ParseableCommandMeta : CommandMeta where T : class + { + protected T ParseArguments(string args) + { + var res = Parser.Default.ParseArguments(args.TokenizeArguments()); + T options = null; + res.WithParsed(o => { options = o; }); + return options; + } + } + + public class ParseableCommand : ParseableCommandMeta, ICommand where T : class + { + public Func Action { get; set; } + + public Task ExecuteCommand(string args) + { + var options = ParseArguments(args); + return options != null ? Action?.Invoke(options) : Task.CompletedTask; + } + } + + public class ParseableCancellableCommand : ParseableCommandMeta, ICancellableCommand where T : class + { + public Func Action { get; set; } + + public Task ExecuteCommand(string args, CancellationToken token) + { + return Action?.Invoke(ParseArguments(args), token); + } + } + + public class CliCommands + { + public IDictionary Commands { get; } = new Dictionary(); + public IDictionary CommandAliases { get; } = new Dictionary(); + + public static bool ParseBoolOption(string text, out bool value) + { + if (string.Compare(text, "on", StringComparison.InvariantCultureIgnoreCase) == 0) + { + value = true; + return true; + } + if (string.Compare(text, "off", StringComparison.InvariantCultureIgnoreCase) == 0) + { + value = false; + return true; + } + + value = false; + return false; + } + + } + + public sealed class MainLoop + { + private readonly CommandMeta _exitCommand; + private readonly CommandMeta _clearCommand; + private readonly CommandMeta _quitCommand; + + public MainLoop() + { + _exitCommand = new SimpleCommand + { + Order = 1000, + Description = "Exit", + Action = (args) => + { + if (StateContext.BackStateCommands != null) + { + var oldContext = StateContext; + StateContext = oldContext.BackStateCommands; + oldContext.Dispose(); + } + + return Task.FromResult(true); + } + }; + + _clearCommand = new SimpleCommand + { + Order = 1001, + Description = "Clears the screen", + Action = args => + { + Console.Clear(); + return Task.FromResult(true); + } + }; + + _quitCommand = new SimpleCommand + { + Order = 1002, + Description = "Quit", + Action = (args) => + { + Finished = true; + StateContext = null; + Environment.Exit(0); + return Task.FromResult(true); + } + }; + } + + public StateCommands StateContext { get; set; } + public bool Finished { get; set; } + public Queue CommandQueue { get; } = new Queue(); + + public async Task Run(InputManager inputManager) + { + CommandMeta runningCommand = null; + CancellationTokenSource tokenSource = null; + + inputManager.CancelKeyPress += (sender, e) => + { + e.Cancel = false; + if (runningCommand != null) + { + if (runningCommand is ICancellableCommand && tokenSource != null) + { + tokenSource.Cancel(); + } + else + { + e.Cancel = true; + } + } + }; + while (!Finished) + { + if (StateContext == null) break; + if (StateContext.NextStateCommands != null) + { + if (!ReferenceEquals(StateContext, StateContext.NextStateCommands)) + { + var oldContext = StateContext; + StateContext = oldContext.NextStateCommands; + oldContext.NextStateCommands = null; + var contexts = StateContext; + while (contexts != null) + { + if (ReferenceEquals(contexts, oldContext)) + { + break; + } + + contexts = contexts.BackStateCommands; + } + + if (contexts == null) + { + oldContext.Dispose(); + } + } + else + { + StateContext.NextStateCommands = null; + } + + inputManager.ClearHistory(); + } + + string command; + if (CommandQueue.Count > 0) + { + command = CommandQueue.Dequeue(); + } + else + { + Console.Write(StateContext.GetPrompt() + "> "); + try + { + command = await inputManager.ReadLine(new ReadLineParameters + { + IsHistory = true + }); + } + catch (KeyboardInterrupt) + { + command = ""; + } + } + + if (string.IsNullOrEmpty(command)) continue; + + command = command.Trim(); + var parameter = ""; + var pos = command.IndexOf(' '); + if (pos > 1) + { + parameter = command.Substring(pos + 1).Trim(); + command = command.Substring(0, pos).Trim(); + } + + command = command.ToLowerInvariant(); + switch (command) + { + case "exit": + runningCommand = _exitCommand; + break; + case "clear": + case "c": + runningCommand = _clearCommand; + break; + case "quit": + case "q": + runningCommand = _quitCommand; + break; + default: + if (StateContext.CommandAliases.TryGetValue(command, out var fullCommand)) + { + command = fullCommand; + } + + StateContext.Commands.TryGetValue(command, out runningCommand); + break; + } + + if (runningCommand != null) + { + try + { + if (runningCommand is ICancellableCommand cc) + { + tokenSource = new CancellationTokenSource(); + await cc.ExecuteCommand(parameter, tokenSource.Token); + } + else if (runningCommand is ICommand c) + { + await c.ExecuteCommand(parameter); + } + else + { + Console.WriteLine("Unsupported command type"); + } + } + catch (Exception e) + { + if (!await StateContext.ProcessException(e)) + { + Console.WriteLine("Error: " + e.Message); + } + } + finally + { + runningCommand = null; + tokenSource?.Dispose(); + tokenSource = null; + } + } + else + { + if (command != "?") + { + Console.WriteLine($"Invalid command: {command}"); + } + + var tab = new Tabulate(3); + tab.AddHeader("Command", "Alias", "Description"); + foreach (var c in StateContext.Commands + .OrderBy(x => x.Value.Order)) + { + var alias = StateContext.CommandAliases + .Where(x => x.Value == c.Key) + .Select(x => x.Key) + .FirstOrDefault(); + tab.AddRow(c.Key, alias ?? "", c.Value.Description); + } + + if (StateContext.BackStateCommands != null) + { + tab.AddRow("exit", "", _exitCommand.Description); + } + + tab.AddRow("clear", "c", _clearCommand.Description); + tab.AddRow("quit", "q", _quitCommand.Description); + + tab.DumpRowNo = false; + tab.LeftPadding = 1; + tab.MaxColumnWidth = 60; + tab.Dump(); + } + + Console.WriteLine(); + } + } + + } + + public abstract class StateCommands : CliCommands, IDisposable + { + public abstract string GetPrompt(); + + public virtual Task ProcessException(Exception e) + { + return Task.FromResult(false); + } + + public StateCommands NextStateCommands { get; set; } + + public StateCommands BackStateCommands { get; set; } + + protected virtual void Dispose(bool disposing) + { + if (disposing) + { + NextStateCommands = null; + BackStateCommands = null; + } + } + + public void Dispose() + { + Dispose(true); + GC.SuppressFinalize(this); + } + } +} diff --git a/KeeperSdk/utils/ConsoleAuthUi.cs b/Cli/ConsoleAuthUi.cs similarity index 68% rename from KeeperSdk/utils/ConsoleAuthUi.cs rename to Cli/ConsoleAuthUi.cs index 41d398e..0ddb7c5 100644 --- a/KeeperSdk/utils/ConsoleAuthUi.cs +++ b/Cli/ConsoleAuthUi.cs @@ -3,12 +3,19 @@ using System.Linq; using System.Threading; using System.Threading.Tasks; +using KeeperSecurity.Authentication; +using KeeperSecurity.Authentication.Async; using KeeperSecurity.Utils; -namespace KeeperSecurity.Authentication.Async +#if NET472_OR_GREATER +using System.Windows; +using System.Text; +#endif + +namespace Cli.Async { /// - public class ConsoleAuthUi : IAuthUI, IAuthInfoUI, IHttpProxyCredentialUi + public class ConsoleAuthUi : IAuthUI, IAuthInfoUI, IAuthSsoUI { protected InputManager InputManager { get; } @@ -63,56 +70,6 @@ public virtual async Task WaitForUserPassword(IPasswordInfo info, Cancella return true; } - private static string DurationToText(TwoFactorDuration duration) - { - switch (duration) - { - case TwoFactorDuration.EveryLogin: - return "never"; - case TwoFactorDuration.Forever: - return "forever"; - default: - return $"{(int) duration} days"; - } - } - - private static bool TryParseTextToDuration(string text, out TwoFactorDuration duration) - { - text = text.Trim().ToLowerInvariant(); - switch (text) - { - case "never": - duration = TwoFactorDuration.EveryLogin; - return true; - case "forever": - duration = TwoFactorDuration.Forever; - return true; - default: - var idx = text.IndexOf(' '); - if (idx > 0) - { - text = text.Substring(0, idx); - } - - if (int.TryParse(text, out var days)) - { - foreach (var d in Enum.GetValues(typeof(TwoFactorDuration)).OfType()) - { - if ((int) d == days) - { - duration = d; - return true; - } - } - } - - break; - } - - duration = TwoFactorDuration.EveryLogin; - return false; - } - public virtual Task WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, CancellationToken token) { var twoFactorTask = new TaskCompletionSource(); @@ -165,7 +122,7 @@ public virtual Task WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, var dur = Enum .GetValues(typeof(TwoFactorDuration)) .OfType() - .Select(x => $"\"{DurationToText(x)}\"") + .Select(x => $"\"{AuthUIExtensions.DurationToText(x)}\"") .ToArray(); Console.WriteLine("Available durations are: " + string.Join(", ", dur)); @@ -177,7 +134,7 @@ public virtual Task WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, { if (codeChannel != null) { - Console.Write($"[{codeChannel.ChannelName ?? ""}] ({DurationToText(codeChannel.Duration)})"); + Console.Write($"[{codeChannel.ChannelName ?? ""}] ({AuthUIExtensions.DurationToText(codeChannel.Duration)})"); } Console.Write(" > "); @@ -211,7 +168,7 @@ public virtual Task WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, if (code.StartsWith("2fa=")) { - if (TryParseTextToDuration(code.Substring(4), out var duration)) + if (AuthUIExtensions.TryParseTextToDuration(code.Substring(4), out var duration)) { if (codeChannel != null) { @@ -226,8 +183,14 @@ public virtual Task WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, { if (pushChannelInfo.ContainsKey(action)) { - - await pushChannelInfo[action].InvokeTwoFactorPushAction(action); + try + { + await pushChannelInfo[action].InvokeTwoFactorPushAction(action); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } } else { @@ -308,7 +271,7 @@ public virtual Task WaitForDeviceApproval(IDeviceApprovalChannelInfo[] cha var dur = Enum .GetValues(typeof(TwoFactorDuration)) .OfType() - .Select(x => $"\"{DurationToText(x)}\"") + .Select(x => $"\"{AuthUIExtensions.DurationToText(x)}\"") .ToArray(); Console.WriteLine("Available durations are: " + string.Join(", ", dur)); @@ -318,7 +281,7 @@ public virtual Task WaitForDeviceApproval(IDeviceApprovalChannelInfo[] cha while (true) { - Console.Write($"({DurationToText(duration)}) > "); + Console.Write($"({AuthUIExtensions.DurationToText(duration)}) > "); var answer = await InputManager.ReadLine(); if (string.IsNullOrEmpty(answer)) { @@ -335,7 +298,7 @@ public virtual Task WaitForDeviceApproval(IDeviceApprovalChannelInfo[] cha Task action = null; if (answer.StartsWith($"{twoFactorDurationPrefix}=", StringComparison.CurrentCultureIgnoreCase)) { - TryParseTextToDuration(answer.Substring(twoFactorDurationPrefix.Length + 1), out duration); + AuthUIExtensions.TryParseTextToDuration(answer.Substring(twoFactorDurationPrefix.Length + 1), out duration); } else if (answer.StartsWith("email_", StringComparison.InvariantCultureIgnoreCase)) { @@ -424,28 +387,124 @@ public virtual Task WaitForDeviceApproval(IDeviceApprovalChannelInfo[] cha return deviceApprovalTask.Task; } + public Task WaitForSsoToken(ISsoTokenActionInfo actionInfo, CancellationToken token) + { + Console.WriteLine($"Complete {(actionInfo.IsCloudSso ? "Cloud" : "OnSite")} SSO login"); + Console.WriteLine($"\nLogin Url:\n\n{actionInfo.SsoLoginUrl}\n"); + var ts = new TaskCompletionSource(); + _ = Task.Run(async () => + { + Task readTask = null; + var registration = token.Register(() => + { + ts.SetCanceled(); + InputManager.InterruptReadTask(readTask); + }); + try + { + while (!ts.Task.IsCompleted) + { +#if NET472_OR_GREATER + Console.WriteLine("Type \"clipboard\" to get token from the clipboard or \"cancel\""); +#else + Console.WriteLine("Paste SSO token or \"cancel\""); +#endif + Console.Write("> "); + readTask = InputManager.ReadLine(); + var answer = await readTask; + switch (answer.ToLowerInvariant()) + { +#if NET472_OR_GREATER + case "clipboard": + var ssoToken = ""; + var thread = new Thread(() => { ssoToken = Clipboard.GetText(); }); + thread.SetApartmentState(ApartmentState.STA); + thread.Start(); + thread.Join(); + if (string.IsNullOrEmpty(ssoToken)) + { + Console.WriteLine("Clipboard is empty"); + } + else + { + Console.WriteLine($"Token:\n{ssoToken}\n\nType \"yes\" to accept this token to discard"); + Console.Write("> "); + answer = await InputManager.ReadLine(); + if (answer == "yes") + { + await actionInfo.InvokeSsoTokenAction(ssoToken); + } + } + break; +#endif + case "cancel": + ts.TrySetResult(false); + break; + } + } + } + finally + { + registration.Dispose(); + } + }); + return ts.Task; + } - public virtual Task WaitForHttpProxyCredentials(IHttpProxyInfo proxyInfo) + public void SsoLogoutUrl(string url) { - var proxyTask = new TaskCompletionSource(); - Task.Run(async () => + Console.WriteLine($"\nSSO Logout Url:\n\n{url}\n"); + } + + public Task WaitForDataKey(IDataKeyChannelInfo[] channels, CancellationToken token) + { + var taskSource = new TaskCompletionSource(); + + _ = Task.Run(async () => { - Console.WriteLine("\nProxy Authentication\n"); - Console.Write("Proxy Username: "); - var username = await InputManager.ReadLine(); - if (string.IsNullOrEmpty(username)) proxyTask.TrySetResult(false); + var actions = channels + .Select(x => x.Channel.SsoDataKeyShareChannelText()) + .Where(x => !string.IsNullOrEmpty(x)) + .ToArray(); - Console.Write("Proxy Password: "); - var password = await InputManager.ReadLine(new ReadLineParameters + Console.WriteLine("\nRequest Data Key\n"); + Console.WriteLine($"{string.Join("\n", actions.Select(x => $"\"{x}\""))}"); + Console.WriteLine("\"cancel\" to stop waiting."); + while (true) { - IsSecured = true - }); - if (string.IsNullOrEmpty(username)) proxyTask.TrySetResult(false); - await proxyInfo.InvokeHttpProxyCredentialsDelegate.Invoke(username, password); - return proxyTask.TrySetResult(true); + Console.Write("> "); + var answer = await InputManager.ReadLine(); + if (token.IsCancellationRequested) break; + if (string.IsNullOrEmpty(answer)) + { + continue; + } + + if (string.Compare("cancel", answer, StringComparison.InvariantCultureIgnoreCase) == 0) + { + taskSource.TrySetResult(false); + break; + } + + if (token.IsCancellationRequested) + { + break; + } + + var action = channels + .FirstOrDefault(x => x.Channel.SsoDataKeyShareChannelText() == answer); + if (action != null) + { + await action.InvokeGetDataKeyAction.Invoke(); + } + else + { + Console.WriteLine($"Unsupported command {answer}"); + } + } }); - return proxyTask.Task; + return taskSource.Task; } public void RegionChanged(string newRegion) @@ -455,4 +514,40 @@ public void RegionChanged(string newRegion) Console.WriteLine(); } } + +#if NET472_OR_GREATER + class WinAuthUi : ConsoleAuthUi, IAuthSecurityKeyUI + { + public WinAuthUi(InputManager inputManager) : base(inputManager) + { + } + + public async Task AuthenticatePublicKeyRequest(PublicKeyCredentialRequestOptions request) + { + if (request == null || string.IsNullOrEmpty(request.challenge)) + { + throw new Exception("Security key challenge is empty. Try another 2FA method."); + } + var cancellationSource = new CancellationTokenSource(); + + + var webAuthnSignature = await WinWebAuthn.Authenticate.GetAssertion(WinWebAuthn.Authenticate.GetConsoleWindow(), request, cancellationSource.Token); + var signature = new KeeperWebAuthnSignature + { + id = webAuthnSignature.credentialId.Base64UrlEncode(), + rawId = webAuthnSignature.credentialId.Base64UrlEncode(), + response = new SignatureResponse + { + authenticatorData = webAuthnSignature.authenticatorData.Base64UrlEncode(), + clientDataJSON = webAuthnSignature.clientData.Base64UrlEncode(), + signature = webAuthnSignature.signatureData.Base64UrlEncode(), + }, + type = "public-key", + clientExtensionResults = new ClientExtensionResults(), + }; + return Encoding.UTF8.GetString(JsonUtils.DumpJson(signature, false)); + } + } +#endif + } diff --git a/KeeperSdk/utils/InputManager.cs b/Cli/InputManager.cs similarity index 89% rename from KeeperSdk/utils/InputManager.cs rename to Cli/InputManager.cs index 805e250..38b9a2b 100644 --- a/KeeperSdk/utils/InputManager.cs +++ b/Cli/InputManager.cs @@ -4,7 +4,7 @@ using System.Text; using System.Threading.Tasks; -namespace KeeperSecurity.Utils +namespace Cli { /// public class ReadLineParameters @@ -14,8 +14,68 @@ public class ReadLineParameters public bool IsHistory { get; set; } } + public class KeyboardInterrupt : Exception { } + + /// + public interface IInputManager + { + Task ReadLine(ReadLineParameters parameters = null); + void InterruptReadTask(Task task); + } + + public class SimpleInputManager : IInputManager + { + private string ReadPassword() + { + var result = new StringBuilder(); + var done = false; + while (!done) + { + ConsoleKeyInfo key = Console.ReadKey(true); + switch (key.Key) + { + case ConsoleKey.Enter: + done = true; + Console.WriteLine(); + break; + case ConsoleKey.Backspace: + if (result.Length > 0) + { + result.Length--; + Console.Write("\b \b"); + } + break; + default: + result.Append(key.KeyChar); + Console.Write('*'); + break; + } + } + return result.ToString(); + } + + public void InterruptReadTask(Task task) + { + Console.WriteLine("Press "); + } + + public Task ReadLine(ReadLineParameters parameters = null) + { + string input; + if (parameters?.IsSecured == true) + { + input = ReadPassword(); + } + else + { + input = Console.ReadLine(); + } + return Task.FromResult(input); + } + } + /// - public class InputManager + public class InputManager : IInputManager { private readonly StringBuilder _buffer = new StringBuilder(); private bool _isSecured; @@ -71,7 +131,7 @@ public void Run() } Console.WriteLine(); - Task.Run(() => { ts.TrySetResult(""); }); + Task.Run(() => { ts.TrySetException(new KeyboardInterrupt()); }); } else { @@ -281,7 +341,7 @@ public void Run() newBuffer = _history[_history.Count - _positionInHistory]; } } - else + else if (!string.IsNullOrEmpty(_savedBuffer)) { newBuffer = _savedBuffer; } @@ -443,15 +503,25 @@ public void ClearHistory() public void InterruptReadTask(Task task) { + TaskCompletionSource ts; lock (this) { if (_taskSource == null || task == null) return; if (ReferenceEquals(task, _taskSource.Task)) { - _taskSource.TrySetCanceled(); - _taskSource = null; + ts = _taskSource; + } + else + { + return; } } + + ts.TrySetCanceled(); + if (ReferenceEquals(task, _taskSource.Task)) + { + _taskSource = null; + } } public Task ReadLine(ReadLineParameters parameters = null) diff --git a/Cli/Tabulate.cs b/Cli/Tabulate.cs new file mode 100644 index 0000000..22ebb02 --- /dev/null +++ b/Cli/Tabulate.cs @@ -0,0 +1,269 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace Cli +{ + /// + public class Tabulate + { + private readonly int _columns; + private readonly bool[] _rightAlignColumn; + private readonly int[] _maxChars; + private readonly List _data = new List(); + + public Tabulate(int columns) + { + _columns = columns; + _rightAlignColumn = Enumerable.Repeat(false, columns).ToArray(); + _maxChars = Enumerable.Repeat(0, columns).ToArray(); + } + + private string[] _header; + + public void AddHeader(params string[] header) + { + _header = header.Take(_columns).ToArray(); + } + + private static bool IsNumber(object value) + { + return value is sbyte + || value is byte + || value is short + || value is ushort + || value is int + || value is uint + || value is long + || value is ulong + || value is float + || value is double + || value is decimal; + } + + private static bool IsDecimal(object value) + { + return value is float + || value is double + || value is decimal; + } + + private static string ValueToString(object o) + { + if (o == null) { + return ""; + } + else if (o is bool b) + { + return b ? "X" : "-"; + } + else if (o is DateTimeOffset dt) + { + return dt.ToString("g"); + } + else if (IsNumber(o)) { + if (IsDecimal(o)) + { + return $"{o:0.00}"; + } + return o.ToString(); + } + else + { + return o.ToString(); + } + } + + public void AddRow(params object[] fields) + { + var row = fields.Select(x => + { + if (x is Array a) + { + if (a.Length == 0) { + return ""; + } + if (a.Length == 1) { + return ValueToString(a.GetValue(0)); + } + var arr = new string[a.Length]; + for (var i = 0; i < a.Length; i++) + { + arr[i] = ValueToString(a.GetValue(i)); + } + return (object) arr; + } + else + { + return ValueToString(x); + } + }).ToArray(); + _data.Add(row); + } + + public void SetColumnRightAlign(int colNo, bool value) + { + if (colNo >= 0 && colNo < _columns) + { + _rightAlignColumn[colNo] = value; + } + } + + private static string GetColumnValue(object[] row, int colNo) + { + if (colNo >= 0 && colNo < row.Length) + { + var v1 = row[colNo]; + if (v1 is string) + { + return (string) v1; + } + else if (v1 is string[] a) + { + if (a.Length > 0) + { + return (a[0] ?? "").ToString(); + } + } + } + return ""; + } + + public void Sort(int colNo) + { + if (_data.Count <= 1) return; + + var isNum = _rightAlignColumn[colNo]; + _data.Sort((x, y) => + { + string xs = GetColumnValue(x, colNo); + string ys = GetColumnValue(y, colNo); + + if (!isNum) return string.Compare(xs, ys, StringComparison.InvariantCultureIgnoreCase); + var res = xs.Length.CompareTo(ys.Length); + return res != 0 ? res : string.Compare(xs, ys, StringComparison.Ordinal); + }); + } + + private const string RowSeparator = " "; + public bool DumpRowNo { get; set; } + public int LeftPadding { get; set; } + public int MaxColumnWidth { get; set; } = 60; + + public void Dump() + { + for (var i = 0; i < _maxChars.Length; i++) + { + var len = 0; + if (_header != null) + { + if (i < _header.Length) + { + len = _header[i]?.Length ?? 0; + } + } + + foreach (var row in _data.Where(row => i < row.Length)) + { + var colLen = 0; + if (row[i] is string[] ars) + { + colLen = ars.Where(x => !string.IsNullOrEmpty(x)).Aggregate(0, (cur, x) => Math.Max(cur, x.Length)); + } + else if (row[i] is string s) + { + colLen = s.Length; + } + len = Math.Max(len, colLen); + if (len > MaxColumnWidth) + { + len = MaxColumnWidth; + } + } + + _maxChars[i] = len; + } + + var rowNoLen = DumpRowNo ? _data.Count.ToString().Length + 1 : 0; + if (rowNoLen > 0 && rowNoLen < 3) + { + rowNoLen = 3; + } + + if (_header != null) + { + var r = (DumpRowNo ? new[] {"#".PadLeft(rowNoLen)} : Enumerable.Empty()) + .Concat(_header.Zip(_maxChars.Zip(_rightAlignColumn, (m, b) => b ? -m : m), + (h, m) => m < 0 ? h.PadLeft(-m) : h.PadRight(m))); + if (LeftPadding > 0) + { + Console.Write("".PadLeft(LeftPadding)); + } + + Console.WriteLine(string.Join(RowSeparator, r)); + + r = (DumpRowNo ? (new[] {"".PadLeft(rowNoLen, '-')}) : Enumerable.Empty()) + .Concat(_maxChars.Select(m => "".PadRight(m, '-'))); + if (LeftPadding > 0) + { + Console.Write("".PadLeft(LeftPadding)); + } + + Console.WriteLine(string.Join(RowSeparator, r)); + } + + var rowNo = 1; + foreach (var row in _data) + { + var subRows = 1; + foreach (var col in row) + { + if (col is string[] ars) + { + subRows = Math.Max(subRows, ars.Length); + } + } + for (var i = 0; i < subRows; i++) + { + var r = ((DumpRowNo) ? (new[] { (i == 0 ? rowNo.ToString() : "").PadLeft(rowNoLen) }) : Enumerable.Empty()) + .Concat(row.Zip(_maxChars.Zip(_rightAlignColumn, (m, b) => b ? -m : m), (cell, m) => + { + string value = ""; + if (cell is string s) { + if (i == 0) { + value = s; + } + } + else if (cell is string[] ars) { + if (i < ars.Length) + { + value = ars[i]; + } + } + + value = value.Replace("\n", " ").Replace("\r", ""); + if (value.Length > MaxColumnWidth) + { + return value.Substring(0, MaxColumnWidth - 3) + "..."; + } + + return m < 0 ? value.PadLeft(-m) : value.PadRight(m); + })); + + if (LeftPadding > 0) + { + Console.Write("".PadLeft(LeftPadding)); + } + + var rowLine = string.Join(RowSeparator, r); + Console.WriteLine(rowLine); + } + + + rowNo++; + } + + Console.WriteLine(); + } + } +} \ No newline at end of file diff --git a/Cli/Utils.cs b/Cli/Utils.cs new file mode 100644 index 0000000..2a3397c --- /dev/null +++ b/Cli/Utils.cs @@ -0,0 +1,589 @@ +using KeeperSecurity.Authentication; +using KeeperSecurity.Authentication.Sync; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Threading.Tasks; + +#if NET472_OR_GREATER +using System.Text; +using System.Threading; +using KeeperSecurity.Utils; +#endif + +namespace Cli +{ + public static class Utils + { + public static void Welcome() + { + string version = null; + string product = null; + try + { + var ver = FileVersionInfo.GetVersionInfo(Process.GetCurrentProcess().MainModule.FileName); + if (ver != null && ver.ProductMajorPart > 0) + { + version = $"{ver.ProductMajorPart}.{ver.ProductMinorPart}.{ver.ProductBuildPart}"; + product = ver.ProductName; + } + } + catch { } + + if (string.IsNullOrEmpty(version)) { + try + { + version = Assembly.GetEntryAssembly()?.GetCustomAttribute()?.InformationalVersion; + product = Assembly.GetEntryAssembly()?.GetCustomAttribute()?.Product; + } + catch { } + } + if (!string.IsNullOrEmpty(version)) + { + version = "v" + version; + } + + // https://stackoverflow.com/questions/30418886/how-and-why-does-quickedit-mode-in-command-prompt-freeze-applications + // https://stackoverflow.com/questions/13656846/how-to-programmatic-disable-c-sharp-console-applications-quick-edit-mode + // Application freezes on start up eventually. + Console.WriteLine(); + Console.WriteLine(@" _ __ "); + Console.WriteLine(@"| |/ /___ ___ _ __ ___ _ _ "); + Console.WriteLine(@"| ' (); + if (passwords != null) + { + passwds.AddRange(passwords); + } + + await auth.Login(email, passwds.ToArray()); + if (!auth.IsCompleted) + { + await LoginFlow(auth, inputManager); + } + if (auth.Step is ErrorStep es) + { + throw new KeeperApiException(es.Code, es.Message); + } + } + + public static async Task LoginToSsoProvider(AuthSync auth, InputManager inputManager, string providerName = null) + { + auth.Cancel(); + var provider = providerName; + if (string.IsNullOrEmpty(provider)) + { + Console.Write("SSO provider: "); + provider = await inputManager.ReadLine(new ReadLineParameters + { + IsHistory = false + }); + if (string.IsNullOrEmpty(provider)) + { + return; + } + } + + await auth.LoginSso(provider); + + await LoginFlow(auth, inputManager); + } + + private static async Task LoginFlow(AuthSync auth, IInputManager inputManager) + { + Task readTask = null; + string answer = null; +#if NET472_OR_GREATER + auth.UiCallback = new WindowsAuthSyncCallback(() => + { + if (readTask != null && !readTask.IsCompleted) + { + Console.WriteLine(); + inputManager.InterruptReadTask(readTask); + } + }); +#else + auth.UiCallback = new AuthSyncCallback(() => + { + if (readTask != null && !readTask.IsCompleted) + { + Console.WriteLine(); + inputManager.InterruptReadTask(readTask); + } + }); +#endif + + while (!auth.IsCompleted) + { + switch (auth.Step) + { + case DeviceApprovalStep das: + Console.WriteLine("\nDevice Approval\n"); + Console.WriteLine("\"email_send\" to resend email"); + Console.WriteLine("\"email_code=\" to validate verification code sent in email"); + Console.WriteLine("\"keeper_push\" to send Keeper Push notification"); + Console.WriteLine("\"2fa_send\" to send 2FA code"); + Console.WriteLine("\"2fa_code=\" to validate a code provided by 2FA application"); + Console.WriteLine("\"resume\" to resume\n\"cancel\" to cancel\n"); + + while (true) + { + Console.Write("Device Approval > "); + readTask = inputManager.ReadLine(); + try + { + answer = await readTask; + } + catch (TaskCanceledException) + { + break; + } + if (string.Compare(answer, "cancel", StringComparison.InvariantCultureIgnoreCase) == 0) + { + auth.Cancel(); + return; + } + if (string.Compare(answer, "resume", StringComparison.InvariantCultureIgnoreCase) == 0) + { + await das.Resume(); + break; + } + try + { + if (answer == "email_send") + { + await das.SendPush(DeviceApprovalChannel.Email); + } + else if (answer == "keeper_push") + { + await das.SendPush(DeviceApprovalChannel.KeeperPush); + } + else if (answer == "2fa_send") + { + await das.SendPush(DeviceApprovalChannel.TwoFactorAuth); + } + else if (answer.StartsWith("email_code=")) + { + var code = answer.Substring("email_code=".Length); + await das.SendCode(DeviceApprovalChannel.Email, code); + break; + } + else if (answer.StartsWith("2fa_code=")) + { + var code = answer.Substring("2fa_code=".Length); + await das.SendCode(DeviceApprovalChannel.TwoFactorAuth, code); + break; + } + } + catch (KeeperAuthFailed) + { + Console.WriteLine("\nCode is invalid or expired."); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + break; + + case TwoFactorStep tfs: + const string twoFactorDurationPrefix = "2fa"; + Console.WriteLine($"\nTo change default 2FA token persistence use command {twoFactorDurationPrefix}="); + var dur = Enum + .GetValues(typeof(TwoFactorDuration)) + .OfType() + .Select(x => $"{AuthUIExtensions.DurationToText(x)}") + .ToArray(); + Console.WriteLine("Available durations are: " + string.Join(", ", dur.Select(x => $"\"{x}\""))); + if (tfs.Channels.Length > 1) + { + Console.WriteLine("'NO' or \"channel=NO\" to change 2FA channel"); + } + Console.WriteLine("\"resume\" to Resume\n\"cancel\" to Cancel"); + + + Console.WriteLine("\nTwo Factor Authentication"); + for (var i = 0; i < tfs.Channels.Length; i++) + { + var phoneNumber = tfs.GetPhoneNumber(tfs.Channels[i]); + if (!string.IsNullOrEmpty(phoneNumber)) + { + phoneNumber = $"({phoneNumber})"; + } + var name = ""; + Console.WriteLine($" {i + 1}. [{AuthUIExtensions.GetTwoFactorChannelText(tfs.Channels[i])}]: {name} {phoneNumber}"); + var pushes = tfs.GetChannelPushActions(tfs.Channels[i]); + if (pushes.Length > 0) + { + var push_text = pushes.Select(x => $"\"{AuthUIExtensions.GetPushActionText(x)}\"").ToArray(); + + Console.WriteLine($" {string.Join(", ", push_text)}"); + } + } + + while (true) + { + var pushActions = tfs.GetChannelPushActions(tfs.DefaultChannel).Select(x => AuthUIExtensions.GetPushActionText(x)).ToArray(); + Console.Write($"[{AuthUIExtensions.GetTwoFactorChannelText(tfs.DefaultChannel)}] ({AuthUIExtensions.DurationToText(tfs.Duration)})"); + Console.Write("> "); + readTask = inputManager.ReadLine(); + try + { + answer = await readTask; + } + catch (TaskCanceledException) + { + break; + } + if (string.IsNullOrEmpty(answer)) + { + continue; + } + if (string.Compare(answer, "cancel", StringComparison.InvariantCultureIgnoreCase) == 0) + { + auth.Cancel(); + return; + } + if (string.Compare(answer, "resume", StringComparison.InvariantCultureIgnoreCase) == 0) + { + await tfs.Resume(); + break; + } + + try + { + if (int.TryParse(answer, out var channelNo)) + { + if (channelNo > 0 && channelNo <= tfs.Channels.Length) + { + answer = $"channel={channelNo}"; + } + } + else if (dur.Any(x => answer == x)) + { + answer = $"{twoFactorDurationPrefix}={answer}"; + } + if (answer.StartsWith("channel=")) + { + var no = answer.Substring("channel=".Length); + if (int.TryParse(no, out var n)) + { + if (n > 0 && n <= tfs.Channels.Length) + { + tfs.DefaultChannel = tfs.Channels[n - 1]; + } + else + { + Console.WriteLine($"Incorrect 2FA channel index: {n}. Valid: 1-{tfs.Channels.Length}"); + } + } + else + { + Console.WriteLine($"2FA channel index {no}. Valid: 1-{tfs.Channels.Length}"); + } + } + else if (answer.StartsWith($"{twoFactorDurationPrefix}=")) + { + var text = answer.Substring(twoFactorDurationPrefix.Length + 1); + if (AuthUIExtensions.TryParseTextToDuration(text, out var duration)) + { + tfs.Duration = duration; + } + else + { + Console.WriteLine($"Invalid 2FA token duration: {text}"); + } + } + else if (pushActions.Any(x => x == answer)) + { + if (AuthUIExtensions.TryParsePushAction(answer, out var push)) + { + await tfs.SendPush(push); + break; + } + } + else + { + await tfs.SendCode(tfs.DefaultChannel, answer); + break; + } + } + catch (KeeperAuthFailed) + { + Console.WriteLine("\nCode is invalid or expired."); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + break; + + case PasswordStep ps: + while (true) + { + readTask = null; + Console.Write("Enter Master Password: "); + var password = await inputManager.ReadLine(new ReadLineParameters + { + IsSecured = true + }); + if (string.IsNullOrEmpty(password)) + { + auth.Cancel(); + return; + } + try + { + await ps.VerifyPassword(password); + break; + } + catch (KeeperAuthFailed) + { + Console.WriteLine("Invalid password."); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + break; + + case SsoTokenStep sts: + Console.WriteLine($"Complete {(sts.IsCloudSso ? "Cloud" : "OnSite")} SSO login"); + Console.WriteLine($"\nSSO Login Url:\n{sts.SsoLoginUrl}\n"); + Console.WriteLine("Navigate to SSO Login URL with your browser and complete login."); + Console.WriteLine("Copy a returned SSO token into clipboard."); + Console.WriteLine("Paste that token into the application"); + Console.WriteLine("NOTE: To copy SSO Token please click \"Copy login token\" button on \"SSO Connect\" page."); + Console.WriteLine(); + Console.WriteLine("'a' or \"password\" to login with master password"); +#if NET472_OR_GREATER + Console.WriteLine("'o' or \"open\" to default browser"); + Console.WriteLine("'c' or \"copy\" SSO Login URL to clipboard"); + Console.WriteLine("'p' or \"paste\" SSO Token from clipboard"); +#endif + + Console.WriteLine("\"cancel\" to cancel login"); + + while (true) + { + Console.Write("SSO login > "); + readTask = inputManager.ReadLine(); + try + { + answer = await readTask; + } + catch (TaskCanceledException) + { + break; + } + if (string.Compare(answer, "cancel", StringComparison.InvariantCultureIgnoreCase) == 0) + { + auth.Cancel(); + return; + } + if (answer == "a") + { + answer = "password"; + } + if (string.Compare(answer, "password", StringComparison.InvariantCultureIgnoreCase) == 0) + { + await sts.LoginWithPassword(); + break; + } +#if NET472_OR_GREATER + if (answer == "o") + { + answer = "open"; + } + if (answer == "p") + { + answer = "paste"; + } + if (answer == "c") + { + answer = "copy"; + } + + if (string.Compare(answer, "open", StringComparison.InvariantCultureIgnoreCase) == 0) + { + try + { + Process.Start(sts.SsoLoginUrl); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + continue; + } + if (string.Compare(answer, "copy", StringComparison.InvariantCultureIgnoreCase) == 0) + { + var thread = new Thread(() => { System.Windows.Clipboard.SetText(sts.SsoLoginUrl); }); + thread.SetApartmentState(ApartmentState.STA); + thread.Start(); + thread.Join(); + continue; + } + if (string.Compare(answer, "paste", StringComparison.InvariantCultureIgnoreCase) == 0) + { + var thread = new Thread(() => { answer = System.Windows.Clipboard.GetText(); }); + thread.SetApartmentState(ApartmentState.STA); + thread.Start(); + thread.Join(); + } +#endif + try + { + await sts.SetSsoToken(answer); + break; + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + break; + + case SsoDataKeyStep sdks: + var actions = sdks.Channels + .Select(x => x.SsoDataKeyShareChannelText()) + .Where(x => !string.IsNullOrEmpty(x)) + .ToArray(); + + Console.WriteLine("\nRequest Data Key\n"); + Console.WriteLine($"{string.Join("\n", actions.Select(x => $"\"{x}\""))}"); + Console.WriteLine("\"resume\" to resume\n\"cancel\" to cancel login."); + while (true) + { + Console.Write("SSO Data Key > "); + readTask = inputManager.ReadLine(); + try + { + answer = await readTask; + } + catch (TaskCanceledException) + { + break; + } + if (string.Compare(answer, "cancel", StringComparison.InvariantCultureIgnoreCase) == 0) + { + auth.Cancel(); + return; + } + if (string.Compare(answer, "resume", StringComparison.InvariantCultureIgnoreCase) == 0) + { + await sdks.Resume(); + break; + } + if (actions.Any(x => x == answer)) + { + if (AuthUIExtensions.TryParseDataKeyShareChannel(answer, out var channel)) + { + try + { + await sdks.RequestDataKey(channel); + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + else + { + Console.WriteLine($"Unsupported approval channel: {answer}"); + } + } + else + { + Console.WriteLine($"Unsupported command: {answer}"); + } + } + break; + } + } + auth.UiCallback = null; + } + } + + public class AuthSyncCallback : IAuthSyncCallback + { + private readonly Action _onNextStep; + public AuthSyncCallback(Action onNextStep) { + _onNextStep = onNextStep; + } + public void OnNextStep() + { + _onNextStep?.Invoke(); + } + } + +#if NET472_OR_GREATER + internal class WindowsAuthSyncCallback : AuthSyncCallback, IAuthSecurityKeyUI + { + public WindowsAuthSyncCallback(Action onNextStep) : base(onNextStep) + { + } + + public async Task AuthenticatePublicKeyRequest(PublicKeyCredentialRequestOptions request) + { + if (request == null || string.IsNullOrEmpty(request.challenge)) + { + throw new Exception("Security key challenge is empty. Try another 2FA method."); + } + var cancellationSource = new CancellationTokenSource(); + + var webAuthnSignature = await WinWebAuthn.Authenticate.GetAssertion(WinWebAuthn.Authenticate.GetConsoleWindow(), request, cancellationSource.Token); + var signature = new KeeperWebAuthnSignature + { + id = webAuthnSignature.credentialId.Base64UrlEncode(), + rawId = webAuthnSignature.credentialId.Base64UrlEncode(), + response = new SignatureResponse + { + authenticatorData = webAuthnSignature.authenticatorData.Base64UrlEncode(), + clientDataJSON = webAuthnSignature.clientData.Base64UrlEncode(), + signature = webAuthnSignature.signatureData.Base64UrlEncode(), + }, + type = "public-key", + clientExtensionResults = new ClientExtensionResults(), + }; + return Encoding.UTF8.GetString(JsonUtils.DumpJson(signature, false)); + } + } +#endif +} diff --git a/Commander/App.config b/Commander/App.config index 282fa31..60f11ba 100644 --- a/Commander/App.config +++ b/Commander/App.config @@ -1,13 +1,14 @@ - + - + - - - - - + + + + + + - + \ No newline at end of file diff --git a/Commander/Commander.csproj b/Commander/Commander.csproj index f2e0d52..9daac39 100644 --- a/Commander/Commander.csproj +++ b/Commander/Commander.csproj @@ -5,7 +5,7 @@ Debug AnyCPU {8CB5CA92-64AD-47E7-AE6A-AE71249755EF} - 7.3 + 7.1 Exe Commander Commander @@ -26,8 +26,8 @@ false false true - 0 - 1.0.0.%2a + 2 + 1.0.1.%2a false true @@ -54,27 +54,57 @@ false + + ..\packages\Portable.BouncyCastle.1.9.0\lib\net40\BouncyCastle.Crypto.dll + + + ..\packages\CommandLineParser.2.9.1\lib\net461\CommandLine.dll + + + ..\packages\Google.Protobuf.3.28.3\lib\net45\Google.Protobuf.dll + + + ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll + + + ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll + + + + ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll + + + ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + + + - + - - + + + + + + + + @@ -90,17 +120,14 @@ + + {413e9a7a-bbcb-415d-932a-7e628bb0d7c8} + Cli + {29b50177-f7b4-46f6-b3da-b9fef269eef2} KeeperSdk - - {912a6a55-c062-42ff-aafb-13b56f74b7e5} - WinWebAuthn - - - 2.8.0 - \ No newline at end of file diff --git a/Commander/CommanderExtensions.cs b/Commander/CommanderExtensions.cs index f0857b9..f93808b 100644 --- a/Commander/CommanderExtensions.cs +++ b/Commander/CommanderExtensions.cs @@ -1,5 +1,8 @@ -using System.Text; +using System.Linq; +using System.Text; using Authentication; +using KeeperSecurity.Utils; +using KeeperSecurity.Vault; namespace Commander { @@ -37,5 +40,104 @@ public static string DeviceStatusToString(this DeviceStatus status) } } + internal static PasswordGenerationOptions RestoreRules(string password) + { + var options = new PasswordGenerationOptions(); + if (!string.IsNullOrEmpty(password)) + { + options.Length = password.Length; + options.Upper = -1; + options.Lower = -1; + options.Digit = -1; + options.Special = -1; + foreach (var ch in password) + { + if (char.IsDigit(ch)) + { + options.Digit = (options.Digit >= 0 ? options.Digit : 0) + 1; + } + else if (char.IsLetter(ch)) + { + if (char.IsLower(ch)) + { + options.Lower = (options.Lower >= 0 ? options.Lower : 0) + 1; + } + else + { + options.Upper = (options.Upper >= 0 ? options.Upper : 0) + 1; + } + } + else + { + options.Special = (options.Special >= 0 ? options.Special : 0) + 1; + } + } + } + else + { + options.Length = 20; + options.Upper = 4; + options.Lower = 4; + options.Digit = 2; + options.Special = -1; + } + return options; + } + + public static bool RotateRecordPassword(this IVault vault, KeeperRecord record) + { + if (record == null) + { + return false; + } + PasswordGenerationOptions options = null; + if (record is PasswordRecord password) + { + options = RestoreRules(password.Password); + password.Password = CryptoUtils.GeneratePassword(options); + return true; + } + if (record is TypedRecord typed) + { + ITypedField passwordField = null; + if (!string.IsNullOrEmpty(typed.TypeName)) + { + if (vault.TryGetRecordTypeByName(typed.TypeName, out var recordType)) + { + var passwordFieldType = recordType.Fields.FirstOrDefault(x => x.FieldName == "password"); + if (passwordFieldType != null) + { + if (!typed.Fields.FindTypedField(passwordFieldType, out passwordField)) + { + passwordField = new TypedField(passwordFieldType.FieldName, passwordFieldType.FieldLabel); + typed.Fields.Add(passwordField); + } + if (passwordFieldType is RecordTypePasswordField rtpf) + { + options = rtpf.PasswordOptions; + } + } + } + } + if (passwordField == null) + { + typed.FindTypedField(new RecordTypeField("password"), out passwordField); + } + if (passwordField != null) + { + if (options == null) + { + if (passwordField.ObjectValue is string pwd) + { + options = RestoreRules(pwd); + } + } + passwordField.ObjectValue = CryptoUtils.GeneratePassword(options); + return true; + } + } + + return false; + } } } diff --git a/Commander/ConnectedCommands.cs b/Commander/ConnectedCommands.cs index c12cd10..713a412 100644 --- a/Commander/ConnectedCommands.cs +++ b/Commander/ConnectedCommands.cs @@ -1,151 +1,47 @@ using System; using System.Collections.Generic; -using System.Diagnostics; +using System.Globalization; using System.Linq; using System.Text; -using System.Text.RegularExpressions; using System.Threading.Tasks; using AccountSummary; using Authentication; using BreachWatch; +using Cli; using CommandLine; using Enterprise; using Google.Protobuf; using KeeperSecurity.Authentication; -using KeeperSecurity.Authentication.Async; using KeeperSecurity.Utils; using KeeperSecurity.Vault; namespace Commander { - public partial class ConnectedContext : StateContext + public partial class ConnectedContext : StateCommands { - private readonly VaultOnline _vault; - private readonly Auth _auth; - - private TeamInfo[] _teamCache; + private readonly VaultContext _vaultContext; + private readonly AuthCommon _auth; private AccountSummaryElements _accountSummary; - public ConnectedContext(Auth auth) + public ConnectedContext(AuthCommon auth) { _auth = auth; var storage = Program.CommanderStorage.GetKeeperStorage(auth.Username); - _vault = new VaultOnline(_auth, storage) + var vault = new VaultOnline(_auth, storage) { - VaultUi = new VaultUi(), + VaultUi = new VaultUi(), AutoSync = true }; + _vaultContext = new VaultContext(vault); + SubscribeToNotifications(); CheckIfEnterpriseAdmin(); lock (Commands) { - Commands.Add("list", - new ParsableCommand - { - Order = 10, - Description = "List folder content", - Action = ListCommand - }); - - Commands.Add("cd", - new SimpleCommand - { - Order = 11, - Description = "Change current folder", - Action = ChangeDirectoryCommand - }); - - Commands.Add("tree", - new ParsableCommand - { - Order = 12, - Description = "Display folder structure", - Action = TreeCommand - }); - - Commands.Add("get", - new SimpleCommand - { - Order = 13, - Description = "Display specified Keeper record/folder/team", - Action = GetCommand - }); - - Commands.Add("add-record", - new ParsableCommand - { - Order = 20, - Description = "Add record", - Action = AddRecordCommand - }); - - Commands.Add("update-record", - new ParsableCommand - { - Order = 21, - Description = "Update record", - Action = UpdateRecordCommand - }); - - Commands.Add("mkdir", - new ParsableCommand - { - Order = 22, - Description = "Make folder", - Action = MakeFolderCommand - }); - - Commands.Add("rmdir", - new ParsableCommand - { - Order = 22, - Description = "Remove folder", - Action = RemoveFolderCommand - }); - - Commands.Add("mv", - new ParsableCommand - { - Order = 23, - Description = "Move record or folder", - Action = MoveCommand - }); - - Commands.Add("rm", - new ParsableCommand - { - Order = 24, - Description = "Remove record(s)", - Action = RemoveRecordCommand - }); - - Commands.Add("sf-list", - new SimpleCommand - { - Order = 30, - Description = "List shared folders", - Action = ListSharedFoldersCommand - }); - - Commands.Add("sf-user", - new ParsableCommand - { - Order = 31, - Description = "Change shared folder user permissions", - Action = ShareFolderUserPermissionCommand - }); - - Commands.Add("sf-record", - new ParsableCommand - { - Order = 32, - Description = "Change shared folder record permissions", - Action = ShareFolderRecordPermissionCommand - }); - + _vaultContext.AppendVaultCommands(this); Commands.Add("devices", - new ParsableCommand + new ParseableCommand { Order = 50, Description = "Devices (other than current) commands", @@ -153,7 +49,7 @@ public ConnectedContext(Auth auth) }); Commands.Add("this-device", - new ParsableCommand + new ParseableCommand { Order = 51, Description = "Current device command", @@ -171,52 +67,23 @@ public ConnectedContext(Auth auth) }); } - Commands.Add("sync-down", - new ParsableCommand - { - Order = 100, - Description = "Download & decrypt data", - Action = async (options) => - { - if (options.Reset) - { - Console.WriteLine("Resetting offline storage."); - _vault.Storage.Clear(); - } - - var fullSync = _vault.Storage.Revision == 0; - Console.WriteLine("Syncing..."); - await _vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(0)); - - if (fullSync) - { - Console.WriteLine($"Decrypted {_vault.RecordCount} record(s)"); - } - } - }); - Commands.Add("logout", - new ParsableCommand + new ParseableCommand { Order = 200, Description = "Logout", Action = LogoutCommand, }); - CommandAliases.Add("ls", "list"); - CommandAliases.Add("d", "sync-down"); - CommandAliases.Add("add", "add-record"); - CommandAliases.Add("upd", "update-record"); } - Program.EnqueueCommand("sync-down"); + Program.GetMainLoop().CommandQueue.Enqueue("sync-down"); } - private string _currentFolder; - private bool DeviceApprovalRequestCallback(NotificationEvent evt) { - if (string.Compare(evt.Event, "device_approval_request", StringComparison.InvariantCultureIgnoreCase) != 0) return false; + if (string.Compare(evt.Event, "device_approval_request", StringComparison.InvariantCultureIgnoreCase) != + 0) return false; _accountSummary = null; var deviceToken = evt.EncryptedDeviceToken.Base64UrlDecode(); Console.WriteLine(!string.IsNullOrEmpty(evt.EncryptedDeviceToken) @@ -237,16 +104,6 @@ private void UnsubscribeFromNotifications() _auth.PushNotifications?.RemoveCallback(EnterpriseNotificationCallback); } - private async Task GetAvailableTeams() - { - if (_teamCache == null) - { - _teamCache = (await _vault.GetAvailableTeams()).ToArray(); - } - - return _teamCache; - } - private async Task LogoutCommand(LogoutOptions options) { UnsubscribeFromNotifications(); @@ -255,557 +112,48 @@ private async Task LogoutCommand(LogoutOptions options) await _auth.Logout(); } - NextState = new NotConnectedCliContext(false); - } - - private Task ListCommand(ListCommandOptions options) - { - FolderNode node = null; - if (!string.IsNullOrEmpty(_currentFolder)) - { - _vault.TryGetFolder(_currentFolder, out node); - } - - if (node == null) { - node = _vault.RootFolder; - } - - if (options.Details) - { - if (node.Subfolders.Count > 0) - { - var tab = new Tabulate(2) - { - DumpRowNo = true - }; - tab.AddHeader(new[] {"Folder UID", "Name"}); - foreach (var uid in node.Subfolders) - { - if (_vault.TryGetFolder(uid, out var f)) - { - tab.AddRow(new[] {f.FolderUid, f.Name}); - } - } - - tab.Sort(1); - tab.Dump(); - } - - if (node.Records.Count > 0) - { - var tab = new Tabulate(4) - { - DumpRowNo = true - }; - tab.AddHeader(new[] {"Record UID", "Title", "Login", "URL"}); - foreach (var uid in node.Records) - { - if (_vault.TryGetRecord(uid, out var r)) - { - tab.AddRow(new[] {r.Uid, r.Title, r.Login, r.Link}); - } - } - - tab.Sort(1); - tab.Dump(); - } - } - else - { - var names = new List(); - foreach (var uid in node.Subfolders) - { - if (_vault.TryGetFolder(uid, out var subNode)) - { - names.Add(subNode.Name + "/"); - } - } - names.Sort(StringComparer.InvariantCultureIgnoreCase); - - var len = names.Count; - foreach (var uid in node.Records) - { - if (_vault.TryGetRecord(uid, out var record)) - { - names.Add(string.IsNullOrEmpty(record.Title) ? record.Uid : record.Title); - } - } - if (names.Count <= 0) return Task.FromResult(true); - names.Sort(len, names.Count - len, StringComparer.InvariantCultureIgnoreCase); - - len = names.Select(x => x.Length).Max(); - if (len < 16) - { - len = 16; - } - - len += 2; - var columns = Console.BufferWidth / len; - if (columns < 1) - { - columns = 1; - } - - var columnWidth = Console.BufferWidth / columns; - var colNo = 0; - foreach (var t in names) - { - Console.Write(t.PadRight(columnWidth - 1)); - colNo++; - if (colNo < columns) continue; - Console.WriteLine(); - colNo = 0; - } - } - - return Task.FromResult(true); + NextStateCommands = new NotConnectedCliContext(false); } - public void PrintTree(FolderNode folder, string indent, bool last) - { - var isRoot = string.IsNullOrEmpty(indent); - Console.WriteLine(indent + (isRoot ? "" : "+-- ") + folder.Name); - indent += isRoot ? " " : (last ? " " : "| "); - for (var i = 0; i < folder.Subfolders.Count; i++) - { - if (_vault.TryGetFolder(folder.Subfolders[i], out var node)) - { - PrintTree(node, indent, i == folder.Subfolders.Count - 1); - } - } - } - - private Task GetCommand(string uid) - { - var tab = new Tabulate(3); - if (_vault.TryGetRecord(uid, out var record)) - { - tab.AddRow(new[] { "Record UID:", record.Uid }); - tab.AddRow(new[] { "Title:", record.Title }); - tab.AddRow(new[] { "Login:", record.Login }); - tab.AddRow(new[] { "Password:", record.Password }); - tab.AddRow(new[] { "Login URL:", record.Link }); - tab.AddRow(new[] { "Notes:", record.Notes }); - if (record.Custom != null && record.Custom.Count > 0) - { - tab.AddRow(new[] { "" }); - tab.AddRow(new[] { "Custom Fields:", "" }); - foreach (var c in record.Custom) - { - tab.AddRow(new[] { c.Name + ":", c.Value }); - } - } - if (record.ExtraFields != null) - { - var totps = record.ExtraFields - .Where(x => string.Equals(x.FieldType, "totp", StringComparison.InvariantCultureIgnoreCase) && x.Custom != null) - .Where(x => x.Custom.ContainsKey("data")) - .ToArray(); - foreach (var t in totps) - { - try - { - var url = t.Custom["data"] as string; - var tup = CryptoUtils.GetTotpCode(url); - tab.AddRow($"{t.FieldTitle}:", $"{tup.Item1} expires in {tup.Item3 - tup.Item2} sec."); - } - catch (Exception e) - { - Console.WriteLine(e.Message); - } - } - } - } - else if (_vault.TryGetSharedFolder(uid, out var sf)) - { - tab.AddRow(new[] { "Shared Folder UID:", sf.Uid }); - tab.AddRow(new[] { "Name:", sf.Name }); - tab.AddRow(new[] { "Default Manage Records:", sf.DefaultManageRecords.ToString() }); - tab.AddRow(new[] { "Default Manage Users:", sf.DefaultManageUsers.ToString() }); - tab.AddRow(new[] { "Default Can Edit:", sf.DefaultCanEdit.ToString() }); - tab.AddRow(new[] { "Default Can Share:", sf.DefaultCanShare.ToString() }); - if (sf.RecordPermissions.Count > 0) - { - tab.AddRow(new[] { "" }); - tab.AddRow(new[] { "Record Permissions:" }); - foreach (var r in sf.RecordPermissions) - { - tab.AddRow(new[] - { - r.RecordUid + ":", "Can Edit: " + r.CanEdit, - "Can Share: " + r.CanShare - }); - } - } - - var teamLookup = _vault.Teams.ToDictionary(t => t.TeamUid, t => t.Name); - if (sf.UsersPermissions.Count > 0) - { - tab.AddRow(new[] { "" }); - tab.AddRow(new[] { "User/Team Permissions:" }); - var sortedList = sf.UsersPermissions.ToList(); - sortedList.Sort((x, y) => - { - var res = x.UserType.CompareTo(y.UserType); - if (res == 0) - { - if (x.UserType == UserType.User) - { - res = string.Compare(x.UserId, y.UserId, StringComparison.OrdinalIgnoreCase); - } - else - { - var xName = teamLookup[x.UserId] ?? x.UserId; - var yName = teamLookup[y.UserId] ?? y.UserId; - res = string.Compare(xName, yName, StringComparison.OrdinalIgnoreCase); - } - } - - return res; - }); - foreach (var u in sortedList) - { - var subjectName = u.UserType == UserType.User ? u.UserId : (teamLookup[u.UserId] ?? u.UserId); - tab.AddRow(new[] - { - $"{u.UserType} {subjectName}:", - $"Can Manage Records: {u.ManageRecords}", - $"Can Manage Users: {u.ManageUsers}" - }); - } - } - } - else if (_vault.TryGetFolder(uid, out var f)) - { - tab.AddRow(new[] { "Folder UID:", f.FolderUid }); - if (!string.IsNullOrEmpty(f.ParentUid)) - { - tab.AddRow(new[] { "Parent Folder UID:", f.ParentUid }); - } - - tab.AddRow(new[] { "Folder Type:", f.FolderType.ToString() }); - tab.AddRow(new[] { "Name:", f.Name }); - } - else - { - Console.WriteLine($"UID {uid} is not a valid Keeper object"); - return Task.FromResult(false); - } - - Console.WriteLine(); - tab.SetColumnRightAlign(0, true); - tab.LeftPadding = 4; - tab.Dump(); - return Task.FromResult(true); - } - - private Task TreeCommand(TreeCommandOptions options) - { - PrintTree(_vault.RootFolder, "", true); - return Task.FromResult(true); - } - - private Task ChangeDirectoryCommand(string name) - { - if (TryResolvePath(name, out var node)) - { - _currentFolder = node.FolderUid; - } - else - { - Console.WriteLine($"Invalid folder name: {name}"); - } - - return Task.FromResult(true); - } - - private async Task AddRecordCommand(AddRecordOptions options) - { - if (!TryResolvePath(options.Folder, out FolderNode node)) - { - Console.WriteLine($"Cannot resolve folder {options.Folder}"); - return; - } - - var record = new PasswordRecord - { - Title = options.Title, - Login = options.Login, - Password = options.Password, - Link = options.Url, - Notes = options.Notes - }; - if (string.IsNullOrEmpty(record.Password) && options.Generate) - { - record.Password = CryptoUtils.GenerateUid(); - } - - if (!options.Force) - { - if (string.IsNullOrEmpty(record.Login)) - { - Console.Write("..." + "Login: ".PadRight(16)); - record.Login = await Program.GetInputManager().ReadLine(); - } - - if (string.IsNullOrEmpty(record.Password)) - { - Console.Write("..." + "Password: ".PadRight(16)); - record.Login = await Program.GetInputManager().ReadLine(new ReadLineParameters - { - IsSecured = true - }); - } - - if (string.IsNullOrEmpty(record.Link)) - { - Console.Write("..." + "Login URL: ".PadRight(16)); - record.Link = await Program.GetInputManager().ReadLine(); - } - } - - await _vault.CreateRecord(record, node.FolderUid); - } - - private async Task UpdateRecordCommand(UpdateRecordOptions options) + private async Task ThisDeviceCommand(ThisDeviceOptions arguments) { - if (_vault.TryGetRecord(options.RecordId, out var record)) - { - } - else if (TryResolvePath(options.RecordId, out var node, out var title)) - { - foreach (var uid in node.Records) - { - if (!_vault.TryGetRecord(uid, out var r)) continue; - if (string.CompareOrdinal(title, r.Title) != 0) continue; - - record = r; - break; - } - } - - if (record == null) - { - Console.WriteLine($"Cannot resolve record {options.RecordId}"); - return; - } - - if (!string.IsNullOrEmpty(options.Title)) - { - record.Title = options.Title; - } - - if (!string.IsNullOrEmpty(options.Login)) - { - record.Login = options.Login; - } - - if (string.IsNullOrEmpty(options.Password)) - { - if (options.Generate) - { - record.Password = CryptoUtils.GenerateUid(); - } - } - else - { - record.Password = options.Password; - } - - if (!string.IsNullOrEmpty(options.Url)) - { - record.Link = options.Url; - } - - if (!string.IsNullOrEmpty(options.Notes)) + if (_accountSummary == null) { - record.Notes = options.Notes; + _accountSummary = await _auth.LoadAccountSummary(); } - await _vault.UpdateRecord(record); - } - - private async Task MakeFolderCommand(MakeFolderOptions options) - { - var sfOptions = options.Shared - ? new SharedFolderOptions - { - ManageRecords = options.ManageRecords, - ManageUsers = options.ManageUsers, - CanEdit = options.CanEdit, - CanShare = options.CanShare, - } - : null; - _ = await _vault.CreateFolder(options.FolderName, _currentFolder, sfOptions); - } - - private async Task RemoveRecordCommand(RemoveRecordOptions options) - { - if (string.IsNullOrEmpty(options.RecordName)) + var device = _accountSummary?.Devices + .FirstOrDefault(x => x.EncryptedDeviceToken.ToByteArray().SequenceEqual(_auth.DeviceToken)); + if (device == null) { + Console.WriteLine("???????????????"); return; } - if (_vault.TryGetRecord(options.RecordName, out var record)) - { - var folders = Enumerable.Repeat(_vault.RootFolder, 1).Concat(_vault.Folders).Where(x => x.Records.Contains(record.Uid)).ToArray(); - if (folders.Length == 0) - { - Console.WriteLine("not expected"); - return; - } - - var folder = folders.Length == 1 - ? folders[0] - : folders.FirstOrDefault(x => x.FolderUid == _currentFolder) - ?? folders.FirstOrDefault(x => string.IsNullOrEmpty(x.FolderUid)) - ?? folders.FirstOrDefault(x => x.FolderType == FolderType.UserFolder) - ?? folders[0]; + var availableVerbs = new[] + {"rename", "register", "persistent_login", "ip_disable_auto_approve", "timeout", "bio"}; - await _vault.DeleteRecords(new[] {new RecordPath {FolderUid = folder.FolderUid, RecordUid = record.Uid,}}); - } - else - { - if (!TryResolvePath(options.RecordName, out var folder, out string recordTitle)) - { - Console.WriteLine($"Invalid record path: {options.RecordName}"); - return; - } - - var sb = new StringBuilder(); - sb.Append(recordTitle); - sb = sb.Replace("*", ".*"); - sb = sb.Replace("?", @"."); - sb = sb.Replace("#", @"[0-9]"); - sb.Insert(0, "^"); - sb.Append("$"); - var pattern = sb.ToString(); - - var records = new List(); - foreach (var recordUid in folder.Records) - { - if (!_vault.TryGetRecord(recordUid, out record)) continue; - - var m = Regex.Match(record.Title, pattern, RegexOptions.IgnoreCase); - if (m.Success) - { - records.Add(new RecordPath { FolderUid = folder.FolderUid, RecordUid = recordUid }); - } - } - - await _vault.DeleteRecords(records.ToArray()); - } - } - - private async Task MoveCommand(MoveOptions options) - { - if (!_vault.TryGetFolder(options.DestinationName, out var dstFolder)) - { - if (!TryResolvePath(options.DestinationName, out dstFolder)) - { - Console.WriteLine($"Invalid destination folder path: {options.DestinationName}"); - return; - } - } - - if (_vault.TryGetFolder(options.SourceName, out var srcFolder)) - { - await _vault.MoveFolder(srcFolder.FolderUid, dstFolder.FolderUid, options.Link); - } - else if (_vault.TryGetRecord(options.SourceName, out var record)) - { - var folders = Enumerable.Repeat(_vault.RootFolder, 1).Concat(_vault.Folders).Where(x => x.Records.Contains(record.Uid)).ToArray(); - if (folders.Length == 0) - { - Console.WriteLine("not expected"); - return; - } - - var folder = folders.Length == 1 ? folders[0] : - folders.FirstOrDefault(x => x.FolderUid == _currentFolder) - ?? folders.FirstOrDefault(x => string.IsNullOrEmpty(x.FolderUid)) - ?? folders.FirstOrDefault(x => x.FolderType == FolderType.UserFolder) - ?? folders[0]; - - await _vault.MoveRecords(new [] {new RecordPath {FolderUid = folder.FolderUid, RecordUid = record.Uid}}, dstFolder.FolderUid, options.Link); - } - else + var deviceToken = device.EncryptedDeviceToken.ToByteArray(); + var bioTarget = _auth.Username.BiometricCredentialTarget(deviceToken); + var hasBio = CredentialManager.GetCredentials(bioTarget, out _, out _); + var persistentLoginDisabled = false; + if (_auth.AuthContext.Enforcements.ContainsKey("restrict_persistent_login")) { - if (!TryResolvePath(options.SourceName, out srcFolder, out string recordTitle)) + var pl = _auth.AuthContext.Enforcements["restrict_persistent_login"]; + if (pl is bool b) { - Console.WriteLine($"Invalid source path: {options.SourceName}"); - return; + persistentLoginDisabled = b; } - - if (string.IsNullOrEmpty(recordTitle)) + else if (pl is IConvertible conv) { - await _vault.MoveFolder(srcFolder.FolderUid, dstFolder.FolderUid, options.Link); + persistentLoginDisabled = conv.ToBoolean(CultureInfo.InvariantCulture); } else { - var sb = new StringBuilder(); - sb.Append(recordTitle); - sb = sb.Replace("*", ".*"); - sb = sb.Replace("?", @"."); - sb = sb.Replace("#", @"[0-9]"); - sb.Insert(0, "^"); - sb.Append("$"); - var pattern = sb.ToString(); - - var records = new List(); - foreach (var recordUid in srcFolder.Records) - { - if (!_vault.TryGetRecord(recordUid, out record)) continue; - - var m = Regex.Match(record.Title, pattern, RegexOptions.IgnoreCase); - if (m.Success) - { - records.Add(new RecordPath { FolderUid = srcFolder.FolderUid, RecordUid = recordUid }); - } - } - - if (records.Count == 0) - { - throw new Exception($"Folder {srcFolder.Name} does not contain any record matching {recordTitle}"); - } - - await _vault.MoveRecords(records.ToArray(), dstFolder.FolderUid, options.Link); + persistentLoginDisabled = true; } } - } - private async Task RemoveFolderCommand(FolderOptions options) - { - if (TryResolvePath(options.FolderName, out var folder)) - { - await _vault.DeleteFolder(folder.FolderUid); - } - else - { - Console.WriteLine($"Invalid folder path: {options.FolderName}"); - } - } - - - private async Task ThisDeviceCommand(ThisDeviceOptions arguments) - { - if (_accountSummary == null) { - _accountSummary = await _auth.LoadAccountSummary(); - } - - var device = _accountSummary?.Devices - .FirstOrDefault(x => x.EncryptedDeviceToken.ToByteArray().SequenceEqual(_auth.DeviceToken)); - if (device == null) - { - Console.WriteLine("???????????????"); - return; - } - - var availableVerbs = new[] {"rename", "register", "persistent_login", "ip_disable_auto_approve", "timeout", "bio"}; - - var deviceToken = device.EncryptedDeviceToken.ToByteArray(); - var bioTarget = _auth.Username.BiometricCredentialTarget(deviceToken); - var hasBio = CredentialManager.GetCredentials(bioTarget, out _, out _); switch (arguments.Command) { case null: @@ -814,27 +162,34 @@ private async Task ThisDeviceCommand(ThisDeviceOptions arguments) Console.WriteLine("{0, 20}: {1}", "Device Name", device.DeviceName); Console.WriteLine("{0, 20}: {1}", "Client Version", device.ClientVersion); Console.WriteLine("{0, 20}: {1}", "Data Key Present", device.EncryptedDataKeyPresent); - Console.WriteLine("{0, 20}: {1}", "IP Auto Approve", !_accountSummary.Settings.IpDisableAutoApprove); - Console.WriteLine("{0, 20}: {1}", "Persistent Login", _accountSummary.Settings.PersistentLogin); + Console.WriteLine("{0, 20}: {1}", "IP Auto Approve", + !_accountSummary.Settings.IpDisableAutoApprove); + Console.WriteLine("{0, 20}: {1}", "Persistent Login", + !persistentLoginDisabled && _accountSummary.Settings.PersistentLogin); if (_accountSummary.Settings.LogoutTimer > 0) { if (_accountSummary.Settings.LogoutTimer >= TimeSpan.FromDays(1).TotalMilliseconds) { - Console.WriteLine("{0, 20}: {1} day(s)", "Logout Timeout", TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalDays); + Console.WriteLine("{0, 20}: {1} day(s)", "Logout Timeout", + TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalDays); } else if (_accountSummary.Settings.LogoutTimer >= TimeSpan.FromHours(1).TotalMilliseconds) { - Console.WriteLine("{0, 20}: {1} hour(s)", "Logout Timeout", TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalHours); + Console.WriteLine("{0, 20}: {1} hour(s)", "Logout Timeout", + TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalHours); } else if (_accountSummary.Settings.LogoutTimer >= TimeSpan.FromSeconds(1).TotalMilliseconds) { - Console.WriteLine("{0, 20}: {1} minute(s)", "Logout Timeout", TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalMinutes); + Console.WriteLine("{0, 20}: {1} minute(s)", "Logout Timeout", + TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalMinutes); } else { - Console.WriteLine("{0, 20}: {1} second(s)", "Logout Timeout", TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalSeconds); + Console.WriteLine("{0, 20}: {1} second(s)", "Logout Timeout", + TimeSpan.FromMilliseconds(_accountSummary.Settings.LogoutTimer).TotalSeconds); } } + Console.WriteLine("{0, 20}: {1}", "Biometric Login", hasBio); Console.WriteLine(); @@ -883,7 +238,8 @@ private async Task ThisDeviceCommand(ThisDeviceOptions arguments) { enabled = true; } - else if (string.Compare(arguments.Parameter, "off", StringComparison.InvariantCultureIgnoreCase) == 0) + else if (string.Compare(arguments.Parameter, "off", StringComparison.InvariantCultureIgnoreCase) == + 0) { enabled = false; } @@ -892,6 +248,13 @@ private async Task ThisDeviceCommand(ThisDeviceOptions arguments) Console.WriteLine($"\"{arguments.Command}\" accepts the following parameters: on, off"); return; } + + if (arguments.Command == "persistent_login" && persistentLoginDisabled) + { + Console.WriteLine("\"Stay Logged In\" feature is restricted by Keeper Administrator"); + return; + } + await _auth.SetSessionParameter(arguments.Command, enabled.Value ? "1" : "0"); } break; @@ -911,11 +274,12 @@ private async Task ThisDeviceCommand(ThisDeviceOptions arguments) } else { - Console.WriteLine($"{arguments.Command}: invalid timeout in minutes parameter: {arguments.Parameter}"); + Console.WriteLine( + $"{arguments.Command}: invalid timeout in minutes parameter: {arguments.Parameter}"); } } } - break; + break; case "bio": { @@ -924,7 +288,8 @@ private async Task ThisDeviceCommand(ThisDeviceOptions arguments) { enabled = true; } - else if (string.Compare(arguments.Parameter, "off", StringComparison.InvariantCultureIgnoreCase) == 0) + else if (string.Compare(arguments.Parameter, "off", StringComparison.InvariantCultureIgnoreCase) == + 0) { enabled = false; } @@ -959,7 +324,7 @@ private async Task ThisDeviceCommand(ThisDeviceOptions arguments) } } } - break; + break; default: { @@ -978,15 +343,18 @@ private async Task ShareDatakeyCommand(string _) return; } */ - Console.Write("Enterprise administrator requested data key to be shared. Proceed with sharing? (Yes/No) : "); + Console.Write( + "Enterprise administrator requested data key to be shared. Proceed with sharing? (Yes/No) : "); var answer = await Program.GetInputManager().ReadLine(); if (string.Compare("y", answer, StringComparison.InvariantCultureIgnoreCase) == 0) { answer = "yes"; } + if (string.Compare(answer, "yes", StringComparison.InvariantCultureIgnoreCase) != 0) return; - var rs = (EnterprisePublicKeyResponse) await _auth.ExecuteAuthRest("enterprise/get_enterprise_public_key", null, typeof(EnterprisePublicKeyResponse)); + var rs = (EnterprisePublicKeyResponse) await _auth.ExecuteAuthRest("enterprise/get_enterprise_public_key", + null, typeof(EnterprisePublicKeyResponse)); if (rs.EnterpriseECCPublicKey?.Length == 65) { var publicKey = CryptoUtils.LoadPublicEcKey(rs.EnterpriseECCPublicKey.ToByteArray()); @@ -1011,7 +379,8 @@ private async Task DeviceCommand(OtherDevicesOptions arguments) _accountSummary = null; } - if (_accountSummary == null) { + if (_accountSummary == null) + { _accountSummary = await _auth.LoadAccountSummary(); } @@ -1038,7 +407,7 @@ private async Task DeviceCommand(OtherDevicesOptions arguments) { DumpRowNo = true }; - tab.AddHeader(new[] {"Device Name", "Client", "ID", "Status", "Data Key"}); + tab.AddHeader(new[] { "Device Name", "Client", "ID", "Status", "Data Key" }); foreach (var device in devices) { var deviceToken = device.EncryptedDeviceToken.ToByteArray(); @@ -1066,7 +435,8 @@ private async Task DeviceCommand(OtherDevicesOptions arguments) var isDecline = arguments.Command == "decline"; var toApprove = devices - .Where(x => ((x.DeviceStatus == DeviceStatus.DeviceNeedsApproval) || (arguments.Link && x.DeviceStatus == DeviceStatus.DeviceOk))) + .Where(x => ((x.DeviceStatus == DeviceStatus.DeviceNeedsApproval) || + (arguments.Link && x.DeviceStatus == DeviceStatus.DeviceOk))) .Where(x => { if (arguments.DeviceId == "all") @@ -1113,359 +483,12 @@ private async Task DeviceCommand(OtherDevicesOptions arguments) Console.WriteLine($"Unsupported device command {arguments.Command}"); } - private Task ListSharedFoldersCommand(string arguments) - { - var tab = new Tabulate(4) - { - DumpRowNo = true - }; - tab.AddHeader(new[] {"Shared Folder UID", "Name", "# Records", "# Users"}); - foreach (var sf in _vault.SharedFolders) - { - tab.AddRow(new object[] {sf.Uid, sf.Name, sf.RecordPermissions.Count, sf.UsersPermissions.Count}); - } - - tab.Sort(1); - tab.Dump(); - - return Task.FromResult(true); - } - - private const string EmailPattern = @"(?i)^[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,}$"; - - private async Task ShareFolderUserPermissionCommand(ShareFolderUserPermissionOptions options) - { - if (!_vault.TryGetSharedFolder(options.FolderName, out var sf)) - { - var sfs = _vault.SharedFolders - .Where(x => string.Compare(x.Name, options.FolderName, StringComparison.CurrentCultureIgnoreCase) == 0) - .ToArray(); - if (sfs.Length == 1) - { - sf = sfs[0]; - } - } - - if (sf == null) - { - if (!_vault.TryGetFolder(options.FolderName, out var folder)) - { - if (!TryResolvePath(options.FolderName, out folder)) - { - Console.WriteLine($"Folder \'{options.FolderName}\' not found"); - return; - } - } - - if (folder.FolderType == FolderType.UserFolder) - { - Console.WriteLine($"Folder \'{folder.Name}\' is not Shared Folder"); - return; - } - - sf = _vault.GetSharedFolder(folder.FolderType == FolderType.SharedFolder ? folder.FolderUid : folder.SharedFolderUid); - } - - if (string.IsNullOrEmpty(options.User)) - { - var teams = await GetAvailableTeams(); - var tab = new Tabulate(4) - { - DumpRowNo = true - }; - tab.SetColumnRightAlign(2, true); - tab.SetColumnRightAlign(3, true); - tab.AddHeader(new[] {"User ID", "User Type", "Manage Records", "Manage Users"}); - foreach (var p in sf.UsersPermissions.OrderBy(x => $"{(int) x.UserType} {x.UserId.ToLowerInvariant()}")) - { - if (p.UserType == UserType.User) - { - tab.AddRow(new[] {p.UserId, p.UserType.ToString(), p.ManageRecords ? "X" : "-", p.ManageUsers ? "X" : "="}); - } - else - { - var team = teams.FirstOrDefault(x => x.TeamUid == p.UserId); - tab.AddRow(new[] { team?.Name ?? p.UserId, p.UserType.ToString(), p.ManageRecords ? "X" : "-", p.ManageUsers ? "X" : "-" }); - } - } - tab.Dump(); - } - else - { - var userType = UserType.User; - string userId = null; - var rx = new Regex(EmailPattern); - if (rx.IsMatch(options.User)) - { - userId = options.User.ToLowerInvariant(); - } - else - { - userType = UserType.Team; - if (_vault.TryGetTeam(options.User, out var team)) - { - userId = team.TeamUid; - } - else - { - team = _vault.Teams.FirstOrDefault(x => string.Compare(x.Name, options.User, StringComparison.CurrentCultureIgnoreCase) == 0); - if (team != null) - { - userId = team.TeamUid; - } - else - { - var teams = await GetAvailableTeams(); - var teamInfo = teams.FirstOrDefault(x => - string.Compare(x.Name, options.User, StringComparison.CurrentCultureIgnoreCase) == 0 || - string.CompareOrdinal(x.TeamUid, options.User) == 0 - ); - if (teamInfo != null) - { - userId = teamInfo.TeamUid; - } - } - } - - if (userId == null) - { - Console.WriteLine($"User {options.User} cannot be resolved as email or team"); - return; - } - } - - var userPermission = sf.UsersPermissions.FirstOrDefault(x => x.UserType == userType && x.UserId == userId); - - if (options.Delete) - { - if (userPermission != null) - { - await _vault.RemoveUserFromSharedFolder(sf.Uid, userId, userType); - } - else - { - Console.WriteLine($"{(userType == UserType.User ? "User" : "Team")} \'{userId}\' is not a part of Shared Folder {sf.Name}"); - } - } - else if (options.ManageUsers.HasValue || options.ManageRecords.HasValue) - { - await _vault.PutUserToSharedFolder(sf.Uid, userId, userType, new SharedFolderUserOptions - { - ManageUsers = options.ManageUsers ?? sf.DefaultManageUsers, - ManageRecords = options.ManageRecords ?? sf.DefaultManageRecords, - }); - } - else - { - if (userPermission != null) - { - Console.WriteLine(); - Console.WriteLine("{0, 20}: {1}", "User Type", userPermission.UserType.ToString()); - Console.WriteLine("{0, 20}: {1}", "User ID", userPermission.UserId); - Console.WriteLine("{0, 20}: {1}", "Manage Records", userPermission.ManageRecords ? "Yes" : "No"); - Console.WriteLine("{0, 20}: {1}", "Manage Users", userPermission.ManageUsers ? "Yes" : "No"); - Console.WriteLine(); - } - else - { - Console.WriteLine($"{(userType == UserType.User ? "User" : "Team")} \'{userId}\' is not a part of Shared Folder {sf.Name}"); - } - } - } - } - - private async Task ShareFolderRecordPermissionCommand(ShareFolderRecordPermissionOptions options) - { - if (!_vault.TryGetSharedFolder(options.FolderName, out var sf)) - { - var sfs = _vault.SharedFolders - .Where(x => string.Compare(x.Name, options.FolderName, StringComparison.CurrentCultureIgnoreCase) == 0) - .ToArray(); - if (sfs.Length == 1) - { - sf = sfs[0]; - } - } - - if (sf == null) - { - if (!_vault.TryGetFolder(options.FolderName, out var folder)) - { - if (!TryResolvePath(options.FolderName, out folder)) - { - Console.WriteLine($"Folder \'{options.FolderName}\'"); - return; - } - } - - if (folder.FolderType == FolderType.UserFolder) - { - Console.WriteLine($"Folder \'{folder.Name}\' is not Shared Folder"); - return; - } - - sf = _vault.GetSharedFolder(folder.FolderType == FolderType.SharedFolder ? folder.FolderUid : folder.SharedFolderUid); - } - - if (string.IsNullOrEmpty(options.Record)) - { - var tab = new Tabulate(4) - { - DumpRowNo = true - }; - tab.AddHeader(new[] { "Record Title", "Record UID", "Can Edit", "Can Share" }); - foreach (var p in sf.RecordPermissions) - { - if (_vault.TryGetRecord(p.RecordUid, out var record)) - { - tab.AddRow(new[] { record.Title, p.RecordUid, p.CanEdit ? "X" : "-", p.CanShare ? "X" : "-" }); - } - } - tab.Sort(0); - tab.Dump(); - } - else - { - string recordUid = null; - if (_vault.TryGetRecord(options.Record, out var record)) - { - recordUid = record.Uid; - } - else - { - if (TryResolvePath(options.Record, out var folder, out var title)) - { - recordUid = folder.Records.Select(x => _vault.GetRecord(x)).FirstOrDefault(x => string.Compare(x.Title, title, StringComparison.CurrentCultureIgnoreCase) == 0)?.Uid; - - } - } - if (string.IsNullOrEmpty(recordUid)) - { - Console.WriteLine($"\'{options.Record}\' cannot be resolved as record"); - return; - } - - var recordPermission = sf.RecordPermissions.FirstOrDefault(x => x.RecordUid == recordUid); - if (recordPermission == null) - { - Console.WriteLine($"Record \'{options.Record}\' is not a part of Shared Folder {sf.Name}"); - return; - } - - if (options.CanShare.HasValue || options.CanEdit.HasValue) - { - await _vault.ChangeRecordInSharedFolder(sf.Uid, recordUid, new SharedFolderRecordOptions - { - CanEdit = options.CanEdit ?? recordPermission.CanEdit, - CanShare = options.CanShare ?? recordPermission.CanShare, - }); - } - else - { - Console.WriteLine(); - Console.WriteLine("{0, 20}: {1}", "Record UID", record.Uid); - Console.WriteLine("{0, 20}: {1}", "Record Title", record.Title); - Console.WriteLine("{0, 20}: {1}", "Can Edit", recordPermission.CanEdit ? "Yes" : "No"); - Console.WriteLine("{0, 20}: {1}", "Can Share", recordPermission.CanShare ? "Yes" : "No"); - Console.WriteLine(); - } - } - } - - private bool TryResolvePath(string path, out FolderNode node) - { - var res = TryResolvePath(path, out node, out var text); - if (res) - { - res = string.IsNullOrEmpty(text); - } - - return res; - } - - private bool TryResolvePath(string path, out FolderNode node, out string text) - { - node = null; - text = null; - if (string.IsNullOrEmpty(_currentFolder) || _currentFolder == _vault.RootFolder.FolderUid) - { - node = _vault.RootFolder; - } - else - { - _vault.TryGetFolder(_currentFolder, out node); - } - - if (!string.IsNullOrEmpty(path)) - { - path = path.Trim(); - if (string.IsNullOrEmpty(path)) - { - return node != null; - } - - if (path[0] == '/') - { - path = path.Substring(1); - node = _vault.RootFolder; - } - - foreach (var folder in path.TokenizeArguments(CommandExtensions.IsPathDelimiter)) - { - if (folder == "..") - { - if (!string.IsNullOrEmpty(node.ParentUid)) - { - if (!_vault.TryGetFolder(node.ParentUid, out node)) - { - return false; - } - } - else if (!string.IsNullOrEmpty(node.FolderUid)) - { - node = _vault.RootFolder; - } - else - { - return false; - } - } - else - { - var found = false; - foreach (var subFolder in node.Subfolders) - { - if (!_vault.TryGetFolder(subFolder, out var subNode)) return false; - - if (string.Compare(folder, subNode.Name, StringComparison.CurrentCultureIgnoreCase) != 0) continue; - - found = true; - node = subNode; - break; - } - - if (found) continue; - if (string.IsNullOrEmpty(text)) - { - text = folder; - } - else - { - return false; - } - } - } - } - - return true; - } - public override async Task ProcessException(Exception e) { if (!(e is KeeperAuthFailed)) return await base.ProcessException(e); Console.WriteLine("Session is expired. Disconnecting..."); - await LogoutCommand(new LogoutOptions {Resume = true}); + await LogoutCommand(new LogoutOptions { Resume = true }); return true; } @@ -1477,11 +500,11 @@ public override string GetPrompt() return ""; } - if (!string.IsNullOrEmpty(_currentFolder)) + if (!string.IsNullOrEmpty(_vaultContext.CurrentFolder)) { - var folder = _currentFolder; + var folder = _vaultContext.CurrentFolder; var sb = new StringBuilder(); - while (_vault.TryGetFolder(folder, out var node)) + while (_vaultContext.Vault.TryGetFolder(folder, out var node)) { if (sb.Length > 0) { @@ -1492,7 +515,7 @@ public override string GetPrompt() folder = node.ParentUid; if (!string.IsNullOrEmpty(folder)) continue; - sb.Insert(0, _vault.RootFolder.Name + "/"); + sb.Insert(0, _vaultContext.Vault.RootFolder.Name + "/"); if (sb.Length <= 40) return sb.ToString(); sb.Remove(0, sb.Length - 37); @@ -1501,13 +524,13 @@ public override string GetPrompt() } } - return _vault.RootFolder.Name; + return _vaultContext.Vault.RootFolder.Name; } protected override void Dispose(bool disposing) { base.Dispose(disposing); - _vault.Dispose(); + _vaultContext.Vault.Dispose(); _auth.Dispose(); } } @@ -1518,130 +541,6 @@ class LogoutOptions public bool Resume { get; set; } } - class ListCommandOptions - { - [Option('l', "list", Required = false, Default = false, HelpText = "detailed output")] - public bool Details { get; set; } - - [Value(0, Required = false, MetaName = "pattern", HelpText = "search pattern")] - public string Pattern { get; set; } - } - - internal class TreeCommandOptions - { - [Value(0, Required = false, MetaName = "folder", HelpText = "folder path or UID")] - public string Folder { get; set; } - } - - internal class EditRecord - { - [Option("login", Required = false, HelpText = "login name")] - public string Login { get; set; } - - [Option("pass", Required = false, HelpText = "password")] - public string Password { get; set; } - - [Option("url", Required = false, HelpText = "url")] - public string Url { get; set; } - - [Option("notes", Required = false, HelpText = "notes")] - public string Notes { get; set; } - - [Option('g', "generate", Required = false, Default = false, HelpText = "generate random password")] - public bool Generate { get; set; } - } - - class AddRecordOptions : EditRecord - { - [Option("folder", Required = false, HelpText = "folder")] - public string Folder { get; set; } - - [Option('f', "force", Required = false, Default = false, HelpText = "do not prompt for omitted fields")] - public bool Force { get; set; } - - [Value(0, Required = true, MetaName = "title", HelpText = "title")] - public string Title { get; set; } - } - - class UpdateRecordOptions : EditRecord - { - [Option("title", Required = false, HelpText = "title")] - public string Title { get; set; } - - [Value(0, Required = true, MetaName = "title", HelpText = "record path or UID")] - public string RecordId { get; set; } - } - - class ShareFolderRecordPermissionOptions : FolderOptions - { - [Option('r', "record", Required = false, Default = null, HelpText = "record name or record uid")] - public string Record { get; set; } - - [Option('s', "can-share", Required = false, Default = null, HelpText = "record permission: can be shared.")] - public bool? CanShare { get; set; } - - [Option('e', "can-edit", Required = false, Default = null, HelpText = "record permission: can be edited.")] - public bool? CanEdit { get; set; } - } - - class ShareFolderUserPermissionOptions : FolderOptions - { - - [Option('u', "user", Required = false, Default = null, HelpText = "account email, team name, or team uid")] - public string User { get; set; } - - [Option('d', "delete", Required = false, Default = false, SetName = "delete", HelpText = "delete user from shared folder")] - public bool Delete { get; set; } - - [Option('r', "manage-records", Required = false, Default = null, SetName = "set", HelpText = "account permission: can manage records.")] - public bool? ManageRecords { get; set; } - - [Option('u', "manage-users", Required = false, Default = null, SetName = "set", HelpText = "account permission: can manage users.")] - public bool? ManageUsers { get; set; } - } - - class RemoveRecordOptions - { - [Value(0, Required = true, MetaName = "record title, uid, or pattern", HelpText = "remove records")] - public string RecordName { get; set; } - } - - class MoveOptions - { - [Option("link", Required = false, HelpText = "do not delete source")] - public bool Link { get; set; } - - [Value(0, Required = true, MetaName = "source record or folder", HelpText = "source record or folder")] - public string SourceName { get; set; } - - [Value(1, Required = true, MetaName = "destination folder", HelpText = "destination folder")] - public string DestinationName { get; set; } - } - - class FolderOptions - { - [Value(0, Required = true, MetaName = "folder name", HelpText = "folder name")] - public string FolderName { get; set; } - } - - class MakeFolderOptions : FolderOptions - { - [Option('s', "shared", Required = false, Default = false, HelpText = "shared folder")] - public bool Shared { get; set; } - - [Option("manage-users", Required = false, Default = null, HelpText = "default manage users")] - public bool? ManageUsers { get; set; } - - [Option("manage-records", Required = false, Default = null, HelpText = "default manage records")] - public bool? ManageRecords { get; set; } - - [Option("can-share", Required = false, Default = null, HelpText = "default can share")] - public bool? CanShare { get; set; } - - [Option("can-edit", Required = false, Default = null, HelpText = "default can edit")] - public bool? CanEdit { get; set; } - } - class OtherDevicesOptions { [Option('f', "force", Required = false, Default = false, HelpText = "reload device list")] @@ -1666,9 +565,4 @@ class ThisDeviceOptions public string Parameter { get; set; } } - class SyncDownOptions - { - [Option("reset", Required = false, Default = false, HelpText = "resets on-disk storage")] - public bool Reset { get; set; } - } } \ No newline at end of file diff --git a/Commander/Commands.cs b/Commander/NotConnectedCommands.cs similarity index 54% rename from Commander/Commands.cs rename to Commander/NotConnectedCommands.cs index ff12da3..1092620 100644 --- a/Commander/Commands.cs +++ b/Commander/NotConnectedCommands.cs @@ -1,257 +1,26 @@ using System; using System.Collections.Generic; -using System.Text; using System.Threading.Tasks; using Authentication; +using Cli; using CommandLine; -using CommandLine.Text; using Google.Protobuf; +using Google.Protobuf.WellKnownTypes; using KeeperSecurity.Authentication; -using KeeperSecurity.Authentication.Async; +using KeeperSecurity.Authentication.Sync; using KeeperSecurity.Utils; namespace Commander { - public interface ICommand + public class NotConnectedCliContext : StateCommands { - int Order { get; } - string Description { get; } - Task ExecuteCommand(string args); - } - - public class SimpleCommand : ICommand - { - public int Order { get; set; } - public string Description { get; set; } - public Func Action { get; set; } - - public async Task ExecuteCommand(string args) - { - if (Action != null) - { - await Action(args); - } - } - } - - public static class CommandExtensions - { - public static bool IsWhiteSpace(char ch) - { - return char.IsWhiteSpace(ch); - } - - public static bool IsPathDelimiter(char ch) - { - return ch == '/'; - } - - public static IEnumerable TokenizeArguments(this string args) - { - return TokenizeArguments(args, IsWhiteSpace); - } - - public static IEnumerable TokenizeArguments(this string args, Func isDelimiter) - { - var sb = new StringBuilder(); - var pos = 0; - var isQuote = false; - var isEscape = false; - while (pos < args.Length) - { - var ch = args[pos]; - - if (isEscape) - { - isEscape = false; - sb.Append(ch); - } - else - { - switch (ch) - { - case '\\': - isEscape = true; - break; - case '"': - isQuote = !isQuote; - break; - default: - { - if (!isQuote && isDelimiter(ch)) - { - if (sb.Length > 0) - { - yield return sb.ToString(); - sb.Length = 0; - } - } - else - { - sb.Append(ch); - } - - break; - } - } - } - - pos++; - } - - if (sb.Length > 0) - { - yield return sb.ToString(); - } - } - - public static string GetCommandUsage(int width = 120) - { - var parser = new Parser(with => with.HelpWriter = null); - var result = parser.ParseArguments(new[] { "--help" }); - return HelpText.AutoBuild(result, h => - { - h.AdditionalNewLineAfterOption = false; - return h; - }, width); - } - } - - public class ParsableCommand : ICommand where T : class - { - public int Order { get; internal set; } - public string Description { get; set; } - public Func Action { get; internal set; } + private readonly AuthSync _auth; - public async Task ExecuteCommand(string args) + private class AppLoadOptions { - var res = Parser.Default.ParseArguments(args.TokenizeArguments()); - T options = null; - res - .WithParsed(o => { options = o; }); - if (options != null) - { - await Action(options); - } + [Option("config", Required = false, HelpText = "configuration file name")] + public string Config { get; set; } } - } - - public class CliCommands: IDisposable - { - public IDictionary Commands { get; } = new Dictionary(); - public IDictionary CommandAliases { get; } = new Dictionary(); - public static bool ParseBoolOption(string text, out bool value) - { - if (string.Compare(text, "on", StringComparison.InvariantCultureIgnoreCase) == 0) - { - value = true; - return true; - } - if (string.Compare(text, "off", StringComparison.InvariantCultureIgnoreCase) == 0) - { - value = false; - return true; - } - - value = false; - return false; - } - - protected virtual void Dispose(bool disposing) - { - if (disposing) - { - } - } - - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - } - - public sealed class CliContext : CliCommands - { - public CliContext() - { - Commands.Add("clear", new SimpleCommand - { - Order = 1001, - Description = "Clear the screen", - Action = (args) => - { - Console.Clear(); - return Task.FromResult(true); - } - }); - - Commands.Add("quit", new SimpleCommand - { - Order = 1002, - Description = "Quit", - Action = (args) => - { - Finished = true; - StateContext = null; - return Task.FromResult(true); - } - }); - CommandAliases.Add("c", "clear"); - CommandAliases.Add("q", "quit"); - } - - public StateContext StateContext { get; set; } - public bool Finished { get; set; } - public Queue CommandQueue { get; } = new Queue(); - } - - public abstract class StateContext : CliCommands - { - public abstract string GetPrompt(); - - public virtual Task ProcessException(Exception e) - { - return Task.FromResult(false); - } - - public StateContext NextState { get; set; } - - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - NextState = null; - } - } - - public abstract class BackStateContext : StateContext - { - protected BackStateContext() - { - Commands.Add("back", - new SimpleCommand - { - Order = 1000, - Description = "Back", - Action = _ => - { - NextState = BackState; - return Task.CompletedTask; - }, - }); - } - - protected internal StateContext BackState { get; set; } - protected override void Dispose(bool disposing) - { - base.Dispose(disposing); - BackState = null; - } - } - - public class NotConnectedCliContext : StateContext - { - private readonly Auth _auth; private class CreateOptions { @@ -259,6 +28,14 @@ private class CreateOptions public string Username { get; set; } } + private class ProxyOptions + { + [Option("user", Required = false, HelpText = "proxy user")] + public string User { get; set; } + + [Option("password", Required = false, HelpText = "proxy password")] + public string Password { get; set; } + } private class LoginOptions { [Option("password", Required = false, HelpText = "master password")] @@ -279,29 +56,38 @@ private class LoginOptions public NotConnectedCliContext(bool autologin) { - var ui = new AuthUi(Program.GetInputManager()); - var storage = Program.CommanderStorage.GetConfigurationStorage(null, new CommanderConfigurationProtection()); + string configFileName = null; + var res = Parser.Default.ParseArguments(Environment.GetCommandLineArgs()); + res.WithParsed(o => { configFileName = o.Config; }); - _auth = new Auth(ui, storage) + var storage = Program.CommanderStorage.GetConfigurationStorage(configFileName, new CommanderConfigurationProtection()); + _auth = new AuthSync(storage) { - Endpoint = {DeviceName = "Commander C#", ClientVersion = "c15.0.0"} + Endpoint = {DeviceName = "Commander C#", ClientVersion = "c16.5.0"} }; - Commands.Add("login", new ParsableCommand + Commands.Add("proxy", new ParseableCommand + { + Order = 9, + Description = "Detect and setup proxy", + Action = DoProxy + }); + + Commands.Add("login", new ParseableCommand { Order = 10, Description = "Login to Keeper", Action = DoLogin }); - Commands.Add("create", new ParsableCommand + Commands.Add("create", new ParseableCommand { Order = 11, Description = "Create Keeper account", Action = DoCreateAccount }); - Commands.Add("server", new SimpleCommand + Commands.Add("server", new Cli.SimpleCommand { Order = 20, Description = "Display or change Keeper Server", @@ -317,7 +103,7 @@ public NotConnectedCliContext(bool autologin) } }); - Commands.Add("version", new SimpleCommand + Commands.Add("version", new Cli.SimpleCommand { Order = 21, Action = args => @@ -348,7 +134,7 @@ public NotConnectedCliContext(bool autologin) var lastLogin = storage.LastLogin; if (!string.IsNullOrEmpty(lastLogin)) { - Program.EnqueueCommand($"login --resume {lastLogin}"); + Program.GetMainLoop().CommandQueue.Enqueue($"login --resume {lastLogin}"); } } } @@ -447,6 +233,46 @@ await DoLogin(new LoginOptions }); } + private async Task DoProxy(ProxyOptions options) + { + Uri proxyUri = null; + string[] proxyMethods = null; + var hasProxy = await _auth.DetectProxy((uri, methods) => + { + proxyUri = uri; + proxyMethods = methods; + }); + if (proxyUri == null || proxyMethods == null) + { + return; + } + var proxy_user = options.User; + if (string.IsNullOrEmpty(proxy_user)) + { + Console.Write("Enter Proxy username: "); + proxy_user = await Program.GetInputManager().ReadLine(); + } + if (string.IsNullOrEmpty(proxy_user)) + { + return; + } + var proxy_password = options.Password; + if (string.IsNullOrEmpty(proxy_password)) + { + Console.Write("Enter Proxy password: "); + proxy_password = await Program.GetInputManager().ReadLine(new ReadLineParameters + { + IsSecured = true, + }); + } + if (string.IsNullOrEmpty(proxy_password)) + { + return; + } + + _auth.Endpoint.WebProxy = AuthUIExtensions.GetWebProxyForCredentials(proxyUri, proxyMethods, proxy_user, proxy_password); + } + private async Task DoLogin(LoginOptions options) { var username = options.Username; @@ -466,10 +292,6 @@ private async Task DoLogin(LoginOptions options) Console.Write("Enter Username: "); username = await Program.GetInputManager().ReadLine(); } - else - { - Console.WriteLine("Username: " + username); - } } if (string.IsNullOrEmpty(username)) return; @@ -478,7 +300,7 @@ private async Task DoLogin(LoginOptions options) { if (isSsoProvider) { - await _auth.LoginSso(username); + await Utils.LoginToSsoProvider(_auth, Program.GetInputManager(), username); } else { @@ -493,25 +315,21 @@ private async Task DoLogin(LoginOptions options) { passwords.Add(options.Password); } - - var uc = _auth.Storage.Users.Get(username); - if (!string.IsNullOrEmpty(uc?.Password)) - { - passwords.Add(uc.Password); - } - - await _auth.Login(username, passwords.ToArray()); + await Utils.LoginToKeeper(_auth, Program.GetInputManager(), username, passwords.ToArray()); } if (_auth.IsAuthenticated()) { var connectedCommands = new ConnectedContext(_auth); - NextState = connectedCommands; + NextStateCommands = connectedCommands; } } catch (KeeperCanceled) { } + catch (KeyboardInterrupt) + { + } } public override string GetPrompt() diff --git a/Commander/Program.cs b/Commander/Program.cs index 353f453..1aa8a35 100644 --- a/Commander/Program.cs +++ b/Commander/Program.cs @@ -5,435 +5,53 @@ // |_| // // Keeper SDK -// Copyright 2021 Keeper Security Inc. +// Copyright 2022 Keeper Security Inc. // Contact: ops@keepersecurity.com // using System; -using System.Collections.Generic; using System.Threading.Tasks; -using System.Linq; using System.Net; -using System.Text; -using System.Threading; -using System.Windows.Forms; using KeeperSecurity.Utils; using KeeperSecurity.Vault; -using KeeperSecurity.Authentication; -using KeeperSecurity.Authentication.Async; +using Cli; namespace Commander { internal class Program { private static readonly InputManager InputManager = new InputManager(); + private static readonly MainLoop MainLoop = new MainLoop(); public static InputManager GetInputManager() { return InputManager; } + public static MainLoop GetMainLoop() + { + return MainLoop; + } + public static IExternalLoader CommanderStorage { get; private set; } private static void Main() { Console.CancelKeyPress += (s, e) => { e.Cancel = true; }; - Welcome(); - - _ = Task.Run(async () => - { - try - { - await MainLoop(); - } - catch (Exception e) - { - Console.WriteLine(e.Message); - } - - Console.WriteLine("Good Bye"); - Environment.Exit(0); - }); - - InputManager.Run(); - } - - internal static void EnqueueCommand(string command) - { - _cliContext?.CommandQueue.Enqueue(command); - } - - private static CliContext _cliContext; + Utils.Welcome(); - private static async Task MainLoop() - { ServicePointManager.ServerCertificateValidationCallback = delegate { return true; }; CommanderStorage = StorageUtils.SetupCommanderStorage(); + if (!CommanderStorage.VerifyDatabase()) { throw new Exception("Database is invalid."); } - _cliContext = new CliContext(); - - var notConnected = new NotConnectedCliContext(true); - - _cliContext.StateContext = notConnected; - - while (!_cliContext.Finished) - { - if (_cliContext.StateContext == null) break; - if (_cliContext.StateContext.NextState != null) - { - if (!ReferenceEquals(_cliContext.StateContext, _cliContext.StateContext.NextState)) - { - var oldContext = _cliContext.StateContext; - _cliContext.StateContext = oldContext.NextState; - oldContext.NextState = null; - if (_cliContext.StateContext is BackStateContext bsc) - { - bsc.BackState = oldContext; - } - else - { - oldContext.Dispose(); - } - } - else - { - _cliContext.StateContext.NextState = null; - } - - InputManager.ClearHistory(); - } - - string command; - if (_cliContext.CommandQueue.Count > 0) - { - command = _cliContext.CommandQueue.Dequeue(); - } - else - { - if (Console.CursorLeft != 0) - { - Console.WriteLine(); - } - - Console.Write(_cliContext.StateContext.GetPrompt() + "> "); - command = await InputManager.ReadLine(new ReadLineParameters - { - IsHistory = true - }); - } - - if (string.IsNullOrEmpty(command)) continue; - - command = command.Trim(); - var parameter = ""; - var pos = command.IndexOf(' '); - if (pos > 1) - { - parameter = command.Substring(pos + 1).Trim(); - command = command.Substring(0, pos).Trim(); - } - - command = command.ToLowerInvariant(); - if (_cliContext.CommandAliases.TryGetValue(command, out var fullCommand)) - { - command = fullCommand; - } - else if (_cliContext.StateContext.CommandAliases.TryGetValue(command, out fullCommand)) - { - command = fullCommand; - } - - if (!_cliContext.Commands.TryGetValue(command, out var cmd)) - { - _cliContext.StateContext.Commands.TryGetValue(command, out cmd); - } - - if (cmd != null) - { - try - { - await cmd.ExecuteCommand(parameter); - } - catch (Exception e) - { - if (!await _cliContext.StateContext.ProcessException(e)) - { - Console.WriteLine("Error: " + e.Message); - } - } - } - else - { - if (command != "?") - { - Console.WriteLine($"Invalid command: {command}"); - } - - foreach (var c in (_cliContext.Commands.Concat(_cliContext.StateContext.Commands.Where(x => !string.IsNullOrEmpty(x.Value.Description)))) - .OrderBy(x => x.Value.Order)) - { - Console.WriteLine(" " + c.Key.PadRight(24) + c.Value.Description); - } - } - - Console.WriteLine(); - } - } - - static void Welcome() - { - Console.WriteLine(); - Console.WriteLine(@" _ __ "); - Console.WriteLine(@"| |/ /___ ___ _ __ ___ _ _ "); - Console.WriteLine(@"| ' Confirmation(string information) - { - Console.WriteLine(information); - Console.Write("Type \"yes\" to confirm, to cancel"); - - var answer = await Program.GetInputManager().ReadLine(); - return string.Compare(answer, "yes", StringComparison.OrdinalIgnoreCase) == 0; - } - - public async Task GetNewPassword(PasswordRuleMatcher matcher) - { - string password1 = null; - while (string.IsNullOrEmpty(password1)) - { - Console.Write("New Master Password: "); - - password1 = await InputManager.ReadLine(new ReadLineParameters - { - IsSecured = true - }); - if (string.IsNullOrEmpty(password1)) continue; - - if (matcher == null) continue; - - var failedRules = matcher.MatchFailedRules(password1); - if (!(failedRules?.Length > 0)) continue; - - password1 = null; - - foreach (var rule in failedRules) - { - Console.WriteLine(rule); - } - } - - string password2 = null; - while (string.IsNullOrEmpty(password2)) - { - Console.Write("Password Again: "); - password2 = await InputManager.ReadLine(new ReadLineParameters - { - IsSecured = true - }); - if (string.CompareOrdinal(password1, password2) == 0) continue; - - Console.WriteLine("Passwords do not match."); - password2 = null; - } - - return password1; - } - - public override Task WaitForUserPassword(IPasswordInfo info, CancellationToken token) - { - var bioTarget = info.Username.BiometricCredentialTarget(DeviceToken); - if (CredentialManager.GetCredentials(bioTarget, out var email, out var key)) - { - if (!string.IsNullOrEmpty(key) && string.Compare(info.Username, email, StringComparison.InvariantCultureIgnoreCase) == 0) - { - this.BiometricKey = key.Base64UrlDecode(); - } - } - - return base.WaitForUserPassword(info, token); - } - - public Task WaitForSsoToken(ISsoTokenActionInfo actionInfo, CancellationToken token) - { - Console.WriteLine($"Complete {(actionInfo.IsCloudSso ? "Cloud" : "OnSite")} SSO login"); - Console.WriteLine($"\nLogin Url:\n\n{actionInfo.SsoLoginUrl}\n"); - var ts = new TaskCompletionSource(); - _ = Task.Run(async () => - { - Task readTask = null; - var registration = token.Register(() => - { - ts.SetCanceled(); - Program.GetInputManager().InterruptReadTask(readTask); - }); - try - { - while (!ts.Task.IsCompleted) - { - Console.WriteLine("Type \"clipboard\" to get token from the clipboard or \"cancel\""); - Console.Write("> "); - readTask = Program.GetInputManager().ReadLine(); - var answer = await readTask; - switch (answer.ToLowerInvariant()) - { - case "clipboard": - var ssoToken = ""; - var thread = new Thread(() => { ssoToken = Clipboard.GetText(); }); - thread.SetApartmentState(ApartmentState.STA); - thread.Start(); - thread.Join(); - if (string.IsNullOrEmpty(ssoToken)) - { - Console.WriteLine("Clipboard is empty"); - } - else - { - Console.WriteLine($"Token:\n{ssoToken}\n\nType \"yes\" to accept this token to discard"); - Console.Write("> "); - answer = await Program.GetInputManager().ReadLine(); - if (answer == "yes") - { - await actionInfo.InvokeSsoTokenAction(ssoToken); - } - } - - break; - case "cancel": - ts.TrySetResult(false); - break; - } - } - } - finally - { - registration.Dispose(); - } - }); - return ts.Task; - } - - public void SsoLogoutUrl(string url) - { - Console.WriteLine($"\nSSO Logout Url:\n\n{url}\n"); - } + MainLoop.StateContext = new NotConnectedCliContext(true); - public Task WaitForDataKey(IDataKeyChannelInfo[] channels, CancellationToken token) - { - var taskSource = new TaskCompletionSource(); - - _ = Task.Run(async () => - { - var actions = channels - .Select(x => x.Channel.SsoDataKeyShareChannelText()) - .Where(x => !string.IsNullOrEmpty(x)) - .ToArray(); - - Console.WriteLine("\nRequest Data Key\n"); - Console.WriteLine($"{string.Join("\n", actions.Select(x => $"\"{x}\""))}"); - Console.WriteLine("\"cancel\" to stop waiting."); - while (true) - { - Console.Write("> "); - var answer = await Program.GetInputManager().ReadLine(); - if (token.IsCancellationRequested) break; - if (string.IsNullOrEmpty(answer)) - { - continue; - } - - if (string.Compare("cancel", answer, StringComparison.InvariantCultureIgnoreCase) == 0) - { - taskSource.TrySetResult(false); - break; - } - - if (token.IsCancellationRequested) - { - break; - } - - var action = channels - .FirstOrDefault(x => x.Channel.SsoDataKeyShareChannelText() == answer); - if (action != null) - { - await action.InvokeGetDataKeyAction.Invoke(); - } - else - { - Console.WriteLine($"Unsupported command {answer}"); - } - } - }); - - return taskSource.Task; - } - - private bool _testedSystemProxy; - - public override Task WaitForHttpProxyCredentials(IHttpProxyInfo proxyInfo) - { - if (!_testedSystemProxy) - { - _testedSystemProxy = true; - if (CredentialManager.GetCredentials(proxyInfo.ProxyUri.DnsSafeHost, out var username, out var password)) - { - proxyInfo.InvokeHttpProxyCredentialsDelegate.Invoke(username, password); - return Task.FromResult(true); - } - } - - return base.WaitForHttpProxyCredentials(proxyInfo); - } - - public async Task AuthenticateRequests(SecurityKeyAuthenticateRequest[] requests) - { - if (requests == null || requests.Length == 0) throw new KeeperCanceled(); - var cancellationSource = new CancellationTokenSource(); - var clientData = new SecurityKeyClientData - { - dataType = SecurityKeyClientData.U2F_SIGN, - challenge = requests[0].challenge, - origin = requests[0].appId, - }; - var keyHandles = new List - { - requests[0].keyHandle.Base64UrlDecode() - }; - - foreach (var rq in requests.Skip(1)) - { - if (rq.challenge == clientData.challenge && rq.appId == clientData.origin) - { - keyHandles.Add(rq.keyHandle.Base64UrlDecode()); - } - } - - var u2fSignature = await WinWebAuthn.Authenticate.GetAssertion(WinWebAuthn.Authenticate.GetConsoleWindow(), clientData, keyHandles, cancellationSource.Token); - var signature = new SecurityKeySignature - { - clientData = u2fSignature.clientData.Base64UrlEncode(), - signatureData = u2fSignature.signatureData.Base64UrlEncode(), - keyHandle = u2fSignature.keyHandle.Base64UrlEncode() - }; - return Encoding.UTF8.GetString(JsonUtils.DumpJson(signature)); + _ = MainLoop.Run(GetInputManager()); + InputManager.Run(); } } diff --git a/Commander/Properties/AssemblyInfo.cs b/Commander/Properties/AssemblyInfo.cs index 28a83d8..98a8e0d 100644 --- a/Commander/Properties/AssemblyInfo.cs +++ b/Commander/Properties/AssemblyInfo.cs @@ -9,8 +9,8 @@ [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("Keeper Security Inc.")] -[assembly: AssemblyProduct("Keeper SDK sample app")] -[assembly: AssemblyCopyright("Copyright (c) 2021")] +[assembly: AssemblyProduct(".NET Commander")] +[assembly: AssemblyCopyright("Copyright (c) 2024")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.9.9.1")] -[assembly: AssemblyFileVersion("0.9.9.1")] +[assembly: AssemblyVersion("1.0.1.5")] +[assembly: AssemblyFileVersion("1.0.1.5")] diff --git a/Commander/ZeroDepJson.cs b/Commander/ZeroDepJson.cs new file mode 100644 index 0000000..b7e00e5 --- /dev/null +++ b/Commander/ZeroDepJson.cs @@ -0,0 +1,5464 @@ +using System; +using System.CodeDom.Compiler; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.Serialization; +using System.Security.Cryptography; +using System.Text; +using System.Xml.Serialization; + +#pragma warning disable IDE0063 // Use simple 'using' statement +#pragma warning disable IDE0057 // Use range operator +#pragma warning disable IDE0090 // Use 'new(...)' +#pragma warning disable CA2249 // Consider using 'string.Contains' instead of 'string.IndexOf' +#pragma warning disable IDE0056 // Use index operator +#pragma warning disable IDE0054 // Use compound assignment +#pragma warning disable CA1031 // Do not catch general exception types +#pragma warning disable CA1034 // Nested types should not be visible + +namespace ZeroDep +{ + /// + /// A utility class to serialize and deserialize JSON. + /// + public static class Json + { + private const string _null = "null"; + private const string _true = "true"; + private const string _false = "false"; + private const string _zeroArg = "{0}"; + private const string _dateStartJs = "new Date("; + private const string _dateEndJs = ")"; + private const string _dateStart = @"""\/Date("; + private const string _dateStart2 = @"/Date("; + private const string _dateEnd = @")\/"""; + private const string _dateEnd2 = @")/"; + private const string _roundTripFormat = "R"; + private const string _enumFormat = "D"; + private const string _x4Format = "{0:X4}"; + private const string _d2Format = "D2"; + private const string _scriptIgnore = "ScriptIgnore"; + private const string _serializationTypeToken = "__type"; + + private static readonly string[] _dateFormatsUtc = { "yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'fff'Z'", "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", "yyyy'-'MM'-'dd'T'HH':'mm'Z'", "yyyyMMdd'T'HH':'mm':'ss'Z'" }; + private static readonly DateTime _minDateTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); + private static readonly long _minDateTimeTicks = _minDateTime.Ticks; + private static readonly FormatterConverter _defaultFormatterConverter = new FormatterConverter(); + + /// + /// Serializes the specified object. Supports anonymous and dynamic types. + /// + /// The object to serialize. + /// Options to use for serialization. + /// + /// A JSON representation of the serialized object. + /// + public static string Serialize(object value, JsonOptions options = null) + { + using (var writer = new StringWriter()) + { + Serialize(writer, value, options); + return writer.ToString(); + } + } + + /// + /// Serializes the specified object to the specified TextWriter. Supports anonymous and dynamic types. + /// + /// The output writer. May not be null. + /// The object to serialize. + /// Options to use for serialization. + public static void Serialize(TextWriter writer, object value, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + options = options ?? new JsonOptions(); + var jsonp = options.JsonPCallback.Nullify(); + if (jsonp != null) + { + writer.Write(options.JsonPCallback); + writer.Write('('); + } + + WriteValue(writer, value, new Dictionary(ReferenceComparer._current), options); + if (jsonp != null) + { + writer.Write(')'); + writer.Write(';'); + } + } + + /// + /// Deserializes an object from the specified text. + /// + /// The text text. + /// The required target type. + /// Options to use for deserialization. + /// + /// An instance of an object representing the input data. + /// + public static object Deserialize(string text, Type targetType = null, JsonOptions options = null) + { + if (text == null) + { + if (targetType == null) + return null; + + if (!targetType.IsValueType) + return null; + + return CreateInstance(null, targetType, 0, options, text); + } + + using (var reader = new StringReader(text)) + { + return Deserialize(reader, targetType, options); + } + } + + /// + /// Deserializes an object from the specified TextReader. + /// + /// The target type. + /// The input reader. May not be null. + /// Options to use for deserialization. + /// + /// An instance of an object representing the input data. + /// + public static T Deserialize(TextReader reader, JsonOptions options = null) => (T)Deserialize(reader, typeof(T), options); + + /// + /// Deserializes an object from the specified TextReader. + /// + /// The target type. + /// The text to deserialize. + /// Options to use for deserialization. + /// + /// An instance of an object representing the input data. + /// + public static T Deserialize(string text, JsonOptions options = null) => (T)Deserialize(text, typeof(T), options); + + /// + /// Deserializes an object from the specified TextReader. + /// + /// The input reader. May not be null. + /// The required target type. + /// Options to use for deserialization. + /// + /// An instance of an object representing the input data. + /// + public static object Deserialize(TextReader reader, Type targetType = null, JsonOptions options = null) + { + if (reader == null) + throw new ArgumentNullException(nameof(reader)); + + options = options ?? new JsonOptions(); + if (targetType == null || targetType == typeof(object)) + return ReadValue(reader, options); + + var value = ReadValue(reader, options); + if (value == null) + { + if (targetType.IsValueType) + return CreateInstance(null, targetType, 0, options, value); + + return null; + } + + return ChangeType(null, value, targetType, options); + } + + /// + /// Deserializes data from the specified text and populates a specified object instance. + /// + /// The text to deserialize. + /// The object instance to populate. + /// Options to use for deserialization. + public static void DeserializeToTarget(string text, object target, JsonOptions options = null) + { + if (text == null) + return; + + using (var reader = new StringReader(text)) + { + DeserializeToTarget(reader, target, options); + } + } + + /// + /// Deserializes data from the specified TextReader and populates a specified object instance. + /// + /// The input reader. May not be null. + /// The object instance to populate. + /// Options to use for deserialization. + public static void DeserializeToTarget(TextReader reader, object target, JsonOptions options = null) + { + if (reader == null) + throw new ArgumentNullException(nameof(reader)); + + if (target == null) + throw new ArgumentNullException(nameof(target)); + + var value = ReadValue(reader, options); + Apply(value, target, options); + } + + /// + /// Applies the content of an array or dictionary to a target object. + /// + /// The input object. + /// The target object. + /// Options to use. + public static void Apply(object input, object target, JsonOptions options = null) + { + options = options ?? new JsonOptions(); + if (target is Array array && !array.IsReadOnly) + { + Apply(input as IEnumerable, array, options); + return; + } + + if (input is IDictionary dic) + { + Apply(dic, target, options); + return; + } + + if (target != null) + { + var lo = GetListObject(target.GetType(), options, target, input, null, null); + if (lo != null) + { + lo.List = target; + ApplyToListTarget(target, input as IEnumerable, lo, options); + return; + } + } + } + + private static object CreateInstance(object target, Type type, int elementsCount, JsonOptions options, object value) + { + try + { + if (options.CreateInstanceCallback != null) + { + var og = new Dictionary + { + ["elementsCount"] = elementsCount, + ["value"] = value + }; + + var e = new JsonEventArgs(null, type, og, options, null, target) + { + EventType = JsonEventType.CreateInstance + }; + options.CreateInstanceCallback(e); + if (e.Handled) + return e.Value; + } + + if (type.IsArray) + { + var elementType = type.GetElementType(); + return Array.CreateInstance(elementType, elementsCount); + } + return Activator.CreateInstance(type); + } + catch (Exception e) + { + HandleException(new JsonException("JSO0001: JSON error detected. Cannot create an instance of the '" + type.Name + "' type.", e), options); + return null; + } + } + + private static ListObject GetListObject(Type type, JsonOptions options, object target, object value, IDictionary dictionary, string key) + { + if (options.GetListObjectCallback != null) + { + var og = new Dictionary + { + ["dictionary"] = dictionary, + ["type"] = type + }; + + var e = new JsonEventArgs(null, value, og, options, key, target) + { + EventType = JsonEventType.GetListObject + }; + options.GetListObjectCallback(e); + if (e.Handled) + { + og.TryGetValue("type", out var outType); + return outType as ListObject; + } + } + + if (type == typeof(byte[])) + return null; + + if (typeof(IList).IsAssignableFrom(type)) + return new IListObject(); // also handles arrays + + if (type.IsGenericType) + { + if (type.GetGenericTypeDefinition() == typeof(ICollection<>)) + return (ListObject)Activator.CreateInstance(typeof(ICollectionTObject<>).MakeGenericType(type.GetGenericArguments()[0])); + } + + foreach (var iface in type.GetInterfaces()) + { + if (!iface.IsGenericType) + continue; + + if (iface.GetGenericTypeDefinition() == typeof(ICollection<>)) + return (ListObject)Activator.CreateInstance(typeof(ICollectionTObject<>).MakeGenericType(iface.GetGenericArguments()[0])); + } + return null; + } + + /// + /// Defines an object that handles list deserialization. + /// + public abstract class ListObject + { + /// + /// Gets or sets the list object. + /// + /// + /// The list. + /// + public virtual object List { get; set; } + + /// + /// Clears the list object. + /// + public abstract void Clear(); + + /// + /// Adds a value to the list object. + /// + /// The value. + /// The options. + public abstract void Add(object value, JsonOptions options = null); + + /// + /// Gets the current context. + /// + /// + /// The context. May be null. + /// + public virtual IDictionary Context => null; + } + + private static void ApplyToListTarget(object target, IEnumerable input, ListObject list, JsonOptions options) + { + if (list.List == null) + return; + + if (list.Context != null) + { + list.Context["action"] = "init"; + list.Context["target"] = target; + list.Context["input"] = input; + list.Context["options"] = options; + } + + if (input != null) + { + var array = list.List as Array; + var max = 0; + var i = 0; + if (array != null) + { + i = array.GetLowerBound(0); + max = array.GetUpperBound(0); + } + + var itemType = GetItemType(list.List.GetType()); + foreach (var value in input) + { + if (array != null) + { + if ((i - 1) == max) + break; + + array.SetValue(ChangeType(target, value, itemType, options), i++); + } + else + { + var cvalue = ChangeType(target, value, itemType, options); + if (list.Context != null) + { + list.Context["action"] = "add"; + list.Context["itemType"] = itemType; + list.Context["value"] = value; + list.Context["cvalue"] = cvalue; + + if (!list.Context.TryGetValue("cvalue", out var newcvalue)) + continue; + + cvalue = newcvalue; + } + + list.Add(cvalue, options); + } + } + } + else + { + if (list.Context != null) + { + list.Context["action"] = "clear"; + } + list.Clear(); + } + + if (list.Context != null) + { + list.Context.Clear(); + } + } + + private static void Apply(IEnumerable input, Array target, JsonOptions options) + { + if (target == null || target.Rank != 1) + return; + + var elementType = target.GetType().GetElementType(); + var i = 0; + if (input != null) + { + foreach (var value in input) + { + target.SetValue(ChangeType(target, value, elementType, options), i++); + } + } + else + { + Array.Clear(target, 0, target.Length); + } + } + + private static bool AreValuesEqual(object o1, object o2) + { + if (ReferenceEquals(o1, o2)) + return true; + + if (o1 == null) + return o2 == null; + + return o1.Equals(o2); + } + + private static bool TryGetObjectDefaultValue(Attribute att, out object value) + { + if (att is JsonAttribute jsa && jsa.HasDefaultValue) + { + value = jsa.DefaultValue; + return true; + } + + if (att is DefaultValueAttribute dva) + { + value = dva.Value; + return true; + } + + value = null; + return false; + } + + private static string GetObjectName(Attribute att) + { + if (att is JsonAttribute jsa && !string.IsNullOrEmpty(jsa.Name)) + return jsa.Name; + + if (att is XmlAttributeAttribute xaa && !string.IsNullOrEmpty(xaa.AttributeName)) + return xaa.AttributeName; + + if (att is XmlElementAttribute xea && !string.IsNullOrEmpty(xea.ElementName)) + return xea.ElementName; + + return null; + } + + private static bool TryGetObjectDefaultValue(MemberInfo mi, out object value) + { + var atts = mi.GetCustomAttributes(true); + if (atts != null) + { + foreach (var att in atts.Cast()) + { + if (TryGetObjectDefaultValue(att, out value)) + return true; + } + } + value = null; + return false; + } + + private static string GetObjectName(MemberInfo mi, string defaultName) + { + var atts = mi.GetCustomAttributes(true); + if (atts != null) + { + foreach (var att in atts.Cast()) + { + var name = GetObjectName(att); + if (name != null) + return name; + } + } + return defaultName; + } + + private static bool TryGetObjectDefaultValue(PropertyDescriptor pd, out object value) + { + foreach (var att in pd.Attributes.Cast()) + { + if (TryGetObjectDefaultValue(att, out value)) + return true; + } + + value = null; + return false; + } + + private static string GetObjectName(PropertyDescriptor pd, string defaultName) + { + foreach (var att in pd.Attributes.Cast()) + { + var name = GetObjectName(att); + if (name != null) + return name; + } + return defaultName; + } + + private static bool HasScriptIgnore(PropertyDescriptor pd) + { + if (pd.Attributes == null) + return false; + + foreach (var att in pd.Attributes) + { + if (att.GetType().Name == null) + continue; + + if (att.GetType().Name.StartsWith(_scriptIgnore)) + return true; + } + return false; + } + + private static bool HasScriptIgnore(MemberInfo mi) + { + var atts = mi.GetCustomAttributes(true); + if (atts == null || atts.Length == 0) + return false; + + foreach (var obj in atts) + { +#pragma warning disable IDE0083 // Use pattern matching + if (!(obj is Attribute att)) +#pragma warning restore IDE0083 // Use pattern matching + continue; + + if (att.GetType().Name == null) + continue; + + if (att.GetType().Name.StartsWith(_scriptIgnore)) + return true; + } + return false; + } + + private static void Apply(IDictionary dictionary, object target, JsonOptions options) + { + if (dictionary == null || target == null) + return; + + if (target is IDictionary dicTarget) + { + var itemType = GetItemType(dicTarget.GetType()); + foreach (DictionaryEntry entry in dictionary) + { + if (entry.Key == null) + continue; + + if (itemType == typeof(object)) + { + dicTarget[entry.Key] = entry.Value; + } + else + { + dicTarget[entry.Key] = ChangeType(target, entry.Value, itemType, options); + } + } + return; + } + + var def = TypeDef.Get(target.GetType(), options); + + foreach (DictionaryEntry entry in dictionary) + { + if (entry.Key == null) + continue; + + var entryKey = string.Format(CultureInfo.InvariantCulture, "{0}", entry.Key); + var entryValue = entry.Value; + if (options.MapEntryCallback != null) + { + var og = new Dictionary + { + ["dictionary"] = dictionary + }; + + var e = new JsonEventArgs(null, entryValue, og, options, entryKey, target) + { + EventType = JsonEventType.MapEntry + }; + options.MapEntryCallback(e); + if (e.Handled) + continue; + + entryKey = e.Name; + entryValue = e.Value; + } + + def.ApplyEntry(dictionary, target, entryKey, entryValue, options); + } + } + + private static JsonAttribute GetJsonAttribute(MemberInfo pi) + { + var atts = pi.GetCustomAttributes(true); + if (atts == null || atts.Length == 0) + return null; + + foreach (var obj in atts) + { +#pragma warning disable IDE0083 // Use pattern matching + if (!(obj is Attribute att)) +#pragma warning restore IDE0083 // Use pattern matching + continue; + + if (att is JsonAttribute xatt) + return xatt; + + } + return null; + } + + /// + /// Gets the type of elements in a collection type. + /// + /// The collection type. + /// The element type or typeof(object) if it was not determined. + public static Type GetItemType(Type collectionType) + { + if (collectionType == null) + throw new ArgumentNullException(nameof(collectionType)); + + foreach (var iface in collectionType.GetInterfaces()) + { + if (!iface.IsGenericType) + continue; + + if (iface.GetGenericTypeDefinition() == typeof(IDictionary<,>)) + return iface.GetGenericArguments()[1]; + + if (iface.GetGenericTypeDefinition() == typeof(IList<>)) + return iface.GetGenericArguments()[0]; + + if (iface.GetGenericTypeDefinition() == typeof(ICollection<>)) + return iface.GetGenericArguments()[0]; + + if (iface.GetGenericTypeDefinition() == typeof(IEnumerable<>)) + return iface.GetGenericArguments()[0]; + } + return typeof(object); + } + + /// + /// Returns a System.Object with a specified type and whose value is equivalent to a specified input object. + /// If an error occurs, a computed default value of the target type will be returned. + /// + /// The input object. May be null. + /// The target type. May not be null. + /// The options to use. + /// + /// An object of the target type whose value is equivalent to input value. + /// + public static object ChangeType(object value, Type conversionType, JsonOptions options) => ChangeType(null, value, conversionType, options); + + /// + /// Returns a System.Object with a specified type and whose value is equivalent to a specified input object. + /// If an error occurs, a computed default value of the target type will be returned. + /// + /// The target. May be null. + /// The input object. May be null. + /// The target type. May not be null. + /// The options to use. + /// + /// An object of the target type whose value is equivalent to input value. + /// + public static object ChangeType(object target, object value, Type conversionType, JsonOptions options = null) + { + if (conversionType == null) + throw new ArgumentNullException(nameof(conversionType)); + + if (conversionType == typeof(object)) + return value; + + options = options ?? new JsonOptions(); + if (!(value is string)) + { + if (conversionType.IsArray) + { + if (value is IEnumerable en) + { + var elementType = conversionType.GetElementType(); + var list = new List(); + foreach (var obj in en) + { + list.Add(ChangeType(target, obj, elementType, options)); + } + + var array = Array.CreateInstance(elementType, list.Count); + if (array != null) + { + Array.Copy(list.ToArray(), array, list.Count); + } + return array; + } + } + + var lo = GetListObject(conversionType, options, target, value, null, null); + if (lo != null) + { + if (value is IEnumerable en) + { + lo.List = CreateInstance(target, conversionType, en is ICollection coll ? coll.Count : 0, options, value); + ApplyToListTarget(target, en, lo, options); + return lo.List; + } + } + } + + if (value is IDictionary dic) + { + var instance = CreateInstance(target, conversionType, 0, options, value); + if (instance != null) + { + Apply(dic, instance, options); + } + return instance; + } + + if (conversionType == typeof(byte[]) && value is string str) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.ByteArrayAsBase64)) + { + try + { + return Convert.FromBase64String(str); + } + catch (Exception e) + { + HandleException(new JsonException("JSO0013: JSON deserialization error with a base64 array as string.", e), options); + return null; + } + } + } + + if (conversionType == typeof(DateTime)) + { + if (value is DateTime) + return value; + + var svalue = string.Format(CultureInfo.InvariantCulture, "{0}", value); + if (!string.IsNullOrEmpty(svalue)) + { + if (TryParseDateTime(svalue, options.DateTimeStyles, out var dt)) + return dt; + } + } + + if (conversionType == typeof(TimeSpan)) + { + var svalue = string.Format(CultureInfo.InvariantCulture, "{0}", value); + if (!string.IsNullOrEmpty(svalue)) + { + if (long.TryParse(svalue, out var ticks)) + return new TimeSpan(ticks); + } + } + + return Conversions.ChangeType(value, conversionType, null, null); + } + + private static object[] ReadArray(TextReader reader, JsonOptions options) + { + if (!ReadWhitespaces(reader)) + return null; + + reader.Read(); + var list = new List(); + do + { + var value = ReadValue(reader, options, true, out var arrayEnd); + if (!Convert.IsDBNull(value)) + { + list.Add(value); + } + if (arrayEnd) + return list.ToArray(); + + if (reader.Peek() < 0) + { + HandleException(GetExpectedCharacterException(GetPosition(reader), ']'), options); + return list.ToArray(); + } + + } + while (true); + } + + private static JsonException GetExpectedCharacterException(long pos, char c) + { + if (pos < 0) + return new JsonException("JSO0002: JSON deserialization error detected. Expecting '" + c + "' character."); ; + + return new JsonException("JSO0003: JSON deserialization error detected at position " + pos + ". Expecting '" + c + "' character."); + } + + private static JsonException GetUnexpectedCharacterException(long pos, char c) + { + if (pos < 0) + return new JsonException("JSO0004: JSON deserialization error detected. Unexpected '" + c + "' character."); ; + + return new JsonException("JSO0005: JSON deserialization error detected at position " + pos + ". Unexpected '" + c + "' character."); + } + + private static JsonException GetExpectedHexaCharacterException(long pos) + { + if (pos < 0) + return new JsonException("JSO0006: JSON deserialization error detected. Expecting hexadecimal character."); ; + + return new JsonException("JSO0007: JSON deserialization error detected at position " + pos + ". Expecting hexadecimal character."); + } + + private static JsonException GetTypeException(long pos, string typeName, Exception inner) + { + if (pos < 0) + return new JsonException("JSO0010: JSON deserialization error detected for '" + typeName + "' type.", inner); + + return new JsonException("JSO0011: JSON deserialization error detected for '" + typeName + "' type at position " + pos + ".", inner); + } + + private static JsonException GetEofException(char c) => new JsonException("JSO0012: JSON deserialization error detected at end of text. Expecting '" + c + "' character."); + + private static long GetPosition(TextReader reader) + { + if (reader == null) + return -1; + + if (reader is StreamReader sr && sr.BaseStream != null) + { + try + { + return sr.BaseStream.Position; + } + catch + { + return -1; + } + } + + if (reader is StringReader str) + { + var fi = typeof(StringReader).GetField("_pos", BindingFlags.Instance | BindingFlags.NonPublic); + if (fi != null) + return (int)fi.GetValue(str); + } + return -1; + } + + private static Dictionary ReadDictionary(TextReader reader, JsonOptions options) + { + if (!ReadWhitespaces(reader)) + return null; + + reader.Read(); + var dictionary = new Dictionary(); + do + { + var i = reader.Peek(); + if (i < 0) + { + HandleException(GetEofException('}'), options); + return dictionary; + } + + var c = (char)reader.Read(); + switch (c) + { + case '}': + return dictionary; + + case '"': + var text = ReadString(reader, options); + if (!ReadWhitespaces(reader)) + { + HandleException(GetExpectedCharacterException(GetPosition(reader), ':'), options); + return dictionary; + } + + c = (char)reader.Peek(); + if (c != ':') + { + HandleException(GetExpectedCharacterException(GetPosition(reader), ':'), options); + return dictionary; + } + + reader.Read(); + dictionary[text] = ReadValue(reader, options); + break; + + case ',': + break; + + case '\r': + case '\n': + case '\t': + case ' ': + break; + + default: + HandleException(GetUnexpectedCharacterException(GetPosition(reader), c), options); + return dictionary; + } + } + while (true); + } + + private static string ReadString(TextReader reader, JsonOptions options) + { + var sb = new StringBuilder(); + do + { + var i = reader.Peek(); + if (i < 0) + { + HandleException(GetEofException('"'), options); + return null; + } + + var c = (char)reader.Read(); + if (c == '"') + break; + + if (c == '\\') + { + i = reader.Peek(); + if (i < 0) + { + HandleException(GetEofException('"'), options); + return null; + } + + var next = (char)reader.Read(); + switch (next) + { + case 'b': + sb.Append('\b'); + break; + + case 't': + sb.Append('\t'); + break; + + case 'n': + sb.Append('\n'); + break; + + case 'f': + sb.Append('\f'); + break; + + case 'r': + sb.Append('\r'); + break; + + case '/': + case '\\': + case '"': + sb.Append(next); + break; + + case 'u': // unicode + var us = ReadX4(reader, options); + sb.Append((char)us); + break; + + default: + sb.Append(c); + sb.Append(next); + break; + } + } + else + { + sb.Append(c); + } + } + while (true); + return sb.ToString(); + } + + private static ISerializable ReadSerializable(TextReader reader, JsonOptions options, string typeName, Dictionary values) + { + Type type; + try + { + type = Type.GetType(typeName, true); + } + catch (Exception e) + { + HandleException(GetTypeException(GetPosition(reader), typeName, e), options); + return null; + } + + var ctor = type.GetConstructor(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance, null, new[] { typeof(SerializationInfo), typeof(StreamingContext) }, null); + var info = new SerializationInfo(type, _defaultFormatterConverter); + + foreach (var kvp in values) + { + info.AddValue(kvp.Key, kvp.Value); + } + + var ctx = new StreamingContext(StreamingContextStates.Remoting, null); + try + { + return (ISerializable)ctor.Invoke(new object[] { info, ctx }); + } + catch (Exception e) + { + HandleException(GetTypeException(GetPosition(reader), typeName, e), options); + return null; + } + } + + private static object ReadValue(TextReader reader, JsonOptions options) => ReadValue(reader, options, false, out var _); + private static object ReadValue(TextReader reader, JsonOptions options, bool arrayMode, out bool arrayEnd) + { + arrayEnd = false; + // 1st chance type is determined by format + int i; + do + { + i = reader.Peek(); + if (i < 0) + return null; + + if (i == 10 || i == 13 || i == 9 || i == 32) + { + reader.Read(); + } + else + break; + } + while (true); + + var c = (char)i; + if (c == '"') + { + reader.Read(); + var s = ReadString(reader, options); + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.AutoParseDateTime)) + { + if (TryParseDateTime(s, options.DateTimeStyles, out var dt)) + return dt; + } + return s; + } + + if (c == '{') + { + var dic = ReadDictionary(reader, options); + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseISerializable)) + { + if (dic.TryGetValue(_serializationTypeToken, out var o)) + { + var typeName = string.Format(CultureInfo.InvariantCulture, "{0}", o); + if (!string.IsNullOrEmpty(typeName)) + { + dic.Remove(_serializationTypeToken); + return ReadSerializable(reader, options, typeName, dic); + } + } + } + return dic; + } + + if (c == '[') + return ReadArray(reader, options); + + if (c == 'n') + return ReadNew(reader, options, out arrayEnd); + + // handles the null/true/false cases + if (char.IsLetterOrDigit(c) || c == '.' || c == '-' || c == '+') + return ReadNumberOrLiteral(reader, options, out arrayEnd); + + if (arrayMode && (c == ']')) + { + reader.Read(); + arrayEnd = true; + return DBNull.Value; // marks array end + } + + if (arrayMode && (c == ',')) + { + reader.Read(); + return DBNull.Value; // marks array end + } + + HandleException(GetUnexpectedCharacterException(GetPosition(reader), c), options); + return null; + } + + private static object ReadNew(TextReader reader, JsonOptions options, out bool arrayEnd) + { + arrayEnd = false; + var sb = new StringBuilder(); + do + { + var i = reader.Peek(); + if (i < 0) + break; + + if (((char)i) == '}') + break; + + var c = (char)reader.Read(); + if (c == ',') + break; + + if (c == ']') + { + arrayEnd = true; + break; + } + + sb.Append(c); + } + while (true); + + var text = sb.ToString(); + if (string.Compare(_null, text.Trim(), StringComparison.OrdinalIgnoreCase) == 0) + return null; + + if (text.StartsWith(_dateStartJs) && text.EndsWith(_dateEndJs)) + { + if (long.TryParse(text.Substring(_dateStartJs.Length, text.Length - _dateStartJs.Length - _dateEndJs.Length), out var l)) + return new DateTime((l * 10000) + _minDateTimeTicks, DateTimeKind.Utc); + } + + HandleException(GetUnexpectedCharacterException(GetPosition(reader), text[0]), options); + return null; + } + + private static object ReadNumberOrLiteral(TextReader reader, JsonOptions options, out bool arrayEnd) + { + arrayEnd = false; + var sb = new StringBuilder(); + do + { + var i = reader.Peek(); + if (i < 0) + break; + + if (((char)i) == '}') + break; + + var c = (char)reader.Read(); + if (char.IsWhiteSpace(c) || c == ',') + break; + + if (c == ']') + { + arrayEnd = true; + break; + } + + sb.Append(c); + } + while (true); + + var text = sb.ToString(); + if (string.Compare(_null, text, StringComparison.OrdinalIgnoreCase) == 0) + return null; + + if (string.Compare(_true, text, StringComparison.OrdinalIgnoreCase) == 0) + return true; + + if (string.Compare(_false, text, StringComparison.OrdinalIgnoreCase) == 0) + return false; + + if (text.LastIndexOf("e", StringComparison.OrdinalIgnoreCase) >= 0) + { + if (double.TryParse(text, NumberStyles.Float, CultureInfo.InvariantCulture, out var d)) + return d; + } + else + { + if (text.IndexOf(".", StringComparison.OrdinalIgnoreCase) >= 0) + { + if (decimal.TryParse(text, NumberStyles.Float, CultureInfo.InvariantCulture, out var de)) + return de; + } + else + { + if (int.TryParse(text, NumberStyles.Integer, CultureInfo.InvariantCulture, out var i)) + return i; + + if (long.TryParse(text, NumberStyles.Integer, CultureInfo.InvariantCulture, out var l)) + return l; + + if (decimal.TryParse(text, NumberStyles.Number, CultureInfo.InvariantCulture, out var de)) + return de; + } + } + + HandleException(GetUnexpectedCharacterException(GetPosition(reader), text[0]), options); + return null; + } + + /// + /// Converts the JSON string representation of a date time to its DateTime equivalent. + /// + /// The input text. + /// A DateTime value if the text was converted successfully; otherwise, null. + public static DateTime? TryParseDateTime(string text) + { + if (!TryParseDateTime(text, out var dt)) + return null; + + return dt; + } + + /// + /// Converts the JSON string representation of a date time to its DateTime equivalent. + /// + /// The input text. + /// The styles to use. + /// A DateTime value if the text was converted successfully; otherwise, null. + public static DateTime? TryParseDateTime(string text, DateTimeStyles styles) + { + if (!TryParseDateTime(text, styles, out var dt)) + return null; + + return dt; + } + + /// + /// Converts the JSON string representation of a date time to its DateTime equivalent. + /// + /// The input text. + /// When this method returns, contains the DateTime equivalent. + /// true if the text was converted successfully; otherwise, false. + public static bool TryParseDateTime(string text, out DateTime dt) => TryParseDateTime(text, JsonOptions._defaultDateTimeStyles, out dt); + + /// + /// Converts the JSON string representation of a date time to its DateTime equivalent. + /// + /// The input text. + /// The styles to use. + /// When this method returns, contains the DateTime equivalent. + /// + /// true if the text was converted successfully; otherwise, false. + /// + public static bool TryParseDateTime(string text, DateTimeStyles styles, out DateTime dt) + { + dt = DateTime.MinValue; + if (text == null) + return false; + + if (text.Length > 2) + { + if (text[0] == '"' && text[text.Length - 1] == '"') + { + using (var reader = new StringReader(text)) + { + reader.Read(); // skip " + var options = new JsonOptions + { + ThrowExceptions = false + }; + text = ReadString(reader, options); + } + } + } + + if (text.EndsWith("Z", StringComparison.OrdinalIgnoreCase)) + { + if (DateTime.TryParseExact(text, _dateFormatsUtc, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces | DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out dt)) + return true; + } + + var offsetHours = 0; + var offsetMinutes = 0; + var kind = DateTimeKind.Utc; + const int len = 19; + + // s format length is 19, as in '2012-02-21T17:07:14' + // so we can do quick checks + // this portion of code is needed because we assume UTC and the default DateTime parse behavior is not that (even with AssumeUniversal) + if (text.Length >= len && + text[4] == '-' && + text[7] == '-' && + (text[10] == 'T' || text[10] == 't') && + text[13] == ':' && + text[16] == ':') + { + if (DateTime.TryParseExact(text, "o", null, DateTimeStyles.AssumeUniversal, out dt)) + return true; + + var tz = text.Substring(len).IndexOfAny(new[] { '+', '-' }); + var text2 = text; + if (tz >= 0) + { + tz += len; + var offset = text.Substring(tz + 1).Trim(); + if (int.TryParse(offset, out int i)) + { + kind = DateTimeKind.Local; + offsetHours = i / 100; + offsetMinutes = i % 100; + if (text[tz] == '-') + { + offsetHours = -offsetHours; + offsetMinutes = -offsetMinutes; + } + text2 = text.Substring(0, tz); + } + } + + if (tz >= 0) + { + if (DateTime.TryParseExact(text2, "s", null, DateTimeStyles.AssumeLocal, out dt)) + { + if (offsetHours != 0) + { + dt = dt.AddHours(offsetHours); + } + + if (offsetMinutes != 0) + { + dt = dt.AddMinutes(offsetMinutes); + } + return true; + } + } + else + { + if (DateTime.TryParseExact(text, "s", null, DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, out dt)) + return true; + } + } + + // 01234567890123456 + // 20150525T15:50:00 + if (text != null && text.Length == 17) + { + if ((text[8] == 'T' || text[8] == 't') && text[11] == ':' && text[14] == ':') + { + _ = int.TryParse(text.Substring(0, 4), out var year); + _ = int.TryParse(text.Substring(4, 2), out var month); + _ = int.TryParse(text.Substring(6, 2), out var day); + _ = int.TryParse(text.Substring(9, 2), out var hour); + _ = int.TryParse(text.Substring(12, 2), out var minute); + _ = int.TryParse(text.Substring(15, 2), out var second); + if (month > 0 && month < 13 && + day > 0 && day < 32 && + year >= 0 && + hour >= 0 && hour < 24 && + minute >= 0 && minute < 60 && + second >= 0 && second < 60) + { + try + { + dt = new DateTime(year, month, day, hour, minute, second); + return true; + } + catch + { + // do nothing + } + } + } + } + + // read this http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx + string ticks = null; + if (text.StartsWith(_dateStartJs) && text.EndsWith(_dateEndJs)) + { + ticks = text.Substring(_dateStartJs.Length, text.Length - _dateStartJs.Length - _dateEndJs.Length).Trim(); + } + else if (text.StartsWith(_dateStart2, StringComparison.OrdinalIgnoreCase) && text.EndsWith(_dateEnd2, StringComparison.OrdinalIgnoreCase)) + { + ticks = text.Substring(_dateStart2.Length, text.Length - _dateEnd2.Length - _dateStart2.Length).Trim(); + } + + if (!string.IsNullOrEmpty(ticks)) + { + var startIndex = (ticks[0] == '-') || (ticks[0] == '+') ? 1 : 0; + var pos = ticks.IndexOfAny(new[] { '+', '-' }, startIndex); + if (pos >= 0) + { + var neg = ticks[pos] == '-'; + var offset = ticks.Substring(pos + 1).Trim(); + ticks = ticks.Substring(0, pos).Trim(); + if (int.TryParse(offset, out var i)) + { + kind = DateTimeKind.Local; + offsetHours = i / 100; + offsetMinutes = i % 100; + if (neg) + { + offsetHours = -offsetHours; + offsetMinutes = -offsetMinutes; + } + } + } + + if (long.TryParse(ticks, NumberStyles.Number, CultureInfo.InvariantCulture, out var l)) + { + dt = new DateTime((l * 10000) + _minDateTimeTicks, kind); + if (offsetHours != 0) + { + dt = dt.AddHours(offsetHours); + } + + if (offsetMinutes != 0) + { + dt = dt.AddMinutes(offsetMinutes); + } + return true; + } + } + + // don't parse pure timespan style XX:YY:ZZ + if (text.Length == 8 && text[2] == ':' && text[5] == ':') + { + dt = DateTime.MinValue; + return false; + } + + return DateTime.TryParse(text, null, styles, out dt); + } + + private static void HandleException(Exception ex, JsonOptions options) + { + if (options != null && !options.ThrowExceptions) + { + options.AddException(ex); + return; + } + throw ex; + } + + private static byte GetHexValue(TextReader reader, char c, JsonOptions options) + { + c = char.ToLower(c); + if (c < '0') + { + HandleException(GetExpectedHexaCharacterException(GetPosition(reader)), options); + return 0; + } + + if (c <= '9') + return (byte)(c - '0'); + + if (c < 'a') + { + HandleException(GetExpectedHexaCharacterException(GetPosition(reader)), options); + return 0; + } + + if (c <= 'f') + return (byte)(c - 'a' + 10); + + HandleException(GetExpectedHexaCharacterException(GetPosition(reader)), options); + return 0; + } + + private static ushort ReadX4(TextReader reader, JsonOptions options) + { + var u = 0; + for (var i = 0; i < 4; i++) + { + u *= 16; + if (reader.Peek() < 0) + { + HandleException(new JsonException("JSO0008: JSON deserialization error detected at end of stream. Expecting hexadecimal character."), options); + return 0; + } + + u += GetHexValue(reader, (char)reader.Read(), options); + } + return (ushort)u; + } + + private static bool ReadWhitespaces(TextReader reader) => ReadWhile(reader, char.IsWhiteSpace); + private static bool ReadWhile(TextReader reader, Predicate cont) + { + do + { + var i = reader.Peek(); + if (i < 0) + return false; + + if (!cont((char)i)) + return true; + + reader.Read(); + } + while (true); + } + + /// + /// Defines an interface for quick access to a type member. + /// + public interface IMemberAccessor + { + /// + /// Gets a component value. + /// + /// The component. + /// The value. + object Get(object component); + + /// + /// Sets a component's value. + /// + /// The component. + /// The value to set. + void Set(object component, object value); + } + + /// + /// Defines a type's member. + /// + public class MemberDefinition + { + private string _name; + private string _wireName; + private string _escapedWireName; + private IMemberAccessor _accessor; + private Type _type; + + /// + /// Gets or sets the member name. + /// + /// + /// The name. + /// + public string Name + { + get => _name; + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException(null, nameof(value)); + + _name = value; + } + } + + /// + /// Gets or sets the name used for serialization and deserialiation. + /// + /// + /// The name used during serialization and deserialization. + /// + public string WireName + { + get => _wireName; + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException(null, nameof(value)); + + _wireName = value; + } + } + + /// + /// Gets or sets the escaped name used during serialization and deserialiation. + /// + /// + /// The escaped name used during serialization and deserialiation. + /// + public string EscapedWireName + { + get => _escapedWireName; + set + { + if (string.IsNullOrEmpty(value)) + throw new ArgumentException(null, nameof(value)); + + _escapedWireName = value; + } + } + + /// + /// Gets or sets a value indicating whether this instance has default value. + /// + /// + /// true if this instance has default value; otherwise, false. + /// + public bool HasDefaultValue { get; set; } + + /// + /// Gets or sets the default value. + /// + /// + /// The default value. + /// + public object DefaultValue { get; set; } + + /// + /// Gets or sets the accessor. + /// + /// + /// The accessor. + /// + public IMemberAccessor Accessor + { + get => _accessor; + set => _accessor = value ?? throw new ArgumentNullException(nameof(value)); + } + + /// + /// Gets or sets the member type. + /// + /// + /// The type. + /// + public Type Type + { + get => _type; + set => _type = value ?? throw new ArgumentNullException(nameof(value)); + } + + /// + /// Returns a that represents this instance. + /// + /// + /// A that represents this instance. + /// + public override string ToString() => Name; + + /// + /// Gets or creates a member instance. + /// + /// The target. + /// The elements count. + /// The options. + /// A new or existing instance. + public virtual object GetOrCreateInstance(object target, int elementsCount, JsonOptions options = null) + { + object targetValue; + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.ContinueOnValueError)) + { + try + { + targetValue = Accessor.Get(target); + } + catch + { + return null; + } + } + else + { + targetValue = Accessor.Get(target); + } + + // sufficient array? + if (targetValue == null || (targetValue is Array array && array.GetLength(0) < elementsCount)) + { + if (Type.IsInterface) + return null; + + targetValue = CreateInstance(target, Type, elementsCount, options, targetValue); + if (targetValue != null) + { + Accessor.Set(target, targetValue); + } + } + return targetValue; + } + + /// + /// Applies the dictionary entry to this member. + /// + /// The input dictionary. + /// The target object. + /// The entry key. + /// The entry value. + /// The options. + public virtual void ApplyEntry(IDictionary dictionary, object target, string key, object value, JsonOptions options = null) + { + if (options.ApplyEntryCallback != null) + { + var og = new Dictionary + { + ["dictionary"] = dictionary, + ["member"] = this + }; + + var e = new JsonEventArgs(null, value, og, options, key, target) + { + EventType = JsonEventType.ApplyEntry + }; + options.ApplyEntryCallback(e); + if (e.Handled) + return; + + value = e.Value; + } + + if (value is IDictionary dic) + { + var targetValue = GetOrCreateInstance(target, dic.Count, options); + Apply(dic, targetValue, options); + return; + + } + + var lo = GetListObject(Type, options, target, value, dictionary, key); + if (lo != null) + { + if (value is IEnumerable enumerable) + { + lo.List = GetOrCreateInstance(target, enumerable is ICollection coll ? coll.Count : 0, options); + ApplyToListTarget(target, enumerable, lo, options); + return; + } + } + + + var cvalue = ChangeType(target, value, Type, options); + Accessor.Set(target, cvalue); + } + + /// + /// Determines whether the specified value is equal to the zero value for its type. + /// + /// The value. + /// true if the specified value is equal to the zero value. + public virtual bool IsNullDateTimeValue(object value) => value == null || DateTime.MinValue.Equals(value); + + /// + /// Determines whether the specified value is equal to the zero value for its type. + /// + /// The value. + /// true if the specified value is equal to the zero value. + public virtual bool IsZeroValue(object value) + { + if (value == null) + return false; + + var type = value.GetType(); + if (type != Type) + return false; + + return IsZeroValueType(value); + } + + /// + /// Determines if a value equals the default value. + /// + /// The value to compare. + /// true if both values are equal; false otherwise. + public virtual bool EqualsDefaultValue(object value) => AreValuesEqual(DefaultValue, value); + + /// + /// Removes a deserialization member. + /// + /// The type. May not be null. + /// The options. May be null. + /// The member. May not be null. + /// true if item is successfully removed; otherwise, false. + public static bool RemoveDeserializationMember(Type type, JsonOptions options, MemberDefinition member) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (member == null) + throw new ArgumentNullException(nameof(member)); + + options = options ?? new JsonOptions(); + return TypeDef.RemoveDeserializationMember(type, options, member); + } + + /// + /// Removes a serialization member. + /// + /// The type. May not be null. + /// The options. May be null. + /// The member. May not be null. + /// true if item is successfully removed; otherwise, false. + public static bool RemoveSerializationMember(Type type, JsonOptions options, MemberDefinition member) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (member == null) + throw new ArgumentNullException(nameof(member)); + + options = options ?? new JsonOptions(); + return TypeDef.RemoveSerializationMember(type, options, member); + } + + /// + /// Adds a deserialization member. + /// + /// The type. May not be null. + /// The options. May be null. + /// The member. May not be null. + /// true if item is successfully added; otherwise, false. + public static void AddDeserializationMember(Type type, JsonOptions options, MemberDefinition member) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (member == null) + throw new ArgumentNullException(nameof(member)); + + options = options ?? new JsonOptions(); + TypeDef.AddDeserializationMember(type, options, member); + } + + /// + /// Adds a serialization member. + /// + /// The type. May not be null. + /// The options. May be null. + /// The member. May not be null. + /// true if item is successfully added; otherwise, false. + public static void AddSerializationMember(Type type, JsonOptions options, MemberDefinition member) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (member == null) + throw new ArgumentNullException(nameof(member)); + + options = options ?? new JsonOptions(); + TypeDef.AddSerializationMember(type, options, member); + } + + /// + /// Gets the serialization members for a given type. + /// + /// The type. May not be null. + /// The options. May be null. + /// A list of serialization members. + public static MemberDefinition[] GetSerializationMembers(Type type, JsonOptions options = null) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + options = options ?? new JsonOptions(); + return TypeDef.GetSerializationMembers(type, options); + } + + /// + /// Gets the deserialization members for a given type. + /// + /// The type. May not be null. + /// The options. May be null. + /// A list of deserialization members. + public static MemberDefinition[] GetDeserializationMembers(Type type, JsonOptions options = null) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + options = options ?? new JsonOptions(); + return TypeDef.GetDeserializationMembers(type, options); + } + + /// + /// Run a specified action, using the member definition lock. + /// + /// The action input type. + /// The action. May not be null. + /// The state. May be null. + public static void UsingLock(Action action, T state) + { + if (action == null) + throw new ArgumentNullException(nameof(action)); + + TypeDef.Lock(action, state); + } + } + + /// + /// Writes a value to a JSON writer. + /// + /// The writer. May not be null. + /// The value to writer. + /// A graph of objects to track cyclic serialization. + /// The options to use. + public static void WriteValue(TextWriter writer, object value, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + objectGraph = objectGraph ?? new Dictionary(); + options = options ?? new JsonOptions(); + if (options.WriteValueCallback != null) + { + var e = new JsonEventArgs(writer, value, objectGraph, options) + { + EventType = JsonEventType.WriteValue + }; + options.WriteValueCallback(e); + if (e.Handled) + return; + } + + if ((value == null) || Convert.IsDBNull(value)) + { + writer.Write(_null); + return; + } + + if (value is string s) + { + WriteString(writer, s); + return; + } + + if (value is bool b) + { + writer.Write(b ? _true : _false); + return; + } + + if (value is float f) + { + if (float.IsInfinity(f) || float.IsNaN(f)) + { + writer.Write(_null); + return; + } + + writer.Write(f.ToString(_roundTripFormat, CultureInfo.InvariantCulture)); + return; + } + + if (value is double d) + { + if (double.IsInfinity(d) || double.IsNaN(d)) + { + writer.Write(_null); + return; + } + + writer.Write(d.ToString(_roundTripFormat, CultureInfo.InvariantCulture)); + return; + } + + if (value is char c) + { + if (c == '\0') + { + writer.Write(_null); + return; + } + WriteString(writer, c.ToString()); + return; + } + + if (value is Enum @enum) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.EnumAsText)) + { + WriteString(writer, value.ToString()); + } + else + { + writer.Write(@enum.ToString(_enumFormat)); + } + return; + } + + if (value is TimeSpan ts) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.TimeSpanAsText)) + { + WriteString(writer, ts.ToString("g", CultureInfo.InvariantCulture)); + } + else + { + writer.Write(ts.Ticks); + } + return; + } + + if (value is DateTimeOffset dto) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatJs)) + { + writer.Write(_dateStartJs); + writer.Write((dto.ToUniversalTime().Ticks - _minDateTimeTicks) / 10000); + writer.Write(_dateEndJs); + } + else if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateTimeOffsetFormatCustom) && !string.IsNullOrEmpty(options.DateTimeOffsetFormat)) + { + WriteString(writer, dto.ToUniversalTime().ToString(options.DateTimeOffsetFormat)); + } + else if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatIso8601)) + { + WriteString(writer, dto.ToUniversalTime().ToString("s")); + } + else if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatRoundtripUtc)) + { + WriteString(writer, dto.ToUniversalTime().ToString("o")); + } + else + { + writer.Write(_dateStart); + writer.Write((dto.ToUniversalTime().Ticks - _minDateTimeTicks) / 10000); + writer.Write(_dateEnd); + } + return; + } + // read this http://weblogs.asp.net/bleroy/archive/2008/01/18/dates-and-json.aspx + + if (value is DateTime dt) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatJs)) + { + writer.Write(_dateStartJs); + writer.Write((dt.ToUniversalTime().Ticks - _minDateTimeTicks) / 10000); + writer.Write(_dateEndJs); + } + else if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatCustom) && !string.IsNullOrEmpty(options.DateTimeFormat)) + { + WriteString(writer, dt.ToUniversalTime().ToString(options.DateTimeFormat)); + } + else if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatIso8601)) + { + writer.Write('"'); + writer.Write(EscapeString(dt.ToUniversalTime().ToString("s")), options); + AppendTimeZoneUtcOffset(writer, dt); + writer.Write('"'); + } + else if (options.SerializationOptions.HasFlag(JsonSerializationOptions.DateFormatRoundtripUtc)) + { + WriteString(writer, dt.ToUniversalTime().ToString("o")); + } + else + { + writer.Write(_dateStart); + writer.Write((dt.ToUniversalTime().Ticks - _minDateTimeTicks) / 10000); + AppendTimeZoneUtcOffset(writer, dt); + writer.Write(_dateEnd); + } + return; + } + + if (value is int || value is uint || value is short || value is ushort || + value is long || value is ulong || value is byte || value is sbyte || + value is decimal) + { + writer.Write(string.Format(CultureInfo.InvariantCulture, _zeroArg, value)); + return; + } + + if (value is Guid guid) + { + if (options.GuidFormat != null) + { + WriteUnescapedString(writer, guid.ToString(options.GuidFormat)); + } + else + { + WriteUnescapedString(writer, guid.ToString()); + } + return; + } + + var uri = value as Uri; + if (uri != null) + { + WriteString(writer, uri.GetComponents(UriComponents.SerializationInfoString, UriFormat.UriEscaped)); + return; + } + + if (value is Array array) + { + WriteArray(writer, array, objectGraph, options); + return; + } + + if (objectGraph.ContainsKey(value)) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.ContinueOnCycle)) + { + writer.Write(_null); + return; + } + + HandleException(new JsonException("JSO0009: Cyclic JSON serialization detected."), options); + return; + } + + objectGraph.Add(value, null); + + if (value is IDictionary dictionary) + { + WriteDictionary(writer, dictionary, objectGraph, options); + return; + } + + // ExpandoObject falls here + if (TypeDef.IsKeyValuePairEnumerable(value.GetType(), out var _, out var _)) + { + WriteDictionary(writer, new KeyValueTypeDictionary(value), objectGraph, options); + return; + } + + if (value is IEnumerable enumerable) + { + WriteEnumerable(writer, enumerable, objectGraph, options); + return; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.StreamsAsBase64)) + { + if (value is Stream stream) + { + WriteBase64Stream(writer, stream, objectGraph, options); + return; + } + } + + WriteObject(writer, value, objectGraph, options); + } + + /// + /// Writes a stream to a JSON writer. + /// + /// The writer. May not be null. + /// The stream. May not be null. + /// The object graph. + /// The options to use. + /// The number of written bytes. + public static long WriteBase64Stream(TextWriter writer, Stream stream, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (stream == null) + throw new ArgumentNullException(nameof(stream)); + + objectGraph = objectGraph ?? new Dictionary(); + options = options ?? new JsonOptions(); + var total = 0L; + + if (writer is StreamWriter sw && sw.BaseStream != null) + { + sw.Flush(); + return WriteBase64Stream(stream, sw.BaseStream, options); + } + + if (writer is IndentedTextWriter itw && itw.InnerWriter != null) + { + itw.Flush(); + return WriteBase64Stream(itw.InnerWriter, stream, objectGraph, options); + } + + using (var ms = new MemoryStream()) + { + var bytes = new byte[options.FinalStreamingBufferChunkSize]; + do + { + var read = stream.Read(bytes, 0, bytes.Length); + if (read == 0) + break; + + ms.Write(bytes, 0, read); + total += read; + } + while (true); + + writer.Write('"'); + writer.Write(Convert.ToBase64String(ms.ToArray())); + writer.Write('"'); + return total; + } + } + + private static long WriteBase64Stream(Stream inputStream, Stream outputStream, JsonOptions options) + { + outputStream.WriteByte((byte)'"'); + // don't dispose this stream or it will dispose the outputStream as well + var b64 = new CryptoStream(outputStream, new ToBase64Transform(), CryptoStreamMode.Write); + var total = 0L; + var bytes = new byte[options.FinalStreamingBufferChunkSize]; + do + { + var read = inputStream.Read(bytes, 0, bytes.Length); + if (read == 0) + break; + + b64.Write(bytes, 0, read); + total += read; + } + while (true); + + b64.FlushFinalBlock(); + b64.Flush(); + outputStream.WriteByte((byte)'"'); + return total; + } + + private static bool InternalIsKeyValuePairEnumerable(Type type, out Type keyType, out Type valueType) + { + keyType = null; + valueType = null; + foreach (var t in type.GetInterfaces()) + { + if (t.IsGenericType) + { + if (typeof(IEnumerable<>).IsAssignableFrom(t.GetGenericTypeDefinition())) + { + var args = t.GetGenericArguments(); + if (args.Length == 1) + { + var kvp = args[0]; + if (kvp.IsGenericType && typeof(KeyValuePair<,>).IsAssignableFrom(kvp.GetGenericTypeDefinition())) + { + var kvpArgs = kvp.GetGenericArguments(); + if (kvpArgs.Length == 2) + { + keyType = kvpArgs[0]; + valueType = kvpArgs[1]; + return true; + } + } + } + } + } + } + return false; + } + + private static void AppendTimeZoneUtcOffset(TextWriter writer, DateTime dt) + { + if (dt.Kind != DateTimeKind.Utc) + { + var offset = TimeZoneInfo.Local.GetUtcOffset(dt); + writer.Write((offset.Ticks >= 0) ? '+' : '-'); + writer.Write(Math.Abs(offset.Hours).ToString(_d2Format)); + writer.Write(Math.Abs(offset.Minutes).ToString(_d2Format)); + } + } + + /// + /// Writes an enumerable to a JSON writer. + /// + /// The writer. May not be null. + /// The array. May not be null. + /// The object graph. + /// The options to use. + public static void WriteArray(TextWriter writer, Array array, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (array == null) + throw new ArgumentNullException(nameof(array)); + + objectGraph = objectGraph ?? new Dictionary(); + options = options ?? new JsonOptions(); + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.ByteArrayAsBase64)) + { + if (array is byte[] bytes) + { + using (var ms = new MemoryStream(bytes)) + { + ms.Position = 0; + WriteBase64Stream(writer, ms, objectGraph, options); + } + return; + } + } + +#pragma warning disable CA1825 // Avoid zero-length array allocations + WriteArray(writer, array, objectGraph, options, new int[0]); +#pragma warning restore CA1825 // Avoid zero-length array allocations + } + + private static void WriteArray(TextWriter writer, Array array, IDictionary objectGraph, JsonOptions options, int[] indices) + { + var newIndices = new int[indices.Length + 1]; + for (var i = 0; i < indices.Length; i++) + { + newIndices[i] = indices[i]; + } + + writer.Write('['); + for (var i = 0; i < array.GetLength(indices.Length); i++) + { + if (i > 0) + { + writer.Write(','); + } + newIndices[indices.Length] = i; + + if (array.Rank == newIndices.Length) + { + WriteValue(writer, array.GetValue(newIndices), objectGraph, options); + } + else + { + WriteArray(writer, array, objectGraph, options, newIndices); + } + } + writer.Write(']'); + } + + /// + /// Writes an enumerable to a JSON writer. + /// + /// The writer. May not be null. + /// The enumerable. May not be null. + /// The object graph. + /// The options to use. + public static void WriteEnumerable(TextWriter writer, IEnumerable enumerable, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (enumerable == null) + throw new ArgumentNullException(nameof(enumerable)); + + objectGraph = objectGraph ?? new Dictionary(); + options = options ?? new JsonOptions(); + writer.Write('['); + var first = true; + foreach (var value in enumerable) + { + if (!first) + { + writer.Write(','); + } + else + { + first = false; + } + WriteValue(writer, value, objectGraph, options); + } + writer.Write(']'); + } + + /// + /// Writes a dictionary to a JSON writer. + /// + /// The writer. May not be null. + /// The dictionary. May not be null. + /// The object graph. + /// The options to use. + public static void WriteDictionary(TextWriter writer, IDictionary dictionary, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (dictionary == null) + throw new ArgumentNullException(nameof(dictionary)); + + objectGraph = objectGraph ?? new Dictionary(); + options = options ?? new JsonOptions(); + writer.Write('{'); + var first = true; + foreach (DictionaryEntry entry in dictionary) + { + if (entry.Key == null) + continue; + + var entryKey = string.Format(CultureInfo.InvariantCulture, "{0}", entry.Key); + if (!first) + { + writer.Write(','); + } + else + { + first = false; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.WriteKeysWithoutQuotes)) + { + writer.Write(EscapeString(entryKey)); + } + else + { + WriteString(writer, entryKey); + } + + writer.Write(':'); + WriteValue(writer, entry.Value, objectGraph, options); + } + writer.Write('}'); + } + + private static void WriteSerializable(TextWriter writer, ISerializable serializable, IDictionary objectGraph, JsonOptions options) + { + var info = new SerializationInfo(serializable.GetType(), _defaultFormatterConverter); + var ctx = new StreamingContext(StreamingContextStates.Remoting, null); + serializable.GetObjectData(info, ctx); + info.AddValue(_serializationTypeToken, serializable.GetType().AssemblyQualifiedName); + + var first = true; + foreach (var entry in info) + { + if (!first) + { + writer.Write(','); + } + else + { + first = false; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.WriteKeysWithoutQuotes)) + { + writer.Write(EscapeString(entry.Name)); + } + else + { + WriteString(writer, entry.Name); + } + + writer.Write(':'); + WriteValue(writer, entry.Value, objectGraph, options); + } + } + + private static bool ForceSerializable(object obj) => obj is Exception; + + /// + /// Writes an object to the JSON writer. + /// + /// The writer. May not be null. + /// The object to serialize. May not be null. + /// The object graph. + /// The options to use. + public static void WriteObject(TextWriter writer, object value, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (value == null) + throw new ArgumentNullException(nameof(value)); + + objectGraph = objectGraph ?? new Dictionary(); + options = options ?? new JsonOptions(); + + ISerializable serializable = null; + var useISerializable = options.SerializationOptions.HasFlag(JsonSerializationOptions.UseISerializable) || ForceSerializable(value); + if (useISerializable) + { + serializable = value as ISerializable; + } + + writer.Write('{'); + + if (options.BeforeWriteObjectCallback != null) + { + var e = new JsonEventArgs(writer, value, objectGraph, options) + { + EventType = JsonEventType.BeforeWriteObject + }; + options.BeforeWriteObjectCallback(e); + if (e.Handled) + return; + } + + var type = value.GetType(); + if (serializable != null) + { + WriteSerializable(writer, serializable, objectGraph, options); + } + else + { + var def = TypeDef.Get(type, options); + def.WriteValues(writer, value, objectGraph, options); + } + + if (options.AfterWriteObjectCallback != null) + { + var e = new JsonEventArgs(writer, value, objectGraph, options) + { + EventType = JsonEventType.AfterWriteObject + }; + options.AfterWriteObjectCallback(e); + } + + writer.Write('}'); + } + + /// + /// Determines whether the specified value is a value type and is equal to zero. + /// + /// The value. + /// true if the specified value is a value type and is equal to zero; false otherwise. + public static bool IsZeroValueType(object value) + { + if (value == null) + return false; + + var type = value.GetType(); + if (!type.IsValueType) + return false; + + return value.Equals(Activator.CreateInstance(type)); + } + + /// + /// Writes a name/value pair to a JSON writer. + /// + /// The input writer. May not be null. + /// The name. null values will be converted to empty values. + /// The value. + /// The object graph. + /// The options to use. + public static void WriteNameValue(TextWriter writer, string name, object value, IDictionary objectGraph, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + name = name ?? string.Empty; + options = options ?? new JsonOptions(); + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.WriteKeysWithoutQuotes)) + { + writer.Write(EscapeString(name)); + } + else + { + WriteString(writer, name); + } + + writer.Write(':'); + WriteValue(writer, value, objectGraph, options); + } + + /// + /// Writes a string to a JSON writer. + /// + /// The input writer. May not be null. + /// The text. + public static void WriteString(TextWriter writer, string text) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (text == null) + { + writer.Write(_null); + return; + } + + writer.Write('"'); + writer.Write(EscapeString(text)); + writer.Write('"'); + } + + /// + /// Writes a string to a JSON writer. + /// + /// The input writer. May not be null. + /// The text. + public static void WriteUnescapedString(TextWriter writer, string text) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + if (text == null) + { + writer.Write(_null); + return; + } + + writer.Write('"'); + writer.Write(text); + writer.Write('"'); + } + + private static void AppendCharAsUnicode(StringBuilder sb, char c) + { + sb.Append('\\'); + sb.Append('u'); + sb.AppendFormat(CultureInfo.InvariantCulture, _x4Format, (ushort)c); + } + + /// + /// Serializes an object with format. Note this is more for debugging purposes as it's not designed to be fast. + /// + /// The JSON object. May be null. + /// The options to use. May be null. + /// A string containing the formatted object. + public static string SerializeFormatted(object value, JsonOptions options = null) + { + using (var sw = new StringWriter()) + { + SerializeFormatted(sw, value, options); + return sw.ToString(); + } + } + + /// + /// Serializes an object with format. Note this is more for debugging purposes as it's not designed to be fast. + /// + /// The output writer. May not be null. + /// The JSON object. May be null. + /// The options to use. May be null. + public static void SerializeFormatted(TextWriter writer, object value, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + options = options ?? new JsonOptions(); + var serialized = Serialize(value, options); + var deserialized = Deserialize(serialized, typeof(object), options); + WriteFormatted(writer, deserialized, options); + } + + /// + /// Writes a JSON deserialized object formatted. + /// + /// The JSON object. May be null. + /// The options to use. May be null. + /// A string containing the formatted object. + public static string WriteFormatted(object jsonObject, JsonOptions options = null) + { + using (var sw = new StringWriter()) + { + WriteFormatted(sw, jsonObject, options); + return sw.ToString(); + } + } + + /// + /// Writes a JSON deserialized object formatted. + /// + /// The output writer. May not be null. + /// The JSON object. May be null. + /// The options to use. May be null. + public static void WriteFormatted(TextWriter writer, object jsonObject, JsonOptions options = null) + { + if (writer == null) + throw new ArgumentNullException(nameof(writer)); + + options = options ?? new JsonOptions(); + var itw = new IndentedTextWriter(writer, options.FormattingTab); + WriteFormatted(itw, jsonObject, options); + } + + private static void WriteFormatted(IndentedTextWriter writer, object jsonObject, JsonOptions options) + { + if (jsonObject is DictionaryEntry entry) + { + var entryKey = string.Format(CultureInfo.InvariantCulture, "{0}", entry.Key); + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.WriteKeysWithoutQuotes)) + { + writer.Write(entryKey); + writer.Write(": "); + } + else + { + writer.Write('"'); + writer.Write(entryKey); + writer.Write("\": "); + } + + writer.Indent++; + WriteFormatted(writer, entry.Value, options); + writer.Indent--; + return; + } + + if (jsonObject is IDictionary dictionary) + { + writer.WriteLine('{'); + var first = true; + writer.Indent++; + foreach (DictionaryEntry entry2 in dictionary) + { + if (!first) + { + writer.WriteLine(','); + } + else + { + first = false; + } + + WriteFormatted(writer, entry2, options); + } + + writer.Indent--; + writer.WriteLine(); + writer.Write('}'); + return; + } + + if (jsonObject is string s) + { + WriteString(writer, s); + return; + } + + if (jsonObject is IEnumerable enumerable) + { + writer.WriteLine('['); + var first = true; + writer.Indent++; + foreach (var obj in enumerable) + { + if (!first) + { + writer.WriteLine(','); + } + else + { + first = false; + } + + WriteFormatted(writer, obj, options); + } + + writer.Indent--; + writer.WriteLine(); + writer.Write(']'); + return; + } + + WriteValue(writer, jsonObject, null, options); + } + + /// + /// Escapes a string using JSON representation. + /// + /// The string to escape. + /// A JSON-escaped string. + public static string EscapeString(string value) + { + if (string.IsNullOrEmpty(value)) + return null; + + StringBuilder builder = null; + var startIndex = 0; + var count = 0; + for (var i = 0; i < value.Length; i++) + { + var c = value[i]; + if ((c == '\r') || + (c == '\t') || + (c == '"') || + (c == '\'') || + (c == '<') || + (c == '>') || + (c == '\\') || + (c == '\n') || + (c == '\b') || + (c == '\f') || + (c < ' ')) + { + if (builder == null) + { + builder = new StringBuilder(value.Length + 5); + } + + if (count > 0) + { + builder.Append(value, startIndex, count); + } + startIndex = i + 1; + count = 0; + } + + switch (c) + { + case '<': + case '>': + case '\'': + AppendCharAsUnicode(builder, c); + continue; + + case '\\': + builder.Append(@"\\"); + continue; + + case '\b': + builder.Append(@"\b"); + continue; + + case '\t': + builder.Append(@"\t"); + continue; + + case '\n': + builder.Append(@"\n"); + continue; + + case '\f': + builder.Append(@"\f"); + continue; + + case '\r': + builder.Append(@"\r"); + continue; + + case '"': + builder.Append("\\\""); + continue; + } + + if (c < ' ') + { + AppendCharAsUnicode(builder, c); + } + else + { + count++; + } + } + + if (builder == null) + return value; + + if (count > 0) + { + builder.Append(value, startIndex, count); + } + return builder.ToString(); + } + + /// + /// Gets a nullified string value from a dictionary by its path. + /// This is useful to get a string value from the object that the untyped Deserialize method returns which is often of IDictionary<string, object> type. + /// + /// The input dictionary. + /// The path, composed of dictionary keys separated by a . character. May not be null. + /// + /// The nullified string value or null if not found. + /// + public static string GetNullifiedStringValueByPath(this IDictionary dictionary, string path) + { + if (dictionary == null) + return null; + + if (!TryGetValueByPath(dictionary, path, out object obj)) + return null; + + return Conversions.ChangeType(obj).Nullify(); + } + + /// + /// Gets a value from a dictionary by its path. + /// This is useful to get a value from the object that the untyped Deserialize method returns which is often of IDictionary<string, object> type. + /// + /// The final type to which to convert the retrieved value. + /// The input dictionary. + /// The path, composed of dictionary keys separated by a . character. May not be null. + /// The value to retrieve. + /// + /// true if the value parameter was retrieved successfully; otherwise, false. + /// + public static bool TryGetValueByPath(this IDictionary dictionary, string path, out T value) + { + if (dictionary == null) + { + value = default; + return false; + } + + if (!TryGetValueByPath(dictionary, path, out object obj)) + { + value = default; + return false; + } + + return Conversions.TryChangeType(obj, out value); + } + + /// + /// Gets a value from a dictionary by its path. + /// This is useful to get a value from the object that the untyped Deserialize method returns which is often of IDictionary<string, object> type. + /// + /// The input dictionary. + /// The path, composed of dictionary keys separated by a . character. May not be null. + /// The value to retrieve. + /// + /// true if the value parameter was retrieved successfully; otherwise, false. + /// + public static bool TryGetValueByPath(this IDictionary dictionary, string path, out object value) + { + if (path == null) + throw new ArgumentNullException(nameof(path)); + + value = null; + if (dictionary == null) + return false; + + var segments = path.Split('.'); + var current = dictionary; + for (var i = 0; i < segments.Length; i++) + { + var segment = segments[i].Nullify(); + if (segment == null) + return false; + + if (!current.TryGetValue(segment, out var newElement)) + return false; + + // last? + if (i == segments.Length - 1) + { + value = newElement; + return true; + } + current = newElement as IDictionary; + if (current == null) + break; + } + return false; + } + + private static T GetAttribute(this PropertyDescriptor descriptor) where T : Attribute => GetAttribute(descriptor.Attributes); + private static T GetAttribute(this AttributeCollection attributes) where T : Attribute + { + foreach (var att in attributes) + { + if (typeof(T).IsAssignableFrom(att.GetType())) + return (T)att; + } + return null; + } + + private static bool EqualsIgnoreCase(this string str, string text, bool trim = false) + { + if (trim) + { + str = str.Nullify(); + text = text.Nullify(); + } + + if (str == null) + return text == null; + + if (text == null) + return false; + + if (str.Length != text.Length) + return false; + + return string.Compare(str, text, StringComparison.OrdinalIgnoreCase) == 0; + } + + private static string Nullify(this string str) + { + if (str == null) + return null; + + if (string.IsNullOrWhiteSpace(str)) + return null; + + var t = str.Trim(); + return t.Length == 0 ? null : t; + } + + private class KeyValueTypeEnumerator : IDictionaryEnumerator + { + private readonly IEnumerator _enumerator; + private PropertyInfo _keyProp; + private PropertyInfo _valueProp; + + public KeyValueTypeEnumerator(object value) + { + _enumerator = ((IEnumerable)value).GetEnumerator(); + } + + public DictionaryEntry Entry + { + get + { + if (_keyProp == null) + { + _keyProp = _enumerator.Current.GetType().GetProperty("Key"); + _valueProp = _enumerator.Current.GetType().GetProperty("Value"); + } + return new DictionaryEntry(_keyProp.GetValue(_enumerator.Current, null), _valueProp.GetValue(_enumerator.Current, null)); + } + } + + public object Key => Entry.Key; + public object Value => Entry.Value; + public object Current => Entry; + + public bool MoveNext() => _enumerator.MoveNext(); + public void Reset() => _enumerator.Reset(); + } + + private class KeyValueTypeDictionary : IDictionary + { + private readonly KeyValueTypeEnumerator _enumerator; + + public KeyValueTypeDictionary(object value) + { + _enumerator = new KeyValueTypeEnumerator(value); + } + + public int Count => throw new NotSupportedException(); + public bool IsSynchronized => throw new NotSupportedException(); + public object SyncRoot => throw new NotSupportedException(); + public bool IsFixedSize => throw new NotSupportedException(); + public bool IsReadOnly => throw new NotSupportedException(); + public ICollection Keys => throw new NotSupportedException(); + public ICollection Values => throw new NotSupportedException(); + public object this[object key] { get => throw new NotSupportedException(); set => throw new NotSupportedException(); } + + public void Add(object key, object value) => throw new NotSupportedException(); + public void Clear() => throw new NotSupportedException(); + public bool Contains(object key) => throw new NotSupportedException(); + public IDictionaryEnumerator GetEnumerator() => _enumerator; + public void Remove(object key) => throw new NotSupportedException(); + public void CopyTo(Array array, int index) => throw new NotSupportedException(); + IEnumerator IEnumerable.GetEnumerator() => throw new NotSupportedException(); + } + + private class KeyValueType + { + public Type KeyType; + public Type ValueType; + } + + private class TypeDef + { + private static readonly Dictionary _defs = new Dictionary(); + private static readonly Dictionary _iskvpe = new Dictionary(); + private static readonly object _lock = new object(); + + private readonly List _serializationMembers = new List(); + private readonly List _deserializationMembers = new List(); + private readonly Type _type; + + private TypeDef(Type type, JsonOptions options) + { + _type = type; + IEnumerable members; + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseReflection)) + { + members = EnumerateDefinitionsUsingReflection(true, type, options); + } + else + { + members = EnumerateDefinitionsUsingTypeDescriptors(true, type, options); + } + _serializationMembers = new List(options.FinalizeSerializationMembers(type, members)); + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseReflection)) + { + members = EnumerateDefinitionsUsingReflection(false, type, options); + } + else + { + members = EnumerateDefinitionsUsingTypeDescriptors(false, type, options); + } + _deserializationMembers = new List(options.FinalizeDeserializationMembers(type, members)); + } + + private MemberDefinition GetDeserializationMember(string key) + { + if (key == null) + return null; + + foreach (var def in _deserializationMembers) + { + if (string.Compare(def.WireName, key, StringComparison.OrdinalIgnoreCase) == 0) + return def; + } + return null; + } + + public void ApplyEntry(IDictionary dictionary, object target, string key, object value, JsonOptions options) + { + var member = GetDeserializationMember(key); + if (member == null) + return; + + member.ApplyEntry(dictionary, target, key, value, options); + } + + public void WriteValues(TextWriter writer, object component, IDictionary objectGraph, JsonOptions options) + { + var first = true; + foreach (var member in _serializationMembers) + { + var nameChanged = false; + var name = member.WireName; + var value = member.Accessor.Get(component); + if (options.WriteNamedValueObjectCallback != null) + { + var e = new JsonEventArgs(writer, value, objectGraph, options, name, component) + { + EventType = JsonEventType.WriteNamedValueObject, + First = first + }; + options.WriteNamedValueObjectCallback(e); + first = e.First; + if (e.Handled) + continue; + + nameChanged = name != e.Name; + name = e.Name; + value = e.Value; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.SkipNullPropertyValues)) + { + if (value == null) + continue; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.SkipZeroValueTypes)) + { + if (member.IsZeroValue(value)) + continue; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.SkipNullDateTimeValues)) + { + if (member.IsNullDateTimeValue(value)) + continue; + } + + var skipDefaultValues = options.SerializationOptions.HasFlag(JsonSerializationOptions.SkipDefaultValues); + if (skipDefaultValues && member.HasDefaultValue) + { + if (member.EqualsDefaultValue(value)) + continue; + } + + if (!first) + { + writer.Write(','); + } + else + { + first = false; + } + + if (nameChanged) + { + WriteNameValue(writer, name, value, objectGraph, options); + } + else + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.WriteKeysWithoutQuotes)) + { + writer.Write(member.EscapedWireName); + } + else + { + writer.Write('"'); + writer.Write(member.EscapedWireName); + writer.Write('"'); + } + + writer.Write(':'); + WriteValue(writer, value, objectGraph, options); + } + } + } + + public override string ToString() => _type.AssemblyQualifiedName; + + private static string GetKey(Type type, JsonOptions options) => type.AssemblyQualifiedName + '\0' + options.GetCacheKey(); + private static TypeDef UnlockedGet(Type type, JsonOptions options) + { + var key = GetKey(type, options); + if (!_defs.TryGetValue(key, out var ta)) + { + ta = new TypeDef(type, options); + _defs.Add(key, ta); + } + return ta; + } + + public static void Lock(Action action, T state) + { + lock (_lock) + { + action(state); + } + } + + public static bool RemoveDeserializationMember(Type type, JsonOptions options, MemberDefinition member) + { + lock (_lock) + { + var ta = UnlockedGet(type, options); + return ta._deserializationMembers.Remove(member); + } + } + + public static bool RemoveSerializationMember(Type type, JsonOptions options, MemberDefinition member) + { + lock (_lock) + { + var ta = UnlockedGet(type, options); + return ta._serializationMembers.Remove(member); + } + } + + public static void AddDeserializationMember(Type type, JsonOptions options, MemberDefinition member) + { + lock (_lock) + { + var ta = UnlockedGet(type, options); + ta._deserializationMembers.Add(member); + } + } + + public static void AddSerializationMember(Type type, JsonOptions options, MemberDefinition member) + { + lock (_lock) + { + var ta = UnlockedGet(type, options); + ta._serializationMembers.Add(member); + } + } + + public static MemberDefinition[] GetDeserializationMembers(Type type, JsonOptions options) + { + lock (_lock) + { + var ta = UnlockedGet(type, options); + return ta._deserializationMembers.ToArray(); + } + } + + public static MemberDefinition[] GetSerializationMembers(Type type, JsonOptions options) + { + lock (_lock) + { + var ta = UnlockedGet(type, options); + return ta._serializationMembers.ToArray(); + } + } + + public static TypeDef Get(Type type, JsonOptions options) + { + lock (_lock) + { + return UnlockedGet(type, options); + } + } + + public static bool IsKeyValuePairEnumerable(Type type, out Type keyType, out Type valueType) + { + lock (_lock) + { + if (!_iskvpe.TryGetValue(type, out var kv)) + { + kv = new KeyValueType(); + InternalIsKeyValuePairEnumerable(type, out kv.KeyType, out kv.ValueType); + _iskvpe.Add(type, kv); + } + + keyType = kv.KeyType; + valueType = kv.ValueType; + return kv.KeyType != null; + } + } + + private static IEnumerable EnumerateDefinitionsUsingReflection(bool serialization, Type type, JsonOptions options) + { + foreach (var info in type.GetProperties(BindingFlags.Public | BindingFlags.Instance)) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseJsonAttribute)) + { + var ja = GetJsonAttribute(info); + if (ja != null) + { + if (serialization && ja.IgnoreWhenSerializing) + continue; + + if (!serialization && ja.IgnoreWhenDeserializing) + continue; + } + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseXmlIgnore)) + { + if (info.IsDefined(typeof(XmlIgnoreAttribute), true)) + continue; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseScriptIgnore)) + { + if (HasScriptIgnore(info)) + continue; + } + + if (serialization) + { + if (!info.CanRead) + continue; + + var getMethod = info.GetGetMethod(); + if (getMethod == null || getMethod.GetParameters().Length > 0) + continue; + } + // else we don't test the set method, as some properties can still be deserialized (collections) + + var name = GetObjectName(info, info.Name); + + var ma = new MemberDefinition + { + Type = info.PropertyType, + Name = info.Name + }; + if (serialization) + { + ma.WireName = name; + ma.EscapedWireName = EscapeString(name); + } + else + { + ma.WireName = name; + } + + ma.HasDefaultValue = TryGetObjectDefaultValue(info, out var defaultValue); + ma.DefaultValue = defaultValue; + ma.Accessor = (IMemberAccessor)Activator.CreateInstance(typeof(PropertyInfoAccessor<,>).MakeGenericType(info.DeclaringType, info.PropertyType), info); + yield return ma; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.SerializeFields)) + { + foreach (var info in type.GetFields(BindingFlags.Public | BindingFlags.Instance)) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseJsonAttribute)) + { + var ja = GetJsonAttribute(info); + if (ja != null) + { + if (serialization && ja.IgnoreWhenSerializing) + continue; + + if (!serialization && ja.IgnoreWhenDeserializing) + continue; + } + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseXmlIgnore)) + { + if (info.IsDefined(typeof(XmlIgnoreAttribute), true)) + continue; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseScriptIgnore)) + { + if (HasScriptIgnore(info)) + continue; + } + + var name = GetObjectName(info, info.Name); + + var ma = new MemberDefinition + { + Type = info.FieldType, + Name = info.Name + }; + if (serialization) + { + ma.WireName = name; + ma.EscapedWireName = EscapeString(name); + } + else + { + ma.WireName = name; + } + + ma.HasDefaultValue = TryGetObjectDefaultValue(info, out var defaultValue); + ma.DefaultValue = defaultValue; + ma.Accessor = (IMemberAccessor)Activator.CreateInstance(typeof(FieldInfoAccessor), info); + yield return ma; + } + } + } + + private static IEnumerable EnumerateDefinitionsUsingTypeDescriptors(bool serialization, Type type, JsonOptions options) + { + foreach (var descriptor in TypeDescriptor.GetProperties(type).Cast()) + { + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseJsonAttribute)) + { + var ja = descriptor.GetAttribute(); + if (ja != null) + { + if (serialization && ja.IgnoreWhenSerializing) + continue; + + if (!serialization && ja.IgnoreWhenDeserializing) + continue; + } + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseXmlIgnore)) + { + if (descriptor.GetAttribute() != null) + continue; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.UseScriptIgnore)) + { + if (HasScriptIgnore(descriptor)) + continue; + } + + if (options.SerializationOptions.HasFlag(JsonSerializationOptions.SkipGetOnly) && descriptor.IsReadOnly) + continue; + + var name = GetObjectName(descriptor, descriptor.Name); + + var ma = new MemberDefinition + { + Type = descriptor.PropertyType, + Name = descriptor.Name + }; + if (serialization) + { + ma.WireName = name; + ma.EscapedWireName = EscapeString(name); + } + else + { + ma.WireName = name; + } + + ma.HasDefaultValue = TryGetObjectDefaultValue(descriptor, out var defaultValue); + ma.DefaultValue = defaultValue; + ma.Accessor = (IMemberAccessor)Activator.CreateInstance(typeof(PropertyDescriptorAccessor), descriptor); + yield return ma; + } + } + } + + private class ReferenceComparer : IEqualityComparer + { + internal static readonly ReferenceComparer _current = new ReferenceComparer(); + + bool IEqualityComparer.Equals(object x, object y) => ReferenceEquals(x, y); + int IEqualityComparer.GetHashCode(object obj) => RuntimeHelpers.GetHashCode(obj); + } + + private class ICollectionTObject : ListObject + { + private ICollection _coll; + + public override object List + { + get => base.List; + set + { + base.List = value; + _coll = (ICollection)value; + } + } + + public override void Clear() => _coll.Clear(); + public override void Add(object value, JsonOptions options = null) + { + if (value == null && typeof(T).IsValueType) + { + HandleException(new JsonException("JSO0014: JSON error detected. Cannot add null to a collection of '" + typeof(T) + "' elements."), options); + } + + _coll.Add((T)value); + } + } + + private class IListObject : ListObject + { + private IList _list; + + public override object List + { + get => base.List; + set + { + base.List = value; + _list = (IList)value; + } + } + + public override void Clear() => _list.Clear(); + public override void Add(object value, JsonOptions options = null) => _list.Add(value); + } + + private class FieldInfoAccessor : IMemberAccessor + { + private readonly FieldInfo _fi; + + public FieldInfoAccessor(FieldInfo fi) + { + _fi = fi; + } + + public object Get(object component) => _fi.GetValue(component); + public void Set(object component, object value) => _fi.SetValue(component, value); + } + + private class PropertyDescriptorAccessor : IMemberAccessor + { + private readonly PropertyDescriptor _pd; + + public PropertyDescriptorAccessor(PropertyDescriptor pd) + { + _pd = pd; + } + + public object Get(object component) => _pd.GetValue(component); + public void Set(object component, object value) + { + if (_pd.IsReadOnly) + return; + + _pd.SetValue(component, value); + } + } + + // note: Funcs & Action needs .NET 4+ + private delegate TResult JFunc(T arg); + private delegate void JAction(T1 arg1, T2 arg2); + + private class PropertyInfoAccessor : IMemberAccessor + { + private readonly JFunc _get; + private readonly JAction _set; + + public PropertyInfoAccessor(PropertyInfo pi) + { + var get = pi.GetGetMethod(); + if (get != null) + { + _get = (JFunc)Delegate.CreateDelegate(typeof(JFunc), get); + } + + var set = pi.GetSetMethod(); + if (set != null) + { + _set = (JAction)Delegate.CreateDelegate(typeof(JAction), set); + } + } + + public object Get(object component) + { + if (_get == null) + return null; + + return _get((TComponent)component); + } + + public void Set(object component, object value) + { + if (_set == null) + return; + + _set((TComponent)component, (TMember)value); + } + } + + private static class Conversions + { + private static readonly char[] _enumSeparators = new char[] { ',', ';', '+', '|', ' ' }; + private static readonly string[] _dateFormatsUtc = { "yyyy'-'MM'-'dd'T'HH':'mm':'ss'Z'", "yyyy'-'MM'-'dd'T'HH':'mm'Z'", "yyyyMMdd'T'HH':'mm':'ss'Z'" }; + + private static bool IsValid(DateTime dt) => dt != DateTime.MinValue && dt != DateTime.MaxValue && dt.Kind != DateTimeKind.Unspecified; + + public static T ChangeType(object input, T defaultValue = default, IFormatProvider provider = null) + { + if (!TryChangeType(input, provider, out T value)) + return defaultValue; + + return value; + } + + public static bool TryChangeType(object input, out T value) => TryChangeType(input, null, out value); + public static bool TryChangeType(object input, IFormatProvider provider, out T value) + { + if (!TryChangeType(input, typeof(T), provider, out var tvalue)) + { + value = default; + return false; + } + + value = (T)tvalue; + return true; + } + + public static object ChangeType(object input, Type conversionType, object defaultValue = null, IFormatProvider provider = null) + { + if (!TryChangeType(input, conversionType, provider, out var value)) + { + if (TryChangeType(defaultValue, conversionType, provider, out var def)) + return def; + + if (IsReallyValueType(conversionType)) + return Activator.CreateInstance(conversionType); + + return null; + } + + return value; + } + + public static bool TryChangeType(object input, Type conversionType, out object value) => TryChangeType(input, conversionType, null, out value); + public static bool TryChangeType(object input, Type conversionType, IFormatProvider provider, out object value) + { + if (conversionType == null) + throw new ArgumentNullException(nameof(conversionType)); + + if (conversionType == typeof(object)) + { + value = input; + return true; + } + + if (IsNullable(conversionType)) + { + if (input == null) + { + value = null; + return true; + } + + var type = conversionType.GetGenericArguments()[0]; + if (TryChangeType(input, type, provider, out var vtValue)) + { + var nt = typeof(Nullable<>).MakeGenericType(type); + value = Activator.CreateInstance(nt, vtValue); + return true; + } + + value = null; + return false; + } + + value = IsReallyValueType(conversionType) ? Activator.CreateInstance(conversionType) : null; + if (input == null) + return !IsReallyValueType(conversionType); + + var inputType = input.GetType(); + if (conversionType.IsAssignableFrom(inputType)) + { + value = input; + return true; + } + + if (conversionType.IsEnum) + return EnumTryParse(conversionType, input, out value); + + if (inputType.IsEnum) + { + var tc = Type.GetTypeCode(inputType); + if (conversionType == typeof(int)) + { + switch (tc) + { + case TypeCode.Int32: + value = (int)input; + return true; + + case TypeCode.Int16: + value = (int)(short)input; + return true; + + case TypeCode.Int64: + value = (int)(long)input; + return true; + + case TypeCode.UInt32: + value = (int)(uint)input; + return true; + + case TypeCode.UInt16: + value = (int)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (int)(ulong)input; + return true; + + case TypeCode.Byte: + value = (int)(byte)input; + return true; + + case TypeCode.SByte: + value = (int)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(short)) + { + switch (tc) + { + case TypeCode.Int32: + value = (short)(int)input; + return true; + + case TypeCode.Int16: + value = (short)input; + return true; + + case TypeCode.Int64: + value = (short)(long)input; + return true; + + case TypeCode.UInt32: + value = (short)(uint)input; + return true; + + case TypeCode.UInt16: + value = (short)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (short)(ulong)input; + return true; + + case TypeCode.Byte: + value = (short)(byte)input; + return true; + + case TypeCode.SByte: + value = (short)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(long)) + { + switch (tc) + { + case TypeCode.Int32: + value = (long)(int)input; + return true; + + case TypeCode.Int16: + value = (long)(short)input; + return true; + + case TypeCode.Int64: + value = (long)input; + return true; + + case TypeCode.UInt32: + value = (long)(uint)input; + return true; + + case TypeCode.UInt16: + value = (long)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (long)(ulong)input; + return true; + + case TypeCode.Byte: + value = (long)(byte)input; + return true; + + case TypeCode.SByte: + value = (long)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(uint)) + { + switch (tc) + { + case TypeCode.Int32: + value = (uint)(int)input; + return true; + + case TypeCode.Int16: + value = (uint)(short)input; + return true; + + case TypeCode.Int64: + value = (uint)(long)input; + return true; + + case TypeCode.UInt32: + value = (uint)input; + return true; + + case TypeCode.UInt16: + value = (uint)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (uint)(ulong)input; + return true; + + case TypeCode.Byte: + value = (uint)(byte)input; + return true; + + case TypeCode.SByte: + value = (uint)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(ushort)) + { + switch (tc) + { + case TypeCode.Int32: + value = (ushort)(int)input; + return true; + + case TypeCode.Int16: + value = (ushort)(short)input; + return true; + + case TypeCode.Int64: + value = (ushort)(long)input; + return true; + + case TypeCode.UInt32: + value = (ushort)(uint)input; + return true; + + case TypeCode.UInt16: + value = (ushort)input; + return true; + + case TypeCode.UInt64: + value = (ushort)(ulong)input; + return true; + + case TypeCode.Byte: + value = (ushort)(byte)input; + return true; + + case TypeCode.SByte: + value = (ushort)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(ulong)) + { + switch (tc) + { + case TypeCode.Int32: + value = (ulong)(int)input; + return true; + + case TypeCode.Int16: + value = (ulong)(short)input; + return true; + + case TypeCode.Int64: + value = (ulong)(long)input; + return true; + + case TypeCode.UInt32: + value = (ulong)(uint)input; + return true; + + case TypeCode.UInt16: + value = (ulong)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (ulong)input; + return true; + + case TypeCode.Byte: + value = (ulong)(byte)input; + return true; + + case TypeCode.SByte: + value = (ulong)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(byte)) + { + switch (tc) + { + case TypeCode.Int32: + value = (byte)(int)input; + return true; + + case TypeCode.Int16: + value = (byte)(short)input; + return true; + + case TypeCode.Int64: + value = (byte)(long)input; + return true; + + case TypeCode.UInt32: + value = (byte)(uint)input; + return true; + + case TypeCode.UInt16: + value = (byte)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (byte)(ulong)input; + return true; + + case TypeCode.Byte: + value = (byte)input; + return true; + + case TypeCode.SByte: + value = (byte)(sbyte)input; + return true; + } + return false; + } + + if (conversionType == typeof(sbyte)) + { + switch (tc) + { + case TypeCode.Int32: + value = (sbyte)(int)input; + return true; + + case TypeCode.Int16: + value = (sbyte)(short)input; + return true; + + case TypeCode.Int64: + value = (sbyte)(long)input; + return true; + + case TypeCode.UInt32: + value = (sbyte)(uint)input; + return true; + + case TypeCode.UInt16: + value = (sbyte)(ushort)input; + return true; + + case TypeCode.UInt64: + value = (sbyte)(ulong)input; + return true; + + case TypeCode.Byte: + value = (sbyte)(byte)input; + return true; + + case TypeCode.SByte: + value = (sbyte)input; + return true; + } + return false; + } + } + + if (conversionType == typeof(Guid)) + { + var svalue = string.Format(provider, "{0}", input).Nullify(); + if (svalue != null && Guid.TryParse(svalue, out var guid)) + { + value = guid; + return true; + } + return false; + } + + if (conversionType == typeof(Uri)) + { + var svalue = string.Format(provider, "{0}", input).Nullify(); + if (svalue != null && Uri.TryCreate(svalue, UriKind.RelativeOrAbsolute, out var uri)) + { + value = uri; + return true; + } + return false; + } + + if (conversionType == typeof(IntPtr)) + { + if (IntPtr.Size == 8) + { + if (TryChangeType(input, provider, out long l)) + { + value = new IntPtr(l); + return true; + } + } + else if (TryChangeType(input, provider, out int i)) + { + value = new IntPtr(i); + return true; + } + return false; + } + + if (conversionType == typeof(int)) + { + if (inputType == typeof(uint)) + { + value = unchecked((int)(uint)input); + return true; + } + + if (inputType == typeof(ulong)) + { + value = unchecked((int)(ulong)input); + return true; + } + + if (inputType == typeof(ushort)) + { + value = unchecked((int)(ushort)input); + return true; + } + + if (inputType == typeof(byte)) + { + value = unchecked((int)(byte)input); + return true; + } + } + + if (conversionType == typeof(long)) + { + if (inputType == typeof(uint)) + { + value = unchecked((long)(uint)input); + return true; + } + + if (inputType == typeof(ulong)) + { + value = unchecked((long)(ulong)input); + return true; + } + + if (inputType == typeof(ushort)) + { + value = unchecked((long)(ushort)input); + return true; + } + + if (inputType == typeof(byte)) + { + value = unchecked((long)(byte)input); + return true; + } + + if (inputType == typeof(TimeSpan)) + { + value = ((TimeSpan)input).Ticks; + return true; + } + } + + if (conversionType == typeof(short)) + { + if (inputType == typeof(uint)) + { + value = unchecked((short)(uint)input); + return true; + } + + if (inputType == typeof(ulong)) + { + value = unchecked((short)(ulong)input); + return true; + } + + if (inputType == typeof(ushort)) + { + value = unchecked((short)(ushort)input); + return true; + } + + if (inputType == typeof(byte)) + { + value = unchecked((short)(byte)input); + return true; + } + } + + if (conversionType == typeof(sbyte)) + { + if (inputType == typeof(uint)) + { + value = unchecked((sbyte)(uint)input); + return true; + } + + if (inputType == typeof(ulong)) + { + value = unchecked((sbyte)(ulong)input); + return true; + } + + if (inputType == typeof(ushort)) + { + value = unchecked((sbyte)(ushort)input); + return true; + } + + if (inputType == typeof(byte)) + { + value = unchecked((sbyte)(byte)input); + return true; + } + } + + if (conversionType == typeof(uint)) + { + if (inputType == typeof(int)) + { + value = unchecked((uint)(int)input); + return true; + } + + if (inputType == typeof(long)) + { + value = unchecked((uint)(long)input); + return true; + } + + if (inputType == typeof(short)) + { + value = unchecked((uint)(short)input); + return true; + } + + if (inputType == typeof(sbyte)) + { + value = unchecked((uint)(sbyte)input); + return true; + } + } + + if (conversionType == typeof(ulong)) + { + if (inputType == typeof(int)) + { + value = unchecked((ulong)(int)input); + return true; + } + + if (inputType == typeof(long)) + { + value = unchecked((ulong)(long)input); + return true; + } + + if (inputType == typeof(short)) + { + value = unchecked((ulong)(short)input); + return true; + } + + if (inputType == typeof(sbyte)) + { + value = unchecked((ulong)(sbyte)input); + return true; + } + } + + if (conversionType == typeof(ushort)) + { + if (inputType == typeof(int)) + { + value = unchecked((ushort)(int)input); + return true; + } + + if (inputType == typeof(long)) + { + value = unchecked((ushort)(long)input); + return true; + } + + if (inputType == typeof(short)) + { + value = unchecked((ushort)(short)input); + return true; + } + + if (inputType == typeof(sbyte)) + { + value = unchecked((ushort)(sbyte)input); + return true; + } + } + + if (conversionType == typeof(byte)) + { + if (inputType == typeof(int)) + { + value = unchecked((byte)(int)input); + return true; + } + + if (inputType == typeof(long)) + { + value = unchecked((byte)(long)input); + return true; + } + + if (inputType == typeof(short)) + { + value = unchecked((byte)(short)input); + return true; + } + + if (inputType == typeof(sbyte)) + { + value = unchecked((byte)(sbyte)input); + return true; + } + } + + if (conversionType == typeof(DateTime)) + { + if (inputType == typeof(long)) + { + value = new DateTime((long)input, DateTimeKind.Utc); + return true; + } + + if (inputType == typeof(DateTimeOffset)) + { + value = ((DateTimeOffset)input).DateTime; + return true; + } + } + + if (conversionType == typeof(DateTimeOffset)) + { + if (inputType == typeof(long)) + { + value = new DateTimeOffset(new DateTime((long)input, DateTimeKind.Utc)); + return true; + } + + if (inputType == typeof(DateTime)) + { + var dt = (DateTime)input; + if (IsValid(dt)) + { + value = new DateTimeOffset((DateTime)input); + return true; + } + } + } + + if (conversionType == typeof(TimeSpan)) + { + if (inputType == typeof(long)) + { + value = new TimeSpan((long)input); + return true; + } + + if (inputType == typeof(DateTime)) + { + value = ((DateTime)value).TimeOfDay; + return true; + } + + if (inputType == typeof(DateTimeOffset)) + { + value = ((DateTimeOffset)value).TimeOfDay; + return true; + } + + if (TryChangeType(input, provider, out string sv) && TimeSpan.TryParse(sv, provider, out var ts)) + { + value = ts; + return true; + } + } + + var isGenericList = IsGenericList(conversionType, out var elementType); + if (conversionType.IsArray || isGenericList) + { + if (input is IEnumerable enumerable) + { + if (!isGenericList) + { + elementType = conversionType.GetElementType(); + } + + var list = (IList)Activator.CreateInstance(typeof(List<>).MakeGenericType(elementType)); + var count = 0; + foreach (var obj in enumerable) + { + count++; + if (TryChangeType(obj, elementType, provider, out var element)) + { + list.Add(element); + } + } + + // at least one was converted + if (count > 0 && list.Count > 0) + { + if (isGenericList) + { + value = list; + } + else + { + value = list.GetType().GetMethod(nameof(List.ToArray)).Invoke(list, null); + } + return true; + } + } + } + + if (conversionType == typeof(CultureInfo) || conversionType == typeof(IFormatProvider)) + { + try + { + if (input is int lcid) + { + value = CultureInfo.GetCultureInfo(lcid); + return true; + } + else + { + var si = input?.ToString(); + if (si != null) + { + if (int.TryParse(si, out lcid)) + { + value = CultureInfo.GetCultureInfo(lcid); + return true; + } + + value = CultureInfo.GetCultureInfo(si); + return true; + } + } + } + catch + { + // do nothing, wrong culture, etc. + } + return false; + } + + if (conversionType == typeof(bool)) + { + if (true.Equals(input)) + { + value = true; + return true; + } + + if (false.Equals(input)) + { + value = false; + return true; + } + + var svalue = string.Format(provider, "{0}", input).Nullify(); + if (svalue == null) + return false; + + if (bool.TryParse(svalue, out var b)) + { + value = b; + return true; + } + + if (svalue.EqualsIgnoreCase("y") || svalue.EqualsIgnoreCase("yes")) + { + value = true; + return true; + } + + if (svalue.EqualsIgnoreCase("n") || svalue.EqualsIgnoreCase("no")) + { + value = false; + return true; + } + + if (TryChangeType(input, out long bl)) + { + value = bl != 0; + return true; + } + return false; + } + + // in general, nothing is convertible to anything but one of these, IConvertible is 100% stupid thing + bool isWellKnownConvertible() + { + return conversionType == typeof(short) || conversionType == typeof(int) || + conversionType == typeof(string) || conversionType == typeof(byte) || + conversionType == typeof(char) || conversionType == typeof(DateTime) || + conversionType == typeof(DBNull) || conversionType == typeof(decimal) || + conversionType == typeof(double) || conversionType.IsEnum || + conversionType == typeof(short) || conversionType == typeof(int) || + conversionType == typeof(long) || conversionType == typeof(sbyte) || + conversionType == typeof(bool) || conversionType == typeof(float) || + conversionType == typeof(ushort) || conversionType == typeof(uint) || + conversionType == typeof(ulong); + } + + if (isWellKnownConvertible() && input is IConvertible convertible) + { + try + { + value = convertible.ToType(conversionType, provider); + if (value is DateTime dt && !IsValid(dt)) + return false; + + return true; + } + catch + { + // continue; + } + } + + if (input != null) + { + var inputConverter = TypeDescriptor.GetConverter(input); + if (inputConverter != null) + { + if (inputConverter.CanConvertTo(conversionType)) + { + try + { + value = inputConverter.ConvertTo(null, provider as CultureInfo, input, conversionType); + return true; + } + catch + { + // continue; + } + } + } + } + + var converter = TypeDescriptor.GetConverter(conversionType); + if (converter != null) + { + if (converter.CanConvertTo(conversionType)) + { + try + { + value = converter.ConvertTo(null, provider as CultureInfo, input, conversionType); + return true; + } + catch + { + // continue; + } + } + + if (converter.CanConvertFrom(inputType)) + { + try + { + value = converter.ConvertFrom(null, provider as CultureInfo, input); + return true; + } + catch + { + // continue; + } + } + } + + if (conversionType == typeof(string)) + { + value = string.Format(provider, "{0}", input); + return true; + } + + return false; + } + + public static ulong EnumToUInt64(object value) + { + if (value == null) + throw new ArgumentNullException(nameof(value)); + + var typeCode = Convert.GetTypeCode(value); +#pragma warning disable IDE0010 // Add missing cases +#pragma warning disable IDE0066 // Convert switch statement to expression + switch (typeCode) +#pragma warning restore IDE0066 // Convert switch statement to expression +#pragma warning restore IDE0010 // Add missing cases + { + case TypeCode.SByte: + case TypeCode.Int16: + case TypeCode.Int32: + case TypeCode.Int64: + return (ulong)Convert.ToInt64(value, CultureInfo.InvariantCulture); + + case TypeCode.Byte: + case TypeCode.UInt16: + case TypeCode.UInt32: + case TypeCode.UInt64: + return Convert.ToUInt64(value, CultureInfo.InvariantCulture); + + //case TypeCode.String: + default: + return ChangeType(value, 0, CultureInfo.InvariantCulture); + } + } + + private static bool StringToEnum(Type type, string[] names, Array values, string input, out object value) + { + for (var i = 0; i < names.Length; i++) + { + if (names[i].EqualsIgnoreCase(input)) + { + value = values.GetValue(i); + return true; + } + } + + for (var i = 0; i < values.GetLength(0); i++) + { + var valuei = values.GetValue(i); + if (input.Length > 0 && input[0] == '-') + { + var ul = (long)EnumToUInt64(valuei); + if (ul.ToString().EqualsIgnoreCase(input)) + { + value = valuei; + return true; + } + } + else + { + var ul = EnumToUInt64(valuei); + if (ul.ToString().EqualsIgnoreCase(input)) + { + value = valuei; + return true; + } + } + } + + if (char.IsDigit(input[0]) || input[0] == '-' || input[0] == '+') + { + var obj = EnumToObject(type, input); + if (obj == null) + { + value = Activator.CreateInstance(type); + return false; + } + + value = obj; + return true; + } + + value = Activator.CreateInstance(type); + return false; + } + + public static object EnumToObject(Type enumType, object value) + { + if (enumType == null) + throw new ArgumentNullException(nameof(enumType)); + + if (!enumType.IsEnum) + throw new ArgumentException(null, nameof(enumType)); + + if (value == null) + throw new ArgumentNullException(nameof(value)); + + var underlyingType = Enum.GetUnderlyingType(enumType); + if (underlyingType == typeof(long)) + return Enum.ToObject(enumType, ChangeType(value)); + + if (underlyingType == typeof(ulong)) + return Enum.ToObject(enumType, ChangeType(value)); + + if (underlyingType == typeof(int)) + return Enum.ToObject(enumType, ChangeType(value)); + + if ((underlyingType == typeof(uint))) + return Enum.ToObject(enumType, ChangeType(value)); + + if (underlyingType == typeof(short)) + return Enum.ToObject(enumType, ChangeType(value)); + + if (underlyingType == typeof(ushort)) + return Enum.ToObject(enumType, ChangeType(value)); + + if (underlyingType == typeof(byte)) + return Enum.ToObject(enumType, ChangeType(value)); + + if (underlyingType == typeof(sbyte)) + return Enum.ToObject(enumType, ChangeType(value)); + + throw new ArgumentException(null, nameof(enumType)); + } + + public static object ToEnum(string text, Type enumType) + { + if (enumType == null) + throw new ArgumentNullException(nameof(enumType)); + + EnumTryParse(enumType, text, out var value); + return value; + } + + // Enum.TryParse is not supported by all .NET versions the same way + public static bool EnumTryParse(Type type, object input, out object value) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (!type.IsEnum) + throw new ArgumentException(null, nameof(type)); + + if (input == null) + { + value = Activator.CreateInstance(type); + return false; + } + + var stringInput = string.Format(CultureInfo.InvariantCulture, "{0}", input); + stringInput = stringInput.Nullify(); + if (stringInput == null) + { + value = Activator.CreateInstance(type); + return false; + } + + if (stringInput.StartsWith("0x", StringComparison.OrdinalIgnoreCase)) + { + if (ulong.TryParse(stringInput.Substring(2), NumberStyles.HexNumber, null, out var ulx)) + { + value = ToEnum(ulx.ToString(CultureInfo.InvariantCulture), type); + return true; + } + } + + var names = Enum.GetNames(type); + if (names.Length == 0) + { + value = Activator.CreateInstance(type); + return false; + } + + var values = Enum.GetValues(type); + // some enums like System.CodeDom.MemberAttributes *are* flags but are not declared with Flags... + if (!type.IsDefined(typeof(FlagsAttribute), true) && stringInput.IndexOfAny(_enumSeparators) < 0) + return StringToEnum(type, names, values, stringInput, out value); + + // multi value enum + var tokens = stringInput.Split(_enumSeparators, StringSplitOptions.RemoveEmptyEntries); + if (tokens.Length == 0) + { + value = Activator.CreateInstance(type); + return false; + } + + ulong ul = 0; + foreach (var tok in tokens) + { + var token = tok.Nullify(); // NOTE: we don't consider empty tokens as errors + if (token == null) + continue; + + if (!StringToEnum(type, names, values, token, out var tokenValue)) + { + value = Activator.CreateInstance(type); + return false; + } + + ulong tokenUl; +#pragma warning disable IDE0010 // Add missing cases +#pragma warning disable IDE0066 // Convert switch statement to expression + switch (Convert.GetTypeCode(tokenValue)) +#pragma warning restore IDE0066 // Convert switch statement to expression +#pragma warning restore IDE0010 // Add missing cases + { + case TypeCode.Int16: + case TypeCode.Int32: + case TypeCode.Int64: + case TypeCode.SByte: + tokenUl = (ulong)Convert.ToInt64(tokenValue, CultureInfo.InvariantCulture); + break; + + default: + tokenUl = Convert.ToUInt64(tokenValue, CultureInfo.InvariantCulture); + break; + } + + ul |= tokenUl; + } + value = Enum.ToObject(type, ul); + return true; + } + + public static bool IsGenericList(Type type, out Type elementType) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + if (type.IsGenericType && type.GetGenericTypeDefinition() == typeof(List<>)) + { + elementType = type.GetGenericArguments()[0]; + return true; + } + + elementType = null; + return false; + } + + private static bool IsReallyValueType(Type type) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + return type.IsValueType && !IsNullable(type); + } + + public static bool IsNullable(Type type) + { + if (type == null) + throw new ArgumentNullException(nameof(type)); + + return type.IsGenericType && type.GetGenericTypeDefinition() == typeof(Nullable<>); + } + } + } + + /// + /// Define options for JSON. + /// + public class JsonOptions + { + private readonly List _exceptions = new List(); + internal static DateTimeStyles _defaultDateTimeStyles = DateTimeStyles.AssumeUniversal | DateTimeStyles.AllowInnerWhite | DateTimeStyles.AllowLeadingWhite | DateTimeStyles.AllowTrailingWhite | DateTimeStyles.AllowWhiteSpaces; + + /// + /// Initializes a new instance of the class. + /// + public JsonOptions() + { + SerializationOptions = JsonSerializationOptions.Default; + ThrowExceptions = true; + DateTimeStyles = _defaultDateTimeStyles; + FormattingTab = " "; + StreamingBufferChunkSize = ushort.MaxValue; + MaximumExceptionsCount = 100; + } + + /// + /// Gets or sets a value indicating whether exceptions can be thrown during serialization or deserialization. + /// If this is set to false, exceptions will be stored in the Exceptions collection. + /// However, if the number of exceptions is equal to or higher than MaximumExceptionsCount, an exception will be thrown. + /// + /// + /// true if exceptions can be thrown on serialization or deserialization; otherwise, false. + /// + public virtual bool ThrowExceptions { get; set; } + + /// + /// Gets or sets the maximum exceptions count. + /// + /// + /// The maximum exceptions count. + /// + public virtual int MaximumExceptionsCount { get; set; } + + /// + /// Gets or sets the JSONP callback. It will be added as wrapper around the result. + /// Check this article for more: http://en.wikipedia.org/wiki/JSONP + /// + /// + /// The JSONP callback name. + /// + public virtual string JsonPCallback { get; set; } + + /// + /// Gets or sets the guid format. + /// + /// + /// The guid format. + /// + public virtual string GuidFormat { get; set; } + + /// + /// Gets or sets the date time format. + /// + /// + /// The date time format. + /// + public virtual string DateTimeFormat { get; set; } + + /// + /// Gets or sets the date time offset format. + /// + /// + /// The date time offset format. + /// + public virtual string DateTimeOffsetFormat { get; set; } + + /// + /// Gets or sets the date time styles. + /// + /// + /// The date time styles. + /// + public virtual DateTimeStyles DateTimeStyles { get; set; } + + /// + /// Gets or sets the size of the streaming buffer chunk. Minimum value is 512. + /// + /// + /// The size of the streaming buffer chunk. + /// + public virtual int StreamingBufferChunkSize { get; set; } + + /// + /// Gets or sets the formatting tab string. + /// + /// + /// The formatting tab. + /// + public virtual string FormattingTab { get; set; } + + /// + /// Gets the deseralization exceptions. Will be empty if ThrowExceptions is set to false. + /// + /// + /// The list of deseralization exceptions. + /// +#pragma warning disable CA1819 // Properties should not return arrays + public virtual Exception[] Exceptions => _exceptions.ToArray(); +#pragma warning restore CA1819 // Properties should not return arrays + + /// + /// Finalizes the serialization members from an initial setup of members. + /// + /// The input type. May not be null. + /// The members. May not be null. + /// A non-null list of members. + public virtual IEnumerable FinalizeSerializationMembers(Type type, IEnumerable members) => members; + + /// + /// Finalizes the deserialization members from an initial setup of members. + /// + /// The input type. May not be null. + /// The members. May not be null. + /// A non-null list of members. + public virtual IEnumerable FinalizeDeserializationMembers(Type type, IEnumerable members) => members; + + /// + /// Gets or sets the serialization options. + /// + /// The serialization options. + public virtual JsonSerializationOptions SerializationOptions { get; set; } + + /// + /// Gets or sets a write value callback. + /// + /// The callback. + public virtual JsonCallback WriteValueCallback { get; set; } + + /// + /// Gets or sets a callback that is called before an object (not a value) is serialized. + /// + /// The callback. + public virtual JsonCallback BeforeWriteObjectCallback { get; set; } + + /// + /// Gets or sets a callback that is called before an object (not a value) is serialized. + /// + /// The callback. + public virtual JsonCallback AfterWriteObjectCallback { get; set; } + + /// + /// Gets or sets a callback that is called before an object field or property is serialized. + /// + /// The callback. + public virtual JsonCallback WriteNamedValueObjectCallback { get; set; } + + /// + /// Gets or sets a callback that is called before an instance of an object is created. + /// + /// The callback. + public virtual JsonCallback CreateInstanceCallback { get; set; } + + /// + /// Gets or sets a callback that is called during deserialization, before a dictionary entry is mapped to a target object. + /// + /// The callback. + public virtual JsonCallback MapEntryCallback { get; set; } + + /// + /// Gets or sets a callback that is called during deserialization, before a dictionary entry is applied to a target object. + /// + /// The callback. + public virtual JsonCallback ApplyEntryCallback { get; set; } + + /// + /// Gets or sets a callback that is called during deserialization, to deserialize a list object. + /// + /// The callback. + public virtual JsonCallback GetListObjectCallback { get; set; } + + /// + /// Adds an exception to the list of exceptions. + /// + /// The exception to add. + public virtual void AddException(Exception error) + { + if (error == null) + throw new ArgumentNullException(nameof(error)); + + if (_exceptions.Count >= MaximumExceptionsCount) + throw new JsonException("JSO0015: Two many JSON errors detected (" + _exceptions.Count + ").", error); + + _exceptions.Add(error); + } + + internal int FinalStreamingBufferChunkSize => Math.Max(512, StreamingBufferChunkSize); + + /// + /// Clones this instance. + /// + /// A newly created insance of this class with all values copied. + public virtual JsonOptions Clone() + { + var clone = new JsonOptions + { + AfterWriteObjectCallback = AfterWriteObjectCallback, + ApplyEntryCallback = ApplyEntryCallback, + BeforeWriteObjectCallback = BeforeWriteObjectCallback, + CreateInstanceCallback = CreateInstanceCallback, + DateTimeFormat = DateTimeFormat, + DateTimeOffsetFormat = DateTimeOffsetFormat, + DateTimeStyles = DateTimeStyles + }; + clone._exceptions.AddRange(_exceptions); + clone.FormattingTab = FormattingTab; + clone.GetListObjectCallback = GetListObjectCallback; + clone.GuidFormat = GuidFormat; + clone.MapEntryCallback = MapEntryCallback; + clone.MaximumExceptionsCount = MaximumExceptionsCount; + clone.SerializationOptions = SerializationOptions; + clone.StreamingBufferChunkSize = StreamingBufferChunkSize; + clone.ThrowExceptions = ThrowExceptions; + clone.WriteNamedValueObjectCallback = WriteNamedValueObjectCallback; + clone.WriteValueCallback = WriteValueCallback; + return clone; + } + + /// + /// Gets a key that can be used for type cache. + /// + /// A cache key. + public virtual string GetCacheKey() => ((int)SerializationOptions).ToString(); + } + + /// + /// Defines a callback delegate to customize JSON serialization and deserialization. + /// + public delegate void JsonCallback(JsonEventArgs e); + + /// + /// Defines a type of JSON event. + /// + public enum JsonEventType + { + /// + /// An unspecified type of event. + /// + Unspecified, + + /// + /// The write value event type. + /// + WriteValue, + + /// + /// The before write object event type. + /// + BeforeWriteObject, + + /// + /// The after write object event type. + /// + AfterWriteObject, + + /// + /// The write named value object event type. + /// + WriteNamedValueObject, + + /// + /// The create instance event type. + /// + CreateInstance, + + /// + /// The map entry event type. + /// + MapEntry, + + /// + /// The apply entry event type. + /// + ApplyEntry, + + /// + /// The get list object event type. + /// + GetListObject, + } + + /// + /// Provides data for a JSON event. + /// + public class JsonEventArgs : EventArgs + { + /// + /// Initializes a new instance of the class. + /// + /// The writer currently in use. + /// The value on the stack. + /// The current serialization object graph. + /// The options currently in use. + public JsonEventArgs(TextWriter writer, object value, IDictionary objectGraph, JsonOptions options) + : this(writer, value, objectGraph, options, null, null) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The writer currently in use. + /// The value on the stack. + /// The current serialization object graph. + /// The options currently in use. + /// The field or property name. + /// The component holding the value. + public JsonEventArgs(TextWriter writer, object value, IDictionary objectGraph, JsonOptions options, string name, object component) + { + Options = options; + Writer = writer; + ObjectGraph = objectGraph; + Value = value; + Name = name; + Component = component; + } + + /// + /// Gets the options currently in use. + /// + /// The options. + public JsonOptions Options { get; } + + /// + /// Gets the writer currently in use. + /// + /// The writer. + public TextWriter Writer { get; } + + /// + /// Gets the current serialization object graph. + /// + /// The object graph. + public IDictionary ObjectGraph { get; } + + /// + /// Gets the component holding the value. May be null. + /// + /// The component. + public virtual object Component { get; } + + /// + /// Gets or sets the type of the event. + /// + /// + /// The type of the event. + /// + public virtual JsonEventType EventType { get; set; } + + /// + /// Gets or sets a value indicating whether this is handled. + /// An handled object can be skipped, not written to the stream. If the object is written, First must be set to false, otherwise it must not be changed. + /// + /// true if handled; otherwise, false. + public virtual bool Handled { get; set; } + + /// + /// Gets or sets a value indicating whether the object being handled is first in the list. + /// If the object is handled and written to the stream, this must be set to false after the stream is written. + /// If the object is skipped, it must not be changed. + /// + /// true if this is the first object; otherwise, false. + public virtual bool First { get; set; } + + /// + /// Gets or sets the value on the stack. + /// + /// The value. + public virtual object Value { get; set; } + + /// + /// Gets or sets the name on the stack. The Name can be a property or field name when serializing objects. May be null. + /// + /// The value. + public virtual string Name { get; set; } + } + + /// + /// Provides options for JSON. + /// + [AttributeUsage(AttributeTargets.All)] + public sealed class JsonAttribute : Attribute + { + /// + /// Initializes a new instance of the class. + /// + public JsonAttribute() + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The name to use for JSON serialization and deserialization. + public JsonAttribute(string name) + { + Name = name; + } + + /// + /// Gets or sets the name to use for JSON serialization and deserialization. + /// + /// + /// The name. + /// + public string Name { get; set; } + + /// + /// Gets or sets a value indicating whether to ignore this instance's owner when serializing. + /// + /// + /// true if this instance's owner must be ignored when serializing; otherwise, false. + /// + public bool IgnoreWhenSerializing { get; set; } + + /// + /// Gets or sets a value indicating whether to ignore this instance's owner when deserializing. + /// + /// + /// true if this instance's owner must be ignored when deserializing; otherwise, false. + /// + public bool IgnoreWhenDeserializing { get; set; } + + /// + /// Gets or sets the default value. + /// + /// + /// The default value. + /// + public object DefaultValue { get; set; } + + /// + /// Gets or sets a value indicating whether this instance has a default value. In this case, it's defined by the DefaultValue property. + /// + /// + /// true if this instance has default value; otherwise, false. + /// + public bool HasDefaultValue { get; set; } + } + + /// + /// Define options for JSON serialization. + /// + [Flags] + public enum JsonSerializationOptions + { + /// + /// No option. + /// Use Type Descriptor (including custom ones) when serializing custom objects. + /// + None = 0x0, + + /// + /// Use pure reflection when serializing custom objects. + /// + UseReflection = 0x1, + + /// + /// Avoid fields and properties marked with the XmlIgnore attribute. + /// + UseXmlIgnore = 0x2, + + /// + /// Use the format defined in the DateTimeFormat property of the JsonOptions class. + /// + DateFormatCustom = 0x4, + + /// + /// Serializes fields. + /// + SerializeFields = 0x8, + + /// + /// Use the ISerializable interface. + /// + UseISerializable = 0x10, + + /// + /// Use the [new Date(utc milliseconds)] format. + /// Note this format is not generally supported by browsers native JSON parsers. + /// + DateFormatJs = 0x20, + + /// + /// Use the ISO 8601 string format ('s' DateTime format). + /// + DateFormatIso8601 = 0x40, + + /// + /// Avoid fields and properties marked with the ScriptIgnore attribute. + /// + UseScriptIgnore = 0x80, + + /// + /// Use the ISO 8601 roundtrip string format ('o' DateTime format). + /// + DateFormatRoundtripUtc = 0x100, + + /// + /// Serialize enum values as text. + /// + EnumAsText = 0x200, + + /// + /// Continue serialization if a cycle was detected. + /// + ContinueOnCycle = 0x400, + + /// + /// Continue serialization if getting a value throws error. + /// + ContinueOnValueError = 0x800, + + /// + /// Don't serialize properties with a null value. + /// + SkipNullPropertyValues = 0x1000, + + /// + /// Use the format defined in the DateTimeOffsetFormat property of the JsonOptions class. + /// + DateTimeOffsetFormatCustom = 0x2000, + + /// + /// Don't serialize null date time values. + /// + SkipNullDateTimeValues = 0x4000, + + /// + /// Automatically parse date time. + /// + AutoParseDateTime = 0x8000, + + /// + /// Write dictionary keys without quotes. + /// + WriteKeysWithoutQuotes = 0x10000, + + /// + /// Serializes byte arrays as base 64 strings. + /// + ByteArrayAsBase64 = 0x20000, + + /// + /// Serializes streams as base 64 strings. + /// + StreamsAsBase64 = 0x40000, + + /// + /// Don't serialize value type with a zero value. + /// + SkipZeroValueTypes = 0x80000, + + /// + /// Use the JSON attribute. + /// + UseJsonAttribute = 0x100000, + + /// + /// Don't serialize values equal to the default member (property, field) value, if defined. + /// + SkipDefaultValues = 0x200000, + + /// + /// Serialize TimeSpan values as text. + /// + TimeSpanAsText = 0x400000, + + /// + /// Skip members with get only method. + /// + SkipGetOnly = 0x800000, + + /// + /// The default value. + /// + Default = UseXmlIgnore | UseScriptIgnore | SerializeFields | AutoParseDateTime | UseJsonAttribute | SkipGetOnly | SkipDefaultValues | SkipZeroValueTypes | SkipNullPropertyValues | SkipNullDateTimeValues, + } + + /// + /// The exception that is thrown when a JSON error occurs. + /// + [Serializable] + public class JsonException : Exception + { + /// + /// The commn error prefix. + /// + public const string Prefix = "JSO"; + + /// + /// Initializes a new instance of the class. + /// + public JsonException() + : base(Prefix + "0001: JSON exception.") + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The message that describes the error. + public JsonException(string message) + : base(message) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The error message that explains the reason for the exception. + /// The exception that is the cause of the current exception, or a null reference ( in Visual Basic) if no inner exception is specified. + public JsonException(string message, Exception innerException) + : base(message, innerException) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The inner exception. + public JsonException(Exception innerException) + : base(null, innerException) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The that holds the serialized object data about the exception being thrown. + /// The that contains contextual information about the source or destination. + protected JsonException(SerializationInfo info, StreamingContext context) + : base(info, context) + { + } + + /// + /// Gets the errror code. + /// + /// The message. + /// The error code. + public static int GetCode(string message) + { + if (message == null) + return -1; + + if (!message.StartsWith(Prefix, StringComparison.Ordinal)) + return -1; + + var pos = message.IndexOf(':', Prefix.Length); + if (pos < 0) + return -1; + + return int.TryParse(message.Substring(Prefix.Length, pos - Prefix.Length), NumberStyles.None, CultureInfo.InvariantCulture, out var i) ? i : -1; + } + + /// + /// Gets the error code. + /// + /// + /// The error code. + /// + public int Code => GetCode(Message); + } + +#pragma warning restore CA1034 // Nested types should not be visible +#pragma warning restore CA1031 // Do not catch general exception types +#pragma warning restore IDE0054 // Use compound assignment +#pragma warning restore IDE0056 // Use index operator +#pragma warning restore CA2249 // Consider using 'string.Contains' instead of 'string.IndexOf' +#pragma warning restore IDE0057 // Use range operator +#pragma warning restore IDE0090 // Use 'new(...)' +#pragma warning restore IDE0063 // Use simple 'using' statement + +} diff --git a/Commander/enterprise/EnterpriseCommands.cs b/Commander/enterprise/EnterpriseCommands.cs index c76b3e8..d59f0a8 100644 --- a/Commander/enterprise/EnterpriseCommands.cs +++ b/Commander/enterprise/EnterpriseCommands.cs @@ -7,6 +7,7 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using Authentication; +using Cli; using Commander.Enterprise; using CommandLine; using Enterprise; @@ -14,8 +15,10 @@ using KeeperSecurity.Authentication; using KeeperSecurity.Commands; using KeeperSecurity.Enterprise; +using KeeperSecurity.Enterprise.AuditLogCommands; using KeeperSecurity.Utils; using Org.BouncyCastle.Crypto.Parameters; +using static KeeperSecurity.Enterprise.AuditLogExtensions; using EnterpriseData = KeeperSecurity.Enterprise.EnterpriseData; namespace Commander @@ -24,8 +27,9 @@ internal interface IEnterpriseContext { EnterpriseLoader Enterprise { get; } EnterpriseData EnterpriseData { get; } - RoleDataManagement RoleManagement { get; } + RoleData RoleManagement { get; } QueuedTeamDataManagement QueuedTeamManagement { get; } + UserAliasData UserAliasData { get; } DeviceApprovalData DeviceApproval { get; } @@ -39,10 +43,10 @@ internal interface IEnterpriseContext internal static class EnterpriseExtensions { - internal static void AppendEnterpriseCommands(this IEnterpriseContext context, CliCommands cli) + internal static void AppendEnterpriseCommands(this IEnterpriseContext context, Cli.CliCommands cli) { cli.Commands.Add("enterprise-get-data", - new SimpleCommand + new Cli.SimpleCommand { Order = 60, Description = "Retrieve enterprise data", @@ -50,7 +54,7 @@ internal static void AppendEnterpriseCommands(this IEnterpriseContext context, C }); cli.Commands.Add("enterprise-node", - new ParsableCommand + new ParseableCommand { Order = 61, Description = "Manage Enterprise Nodes", @@ -58,7 +62,7 @@ internal static void AppendEnterpriseCommands(this IEnterpriseContext context, C }); cli.Commands.Add("enterprise-user", - new ParsableCommand + new ParseableCommand { Order = 62, Description = "Manage Enterprise Users", @@ -66,7 +70,7 @@ internal static void AppendEnterpriseCommands(this IEnterpriseContext context, C }); cli.Commands.Add("enterprise-team", - new ParsableCommand + new ParseableCommand { Order = 63, Description = "Manage Enterprise Teams", @@ -74,7 +78,7 @@ internal static void AppendEnterpriseCommands(this IEnterpriseContext context, C }); cli.Commands.Add("enterprise-role", - new ParsableCommand + new ParseableCommand { Order = 64, Description = "Manage Enterprise Roles", @@ -82,21 +86,36 @@ internal static void AppendEnterpriseCommands(this IEnterpriseContext context, C }); cli.Commands.Add("enterprise-device", - new ParsableCommand + new ParseableCommand { Order = 65, Description = "Manage User Devices", Action = async options => { await context.EnterpriseDeviceCommand(options); }, }); + cli.Commands.Add("transfer-user", + new ParseableCommand + { + Order = 66, + Description = "Transfer User Account", + Action = async options => { await context.TransferUserCommand(options); }, + }); + cli.Commands.Add("extend-account-share-expiration", + new ParseableCommand + { + Order = 67, + Description = "Extend Account Share Expiration", + Action = async options => { await context.ExtendAccountShareExpirationCommand(options); }, + }); cli.Commands.Add("audit-report", - new ParsableCommand + new ParseableCommand { - Order = 66, + Order = 70, Description = "Run an audit trail report.", Action = async options => { await context.RunAuditEventsReport(options); }, }); + cli.CommandAliases["eget"] = "enterprise-get-data"; cli.CommandAliases["en"] = "enterprise-node"; cli.CommandAliases["eu"] = "enterprise-user"; @@ -104,10 +123,11 @@ internal static void AppendEnterpriseCommands(this IEnterpriseContext context, C cli.CommandAliases["er"] = "enterprise-role"; cli.CommandAliases["ed"] = "enterprise-device"; + if (context.Enterprise.EcPrivateKey == null) { cli.Commands.Add("enterprise-add-key", - new SimpleCommand + new Cli.SimpleCommand { Order = 63, Description = "Register ECC key pair", @@ -147,7 +167,7 @@ public static void PrintNodeTree(this EnterpriseData enterpriseData, EnterpriseN } } - private static EnterpriseNode ResolveNodeName(this EnterpriseData enterpriseData, string nodeName) + internal static EnterpriseNode ResolveNodeName(this EnterpriseData enterpriseData, string nodeName) { if (nodeName.All(x => char.IsDigit(x))) { @@ -239,29 +259,29 @@ public static async Task EnterpriseNodeCommand(this EnterpriseData enterpriseDat } case "update": - if (!string.IsNullOrEmpty(arguments.Name)) - { - node.DisplayName = arguments.Name; - } - await enterpriseData.UpdateNode(node, parentNode); - Console.WriteLine($"Node \"{node.DisplayName}\" updated."); - if (arguments.RestrictVisibility) - { - await enterpriseData.SetRestrictVisibility(node.Id); - await enterpriseData.Enterprise.Load(); - Console.WriteLine($"Node Isolation: {(node.RestrictVisibility ? "ON" : "OFF")}"); - } + if (!string.IsNullOrEmpty(arguments.Name)) + { + node.DisplayName = arguments.Name; + } + await enterpriseData.UpdateNode(node, parentNode); + Console.WriteLine($"Node \"{node.DisplayName}\" updated."); + if (arguments.RestrictVisibility) + { + await enterpriseData.SetRestrictVisibility(node.Id); + await enterpriseData.Enterprise.Load(); + Console.WriteLine($"Node Isolation: {(node.RestrictVisibility ? "ON" : "OFF")}"); + } - break; + break; case "delete": - await enterpriseData.DeleteNode(node.Id); - Console.WriteLine($"Node \"{node.DisplayName}\" deleted."); - break; + await enterpriseData.DeleteNode(node.Id); + Console.WriteLine($"Node \"{node.DisplayName}\" deleted."); + break; default: - Console.WriteLine($"Unsupported command \"{arguments.Command}\": available commands \"tree\", \"add\", \"update\", \"delete\""); - break; + Console.WriteLine($"Unsupported command \"{arguments.Command}\": available commands \"tree\", \"add\", \"update\", \"delete\""); + break; } } await enterpriseData.Enterprise.Load(); @@ -304,15 +324,16 @@ public static async Task EnterpriseUserCommand(this IEnterpriseContext context, }) .ToArray(); - var tab = new Tabulate(4) + var tab = new Tabulate(5) { DumpRowNo = true }; - tab.AddHeader("Email", "Display Name", "Status", "Teams"); + tab.AddHeader("Email", "Display Name", "Status", "Teams", "Aliases"); foreach (var user in users) { var teams = context.EnterpriseData.GetTeamsForUser(user.Id); - tab.AddRow(user.Email, user.DisplayName, user.UserStatus.ToString(), teams?.Length ?? 0); + var aliases = context.UserAliasData.GetAliasesForUser(user.Id).Where(x => x != user.Email).ToArray(); + tab.AddRow(user.Email, user.DisplayName, user.UserStatus.ToString(), teams?.Length ?? 0, aliases); } tab.Sort(1); @@ -320,7 +341,7 @@ public static async Task EnterpriseUserCommand(this IEnterpriseContext context, return; } - if (string.IsNullOrEmpty(arguments.User)) + if (string.IsNullOrEmpty(arguments.User)) { Console.WriteLine("User parameter cannot be empty"); return; @@ -397,6 +418,52 @@ public static async Task EnterpriseUserCommand(this IEnterpriseContext context, tab.Dump(); } + else if (arguments.Command == "alias-add" || arguments.Command == "alias-remove") { + if (string.IsNullOrEmpty(arguments.Alias)) + { + Console.WriteLine("User alias parameter is mandatory."); + return; + } + if (arguments.Command == "alias-add") + { + var aliasExists = context.UserAliasData.GetAliasesForUser(singleUser.Id).Where(x => x == arguments.Alias).Any(); + if (aliasExists) + { + var rq = new EnterpriseUserAliasRequest { + EnterpriseUserId = singleUser.Id, + Alias = arguments.Alias + }; + await context.Enterprise.Auth.ExecuteAuthRest("enterprise/enterprise_user_set_primary_alias", rq); + } + else { + var rq = new EnterpriseUserAddAliasRequestV2(); + rq.EnterpriseUserAddAliasRequest.Add(new EnterpriseUserAddAliasRequest + { + Primary = true, + EnterpriseUserId = singleUser.Id, + Alias = arguments.Alias + }); + var rs = await context.Enterprise.Auth.ExecuteAuthRest("enterprise/enterprise_user_add_alias", rq, apiVersion: 1); + foreach (var st in rs.Status) + { + if (st.Status != "success") + { + Console.WriteLine($"Failed to add alias to user {st.EnterpriseUserId}: {st.Status}"); + } + } + } + } + else + { + var rq = new EnterpriseUserAliasRequest + { + EnterpriseUserId = singleUser.Id, + Alias = arguments.Alias + }; + await context.Enterprise.Auth.ExecuteAuthRest("enterprise/enterprise_user_delete_alias", rq); + } + await context.Enterprise.Load(); + } else if (arguments.Command == "team-add" || arguments.Command == "team-remove") { if (string.IsNullOrEmpty(arguments.Team)) @@ -465,15 +532,236 @@ public static async Task EnterpriseUserCommand(this IEnterpriseContext context, Console.WriteLine($"User {singleUser.Email} deleted"); } } + else if (arguments.Command == "delete") + { + if (!arguments.Confirm) { + Console.WriteLine("Deleting a user will also delete any records owned and shared by this user.\n" + + "Before you delete this user, we strongly recommend you lock their account\n" + + "and transfer any important records to other user.\nThis action cannot be undone.\n"); + Console.Write("Do you want to proceed with deletion (Yes/No)? > "); + var answer = await Program.GetInputManager().ReadLine(); + if (string.Compare("y", answer, StringComparison.InvariantCultureIgnoreCase) == 0) + { + answer = "yes"; + } + arguments.Confirm = string.Equals(answer, "yes", StringComparison.InvariantCultureIgnoreCase); + } + if (!arguments.Confirm) return; + + await context.EnterpriseData.DeleteUser(singleUser); + + Console.WriteLine($"User {singleUser.Email} deleted"); + } else { Console.WriteLine($"Unsupported command \"{arguments.Command}\". Commands are \"list\", \"view\", \"invite\", \"team-add\", \"team-remove\""); } } + public static async Task TransferUserCommand(this IEnterpriseContext context, EnterpriseTransferUserOptions arguments) + { + KeeperSecurity.Enterprise.EnterpriseUser fromUser = null; + if (arguments.FromUser.All(x => char.IsDigit(x))) + { + if (long.TryParse(arguments.FromUser, out var userId)) + { + context.EnterpriseData.TryGetUserById(userId, out fromUser); + } + } + if (fromUser == null) + { + context.EnterpriseData.TryGetUserByEmail(arguments.FromUser, out fromUser); + } + if (fromUser == null) + { + Console.WriteLine($"Enterprise user \"{arguments.FromUser}\" not found"); + return; + } + KeeperSecurity.Enterprise.EnterpriseUser targetUser = null; + if (arguments.TargetUser.All(x => char.IsDigit(x))) + { + if (long.TryParse(arguments.TargetUser, out var userId)) + { + context.EnterpriseData.TryGetUserById(userId, out targetUser); + } + } + if (targetUser == null) + { + context.EnterpriseData.TryGetUserByEmail(arguments.TargetUser, out targetUser); + } + if (targetUser == null) + { + Console.WriteLine($"Enterprise user \"{arguments.TargetUser}\" not found"); + return; + } + + if (fromUser.Id == targetUser.Id) + { + Console.WriteLine($"From and Target users cannot be the same."); + return; + } + Console.Write($"This action cannot be undone.\n\nDo you want to proceed with transferring {fromUser.Email} account (Yes/No)? > "); + var answer = await Program.GetInputManager().ReadLine(); + if (string.Compare("y", answer, StringComparison.InvariantCultureIgnoreCase) == 0) + { + answer = "yes"; + } + + if (!string.Equals(answer, "yes", StringComparison.InvariantCultureIgnoreCase)) return; + + var result = await context.EnterpriseData.TransferUserAccount(context.RoleManagement, fromUser, targetUser); + var tab = new Tabulate(2) + { + DumpRowNo = false + }; + + tab.SetColumnRightAlign(0, true); + tab.AddRow("Successfully Transfered ", ""); + tab.AddRow("Records:", result.RecordsTransfered); + tab.AddRow("Shared Folders:", result.SharedFoldersTransfered); + tab.AddRow("Teams:", result.TeamsTransfered); + if (result.RecordsCorrupted > 0 || result.SharedFoldersCorrupted > 0 || result.TeamsCorrupted > 0) + { + tab.AddRow("Failed to Transfer ", ""); + if (result.RecordsCorrupted > 0) + { + tab.AddRow("Records:", result.RecordsCorrupted); + } + if (result.SharedFoldersCorrupted > 0) + { + tab.AddRow("Shared Folders:", result.SharedFoldersCorrupted); + } + if (result.TeamsCorrupted > 0) + { + tab.AddRow("Teams:", result.TeamsCorrupted); + } + } + tab.Dump(); + } + + public static async Task ExtendAccountShareExpirationCommand(this IEnterpriseContext context, EnterpriseUsersOptions options) + { + var availabeUsers = new Dictionary(); + foreach (var u in context.EnterpriseData.Users) + { + if (u.AccountShareExpiration > 0) + { + availabeUsers[u.Id] = u; + } + } + if (availabeUsers.Count == 0) + { + Console.WriteLine("There are no users with pending Account Share status"); + return; + } + + if (options.Users == null || !options.Users.Any()) + { + var tab = new Tabulate(3) + { + DumpRowNo = true + }; + tab.AddHeader("User ID", "Email", "Expiration"); + foreach (var u in availabeUsers.Values) + { + var exp = DateTimeOffset.FromUnixTimeMilliseconds(u.AccountShareExpiration).ToLocalTime(); + tab.AddRow(u.Id, u.Email, exp.ToString("g")); + } + tab.Sort(1); + tab.Dump(); + return; + } + + var matchingUsers = new HashSet(); + foreach (var user in options.Users) + { + var cnt = matchingUsers.Count; + var allDigits = user.All(x => char.IsDigit(x)); + if (allDigits) + { + if (long.TryParse(user, out var userId)) + { + if (availabeUsers.ContainsKey(userId)) + { + matchingUsers.Add(userId); + } + } + } + else + { + foreach (var t in availabeUsers) + { + var matched = t.Value.Email.StartsWith(user, StringComparison.InvariantCultureIgnoreCase); + if (!matched) + { + var m = Regex.Match(t.Value.Email, user, RegexOptions.IgnoreCase); + matched = m.Success; + + } + if (matched) + { + matchingUsers.Add(t.Key); + } + } + } + + if (matchingUsers.Count > cnt) + { + foreach (var uid in matchingUsers) + { + if (availabeUsers.ContainsKey(uid)) + { + availabeUsers.Remove(uid); + } + } + if (availabeUsers.Count == 0) + { + break; + } + } + } + if (matchingUsers.Count == 0) + { + Console.WriteLine("No users are found"); + return; + } + + Console.Write($"Do you want to extend Account Share Expiration period for {matchingUsers.Count} account(s) (Yes/No)? > "); + var answer = await Program.GetInputManager().ReadLine(); + if (string.Compare("y", answer, StringComparison.InvariantCultureIgnoreCase) == 0) + { + answer = "yes"; + } + + if (!string.Equals(answer, "yes", StringComparison.InvariantCultureIgnoreCase)) return; + + var commands = matchingUsers.Select(x => new ExtendAccountShareExpirationCommand { EnterpriseUserId = x }).Cast().ToArray(); + + var execRq = new ExecuteCommand + { + Requests = commands.Take(99).ToList() + }; + var execRs = await context.Enterprise.Auth.ExecuteAuthCommand(execRq); + if (execRs.Results?.Count > 0) + { + var last = execRs.Results.Last(); + var success = execRs.Results.Count + (last.IsSuccess ? 0 : -1); + if (success > 0) + { + Console.WriteLine($"Successfully extended {success} account(s)"); + } + if (!last.IsSuccess) + { + Console.WriteLine($"Error: {last.message}"); + } + } + + await context.Enterprise.Load(); + } + private static string[] _privilegeNames = new string[] { "MANAGE_NODES", "MANAGE_USER", "MANAGE_ROLES", "MANAGE_TEAMS", "RUN_REPORTS", "MANAGE_BRIDGE", "APPROVE_DEVICE", "TRANSFER_ACCOUNT" }; - public static async Task EnterpriseRoleCommand(this RoleDataManagement roleData, EnterpriseData enterpriseData, EnterpriseRoleOptions arguments) + public static async Task EnterpriseRoleCommand(this RoleData roleData, EnterpriseData enterpriseData, EnterpriseRoleOptions arguments) { if (arguments.Force) { @@ -640,7 +928,7 @@ public static async Task EnterpriseRoleCommand(this RoleDataManagement roleData, nodeId = enterpriseData.RootNode.Id; } - await roleData.CreateRole(arguments.Role, nodeId, arguments.VisibleBelow, arguments.NewUser); + await roleData.CreateRole(arguments.Role, nodeId, arguments.NewUser); Console.WriteLine($"Role \"{arguments.Role}\" successfully added."); return; } @@ -738,15 +1026,15 @@ public static async Task EnterpriseRoleCommand(this RoleDataManagement roleData, return; } - if (string.CompareOrdinal(arguments.Command, "delete") == 0) + if (string.CompareOrdinal(arguments.Command, "delete") == 0) { - await roleData.DeleteRole(role.Id); + await roleData.DeleteRole(role); return; } var cmds = new HashSet(StringComparer.InvariantCultureIgnoreCase); cmds.UnionWith(new[] { "add-members", "remove-members" }); - if (cmds.Contains(arguments.Command)) + if (cmds.Contains(arguments.Command)) { var users = new Dictionary(); var teams = new Dictionary(); @@ -779,7 +1067,7 @@ public static async Task EnterpriseRoleCommand(this RoleDataManagement roleData, continue; } var ts = enterpriseData.Teams.Where(x => string.Equals(x.Name, member, StringComparison.CurrentCultureIgnoreCase)).ToArray(); - if (ts.Length == 1) + if (ts.Length == 1) { t = ts[0]; teams[t.Uid] = t; @@ -800,15 +1088,15 @@ public static async Task EnterpriseRoleCommand(this RoleDataManagement roleData, Console.Write($"User: \"{user.Email}\" : "); if (isAdd) { - await roleData.AddUserToRole(role.Id, user.Id); + await roleData.AddUserToRole(role, user); } - else + else { - await roleData.RemoveUserFromRole(role.Id, user.Id); + await roleData.RemoveUserFromRole(role, user); } Console.WriteLine("Success"); } - catch (Exception e) + catch (Exception e) { Console.WriteLine($"Error: {e.Message}"); } @@ -820,11 +1108,11 @@ public static async Task EnterpriseRoleCommand(this RoleDataManagement roleData, Console.Write($"Team: \"{team.Name}\" : "); if (isAdd) { - await roleData.AddTeamToRole(role.Id, team.Uid); + await roleData.AddTeamToRole(role, team); } else { - await roleData.RemoveTeamFromRole(role.Id, team.Uid); + await roleData.RemoveTeamFromRole(role, team); } Console.WriteLine("Success"); } @@ -888,9 +1176,9 @@ public static async Task EnterpriseTeamCommand(this IEnterpriseContext context, false, queuedUserCount.ToString()); } - if (arguments.Queued) + if (arguments.Queued) { - foreach (var qteam in context.QueuedTeamManagement.QueuedTeams) + foreach (var qteam in context.QueuedTeamManagement.QueuedTeams) { EnterpriseNode node = null; if (qteam.ParentNodeId > 0) @@ -906,7 +1194,7 @@ public static async Task EnterpriseTeamCommand(this IEnterpriseContext context, tab.AddRow(qteam.Name, qteam.Uid, node != null ? node.DisplayName : "", - "","","","", + "", "", "", "", true, queuedUserCount.ToString()); } } @@ -961,14 +1249,14 @@ public static async Task EnterpriseTeamCommand(this IEnterpriseContext context, tab.AddRow(" Restrict Share:", team.RestrictSharing ? "Yes" : "No"); tab.AddRow(" Restrict View:", team.RestrictView ? "Yes" : "No"); } - else if (queuedTeam != null) + else if (queuedTeam != null) { tab.AddRow(" Queued Team Name:", queuedTeam.Name); tab.AddRow(" Queued Team UID:", queuedTeam.Uid); } var teamUid = team != null ? team.Uid : queuedTeam.Uid; - if (team != null) + if (team != null) { var users = context.EnterpriseData.GetUsersForTeam(teamUid) ?? Enumerable.Empty(); ; var userEmails = users @@ -1290,7 +1578,7 @@ internal static async Task DenyAdminDeviceRequests(this IEnterpriseContext conte } } - internal static async Task EnterpriseRegisterEcKey(this IEnterpriseContext context, CliCommands cli) + internal static async Task EnterpriseRegisterEcKey(this IEnterpriseContext context, Cli.CliCommands cli) { if (context.Enterprise.TreeKey == null) { @@ -1380,6 +1668,7 @@ private static object ParseDateCreatedFilter(string text) filter.Max = dt; filter.ExcludeMax = !hasEqual; } + return filter; } } else @@ -1432,19 +1721,24 @@ internal static async Task RunAuditEventsReport(this IEnterpriseContext context, filter.EventTypes = options.EventType.ToArray(); } - if (!string.IsNullOrEmpty(options.Username)) + if (options.Username != null && options.Username.Any()) + { + filter.Username = options.Username.ToArray(); + } + + if (!string.IsNullOrEmpty(options.ToUsername)) { - filter.Username = options.Username; + filter.ToUsername = new[] { options.ToUsername }; } - if (!string.IsNullOrEmpty(options.RecordUid)) + if (options.RecordUid != null && options.RecordUid.Any()) { - filter.RecordUid = options.RecordUid; + filter.RecordUid = options.RecordUid.ToArray(); } - if (!string.IsNullOrEmpty(options.SharedFolderUid)) + if (options.SharedFolderUid != null && options.SharedFolderUid.Any()) { - filter.SharedFolderUid = options.SharedFolderUid; + filter.SharedFolderUid = options.SharedFolderUid.ToArray(); } var rq = new GetAuditEventReportsCommand @@ -1453,75 +1747,129 @@ internal static async Task RunAuditEventsReport(this IEnterpriseContext context, Limit = options.Limit, }; - var rs = await context.Enterprise.Auth.ExecuteAuthCommand(rq); + if (!string.IsNullOrEmpty(options.Order)) + { + if (options.Order == "asc") + { + rq.Order = "ascending"; + } + } - var tab = new Tabulate(4) {DumpRowNo = true}; - tab.AddHeader("Created", "Username", "Event", "Message"); - tab.MaxColumnWidth = 100; - foreach (var evt in rs.Events) + if (!string.IsNullOrEmpty(options.ReportType)) { - if (!evt.TryGetValue("audit_event_type", out var v)) continue; - var eventName = v.ToString(); - if (!context.AuditEvents.TryGetValue(eventName, out var eventType)) continue; + rq.ReportType = options.ReportType; + } + if (options.Aggregate != null && options.Aggregate.Any()) + { + rq.Aggregate = options.Aggregate.ToArray(); + } + if (options.Columns != null && options.Columns.Any()) + { + rq.Columns = options.Columns.ToArray(); + } - var message = eventType.SyslogMessage; - do + var rs = await context.Enterprise.Auth.ExecuteAuthCommand(rq); + + Tabulate tab; + + if (rq.ReportType == "raw") + { + tab = new Tabulate(4) { DumpRowNo = true }; + tab.AddHeader("Created", "Username", "Event", "Message"); + tab.MaxColumnWidth = 100; + foreach (var evt in rs.Events) { - var match = Regex.Match(message, ParameterPattern); - if (!match.Success) break; - if (match.Groups.Count != 2) break; - var parameter = match.Groups[1].Value; - var value = ""; - if (evt.TryGetValue(parameter, out v)) + if (!evt.TryGetValue("audit_event_type", out var v)) continue; + var eventName = v.ToString(); + if (!context.AuditEvents.TryGetValue(eventName, out var eventType)) continue; + + var message = eventType.SyslogMessage; + do { - value = v.ToString(); - } + var match = Regex.Match(message, ParameterPattern); + if (!match.Success) break; + if (match.Groups.Count != 2) break; + var parameter = match.Groups[1].Value; + var value = ""; + if (evt.TryGetValue(parameter, out v)) + { + value = v.ToString(); + } - message = message.Remove(match.Groups[0].Index, match.Groups[0].Length); - message = message.Insert(match.Groups[0].Index, value); - } while (true); - var created = ""; - if (evt.TryGetValue("created", out v)) - { - created = v.ToString(); - if (long.TryParse(created, out var epoch)) + message = message.Remove(match.Groups[0].Index, match.Groups[0].Length); + message = message.Insert(match.Groups[0].Index, value); + } while (true); + var created = ""; + if (evt.TryGetValue("created", out v)) + { + created = v.ToString(); + if (long.TryParse(created, out var epoch)) + { + created = DateTimeOffset.FromUnixTimeSeconds(epoch).ToString("G"); + } + } + var username = ""; + if (evt.TryGetValue("username", out v)) { - created = DateTimeOffset.FromUnixTimeSeconds(epoch).ToString("G"); + username = v.ToString(); } + tab.AddRow(created, username, eventName, message); } - var username = ""; - if (evt.TryGetValue("username", out v)) + } + else + { + var columns = options.Aggregate.Concat(options.Columns).ToArray(); + tab = new Tabulate(columns.Length) { DumpRowNo = true }; + tab.AddHeader(columns); + tab.MaxColumnWidth = 100; + foreach (var evt in rs.Events) { - username = v.ToString(); + var values = columns.Select(x => { + object value = null; + evt.TryGetValue(x, out value); + if (value != null && (x == "last_created" || x == "first_created")) + { + if (value is IConvertible c) + { + var ts = c.ToInt64(CultureInfo.InvariantCulture); + var dt = DateTimeOffset.FromUnixTimeSeconds(ts); + value = dt.ToString("g"); + } + } + return value; + }).ToArray(); + tab.AddRow(values); } - tab.AddRow(created, username, eventName, message); } tab.Dump(); } } - internal class McEnterpriseContext : BackStateContext, IEnterpriseContext + internal class McEnterpriseContext : StateCommands, IEnterpriseContext { public EnterpriseLoader Enterprise { get; } public EnterpriseData EnterpriseData { get; } public DeviceApprovalData DeviceApproval { get; } - public RoleDataManagement RoleManagement { get; } + public RoleData RoleManagement { get; } public QueuedTeamDataManagement QueuedTeamManagement { get; } + public UserAliasData UserAliasData { get; } public McEnterpriseContext(ManagedCompanyAuth auth) { if (auth.AuthContext.IsEnterpriseAdmin) { DeviceApproval = new DeviceApprovalData(); - RoleManagement = new RoleDataManagement(); + RoleManagement = new RoleData(); EnterpriseData = new EnterpriseData(); QueuedTeamManagement = new QueuedTeamDataManagement(); + UserAliasData = new UserAliasData(); - Enterprise = new EnterpriseLoader(auth, new EnterpriseDataPlugin[] { EnterpriseData, RoleManagement, DeviceApproval, QueuedTeamManagement }, auth.TreeKey); + Enterprise = new EnterpriseLoader(auth, new EnterpriseDataPlugin[] { EnterpriseData, RoleManagement, DeviceApproval, QueuedTeamManagement, UserAliasData }); Task.Run(async () => { try { + await Enterprise.LoadKeys(auth.TreeKey); await Enterprise.Load(); this.AppendEnterpriseCommands(this); } @@ -1544,12 +1892,13 @@ public override string GetPrompt() } } - public partial class ConnectedContext: IEnterpriseContext + public partial class ConnectedContext : IEnterpriseContext { public EnterpriseLoader Enterprise { get; private set; } public EnterpriseData EnterpriseData { get; private set; } - public RoleDataManagement RoleManagement { get; private set; } + public RoleData RoleManagement { get; private set; } public QueuedTeamDataManagement QueuedTeamManagement { get; private set; } + public UserAliasData UserAliasData { get; internal set; } public DeviceApprovalData DeviceApproval { get; private set; } public bool AutoApproveAdminRequests { get; set; } @@ -1566,12 +1915,13 @@ private void CheckIfEnterpriseAdmin() if (_auth.AuthContext.IsEnterpriseAdmin) { EnterpriseData = new EnterpriseData(); - RoleManagement = new RoleDataManagement(); + RoleManagement = new RoleData(); DeviceApproval = new DeviceApprovalData(); _managedCompanies = new ManagedCompanyData(); QueuedTeamManagement = new QueuedTeamDataManagement(); + UserAliasData = new UserAliasData(); - Enterprise = new EnterpriseLoader(_auth, new EnterpriseDataPlugin[] { EnterpriseData, RoleManagement, DeviceApproval, _managedCompanies, QueuedTeamManagement }); + Enterprise = new EnterpriseLoader(_auth, new EnterpriseDataPlugin[] { EnterpriseData, RoleManagement, DeviceApproval, _managedCompanies, QueuedTeamManagement, UserAliasData }); _auth.PushNotifications?.RegisterCallback(EnterpriseNotificationCallback); Task.Run(async () => @@ -1585,16 +1935,37 @@ private void CheckIfEnterpriseAdmin() if (!string.IsNullOrEmpty(EnterpriseData.EnterpriseLicense?.LicenseStatus) && EnterpriseData.EnterpriseLicense.LicenseStatus.StartsWith("msp")) { Commands.Add("mc-list", - new SimpleCommand + new Cli.SimpleCommand { - Order = 70, + Order = 72, Description = "List managed companies", Action = ListManagedCompanies, }); + Commands.Add("mc-create", + new ParseableCommand + { + Order = 73, + Description = "Create managed company", + Action = CreateManagedCompany, + }); + Commands.Add("mc-update", + new ParseableCommand + { + Order = 74, + Description = "Updates managed company", + Action = UpdateManagedCompany, + }); + Commands.Add("mc-delete", + new ParseableCommand + { + Order = 75, + Description = "Removes managed company", + Action = RemoveManagedCompany, + }); Commands.Add("mc-login", - new ParsableCommand + new ParseableCommand { - Order = 71, + Order = 79, Description = "Login to managed company", Action = LoginToManagedCompany, }); @@ -1635,28 +2006,217 @@ private bool EnterpriseNotificationCallback(NotificationEvent evt) return false; } - private async Task LoginToManagedCompany(EnterpriseMcLoginOptions options) + private async Task LoginToManagedCompany(ManagedCompanyLoginOptions options) { var mcAuth = new ManagedCompanyAuth(); await mcAuth.LoginToManagedCompany(Enterprise, options.CompanyId); - NextState = new McEnterpriseContext(mcAuth); + NextStateCommands = new McEnterpriseContext(mcAuth); } private Task ListManagedCompanies(string _) { - var tab = new Tabulate(6); - tab.AddHeader("Company Name", "Company ID", "License", "# Seats", "# Users", "Paused"); + var tab = new Tabulate(9); + tab.AddHeader("Company Name", "Company ID", "Node", "Plan", "Storage", "Addons", "Seats Allowed", "Seats Used", "Paused"); foreach (var mc in _managedCompanies.ManagedCompanies) { - tab.AddRow(mc.EnterpriseName, mc.EnterpriseId, mc.ProductId, - mc.NumberOfSeats, mc.NumberOfUsers, mc.IsExpired ? "Yes" : ""); + string nodeName = ""; + if (EnterpriseData.TryGetNode(mc.ParentNodeId, out var node)) + { + if (node.ParentNodeId > 0) + { + nodeName = node.DisplayName; + } + else + { + nodeName = EnterpriseData.Enterprise.EnterpriseName; + } + } + var plan = ManagedCompanyConstants.MspProducts.FirstOrDefault(x => x.ProductCode == mc.ProductId); + var filePlan = ManagedCompanyConstants.MspFilePlans.FirstOrDefault(x => x.FilePlanCode == mc.FilePlanType); + var addons = mc.AddOns.Select(x => + { + var addon = ManagedCompanyConstants.MspAddons.FirstOrDefault(y => x.Name == y.AddonCode); + return addon?.AddonName ?? x.Name; + }).ToArray(); + tab.AddRow(mc.EnterpriseName, mc.EnterpriseId, nodeName, plan?.ProductName ?? mc.ProductId, filePlan?.FilePlanName ?? mc.FilePlanType, + addons, mc.NumberOfSeats < 2000000 ? mc.NumberOfSeats : (object)"Unlimited", mc.NumberOfUsers, mc.IsExpired ? "Yes" : ""); } tab.Sort(0); tab.DumpRowNo = true; + tab.SetColumnRightAlign(6, true); + tab.SetColumnRightAlign(7, true); tab.Dump(); return Task.CompletedTask; } + + + private void PopulateMspCommonOptions(ManagedCompanyCommonOptions arguments, ManagedCompanyOptions options) + { + if (!string.IsNullOrEmpty(arguments.Node)) + { + var n = EnterpriseData.ResolveNodeName(arguments.Node); + options.NodeId = n.Id; + } + + if (!string.IsNullOrEmpty(arguments.Product)) + { + var plan = ManagedCompanyConstants.MspProducts.FirstOrDefault(x => string.Equals(arguments.Product, x.ProductCode, StringComparison.InvariantCultureIgnoreCase)); + if (plan == null) + { + throw new Exception($"Invalid license plan: {arguments.Product}. Supported plans are {string.Join(", ", ManagedCompanyConstants.MspProducts.Select(x => x.ProductCode))}"); + } + options.ProductId = plan.ProductCode; + } + + if (arguments.Seats != null) + { + options.NumberOfSeats = arguments.Seats.Value >= 0 ? arguments.Seats.Value : 2147483647; + } + + if (!string.IsNullOrEmpty(arguments.Storage)) + { + var filePlan = ManagedCompanyConstants.MspFilePlans.FirstOrDefault(x => + string.Equals(arguments.Storage, x.FilePlanName, StringComparison.InvariantCultureIgnoreCase) || + string.Equals(arguments.Storage, x.FilePlanCode, StringComparison.InvariantCultureIgnoreCase)); + + if (filePlan == null) + { + throw new Exception($"Invalid storage plan: {arguments.Storage}. Supported plans are {string.Join(", ", ManagedCompanyConstants.MspProducts.Select(x => x.ProductName))}"); + } + options.FilePlanType = filePlan.FilePlanCode; + } + + if (!string.IsNullOrEmpty(arguments.Addons)) + { + var addonList = new List(); + foreach (var aon in arguments.Addons.Split(',')) + { + string addonName = aon.Trim(); + if (string.IsNullOrEmpty(addonName)) + { + continue; + } + int addonSeats = 0; + var pos = addonName.IndexOf(':'); + if (pos > 0) + { + var seats = addonName.Substring(pos + 1); + addonName = addonName.Substring(0, pos); + if (!int.TryParse(seats, out addonSeats)) + { + throw new Exception($"Invalid number of seats \"{seats}\" for addon \"{addonName}\""); + } + } + var addon = ManagedCompanyConstants.MspAddons.FirstOrDefault(x => string.Equals(x.AddonCode, addonName, StringComparison.InvariantCultureIgnoreCase)); + if (addon == null) + { + throw new Exception($"Invalid addon {addonName}. Supported addons are {string.Join(", ", ManagedCompanyConstants.MspAddons.Select(x => x.AddonCode))}"); + } + addonList.Add(new ManagedCompanyAddonOptions + { + Addon = addon.AddonCode, + NumberOfSeats = addonSeats > 0 ? addonSeats : (int?) null + }); + } + options.Addons = addonList.ToArray(); + } + } + + private async Task CreateManagedCompany(ManagedCompanyCreateOptions arguments) + { + var mcOptions = new ManagedCompanyOptions + { + NodeId = EnterpriseData.RootNode.Id, + Name = arguments.Name, + }; + + PopulateMspCommonOptions(arguments, mcOptions); + + if (string.IsNullOrEmpty(mcOptions.ProductId)) + { + throw new Exception($"License plan is required."); + } + + if (mcOptions.NumberOfSeats == null) + { + mcOptions.NumberOfSeats = 0; + } + + var mc = await _managedCompanies.CreateManagedCompany(mcOptions); + Console.WriteLine($"Managed Company \"{mc.EnterpriseName}\", ID:{mc.EnterpriseId} has been created."); + } + + + private async Task UpdateManagedCompany(ManagedCompanyUpdateOptions arguments) + { + int companyId = -1; + int.TryParse(arguments.Company, out companyId); + + var mc = _managedCompanies.ManagedCompanies.FirstOrDefault(x => + { + if (companyId > 0) + { + if (companyId == x.EnterpriseId) + { + return true; + } + } + + return string.Equals(x.EnterpriseName, arguments.Company, StringComparison.InvariantCultureIgnoreCase); + }); + + if (mc == null) + { + Console.WriteLine($"Managed company {arguments.Company} not found."); + } + + var mcOptions = new ManagedCompanyOptions + { + ProductId = mc.ProductId, + NumberOfSeats = mc.NumberOfSeats + }; + PopulateMspCommonOptions(arguments, mcOptions); + + if (!string.IsNullOrEmpty(arguments.Name)) + { + mcOptions.Name = arguments.Name; + } + + var mc1 = await _managedCompanies.UpdateManagedCompany(mc.EnterpriseId, mcOptions); + + Console.WriteLine($"Managed Company \"{mc1.EnterpriseName}\", ID:{mc1.EnterpriseId} has been updated."); + } + + private async Task RemoveManagedCompany(ManagedCompanyRemoveOptions options) + { + int companyId = -1; + int.TryParse(options.Company, out companyId); + + var mc = _managedCompanies.ManagedCompanies.FirstOrDefault(x => + { + if (companyId > 0) + { + if (companyId == x.EnterpriseId) + { + return true; + } + } + + return string.Equals(x.EnterpriseName, options.Company, StringComparison.InvariantCultureIgnoreCase); + }); + + if (mc != null) + { + await _managedCompanies.RemoveManagedCompany(mc.EnterpriseId); + Console.WriteLine($"Managed Company \"{mc.EnterpriseName}\", ID:{mc.EnterpriseId} has been removed."); + } + else + { + Console.WriteLine($"Managed company {options.Company} not found."); + } + } } + class EnterpriseGenericOptions { [Option('f', "force", Required = false, Default = false, HelpText = "force reload enterprise data")] @@ -1690,19 +2250,35 @@ class EnterpriseUserOptions : EnterpriseGenericOptions [Option("team", Required = false, HelpText = "team name or UID. \"team-add\", \"team-remove\"")] public string Team { get; set; } + [Option("alias", Required = false, HelpText = "user alias. \"alias-add\", \"alias-remove\"")] + public string Alias { get; set; } + [Option("node", Required = false, HelpText = "node name or ID. \"invite\"")] public string Node { get; set; } [Option("name", Required = false, HelpText = "user full name. \"invite\"")] public string FullName { get; set; } - [Value(0, Required = false, HelpText = "enterprise-user command: \"list\", \"view\", \"invite\", \"lock\", \"unlock\", \"team-add\", \"team-remove\"")] + [Option("yes", Required = false, HelpText = "delete user without confirmation prompt. \"delete\"")] + public bool Confirm { get; set; } + + [Value(0, Required = false, HelpText = "enterprise-user command: \"list\", \"view\", \"invite\", \"lock\", \"unlock\", \"team-add\", \"team-remove\", " + + "\"delete\", \"alias-add\", \"alias-remove\"")] public string Command { get; set; } [Value(1, Required = false, HelpText = "enterprise user email, ID (except \"invite\")")] public string User { get; set; } } + class EnterpriseTransferUserOptions : EnterpriseGenericOptions + { + [Value(0, Required = true, HelpText = "email or user ID to transfer vault from user")] + public string FromUser { get; set; } + + [Value(1, Required = true, HelpText = "email or user ID to transfer vault to user")] + public string TargetUser { get; set; } + } + class EnterpriseTeamOptions : EnterpriseGenericOptions { [Option("node", Required = false, HelpText = "node name or ID. \"add\", \"update\"")] @@ -1732,9 +2308,6 @@ class EnterpriseRoleOptions : EnterpriseGenericOptions [Option("node", Required = false, HelpText = "Node Name or ID. \"add\"")] public string Node { get; set; } - [Option('b', "visible-below", Required = false, Default = true, HelpText = "Visible to all nodes in hierarchy below. \"add\"")] - public bool VisibleBelow { get; set; } - [Option('n', "new-user", Required = false, Default = false, HelpText = "New users automatically get this role assigned. \"add\"")] public bool NewUser { get; set; } @@ -1765,6 +2338,9 @@ class AuditReportOptions [Option("limit", Required = false, Default = 100, HelpText = "maximum number of returned events")] public int Limit { get; set; } + [Option("order", Required = false, Default = null, HelpText = "sort order: asc, desc")] + public string Order { get; set; } + [Option("created", Required = false, Default = null, HelpText = "event creation datetime")] public string Created { get; set; } @@ -1772,22 +2348,76 @@ class AuditReportOptions public IEnumerable EventType { get; set; } [Option("username", Required = false, Default = null, HelpText = "username of event originator")] - public string Username { get; set; } + public IEnumerable Username { get; set; } - [Option("to_username", Required = false, Default = null, HelpText = "username of event target")] + [Option("to-username", Required = false, Default = null, HelpText = "username of event target")] public string ToUsername { get; set; } - [Option("record_uid", Required = false, Default = null, HelpText = "record UID")] - public string RecordUid { get; set; } + [Option("record-uid", Required = false, Default = null, HelpText = "record UID")] + public IEnumerable RecordUid { get; set; } [Option("shared-folder-uid", Required = false, Default = null, HelpText = "shared folder UID")] - public string SharedFolderUid { get; set; } + public IEnumerable SharedFolderUid { get; set; } + + [Option("report-type", Required = false, Default = "raw", HelpText = "report type")] + public string ReportType { get; set; } + + [Option("aggregate", Required = false, HelpText = "aggregate columns")] + public IEnumerable Aggregate { get; set; } + + [Option("columns", Required = false, HelpText = "report columns")] + public IEnumerable Columns { get; set; } } - class EnterpriseMcLoginOptions : EnterpriseGenericOptions + class EnterpriseUsersOptions : EnterpriseGenericOptions + { + [Value(0, Required = false, HelpText = "Email, User ID, or email pattern")] + public IEnumerable Users { get; set; } + } + + class ManagedCompanyLoginOptions : EnterpriseGenericOptions { [Value(0, Required = true, HelpText = "mc-login ")] public int CompanyId { get; set; } } - + + class ManagedCompanyRemoveOptions : EnterpriseGenericOptions + { + [Value(0, Required = true, HelpText = "Managed company name or ID")] + public string Company { get; set; } + } + + class ManagedCompanyCommonOptions : EnterpriseGenericOptions + { + [Option("product", Required = false, HelpText = "Product Plan: business, businessPlus, enterprise, enterprisePlus")] + public string Product { get; set; } + + [Option("seats", Required = false, HelpText = "Maximum number of seats. -1 unlimited.")] + public int? Seats { get; set; } + + [Option("node", Required = false, HelpText = "Node Name or ID.")] + public string Node { get; set; } + + [Option("storage", Required = false, HelpText = "Storage Plan: 100GB, 1TB, 10TB")] + public string Storage { get; set; } + + [Option("addons", Required = false, HelpText = "Comma-separated list of addons: \nenterprise_breach_watch, compliance_report, enterprise_audit_and_reporting, \nmsp_service_and_support, secrets_manager, connection_manager:N, chat")] + public string Addons { get; set; } + } + + class ManagedCompanyCreateOptions : ManagedCompanyCommonOptions + { + + [Value(0, Required = true, HelpText = "Managed Company Name")] + public string Name { get; set; } + } + + class ManagedCompanyUpdateOptions : ManagedCompanyCommonOptions + { + [Option("name", Required = false, HelpText = "New Managed Company Name.")] + public string Name { get; set; } + + [Value(0, Required = true, HelpText = "Managed company name or ID")] + public string Company { get; set; } + } } diff --git a/Commander/enterprise/QueuedTeamManagement.cs b/Commander/enterprise/QueuedTeamManagement.cs new file mode 100644 index 0000000..c10ff84 --- /dev/null +++ b/Commander/enterprise/QueuedTeamManagement.cs @@ -0,0 +1,29 @@ +using KeeperSecurity.Authentication; +using KeeperSecurity.Commands; +using KeeperSecurity.Enterprise; +using System.Threading.Tasks; + +namespace Commander.Enterprise +{ + + public interface IQueuedTeamDataManagement + { + Task QueueUserToTeam(long enterpriseUserId, string teamUid); + } + + + public class QueuedTeamDataManagement : QueuedTeamData, IQueuedTeamDataManagement + { + public async Task QueueUserToTeam(long enterpriseUserId, string teamUid) + { + var rq = new TeamQueueUserCommand + { + TeamUid = teamUid, + EnterpriseUserId = enterpriseUserId + }; + + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + } + } +} diff --git a/Commander/enterprise/RoleDataManagement.cs b/Commander/enterprise/RoleDataManagement.cs deleted file mode 100644 index b15e106..0000000 --- a/Commander/enterprise/RoleDataManagement.cs +++ /dev/null @@ -1,200 +0,0 @@ -using KeeperSecurity.Commands; -using KeeperSecurity.Authentication; -using System.Threading.Tasks; -using KeeperSecurity.Utils; -using System.Collections.Generic; -using Enterprise; -using System; -using System.Diagnostics; -using Google.Protobuf; -using KeeperSecurity.Enterprise; - -namespace Commander.Enterprise -{ - public interface IRoleDataManagement : IRoleData - { - Task CreateRole(string roleName, long nodeId, bool visibleBelow, bool newUserInherit); - Task DeleteRole(long roleId); - - Task AddUserToRole(long roleId, long userId); - Task AddUserToAdminRole(long roleId, long userId, byte[] userRsaPublicKey); - Task RemoveUserFromRole(long roleId, long userId); - Task AddTeamToRole(long roleId, string teamUid); - Task RemoveTeamFromRole(long roleId, string teamUid); - } - - public class RoleDataManagement : RoleData, IRoleDataManagement - { - private Dictionary _adminRoleKeys = new Dictionary(); - - private async Task GetRoleKey(long roleId) - { - lock (_adminRoleKeys) - { - if (_adminRoleKeys.TryGetValue(roleId, out var result)) - { - return result; - } - } - - var krq = new GetEnterpriseDataKeysRequest(); - krq.RoleId.Add(roleId); - var krs = await Enterprise.Auth.ExecuteAuthRest("enterprise/get_enterprise_data_keys", krq); - foreach (var rKey in krs.ReEncryptedRoleKey) - { - if (rKey.RoleId == roleId) - { - try - { - var roleKey = CryptoUtils.DecryptAesV2(rKey.EncryptedRoleKey.ToByteArray(), Enterprise.TreeKey); - lock (_adminRoleKeys) - { - if (!_adminRoleKeys.ContainsKey(roleId)) - { - _adminRoleKeys.Add(roleId, roleKey); - } - return roleKey; - } - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - } - } - - foreach (var rKey in krs.RoleKey) - { - if (rKey.RoleId == roleId) - { - byte[] roleKey = null; - try - { - switch (rKey.KeyType) - { - case EncryptedKeyType.KtEncryptedByDataKey: - roleKey = CryptoUtils.DecryptAesV1(rKey.EncryptedKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.DataKey); - break; - case EncryptedKeyType.KtEncryptedByPublicKey: - roleKey = CryptoUtils.DecryptRsa(rKey.EncryptedKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.PrivateKey); - break; - } - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - - if (roleKey != null) - { - lock (_adminRoleKeys) - { - if (!_adminRoleKeys.ContainsKey(roleId)) - { - _adminRoleKeys.Add(roleId, roleKey); - } - return roleKey; - } - } - } - } - - return null; - } - - public async Task CreateRole(string roleName, long nodeId, bool visibleBelow, bool newUserInherit) - { - var encryptedData = new EncryptedData - { - DisplayName = roleName - }; - - var roleId = await Enterprise.GetEnterpriseId(); - var rq = new RoleAddCommand - { - RoleId = roleId, - NodeId = nodeId, - EncryptedData = EnterpriseUtils.EncryptEncryptedData(encryptedData, Enterprise.TreeKey), - VisibleBelow = visibleBelow, - NewUserInherit = newUserInherit - }; - - await Enterprise.Auth.ExecuteAuthCommand(rq); - await Enterprise.Load(); - return TryGetRole(roleId, out var role) ? role : null; - } - - public async Task DeleteRole(long roleId) - { - await Enterprise.Auth.ExecuteAuthCommand(new RoleDeleteCommand { RoleId = roleId }); ; - await Enterprise.Load(); - } - - public async Task AddUserToRole(long roleId, long userId) - { - var rq = new RoleUserAddCommand - { - RoleId = roleId, - EnterpriseUserId = userId, - }; - - await Enterprise.Auth.ExecuteAuthCommand(rq); - await Enterprise.Load(); - } - - public async Task AddUserToAdminRole(long roleId, long userId, byte[] userRsaPublicKey) - { - var publicKey = CryptoUtils.LoadPublicKey(userRsaPublicKey); - var rq = new RoleUserAddCommand - { - RoleId = roleId, - EnterpriseUserId = userId, - TreeKey = CryptoUtils.EncryptRsa(Enterprise.TreeKey, publicKey).Base64UrlEncode(), - }; - var roleKey = await GetRoleKey(roleId); - if (roleKey != null) - { - rq.RoleAdminKey = CryptoUtils.EncryptRsa(roleKey, publicKey).Base64UrlEncode(); - } - await Enterprise.Auth.ExecuteAuthCommand(rq); - await Enterprise.Load(); - } - - public async Task RemoveUserFromRole(long roleId, long userId) - { - var rq = new RoleUserRemoveCommand - { - RoleId = roleId, - EnterpriseUserId = userId, - }; - - await Enterprise.Auth.ExecuteAuthCommand(rq); - await Enterprise.Load(); - } - - public async Task AddTeamToRole(long roleId, string teamUid) { - var rq = new RoleTeams(); - rq.RoleTeam.Add(new RoleTeam - { - RoleId = roleId, - TeamUid = ByteString.CopyFrom(teamUid.Base64UrlDecode()), - }); - - await Enterprise.Auth.ExecuteAuthRest("enterprise/role_team_add", rq); - await Enterprise.Load(); - } - - public async Task RemoveTeamFromRole(long roleId, string teamUid) - { - var rq = new RoleTeams(); - rq.RoleTeam.Add(new RoleTeam - { - RoleId = roleId, - TeamUid = ByteString.CopyFrom(teamUid.Base64UrlDecode()), - }); - - await Enterprise.Auth.ExecuteAuthRest("enterprise/role_team_remove", rq); - await Enterprise.Load(); - } - } -} diff --git a/Commander/vault/FolderCommands.cs b/Commander/vault/FolderCommands.cs new file mode 100644 index 0000000..5fe915d --- /dev/null +++ b/Commander/vault/FolderCommands.cs @@ -0,0 +1,523 @@ +using CommandLine; +using System.Threading.Tasks; +using KeeperSecurity.Vault; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using System.Text; +using Cli; + +namespace Commander +{ + internal partial class VaultContext + { + private TeamInfo[] _teamCache; + + public async Task GetAvailableTeams() + { + if (_teamCache == null) + { + _teamCache = (await Vault.GetTeamsForShare()).ToArray(); + } + + return _teamCache; + } + } + + internal static class FolderCommandExtensions + { + public static async Task MakeFolderCommand(this VaultContext context, MakeFolderOptions options) + { + var sfOptions = options.Shared + ? new SharedFolderOptions + { + ManageRecords = options.ManageRecords, + ManageUsers = options.ManageUsers, + CanEdit = options.CanEdit, + CanShare = options.CanShare, + } + : null; + _ = await context.Vault.CreateFolder(options.FolderName, context.CurrentFolder, sfOptions); + } + + public static async Task RemoveFolderCommand(this VaultContext context, FolderOptions options) + { + if (context.TryResolvePath(options.FolderName, out var folder)) + { + await context.Vault.DeleteFolder(folder.FolderUid); + } + else + { + Console.WriteLine($"Invalid folder path: {options.FolderName}"); + } + } + + public static async Task UpdateFolderCommand(this VaultContext context, UpdateFolderOptions options) + { + if (context.TryResolvePath(options.FolderName, out var folder)) + { + SharedFolderOptions sharedFolderOptions = null; + if (folder.FolderType == FolderType.SharedFolder) + { + sharedFolderOptions = new SharedFolderOptions + { + ManageRecords = options.ManageRecords, + ManageUsers = options.ManageUsers, + CanEdit = options.CanEdit, + CanShare = options.CanShare, + }; + } + + await context.Vault.UpdateFolder(folder.FolderUid, options.NewName, sharedFolderOptions); + } + else + { + Console.WriteLine($"Invalid folder path: {options.FolderName}"); + } + } + + public static async Task MoveCommand(this VaultContext context, MoveOptions options) + { + if (!context.Vault.TryGetFolder(options.DestinationName, out var dstFolder)) + { + if (!context.TryResolvePath(options.DestinationName, out dstFolder)) + { + Console.WriteLine($"Invalid destination folder path: {options.DestinationName}"); + return; + } + } + + if (context.Vault.TryGetFolder(options.SourceName, out var srcFolder)) + { + await context.Vault.MoveFolder(srcFolder.FolderUid, dstFolder.FolderUid, options.Link); + } + else if (context.Vault.TryGetKeeperRecord(options.SourceName, out var record)) + { + var folders = Enumerable.Repeat(context.Vault.RootFolder, 1).Concat(context.Vault.Folders) + .Where(x => x.Records.Contains(record.Uid)).ToArray(); + if (folders.Length == 0) + { + Console.WriteLine("not expected"); + return; + } + + var folder = folders.Length == 1 + ? folders[0] + : folders.FirstOrDefault(x => x.FolderUid == context.CurrentFolder) + ?? folders.FirstOrDefault(x => string.IsNullOrEmpty(x.FolderUid)) + ?? folders.FirstOrDefault(x => x.FolderType == FolderType.UserFolder) + ?? folders[0]; + + await context.Vault.MoveRecords(new[] { new RecordPath { FolderUid = folder.FolderUid, RecordUid = record.Uid } }, + dstFolder.FolderUid, options.Link); + } + else + { + if (!context.TryResolvePath(options.SourceName, out srcFolder, out string recordTitle)) + { + Console.WriteLine($"Invalid source path: {options.SourceName}"); + return; + } + + if (string.IsNullOrEmpty(recordTitle)) + { + await context.Vault.MoveFolder(srcFolder.FolderUid, dstFolder.FolderUid, options.Link); + } + else + { + var sb = new StringBuilder(); + sb.Append(recordTitle); + sb = sb.Replace("*", ".*"); + sb = sb.Replace("?", @"."); + sb = sb.Replace("#", @"[0-9]"); + sb.Insert(0, "^"); + sb.Append("$"); + var pattern = sb.ToString(); + + var records = new List(); + foreach (var recordUid in srcFolder.Records) + { + if (!context.Vault.TryGetKeeperRecord(recordUid, out record)) continue; + + var m = Regex.Match(record.Title, pattern, RegexOptions.IgnoreCase); + if (m.Success) + { + records.Add(new RecordPath { FolderUid = srcFolder.FolderUid, RecordUid = recordUid }); + } + } + + if (records.Count == 0) + { + throw new Exception( + $"Folder {srcFolder.Name} does not contain any record matching {recordTitle}"); + } + + await context.Vault.MoveRecords(records.ToArray(), dstFolder.FolderUid, options.Link); + } + } + } + public static Task ListSharedFoldersCommand(this VaultContext context, string arguments) + { + var tab = new Tabulate(4) + { + DumpRowNo = true + }; + tab.AddHeader(new[] { "Shared Folder UID", "Name", "# Records", "# Users" }); + foreach (var sf in context.Vault.SharedFolders) + { + tab.AddRow(new object[] { sf.Uid, sf.Name, sf.RecordPermissions.Count, sf.UsersPermissions.Count }); + } + + tab.Sort(1); + tab.Dump(); + + return Task.FromResult(true); + } + + private const string EmailPattern = @"(?i)^[A-Z0-9._%+-]+@(?:[A-Z0-9-]+\.)+[A-Z]{2,}$"; + + public static async Task ShareFolderUserPermissionCommand(this VaultContext context, ShareFolderUserPermissionOptions options) + { + if (!context.Vault.TryGetSharedFolder(options.FolderName, out var sf)) + { + var sfs = context.Vault.SharedFolders + .Where(x => string.Compare(x.Name, options.FolderName, StringComparison.CurrentCultureIgnoreCase) == + 0) + .ToArray(); + if (sfs.Length == 1) + { + sf = sfs[0]; + } + } + + if (sf == null) + { + if (!context.Vault.TryGetFolder(options.FolderName, out var folder)) + { + if (!context.TryResolvePath(options.FolderName, out folder)) + { + Console.WriteLine($"Folder \'{options.FolderName}\' not found"); + return; + } + } + + if (folder.FolderType == FolderType.UserFolder) + { + Console.WriteLine($"Folder \'{folder.Name}\' is not Shared Folder"); + return; + } + + sf = context.Vault.GetSharedFolder(folder.FolderType == FolderType.SharedFolder + ? folder.FolderUid + : folder.SharedFolderUid); + } + + if (string.IsNullOrEmpty(options.User)) + { + var teams = await context.GetAvailableTeams(); + var tab = new Tabulate(4) + { + DumpRowNo = true + }; + tab.SetColumnRightAlign(2, true); + tab.SetColumnRightAlign(3, true); + tab.AddHeader(new[] { "User ID", "User Type", "Manage Records", "Manage Users" }); + foreach (var p in sf.UsersPermissions.OrderBy(x => $"{(int) x.UserType} {x.UserId.ToLowerInvariant()}")) + { + if (p.UserType == UserType.User) + { + tab.AddRow(new[] + {p.UserId, p.UserType.ToString(), p.ManageRecords ? "X" : "-", p.ManageUsers ? "X" : "="}); + } + else + { + var team = teams.FirstOrDefault(x => x.TeamUid == p.UserId); + tab.AddRow(new[] + { + team?.Name ?? p.UserId, p.UserType.ToString(), p.ManageRecords ? "X" : "-", + p.ManageUsers ? "X" : "-" + }); + } + } + + tab.Dump(); + } + else + { + var userType = UserType.User; + string userId = null; + var rx = new Regex(EmailPattern); + if (rx.IsMatch(options.User)) + { + userId = options.User.ToLowerInvariant(); + } + else + { + userType = UserType.Team; + if (context.Vault.TryGetTeam(options.User, out var team)) + { + userId = team.TeamUid; + } + else + { + team = context.Vault.Teams.FirstOrDefault(x => + string.Compare(x.Name, options.User, StringComparison.CurrentCultureIgnoreCase) == 0); + if (team != null) + { + userId = team.TeamUid; + } + else + { + var teams = await context.GetAvailableTeams(); + var teamInfo = teams.FirstOrDefault(x => + string.Compare(x.Name, options.User, StringComparison.CurrentCultureIgnoreCase) == 0 || + string.CompareOrdinal(x.TeamUid, options.User) == 0 + ); + if (teamInfo != null) + { + userId = teamInfo.TeamUid; + } + } + } + + if (userId == null) + { + Console.WriteLine($"User {options.User} cannot be resolved as email or team"); + return; + } + } + + var userPermission = + sf.UsersPermissions.FirstOrDefault(x => x.UserType == userType && x.UserId == userId); + + if (options.Delete) + { + if (userPermission != null) + { + await context.Vault.RemoveUserFromSharedFolder(sf.Uid, userId, userType); + } + else + { + Console.WriteLine( + $"{(userType == UserType.User ? "User" : "Team")} \'{userId}\' is not a part of Shared Folder \'{sf.Name}\'"); + } + } + else + { + try + { + await context.Vault.PutUserToSharedFolder(sf.Uid, userId, userType, new SharedFolderUserOptions + { + ManageUsers = options.ManageUsers ?? sf.DefaultManageUsers, + ManageRecords = options.ManageRecords ?? sf.DefaultManageRecords, + }); + } + catch (NoActiveShareWithUserException e) + { + Console.WriteLine(e.Message); + Console.Write( + $"Do you want to send share invitation request to \"{e.Username}\"? (Yes/No) : "); + var answer = await Program.GetInputManager().ReadLine(); + if (string.Equals("y", answer, StringComparison.InvariantCultureIgnoreCase)) + { + answer = "yes"; + } + if (string.Equals(answer, "yes", StringComparison.InvariantCultureIgnoreCase)) + { + await context.Vault.SendShareInvitationRequest(e.Username); + Console.WriteLine($"Invitation has been sent to {e.Username}\nPlease repeat this command when your invitation is accepted."); + } + } + } + } + } + + public static async Task ShareFolderRecordPermissionCommand(this VaultContext context, ShareFolderRecordPermissionOptions options) + { + if (!context.Vault.TryGetSharedFolder(options.FolderName, out var sf)) + { + var sfs = context.Vault.SharedFolders + .Where(x => string.Compare(x.Name, options.FolderName, StringComparison.CurrentCultureIgnoreCase) == + 0) + .ToArray(); + if (sfs.Length == 1) + { + sf = sfs[0]; + } + } + + if (sf == null) + { + if (!context.Vault.TryGetFolder(options.FolderName, out var folder)) + { + if (!context.TryResolvePath(options.FolderName, out folder)) + { + Console.WriteLine($"Folder \'{options.FolderName}\'"); + return; + } + } + + if (folder.FolderType == FolderType.UserFolder) + { + Console.WriteLine($"Folder \'{folder.Name}\' is not Shared Folder"); + return; + } + + sf = context.Vault.GetSharedFolder(folder.FolderType == FolderType.SharedFolder + ? folder.FolderUid + : folder.SharedFolderUid); + } + + if (string.IsNullOrEmpty(options.Record)) + { + var tab = new Tabulate(4) + { + DumpRowNo = true + }; + tab.AddHeader(new[] { "Record Title", "Record UID", "Can Edit", "Can Share" }); + foreach (var p in sf.RecordPermissions) + { + if (context.Vault.TryGetKeeperRecord(p.RecordUid, out var record)) + { + tab.AddRow(record.Title, p.RecordUid, p.CanEdit ? "X" : "-", p.CanShare ? "X" : "-"); + } + } + + tab.Sort(0); + tab.Dump(); + } + else + { + string recordUid = null; + if (context.Vault.TryGetKeeperRecord(options.Record, out var record)) + { + recordUid = record.Uid; + } + else + { + if (context.TryResolvePath(options.Record, out var folder, out var title)) + { + recordUid = folder.Records.Select(x => context.Vault.GetRecord(x)).FirstOrDefault(x => + string.Compare(x.Title, title, StringComparison.CurrentCultureIgnoreCase) == 0)?.Uid; + + } + } + + if (string.IsNullOrEmpty(recordUid)) + { + Console.WriteLine($"\'{options.Record}\' cannot be resolved as record"); + return; + } + + var recordPermission = sf.RecordPermissions.FirstOrDefault(x => x.RecordUid == recordUid); + if (recordPermission == null) + { + Console.WriteLine($"Record \'{options.Record}\' is not a part of Shared Folder {sf.Name}"); + return; + } + + if (options.CanShare.HasValue || options.CanEdit.HasValue) + { + await context.Vault.ChangeRecordInSharedFolder(sf.Uid, recordUid, new SharedFolderRecordOptions + { + CanEdit = options.CanEdit ?? recordPermission.CanEdit, + CanShare = options.CanShare ?? recordPermission.CanShare, + }); + } + else + { + Console.WriteLine(); + Console.WriteLine("{0, 20}: {1}", "Record UID", record.Uid); + Console.WriteLine("{0, 20}: {1}", "Record Title", record.Title); + Console.WriteLine("{0, 20}: {1}", "Can Edit", recordPermission.CanEdit ? "Yes" : "No"); + Console.WriteLine("{0, 20}: {1}", "Can Share", recordPermission.CanShare ? "Yes" : "No"); + Console.WriteLine(); + } + } + } + + } + + class FolderOptions + { + [Value(0, Required = true, MetaName = "folder name", HelpText = "folder name")] + public string FolderName { get; set; } + } + + class UpdateFolderOptions : FolderOptions + { + [Option("manage-users", Required = false, Default = null, HelpText = "default manage users")] + public bool? ManageUsers { get; set; } + + [Option("manage-records", Required = false, Default = null, HelpText = "default manage records")] + public bool? ManageRecords { get; set; } + + [Option("can-share", Required = false, Default = null, HelpText = "default can share")] + public bool? CanShare { get; set; } + + [Option("can-edit", Required = false, Default = null, HelpText = "default can edit")] + public bool? CanEdit { get; set; } + + [Option("name", Required = false, Default = null, HelpText = "new folder folder")] + public string NewName { get; set; } + } + + class MakeFolderOptions : FolderOptions + { + [Option('s', "shared", Required = false, Default = false, HelpText = "shared folder")] + public bool Shared { get; set; } + + [Option("manage-users", Required = false, Default = null, HelpText = "default manage users")] + public bool? ManageUsers { get; set; } + + [Option("manage-records", Required = false, Default = null, HelpText = "default manage records")] + public bool? ManageRecords { get; set; } + + [Option("can-share", Required = false, Default = null, HelpText = "default can share")] + public bool? CanShare { get; set; } + + [Option("can-edit", Required = false, Default = null, HelpText = "default can edit")] + public bool? CanEdit { get; set; } + } + class MoveOptions + { + [Option("link", Required = false, HelpText = "do not delete source")] + public bool Link { get; set; } + + [Value(0, Required = true, MetaName = "source record or folder", HelpText = "source record or folder")] + public string SourceName { get; set; } + + [Value(1, Required = true, MetaName = "destination folder", HelpText = "destination folder")] + public string DestinationName { get; set; } + } + + class ShareFolderRecordPermissionOptions : FolderOptions + { + [Option('r', "record", Required = false, Default = null, HelpText = "record name or record uid")] + public string Record { get; set; } + + [Option('s', "can-share", Required = false, Default = null, HelpText = "record permission: can be shared.")] + public bool? CanShare { get; set; } + + [Option('e', "can-edit", Required = false, Default = null, HelpText = "record permission: can be edited.")] + public bool? CanEdit { get; set; } + } + + class ShareFolderUserPermissionOptions : FolderOptions + { + + [Option("user", Required = false, Default = null, HelpText = "account email, team name, or team uid")] + public string User { get; set; } + + [Option("delete", Required = false, Default = false, SetName = "delete", HelpText = "delete user from shared folder")] + public bool Delete { get; set; } + + [Option('r', "manage-records", Required = false, Default = null, SetName = "set", HelpText = "account permission: can manage records.")] + public bool? ManageRecords { get; set; } + + [Option('u', "manage-users", Required = false, Default = null, SetName = "set", HelpText = "account permission: can manage users.")] + public bool? ManageUsers { get; set; } + } + +} diff --git a/Commander/vault/ImportCommands.cs b/Commander/vault/ImportCommands.cs new file mode 100644 index 0000000..5ea633d --- /dev/null +++ b/Commander/vault/ImportCommands.cs @@ -0,0 +1,73 @@ +using Cli; +using CommandLine; +using KeeperSecurity.Vault; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Globalization; +using System.IO; + +using System.Threading.Tasks; + +namespace Commander +{ + internal static class ImportCommandExtensions + { + public static async Task ImportCommand(this VaultContext context, ImportCommandOptions options) + { + void Logger(Severity severity, string message) + { + if (severity == Severity.Warning || severity == Severity.Error) + { + Console.WriteLine(message); + } + Debug.WriteLine(message); + } + + if (!File.Exists(options.FileName)) + { + throw new Exception($"File \"{options.FileName}\" does not exist"); + } + var json = File.ReadAllText(options.FileName); + var j_options = new ZeroDep.JsonOptions + { + DateTimeStyles = DateTimeStyles.None, + }; + j_options.SerializationOptions &= ~ZeroDep.JsonSerializationOptions.AutoParseDateTime; + var j = ZeroDep.Json.Deserialize>(json, j_options); + var import = KeeperImport.LoadJsonDictionary(j); + var result = await context.Vault.ImportJson(import, Logger); + var table = new Tabulate(2) + { + LeftPadding = 4 + }; + table.SetColumnRightAlign(0, true); + if (result.SharedFolderCount > 0) + { + table.AddRow("Shared Folders:", result.SharedFolderCount); + } + if (result.FolderCount > 0) + { + table.AddRow("Folders:", result.FolderCount); + } + if (result.TypedRecordCount > 0) + { + table.AddRow("Records:", result.TypedRecordCount); + } + if (result.LegacyRecordCount > 0) + { + table.AddRow("Legacy Records:", result.LegacyRecordCount); + } + if (result.UpdatedRecordCount > 0) + { + table.AddRow("Updated Records:", result.UpdatedRecordCount); + } + table.Dump(); + } + } + class ImportCommandOptions + { + [Value(0, Required = true, HelpText = "JSON import filename")] + public string FileName { get; set; } + } +} diff --git a/Commander/vault/RecordCommands.cs b/Commander/vault/RecordCommands.cs new file mode 100644 index 0000000..47240a3 --- /dev/null +++ b/Commander/vault/RecordCommands.cs @@ -0,0 +1,825 @@ +using Cli; +using CommandLine; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using KeeperSecurity.Vault; +using KeeperSecurity.Utils; +using System.Reflection; +using System.Runtime.Serialization; +using System.Globalization; +using System.Text.RegularExpressions; +using System.IO; +using System.Text; + +namespace Commander +{ + internal partial class VaultContext { + + private const string FieldPattern = @"^([^\[\.]+)(\.[^\[]+)?(\[.*\])?\s*=\s*(.*)$"; + + public static IEnumerable ParseRecordFields(IEnumerable inputs) + { + var rx = new Regex(FieldPattern); + foreach (var f in inputs) + { + var field = f; + var crf = new CmdLineRecordField(); + var match = rx.Match(field); + if (!match.Success || match.Groups.Count < 5) + { + throw new Exception($"Invalid field parameter: {f}"); + } + + crf.FieldName = match.Groups[1].Value.Trim(); + crf.FieldLabel = match.Groups[2].Value.Trim('.').Trim(); + crf.FieldIndex = match.Groups[3].Value.Trim('[', ']').Trim(); + crf.Value = match.Groups[4].Value.Trim(); + if (crf.Value.Length >= 2 && crf.Value.StartsWith("\"") && crf.Value.EndsWith("\"")) + { + crf.Value = crf.Value.Trim('"').Replace("\\\"", "\""); + } + + yield return crf; + } + } + + public void AssignRecordFields(KeeperRecord record, CmdLineRecordField[] fields) + { + if (record is PasswordRecord password) + { + foreach (var field in fields) + { + switch (field.FieldName.ToLowerInvariant()) + { + case "login": + password.Login = field.Value; + break; + case "password": + password.Password = field.Value; + break; + case "notes": + password.Notes = field.Value; + break; + default: + password.SetCustomField(field.FieldName, field.Value); + break; + } + } + } + else if (record is TypedRecord typed) + { + if (Vault.TryGetRecordTypeByName(typed.TypeName, out var recordType)) + { + VerifyTypedFields(fields, recordType); + } + + var indexes = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + foreach (var f in typed.Fields.Concat(typed.Custom)) + { + if (f.Count <= 1) continue; + var fullName = f.GetTypedFieldName(); + for (var i = 1; i < f.Count; i++) + { + indexes.Add($"{fullName}[{i}]", i); + } + } + + var fieldSet = fields.Where(x => !string.IsNullOrEmpty(x.Value)).ToArray(); + var fieldDelete = fields.Where(x => string.IsNullOrEmpty(x.Value)).ToArray(); + foreach (var field in fieldSet.Concat(fieldDelete)) + { + if (string.Equals(field.FieldName, "notes", StringComparison.InvariantCultureIgnoreCase)) + { + if (string.IsNullOrEmpty(typed.Notes)) + { + typed.Notes = ""; + } + else + { + typed.Notes += "\n"; + } + typed.Notes += field.Value; + } + else + { + if (!typed.FindTypedField(field, out var typedField)) + { + if (string.IsNullOrEmpty(field.Value)) continue; + typedField = field.CreateTypedField(); + typed.Custom.Add(typedField); + } + + + if (string.IsNullOrEmpty(field.Value)) + { + if (string.IsNullOrEmpty(field.FieldIndex)) + { + while (typedField.Count > 0) + { + typedField.DeleteValueAt(0); + } + } + else + { + var fullName = field.GetTypedFieldName(); + var valuePath = $"{fullName}[{field.FieldIndex}]"; + if (!indexes.TryGetValue(valuePath, out var idx)) + { + if (idx >= 0 && idx < typedField.Count) + { + typedField.DeleteValueAt(idx); + } + indexes.Remove(valuePath); + } + } + } + else + { + var idx = 0; + if (!string.IsNullOrEmpty(field.FieldIndex)) + { + var fullName = field.GetTypedFieldName(); + var valuePath = $"{fullName}[{field.FieldIndex}]"; + if (!indexes.TryGetValue(valuePath, out idx)) + { + typedField.AppendValue(); + idx = typedField.Count - 1; + indexes.Add(valuePath, idx); + } + } + + if (typedField.Count == 0) + { + typedField.AppendValue(); + } + + if (typedField is TypedField tfs) + { + tfs.Values[idx] = field.Value; + } + else if (typedField is TypedField tfl) + { + if (!long.TryParse(field.Value, out var lv)) + { + if (DateTimeOffset.TryParse(field.Value, CultureInfo.CurrentCulture, DateTimeStyles.AssumeUniversal, out var dto)) + { + lv = dto.ToUnixTimeMilliseconds(); + } + else + { + throw new Exception($"Field \"{field.FieldName}\": invalid value \"{field.Value}\""); + } + } + tfl.Values[idx] = lv; + } + else + { + if (typedField.GetValueAt(idx) is IFieldTypeSerialize typedValue) + { + typedValue.SetValueAsString(field.Value); + } + else + { + throw new Exception($"Field type {field.FieldName}: Value serialization is not supported."); + } + } + } + } + } + } + } + + private void VerifyTypedFields(CmdLineRecordField[] fields, RecordType recordType) + { + foreach (var field in fields) + { + if (string.Equals(field.FieldName, "notes", StringComparison.InvariantCultureIgnoreCase)) + { + continue; + } + + if (string.IsNullOrEmpty(field.Value)) continue; + + if (!RecordTypesConstants.TryGetRecordField(field.FieldName, out var recordField)) + { + if (string.IsNullOrEmpty(field.FieldLabel)) + { + field.FieldLabel = field.FieldName; + field.FieldName = "text"; + } + else + { + throw new Exception($"Record field \"{field.FieldName}\" is not supported."); + } + } + + if (string.IsNullOrEmpty(field.FieldIndex)) continue; + + if (recordField.Multiple != RecordFieldMultiple.Always) + { + throw new Exception($"Record field \"{field.FieldName}\" does not support multiple values"); + } + } + } + } + + internal static class RecordCommandExtensions + { + public static Task RecordTypeInfoCommand(this VaultContext context, RecordTypeInfoOptions options) + { + Tabulate table = null; + if (string.IsNullOrEmpty(options.Name)) + { + if (options.ShowFields) + { + table = new Tabulate(4); + table.AddHeader("Field Type ID", "Type", "Multiple", "Description"); + foreach (var f in RecordTypesConstants.RecordFields) + { + table.AddRow(f.Name, f.Type?.Name, + f.Multiple == RecordFieldMultiple.Optional + ? "optional" + : (f.Multiple == RecordFieldMultiple.Always ? "default" : ""), + f.Type?.Description ?? ""); + } + } + else + { + table = new Tabulate(3) + { + LeftPadding = 4 + }; + table.SetColumnRightAlign(0, true); + table.AddHeader("Record Type ID", "Type Name", "Scope", "Description"); + foreach (var rt in context.Vault.RecordTypes) + { + table.AddRow(rt.Id, rt.Name, rt.Scope.ToText(), rt.Description); + } + + table.Sort(0); + } + } + else + { + if (options.ShowFields) + { + if (!RecordTypesConstants.TryGetRecordField(options.Name, out var fieldInfo)) + { + Console.WriteLine($"Error - Unknown field type: {options.Name}"); + return Task.FromResult(false); + } + + table = new Tabulate(2) + { + LeftPadding = 4 + }; + table.SetColumnRightAlign(0, true); + table.AddRow("Field Type ID:", fieldInfo.Name); + table.AddRow("Type:", fieldInfo.Type.Name); + var valueType = ""; + if (fieldInfo.Type != null) + { + if (fieldInfo.Type?.Type == typeof(string)) + { + valueType = "string"; + } + else if (fieldInfo.Type?.Type == typeof(long)) + { + valueType = "integer"; + } + else + { + valueType = "object"; + } + } + + table.AddRow("Value Type:", valueType); + if (fieldInfo.Type != null) + { + if (typeof(IFieldTypeSerialize).IsAssignableFrom(fieldInfo.Type.Type)) + { + var elements = new List(); + var properties = fieldInfo.Type.Type.GetProperties(); + foreach (var prop in properties) + { + var attribute = prop.GetCustomAttribute(true); + if (attribute != null) + { + elements.Add(attribute.Name); + } + } + + table.AddRow("Value Elements:", string.Join(", ", elements.Select(x => $"\"{x}\""))); + } + } + } + else + { + if (!context.Vault.TryGetRecordTypeByName(options.Name, out var recordInfo)) + { + Console.WriteLine($"Error - Unknown record type: {options.Name}"); + return Task.FromResult(false); + } + + table = new Tabulate(2) + { + LeftPadding = 4 + }; + table.SetColumnRightAlign(0, true); + table.AddRow("Record Type ID:", recordInfo.Id); + table.AddRow("Type Name:", recordInfo.Name); + table.AddRow("Scope:", recordInfo.Scope.ToText()); + table.AddRow("Description:", recordInfo.Description); + var fields = recordInfo.Fields + .Select(x => + $"{x.FieldLabel ?? ""} ({(string.IsNullOrEmpty(x.FieldName) ? "text" : x.FieldName)})" + .Trim()) + .ToArray(); + for (var i = 0; i < Math.Max(fields.Length, 1); i++) + { + table.AddRow(i == 0 ? "Fields:" : "", i < fields.Length ? fields[i] : ""); + } + } + } + + table?.Dump(); + return Task.FromResult(true); + } + + public static async Task AddRecordCommand(this VaultContext context, AddRecordOptions options) + { + if (!context.TryResolvePath(options.Folder, out var node)) + { + Console.WriteLine($"Cannot resolve folder {options.Folder}"); + return; + } + if (string.IsNullOrEmpty(options.Title)) + { + Console.WriteLine($"\"Title\" parameter is missing."); + return; + } + var fields = VaultContext.ParseRecordFields(options.Fields).ToArray(); + + KeeperRecord record = null; + if (string.Equals(options.RecordType, "general", StringComparison.InvariantCultureIgnoreCase) || + string.Equals(options.RecordType, "legacy", StringComparison.InvariantCultureIgnoreCase)) + { + record = new PasswordRecord + { + Title = options.Title + }; + } + else + { + var typedRecord = new TypedRecord(options.RecordType) + { + Title = options.Title + }; + + if (context.Vault.TryGetRecordTypeByName(options.RecordType, out var rt)) + { + foreach (var rtf in rt.Fields) + { + try + { + var field = rtf.CreateTypedField(); + typedRecord.Fields.Add(field); + } + catch { /* ignored */ } + } + } + + record = typedRecord; + } + if (options.Generate) + { + context.Vault.RotateRecordPassword(record); + } + + context.AssignRecordFields(record, fields); + await context.Vault.CreateRecord(record, node.FolderUid); + } + + public static async Task UpdateRecordCommand(this VaultContext context, UpdateRecordOptions options) + { + if (context.Vault.TryGetKeeperRecord(options.RecordId, out var record)) + { + } + else if (context.TryResolvePath(options.RecordId, out var node, out var title)) + { + foreach (var uid in node.Records) + { + if (!context.Vault.TryGetKeeperRecord(uid, out var r)) continue; + if (string.CompareOrdinal(title, r.Title) != 0) continue; + + record = r; + break; + } + } + + if (record == null) + { + Console.WriteLine($"Cannot resolve record {options.RecordId}"); + return; + } + if (!string.IsNullOrEmpty(options.RecordType)) + { + if (record is TypedRecord typed) + { + if (context.Vault.TryGetRecordTypeByName(options.RecordType, out var rt)) + { + typed.TypeName = rt.Name; + } + } + else + { + Console.WriteLine($"{options.RecordId} is a legacy record. Record type is not supported."); + return; + } + } + + if (!string.IsNullOrEmpty(options.Title)) + { + record.Title = options.Title; + } + + if (options.Generate) + { + context.Vault.RotateRecordPassword(record); + } + + var fields = VaultContext.ParseRecordFields(options.Fields).ToArray(); + context.AssignRecordFields(record, fields); + await context.Vault.UpdateRecord(record); + } + + public static async Task DownloadAttachmentCommand(this VaultContext context, DownloadAttachmentOptions options) + { + if (context.Vault.TryGetKeeperRecord(options.RecordName, out var record)) + { + } + else if (context.TryResolvePath(options.RecordName, out var node, out var title)) + { + foreach (var uid in node.Records) + { + if (!context.Vault.TryGetKeeperRecord(uid, out var r)) continue; + if (string.CompareOrdinal(title, r.Title) != 0) continue; + + record = r; + break; + } + } + + if (record == null) + { + Console.WriteLine($"Cannot resolve record {options.RecordName}"); + return; + } + + if (string.IsNullOrEmpty(options.OutputDirectory)) + { + options.OutputDirectory = Directory.GetCurrentDirectory(); + } + else + { + var dirEntry = System.IO.Directory.CreateDirectory(options.OutputDirectory); + options.OutputDirectory = dirEntry.FullName; + } + + var attas = context.Vault.RecordAttachments(record) + .Where(x => + { + if (string.IsNullOrEmpty(options.FileName)) + { + return true; + } + + if (string.Equals(options.FileName, x.Id)) + { + return true; + } + + if (string.Equals(options.FileName, x.Title, StringComparison.InvariantCultureIgnoreCase)) + { + return true; + } + + if (string.Equals(options.FileName, x.Name, StringComparison.InvariantCultureIgnoreCase)) + { + return true; + } + + return false; + }).ToArray(); + + if (attas.Length > 0) + { + foreach (var atta in attas) + { + Console.Write($"Downloading {atta.Name} ..."); + try + { + using (var stream = File.OpenWrite(Path.Combine(options.OutputDirectory, atta.Name))) + { + switch (atta) + { + case AttachmentFile af: + await context.Vault.DownloadAttachmentFile(record.Uid, af, stream); + break; + case FileRecord fr: + await context.Vault.DownloadFile(fr, stream); + break; + } + } + + Console.WriteLine(" Done."); + } + catch (Exception e) + { + Console.WriteLine($"Failed: {e.Message}"); + } + } + } + else + { + Console.WriteLine($"Attachment not found: {(options.FileName ?? "")}"); + } + } + + public static async Task UploadAttachmentCommand(this VaultContext context, UploadAttachmentOptions options) + { + if (context.Vault.TryGetKeeperRecord(options.RecordName, out var record)) + { + } + else if (context.TryResolvePath(options.RecordName, out var node, out var title)) + { + foreach (var uid in node.Records) + { + if (!context.Vault.TryGetKeeperRecord(uid, out var r)) continue; + if (string.CompareOrdinal(title, r.Title) != 0) continue; + + record = r; + break; + } + } + + if (record == null) + { + Console.WriteLine($"Cannot resolve record {options.RecordName}"); + return; + } + + if (!File.Exists(options.FileName)) + { + Console.WriteLine($"File {options.FileName} not found."); + return; + } + + var uploadTask = new FileAttachmentUploadTask(options.FileName); + await context.Vault.UploadAttachment(record, uploadTask); + } + + public static async Task RemoveRecordCommand(this VaultContext context, RemoveRecordOptions options) + { + if (string.IsNullOrEmpty(options.RecordName)) + { + return; + } + + if (context.Vault.TryGetKeeperRecord(options.RecordName, out var record)) + { + var folders = Enumerable.Repeat(context.Vault.RootFolder, 1).Concat(context.Vault.Folders) + .Where(x => x.Records.Contains(record.Uid)).ToArray(); + if (folders.Length == 0) + { + Console.WriteLine("not expected"); + return; + } + + var folder = folders.Length == 1 + ? folders[0] + : folders.FirstOrDefault(x => x.FolderUid == context.CurrentFolder) + ?? folders.FirstOrDefault(x => string.IsNullOrEmpty(x.FolderUid)) + ?? folders.FirstOrDefault(x => x.FolderType == FolderType.UserFolder) + ?? folders[0]; + + await context.Vault.DeleteRecords(new[] + {new RecordPath {FolderUid = folder.FolderUid, RecordUid = record.Uid,}}); + } + else + { + if (!context.TryResolvePath(options.RecordName, out var folder, out string recordTitle)) + { + Console.WriteLine($"Invalid record path: {options.RecordName}"); + return; + } + + var sb = new StringBuilder(); + sb.Append(recordTitle); + sb = sb.Replace("*", ".*"); + sb = sb.Replace("?", @"."); + sb = sb.Replace("#", @"[0-9]"); + sb.Insert(0, "^"); + sb.Append("$"); + var pattern = sb.ToString(); + + var records = new List(); + foreach (var recordUid in folder.Records) + { + if (!context.Vault.TryGetKeeperRecord(recordUid, out record)) continue; + + var m = Regex.Match(record.Title, pattern, RegexOptions.IgnoreCase); + if (m.Success) + { + records.Add(new RecordPath { FolderUid = folder.FolderUid, RecordUid = recordUid }); + } + } + + await context.Vault.DeleteRecords(records.ToArray()); + } + } + public static async Task ShareRecordCommand(this VaultContext context, ShareRecordOptions options) + { + + if (string.Equals("cancel", options.Action, StringComparison.InvariantCultureIgnoreCase)) + { + Console.Write( + $"Do you want to cancel all shares with user \"{options.Email}\"? (Yes/No) : "); + var answer = await Program.GetInputManager().ReadLine(); + if (string.Compare("y", answer, StringComparison.InvariantCultureIgnoreCase) == 0) + { + answer = "yes"; + } + + if (string.Compare(answer, "yes", StringComparison.InvariantCultureIgnoreCase) != 0) return; + await context.Vault.CancelSharesWithUser(options.Email); + return; + } + + if (string.IsNullOrEmpty(options.RecordName)) + { + Console.WriteLine("Record parameter cannot be empty"); + return; + } + + if (context.Vault.TryGetKeeperRecord(options.RecordName, out var record)) + { + } + else if (context.TryResolvePath(options.RecordName, out var node, out var title)) + { + foreach (var uid in node.Records) + { + if (!context.Vault.TryGetKeeperRecord(uid, out var r)) continue; + if (string.CompareOrdinal(title, r.Title) != 0) continue; + + record = r; + break; + } + } + + if (record == null) + { + Console.WriteLine($"Cannot resolve record \"{options.RecordName}\""); + return; + } + + if (string.Equals("share", options.Action, StringComparison.InvariantCultureIgnoreCase)) + { + try + { + await context.Vault.ShareRecordWithUser(record.Uid, options.Email, options.CanShare, options.CanEdit); + } + catch (NoActiveShareWithUserException e) + { + Console.WriteLine(e.Message); + Console.Write( + $"Do you want to send share invitation request to \"{e.Username}\"? (Yes/No) : "); + var answer = await Program.GetInputManager().ReadLine(); + if (string.Equals("y", answer, StringComparison.InvariantCultureIgnoreCase)) + { + answer = "yes"; + } + if (string.Equals(answer, "yes", StringComparison.InvariantCultureIgnoreCase)) + { + await context.Vault.SendShareInvitationRequest(e.Username); + Console.WriteLine($"Invitation has been sent to {e.Username}\nPlease repeat this command when your invitation is accepted."); + } + } + } + else if (string.Equals("revoke", options.Action, StringComparison.InvariantCultureIgnoreCase)) + { + await context.Vault.RevokeShareFromUser(record.Uid, options.Email); + } + else if (string.Equals("transfer", options.Action, StringComparison.InvariantCultureIgnoreCase)) + { + await context.Vault.TransferRecordToUser(record.Uid, options.Email); + } + else + { + throw new Exception($"Invalid record share action: {options.Action}"); + } + } + + } + + class RecordTypeInfoOptions + { + [Option('f', "field", Required = false, HelpText = "Show field. ")] + public bool ShowFields { get; set; } + + [Value(0, Required = false, HelpText = "record or field type name")] + public string Name { get; set; } + } + + class AddRecordOptions + { + [Option("folder", Required = false, HelpText = "folder")] + public string Folder { get; set; } + + [Option('t', "type", Required = true, HelpText = "record type.")] + public string RecordType { get; set; } + + [Option("title", Required = true, HelpText = "record title.")] + public string Title { get; set; } + + [Option('g', "generate", Required = false, Default = false, HelpText = "generate random password")] + public bool Generate { get; set; } + + [Value(0, Required = false, MetaName = "Record fields", HelpText = "Record fields")] + public IEnumerable Fields { get; set; } + } + + class UpdateRecordOptions + { + [Option("title", Required = false, HelpText = "title")] + public string Title { get; set; } + + [Option('t', "type", Required = false, HelpText = "record type. typed records only.")] + public string RecordType { get; set; } + + [Option('g', "generate", Required = false, Default = false, HelpText = "generate random password")] + public bool Generate { get; set; } + + [Value(0, Required = true, MetaName = "record", HelpText = "record path or UID")] + public string RecordId { get; set; } + + [Value(1, Required = false, MetaName = "Record fields", HelpText = "Record fields")] + public IEnumerable Fields { get; set; } + } + + class DownloadAttachmentOptions + { + [Option('o', "output-dir", Required = false, Default = null, HelpText = "Output directory")] + public string OutputDirectory { get; set; } + + [Option('f', "file", Required = false, Default = null, HelpText = "Attachment UID, name, or title")] + public string FileName { get; set; } + + + [Value(0, Required = true, MetaName = "record path or uid", HelpText = "Keeper Record")] + public string RecordName { get; set; } + } + + class UploadAttachmentOptions + { + [Option('f', "file", Required = true, Default = null, HelpText = "File path")] + public string FileName { get; set; } + + + [Value(0, Required = true, MetaName = "record path or uid", HelpText = "Keeper Record")] + public string RecordName { get; set; } + } + + class RemoveRecordOptions + { + [Value(0, Required = true, MetaName = "record title, uid, or pattern", HelpText = "remove records")] + public string RecordName { get; set; } + } + + class ShareRecordOptions + { + [Option('a', "action", Required = false, Default = "share", HelpText = "user share action: \'share\' (default), \'revoke\', \'transfer\', \'cancel\'")] + public string Action { get; set; } + + [Option('s', "share", Required = false, Default = null, HelpText = "can re-share record")] + public bool? CanShare { get; set; } + + [Option('w', "write", Required = false, Default = null, HelpText = "can modify record")] + public bool? CanEdit { get; set; } + + [Option('e', "email", Required = true, HelpText = "peer account email")] + public string Email { get; set; } + [Value(0, Required = false, MetaName = "record", HelpText = "record path or UID")] + public string RecordName { get; set; } + } + + class CmdLineRecordField : IRecordTypeField + { + public string FieldName { get; set; } + public string FieldLabel { get; set; } + public string FieldIndex { get; set; } + public string Value { get; set; } + } +} diff --git a/Commander/vault/SecretManagerCommands.cs b/Commander/vault/SecretManagerCommands.cs new file mode 100644 index 0000000..b444437 --- /dev/null +++ b/Commander/vault/SecretManagerCommands.cs @@ -0,0 +1,438 @@ +using Cli; +using CommandLine; +using Google.Protobuf.WellKnownTypes; +using KeeperSecurity.Utils; +using KeeperSecurity.Vault; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Commander +{ + internal static class SecretManagerCommandExtensions + { + public static async Task OneTimeShareCommand(this VaultContext context, OneTimeShareOptions arguments) + { + if (context.Vault.TryGetKeeperRecord(arguments.Record, out var record)) + { + } + else if (context.TryResolvePath(arguments.Record, out var node, out var title)) + { + foreach (var uid in node.Records) + { + if (!context.Vault.TryGetKeeperRecord(uid, out var r)) continue; + if (string.CompareOrdinal(title, r.Title) != 0) continue; + + record = r; + break; + } + } + if (record == null) + { + Console.WriteLine($"Cannot resolve record {arguments.Record}"); + return; + } + + if (arguments.Command == "create") + { + if (string.IsNullOrEmpty(arguments.Expire)) + { + Console.WriteLine("--expire argument is required"); + return; + } + var exp = TimeSpan.FromHours(1); + var cnt = arguments.Expire; + var p = 'h'; + if (char.IsLetter(arguments.Expire[arguments.Expire.Length - 1])) + { + p = arguments.Expire[arguments.Expire.Length - 1]; + cnt = cnt.Substring(0, cnt.Length - 1); + } + if (!int.TryParse(cnt, out int res)) + { + Console.WriteLine($"Invalid expiration {arguments.Expire}"); + return; + } + switch (p) + { + case 'm': + exp = TimeSpan.FromMinutes(res); break; + case 'h': + exp = TimeSpan.FromHours(res); break; + case 'd': + exp = TimeSpan.FromDays(res); break; + } + if (exp.TotalDays > 180) + { + Console.WriteLine($"One time share URL expiration cannot exceed 180 days"); + return; + } + var url = await context.Vault.CreateExternalRecordShare(record.Uid, exp, arguments.Client); + Console.WriteLine($"URL: {url}"); + } + else if (arguments.Command == "delete") + { + if (string.IsNullOrEmpty(arguments.Client)) + { + Console.WriteLine("--client argument is required"); + return; + } + + var shares = (await context.Vault.GetExernalRecordShares(record.Uid)) + .Where(x => arguments.Client == "@all" || x.ClientId == arguments.Client || string.Equals(x.Name, arguments.Client, StringComparison.CurrentCultureIgnoreCase)) + .ToArray(); + if (shares.Length > 0) + { + await context.Vault.DeleteExernalRecordShares(record.Uid, shares.Select(x => x.ClientId)); + } + else + { + Console.WriteLine($"Client {arguments.Client} not found"); + } + } + else if (arguments.Command == "list") + { + var shares = await context.Vault.GetExernalRecordShares(record.Uid); + var tab = new Tabulate(8) + { + DumpRowNo = true + }; + tab.AddHeader(new[] { "Record UID", "Record Title", "Share Name", "Generated", "Opened", "Expires" }); + foreach (var share in shares) + { + tab.AddRow(new object[] { record.Uid, record.Title, share.Name, + share.CreatedOn.ToString("g"), share.FirstAccessed.HasValue ? share.FirstAccessed.Value.ToString("g") : "", + share.AccessExpiresOn.ToString("g") + }); + } + + tab.Sort(4); + tab.Dump(); + } + else + { + Console.WriteLine($"Action {arguments.Command} is not supported."); + } + } + + public static async Task SecretManagerCommand(this VaultContext context, SecretManagerOptions arguments) + { + var action = (string.IsNullOrEmpty(arguments.Command) ? "list" : arguments.Command).ToLowerInvariant(); + + if (action == "list") + { + var tab = new Tabulate(2) + { + DumpRowNo = true + }; + tab.AddHeader(new[] { "Application UID", "Title" }); + foreach (var app in context.Vault.KeeperApplications) + { + tab.AddRow(app.Uid, app.Title); + } + + Console.WriteLine(); + tab.Dump(); + return; + } + if (string.IsNullOrEmpty(arguments.KsmId)) + { + Console.Write("KSM application UID or Title is required."); + return; + } + if (action == "create") + { + var record = await context.Vault.CreateSecretManagerApplication(arguments.KsmId); + Console.WriteLine("{0, 20}: {1}", "Application UID", record.Uid); + Console.WriteLine("{0, 20}: {1}", "Title", record.Title); + return; + } + + var application = context.Vault.KeeperApplications.FirstOrDefault(x => x.Uid == arguments.KsmId || string.Equals(x.Title, arguments.KsmId, StringComparison.InvariantCultureIgnoreCase)); + if (application == null) + { + Console.Write($"KSM application {arguments.KsmId} not found"); + return; + } + + if (action == "view") + { + var app = await context.Vault.GetSecretManagerApplication(application.Uid); + DumpSecretManagerApplicationInfo(context.Vault, app); + } + else if (action == "delete") + { + await context.Vault.DeleteSecretManagerApplication(application.Uid); + Console.Write($"KSM Application {application.Title} has been deleted."); + } + else if (action == "share") + { + if (string.IsNullOrEmpty(arguments.Secret)) + { + Console.Write("Secret (Shared Folder/Record UID/Title) parameter is required."); + return; + } + string uid = ""; + + if (context.Vault.TryGetKeeperRecord(arguments.Secret, out var record)) + { + uid = record.Uid; + } + else if (context.Vault.TryGetSharedFolder(arguments.Secret, out var sf)) + { + uid = sf.Uid; + } + else + { + if (context.TryResolvePath(arguments.Secret, out var folder, out var title)) + { + if (string.IsNullOrEmpty(title)) + { + if (folder.FolderType == FolderType.SharedFolder) + { + uid = folder.FolderUid; + } + else + { + Console.Write($"Folder \"{arguments.Secret}\" is not Shared Folder."); + return; + } + } + else + { + record = folder.Records.Select(x => context.Vault.GetRecord(x)).FirstOrDefault(x => + string.Compare(x.Title, title, StringComparison.CurrentCultureIgnoreCase) == 0); + if (record != null) + { + uid = record.Uid; + } + } + } + } + if (string.IsNullOrEmpty(uid)) + { + Console.Write($"Record or Shared Folder \"{arguments.Secret}\" does not exist."); + return; + } + var app = await context.Vault.ShareToSecretManagerApplication(application.Uid, uid, arguments.CanEdit); + DumpSecretManagerApplicationInfo(context.Vault, app); + } + else if (action == "unshare") + { + if (string.IsNullOrEmpty(arguments.Secret)) + { + Console.Write("Secret (Shared Folder/Record UID/Title) parameter is required."); + return; + } + + var uid = ""; + if (context.Vault.TryGetKeeperRecord(arguments.Secret, out var record)) + { + uid = record.Uid; + } + else if (context.Vault.TryGetSharedFolder(arguments.Secret, out var sf)) + { + uid = sf.Uid; + } + else + { + if (context.TryResolvePath(arguments.Secret, out var folder, out var title)) + { + if (string.IsNullOrEmpty(title)) + { + if (folder.FolderType == FolderType.SharedFolder) + { + uid = folder.FolderUid; + } + } + else + { + record = folder.Records.Select(x => context.Vault.GetRecord(x)).FirstOrDefault(x => + string.Compare(x.Title, title, StringComparison.CurrentCultureIgnoreCase) == 0); + if (record != null) + { + uid = record.Uid; + } + } + } + } + + if (string.IsNullOrEmpty(uid)) + { + uid = arguments.Secret; + } + var app = await context.Vault.GetSecretManagerApplication(application.Uid); + var share = app.Shares.FirstOrDefault(x => x.SecretUid == uid); + + if (share == null) + { + Console.Write($"\"{arguments.Secret}\" is not shared to application {application.Title}"); + } + app = await context.Vault.UnshareFromSecretManagerApplication(application.Uid, uid); + DumpSecretManagerApplicationInfo(context.Vault, app); + } + else if (action == "add-client") + { + var unlockIp = arguments.UnlockIP; + int? firstAccess = arguments.CreateExpire > 0 ? arguments.CreateExpire : (int?) null; + int? accessExpire = arguments.AccessExpire > 0 ? arguments.AccessExpire : (int?) null; + var t = await context.Vault.AddSecretManagerClient(application.Uid, unlockIp: arguments.B64 ? false : unlockIp, + firstAccessExpireInMinutes: firstAccess, accessExpiresInMinutes: accessExpire, + name: arguments.ClientName); + + var device = t.Item1; + var clientKey = t.Item2; + + Console.WriteLine("Successfully generated Client Device\n"); + if (arguments.B64) + { + var configuration = await context.Vault.GetConfiguration(clientKey); + var configData = JsonUtils.DumpJson(configuration); + var configText = Convert.ToBase64String(configData); + Console.WriteLine($"KSM Configuration:\n{configText}"); + } + else + { + Console.WriteLine($"One-Time Access Token: {clientKey}"); + var ipLock = device.LockIp ? "Enabled" : "Disabled"; + Console.WriteLine($"IP Lock: {ipLock}"); + var firstAccessOn = device.FirstAccessExpireOn.HasValue ? device.FirstAccessExpireOn.Value.ToString("G") : "Taken"; + Console.WriteLine($"Token Expires On: {device.FirstAccessExpireOn.Value}"); + } + + var accessExpireOn = device.AccessExpireOn.HasValue ? device.AccessExpireOn.Value.ToString("G") : "Never"; + Console.WriteLine($"App Access Expires On: {accessExpireOn}"); + } + else if (action == "delete-client") + { + if (string.IsNullOrEmpty(arguments.ClientName)) + { + Console.Write("\"client-name\" parameter is required"); + return; + } + + var app = await context.Vault.GetSecretManagerApplication(application.Uid); + var device = app.Devices.FirstOrDefault(x => x.Name == arguments.ClientName || x.DeviceId.StartsWith(arguments.ClientName)); + if (device == null) + { + Console.Write($"Device \"{arguments.ClientName}\" is not found in application {application.Title}"); + return; + } + await context.Vault.DeleteSecretManagerClient(application.Uid, device.DeviceId); + Console.Write($"Client \"{device.Name}\" has been deleted from application {application.Title}"); + } + else + { + Console.Write($"Unsupported KSM command {arguments.Command}"); + } + } + + private static void DumpSecretManagerApplicationInfo(VaultData vault, SecretsManagerApplication application) + { + var shareTab = new Tabulate(5) + { + DumpRowNo = true + }; + shareTab.AddHeader("Share Type", "Share UID", "Share Title", "Editable", "Created"); + foreach (var share in application.Shares) + { + var shareType = share.SecretType == SecretManagerSecretType.Record ? "Record" : "SharedFolder"; + var shareTitle = ""; + if (share.SecretType == SecretManagerSecretType.Record) + { + if (vault.TryGetKeeperRecord(share.SecretUid, out var r)) + { + shareTitle = r.Title; + } + } + else + { + if (vault.TryGetSharedFolder(share.SecretUid, out var sf)) + { + shareTitle = sf.Name; + } + } + shareTab.AddRow(shareType, share.SecretUid, shareTitle, share.Editable, share.CreatedOn); + } + + var clientTab = new Tabulate(4) + { + DumpRowNo = true + }; + + var nameLength = 6; + var s = new HashSet(); + while (true) + { + s.Clear(); + s.UnionWith(application.Devices.Select(x => x.DeviceId.Substring(0, nameLength))); + if (s.Count == application.Devices.Length) + { + break; + } + nameLength++; + } + + clientTab.AddHeader("Name", "Device ID", "Created", "Last Accessed", "Expires"); + foreach (var client in application.Devices) + { + clientTab.AddRow(client.Name, client.DeviceId.Substring(0, nameLength), client.CreatedOn, client.LastAccess, client.AccessExpireOn); + } + + Console.WriteLine("{0, 20}: {1}", "Application UID", application.Uid); + Console.WriteLine("{0, 20}: {1}", "Title", application.Title); + Console.WriteLine(); + Console.WriteLine("Shares"); + shareTab.Dump(); + + Console.WriteLine("Devices"); + clientTab.Dump(); + } + + } + + class OneTimeShareOptions + { + [Option("client", Required = false, HelpText = "One-Time Share name. \"create\" or \"delete\"")] + public string Client { get; set; } + + [Option("expire", Required = false, HelpText = "Expire share in [(m)inutes|(h)ours|(d)ays. \"create\" only")] + public string Expire { get; set; } + + [Value(0, Required = true, HelpText = "KSM command: \"create\", \"delete\", \"list\"")] + public string Command { get; set; } + + [Value(1, Required = true, HelpText = "Record UID or path")] + public string Record { get; set; } + } + + class SecretManagerOptions + { + [Option("folder", Required = false, HelpText = "Shared Folder UID or name. \"share\", \"unshare\" only")] + public string Secret { get; set; } + [Option('e', "can-edit", Required = false, HelpText = "Can secret be edited? \"share\", \"unshare\" only")] + public bool CanEdit { get; set; } + + [Option("client-name", Required = false, HelpText = "Client name. \"add-client\", \"remove-client\" only")] + public string ClientName { get; set; } + [Option("unlock-ip", Required = false, HelpText = "Unlock IP Address? \"add-client\" only")] + public bool UnlockIP { get; set; } + [Option("create-expire", Required = false, HelpText = "Device creation expitation in minutes. \"add-client\" only")] + public int CreateExpire { get; set; } + [Option("access-expire", Required = false, HelpText = "Device access expitation in minutes. \"add-client\" only")] + public int AccessExpire { get; set; } + [Option("b64", Required = false, HelpText = "Return KSM configuration intead of one time token \"add-client\" only")] + public bool B64 { get; set; } + + + + [Value(0, Required = false, HelpText = "KSM command: \"view\", \"create\", \"delete\", \"share\", \"unshare\", \"add-client\", \"delete-client\", \"list\"")] + public string Command { get; set; } + + [Value(1, Required = false, HelpText = "Secret Manager application UID or Title")] + public string KsmId { get; set; } + } + +} diff --git a/Commander/vault/VaultCommands.cs b/Commander/vault/VaultCommands.cs new file mode 100644 index 0000000..502fec7 --- /dev/null +++ b/Commander/vault/VaultCommands.cs @@ -0,0 +1,932 @@ +using Cli; +using KeeperSecurity.Vault; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.RegularExpressions; +using System.Threading.Tasks; +using KeeperSecurity.Utils; +using CommandLine; + +namespace Commander +{ + internal partial class VaultContext { + internal readonly VaultOnline Vault; + internal string CurrentFolder; + public VaultContext(VaultOnline vault) + { + Vault = vault; + } + + public void PrintTree(FolderNode folder, string indent, bool last) + { + var isRoot = string.IsNullOrEmpty(indent); + Console.WriteLine(indent + (isRoot ? "" : "+-- ") + folder.Name); + indent += isRoot ? " " : (last ? " " : "| "); + for (var i = 0; i < folder.Subfolders.Count; i++) + { + if (Vault.TryGetFolder(folder.Subfolders[i], out var node)) + { + PrintTree(node, indent, i == folder.Subfolders.Count - 1); + } + } + } + + public bool TryResolvePath(string path, out FolderNode node) + { + var res = TryResolvePath(path, out node, out var text); + if (res) + { + res = string.IsNullOrEmpty(text); + } + + return res; + } + + public bool TryResolvePath(string path, out FolderNode node, out string text) + { + node = null; + text = null; + if (string.IsNullOrEmpty(CurrentFolder) || CurrentFolder == Vault.RootFolder.FolderUid) + { + node = Vault.RootFolder; + } + else + { + Vault.TryGetFolder(CurrentFolder, out node); + } + + if (!string.IsNullOrEmpty(path)) + { + path = path.Trim(); + if (string.IsNullOrEmpty(path)) + { + return node != null; + } + + if (path[0] == '/') + { + path = path.Substring(1); + node = Vault.RootFolder; + } + + foreach (var folder in path.TokenizeArguments(CommandExtensions.IsPathDelimiter)) + { + if (folder == "..") + { + if (!string.IsNullOrEmpty(node.ParentUid)) + { + if (!Vault.TryGetFolder(node.ParentUid, out node)) + { + return false; + } + } + else if (!string.IsNullOrEmpty(node.FolderUid)) + { + node = Vault.RootFolder; + } + else + { + return false; + } + } + else + { + var found = false; + foreach (var subFolder in node.Subfolders) + { + if (!Vault.TryGetFolder(subFolder, out var subNode)) return false; + + if (string.Compare(folder, subNode.Name, StringComparison.CurrentCultureIgnoreCase) != 0) continue; + + found = true; + node = subNode; + break; + } + + if (found) continue; + if (string.IsNullOrEmpty(text)) + { + text = folder; + } + else + { + return false; + } + } + } + } + + return true; + } + } + + internal static class VaultCommandExtensions + { + internal static void AppendVaultCommands(this VaultContext context, CliCommands cli) + { + cli.Commands.Add("search", + new Cli.ParseableCommand + { + Order = 10, + Description = "Search the vault. Can use a regular expression", + Action = context.SearchCommand + }); + + cli.Commands.Add("ls", + new ParseableCommand + { + Order = 11, + Description = "List folder content", + Action = context.ListCommand + }); + + cli.Commands.Add("cd", + new SimpleCommand + { + Order = 12, + Description = "Change current folder", + Action = context.ChangeDirectoryCommand + }); + + cli.Commands.Add("tree", + new ParseableCommand + { + Order = 13, + Description = "Display folder structure", + Action = context.TreeCommand + }); + + cli.Commands.Add("get", + new SimpleCommand + { + Order = 14, + Description = "Display specified Keeper record/folder/team", + Action = context.GetCommand + }); + cli.Commands.Add("record-history", + new SimpleCommand + { + Order = 15, + Description = "Display record history", + Action = context.RecordHistoryCommand + }); + + if (context.Vault.Auth.AuthContext.Settings.RecordTypesEnabled) + { + cli.Commands.Add("record-type-info", + new ParseableCommand + { + Order = 20, + Description = "Get record type info", + Action = context.RecordTypeInfoCommand + } + ); + cli.CommandAliases.Add("rti", "record-type-info"); + + } + + cli.Commands.Add("add-record", + new ParseableCommand + { + Order = 21, + Description = "Add record", + Action = context.AddRecordCommand + }); + + cli.Commands.Add("update-record", + new ParseableCommand + { + Order = 22, + Description = "Update record", + Action = context.UpdateRecordCommand + }); + + cli.Commands.Add("download-attachment", + new ParseableCommand + { + Order = 23, + Description = "Download Attachment(s)", + Action = context.DownloadAttachmentCommand + }); + + cli.Commands.Add("upload-attachment", + new ParseableCommand + { + Order = 24, + Description = "Upload file attachment", + Action = context.UploadAttachmentCommand + }); + + cli.Commands.Add("mkdir", + new ParseableCommand + { + Order = 25, + Description = "Make folder", + Action = context.MakeFolderCommand + }); + + cli.Commands.Add("rmdir", + new ParseableCommand + { + Order = 26, + Description = "Remove folder", + Action = context.RemoveFolderCommand + }); + + cli.Commands.Add("update-dir", + new ParseableCommand + { + Order = 27, + Description = "Update folder", + Action = context.UpdateFolderCommand + }); + + cli.Commands.Add("mv", + new ParseableCommand + { + Order = 28, + Description = "Move record or folder", + Action = context.MoveCommand + }); + + cli.Commands.Add("rm", + new ParseableCommand + { + Order = 29, + Description = "Remove record(s)", + Action = context.RemoveRecordCommand + }); + + cli.Commands.Add("sf-list", + new SimpleCommand + { + Order = 30, + Description = "List shared folders", + Action = context.ListSharedFoldersCommand + }); + + cli.Commands.Add("sf-user", + new ParseableCommand + { + Order = 31, + Description = "Change shared folder user permissions", + Action = context.ShareFolderUserPermissionCommand + }); + + cli.Commands.Add("sf-record", + new ParseableCommand + { + Order = 32, + Description = "Change shared folder record permissions", + Action = context.ShareFolderRecordPermissionCommand + }); + + cli.Commands.Add("share-record", + new ParseableCommand + { + Order = 33, + Description = "Change the sharing permissions of an individual record", + Action = context.ShareRecordCommand + }); + + cli.Commands.Add("import", + new ParseableCommand + { + Order = 33, + Description = "Imports records from JSON file", + Action = context.ImportCommand + }); + + if (context.Vault.Auth.AuthContext.Enforcements.TryGetValue("allow_secrets_manager", out var value)) + { + if (value is bool b && b) + { + cli.Commands.Add("ksm", + new ParseableCommand + { + Order = 40, + Description = "Keeper Secret Manager commands", + Action = context.SecretManagerCommand + }); + } + } + cli.Commands.Add("one-time-share", + new ParseableCommand + { + Order = 41, + Description = "Manage One Time Shares", + Action = context.OneTimeShareCommand + }); + + cli.Commands.Add("sync-down", + new ParseableCommand + { + Order = 100, + Description = "Download & decrypt data", + Action = async (options) => + { + if (options.Reset) + { + Console.WriteLine("Resetting offline storage."); + context.Vault.Storage.Clear(); + context.Vault.RecordTypesLoaded = false; + } + + var fullSync = context.Vault.Storage.Revision == 0; + Console.WriteLine("Syncing..."); + await context.Vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(0)); + if (fullSync) + { + Console.WriteLine($"Decrypted {context.Vault.RecordCount} record(s)"); + } + } + }); + + + cli.CommandAliases.Add("list", "search"); + cli.CommandAliases.Add("d", "sync-down"); + cli.CommandAliases.Add("add", "add-record"); + cli.CommandAliases.Add("edit", "update-record"); + + } + private static Task SearchCommand(this VaultContext context, SearchCommandOptions options) + { + if (options.Limit <= 0) + { + options.Limit = 100; + } + else if (options.Limit > 1000) + { + options.Limit = 1000; + } + + Regex pattern = string.IsNullOrEmpty(options.Pattern) + ? null + : new Regex(options.Pattern, RegexOptions.Compiled | RegexOptions.IgnoreCase); + + var matchedRecords = context.Vault.KeeperRecords + .Where(record => + { + if (pattern == null) + { + return true; + } + + if (record.Uid == options.Pattern) + { + return true; + } + + if (pattern.IsMatch(record.Title)) + { + return true; + } + + if (record is PasswordRecord legacy) + { + return new[] { legacy.Notes, legacy.Login, legacy.Password, legacy.Notes } + .Where(x => !string.IsNullOrEmpty(x)) + .Any(x => pattern.IsMatch(x)); + } + + if (record is TypedRecord typed) + { + + var matched = new[] { typed.Notes, typed.TypeName } + .Where(x => !string.IsNullOrEmpty(x)) + .Any(x => pattern.IsMatch(x)); + + if (matched) + { + return true; + } + + matched = typed.Fields + .Any(x => x.GetTypedFieldValues().Any(y => pattern.IsMatch(y))); + if (matched) + { + return true; + } + + return typed.Custom + .Any(x => x.GetTypedFieldValues().Any(y => pattern.IsMatch(y))); + } + + return false; + }) + .Take(options.Limit) + .ToArray(); + + if (matchedRecords.Length > 0) + { + var tab = new Tabulate(4) + { + DumpRowNo = true + }; + tab.AddHeader("Record UID", "Title", "Type", "Info"); + foreach (var r in matchedRecords) + { + tab.AddRow(r.Uid, r.Title, r.KeeperRecordType(), r.KeeperRecordPublicInformation()); + } + + tab.Sort(1); + tab.Dump(); + + if (matchedRecords.Length == options.Limit) + { + Console.WriteLine($"First {options.Limit} found records are shown."); + } + } + else + { + Console.WriteLine("No records found"); + } + + return Task.FromResult(true); + } + + private static Task ListCommand(this VaultContext context, ListCommandOptions options) + { + FolderNode node = null; + if (!string.IsNullOrEmpty(context.CurrentFolder)) + { + context.Vault.TryGetFolder(context.CurrentFolder, out node); + } + + if (node == null) + { + node = context.Vault.RootFolder; + } + + if (options.Details) + { + if (node.Subfolders.Count > 0) + { + var tab = new Tabulate(2) + { + DumpRowNo = true + }; + tab.AddHeader("Folder UID", "Name"); + foreach (var uid in node.Subfolders) + { + if (context.Vault.TryGetFolder(uid, out var f)) + { + tab.AddRow(f.FolderUid, f.Name); + } + } + + tab.Sort(1); + tab.Dump(); + } + + if (node.Records.Count > 0) + { + var tab = new Tabulate(4) + { + DumpRowNo = true + }; + tab.AddHeader("Record UID", "Title", "Type", "Info"); + foreach (var uid in node.Records) + { + if (context.Vault.TryGetKeeperRecord(uid, out var r)) + { + tab.AddRow(r.Uid, r.Title, r.KeeperRecordType(), r.KeeperRecordPublicInformation()); + } + } + + tab.Sort(1); + tab.Dump(); + } + } + else + { + var names = new List(); + foreach (var uid in node.Subfolders) + { + if (context.Vault.TryGetFolder(uid, out var subNode)) + { + names.Add(subNode.Name + "/"); + } + } + + names.Sort(StringComparer.InvariantCultureIgnoreCase); + + var len = names.Count; + foreach (var uid in node.Records) + { + if (context.Vault.TryGetKeeperRecord(uid, out var r)) + { + if (r.Version == 2 || r.Version == 3) + { + names.Add(string.IsNullOrEmpty(r.Title) ? r.Uid : r.Title); + } + } + } + + if (names.Count <= 0) return Task.FromResult(true); + names.Sort(len, names.Count - len, StringComparer.InvariantCultureIgnoreCase); + + len = names.Select(x => x.Length).Max(); + if (len < 16) + { + len = 16; + } + + len += 2; + var columns = Console.BufferWidth / len; + if (columns < 1) + { + columns = 1; + } + + var columnWidth = Console.BufferWidth / columns; + var colNo = 0; + foreach (var t in names) + { + Console.Write(t.PadRight(columnWidth - 1)); + colNo++; + if (colNo < columns) continue; + Console.WriteLine(); + colNo = 0; + } + } + + return Task.FromResult(true); + } + + private static Task ChangeDirectoryCommand(this VaultContext context, string name) + { + if (context.TryResolvePath(name, out var node)) + { + context.CurrentFolder = node.FolderUid; + } + else + { + Console.WriteLine($"Invalid folder name: {name}"); + } + + return Task.FromResult(true); + } + + private static Task TreeCommand(this VaultContext context, TreeCommandOptions options) + { + context.PrintTree(context.Vault.RootFolder, "", true); + return Task.FromResult(true); + } + + + private static IEnumerable ToRecordChangeNames(this RecordChange changes) + { + if ((changes & RecordChange.RecordType) != 0) + { + yield return "Record Type"; + } + if ((changes & RecordChange.Title) != 0) + { + yield return "Title"; + } + if ((changes & RecordChange.Login) != 0) + { + yield return "Login"; + } + if ((changes & RecordChange.Password) != 0) + { + yield return "Password"; + } + if ((changes & RecordChange.Url) != 0) + { + yield return "URL"; + } + if ((changes & RecordChange.Notes) != 0) + { + yield return "Notes"; + } + if ((changes & RecordChange.Totp) != 0) + { + yield return "Totp"; + } + if ((changes & RecordChange.Hostname) != 0) + { + yield return "Hostname"; + } + if ((changes & RecordChange.Address) != 0) + { + yield return "Address"; + } + if ((changes & RecordChange.PaymentCard) != 0) + { + yield return "Payment Card"; + } + if ((changes & RecordChange.CustomField) != 0) + { + yield return "Custom Field"; + } + if ((changes & RecordChange.File) != 0) + { + yield return "File"; + } + } + + private static async Task RecordHistoryCommand(this VaultContext context, string recordUid) + { + if (string.IsNullOrEmpty(recordUid)) + { + throw new Exception("\"record-history\" command requires parameter"); + } + var tab = new Tabulate(4); + tab.AddHeader("Version", "Modification Date", "Username", "Changed"); + var history = await context.Vault.GetRecordHistory(recordUid); + for (var i = 0; i < history.Length; i++) + { + var h = history[i]; + + var changes = string.Join(", ", h.RecordChange.ToRecordChangeNames()); + tab.AddRow($"V.{history.Length - i}", h.KeeperRecord.ClientModified.ToString("G"), h.Username, changes); + } + tab.Dump(); + } + + private static async Task GetCommand(this VaultContext context, string uid) + { + var tab = new Tabulate(3); + if (context.Vault.TryGetKeeperRecord(uid, out var record)) + { + List totps = null; + + tab.AddRow("Record UID:", record.Uid); + tab.AddRow("Type:", record.KeeperRecordType()); + tab.AddRow("Title:", record.Title); + if (record is PasswordRecord legacy) + { + tab.AddRow("Notes:", legacy.Notes); + tab.AddRow("$login:", legacy.Login); + tab.AddRow("$password:", legacy.Password); + tab.AddRow("$url:", legacy.Link); + if (!string.IsNullOrEmpty(legacy.Totp)) + { + if (totps == null) + { + totps = new List(); + } + totps.Add(legacy.Totp); + tab.AddRow("$oneTimeCode:", legacy.Totp); + } + if (legacy.Custom != null && legacy.Custom.Count > 0) + { + foreach (var c in legacy.Custom) + { + tab.AddRow(c.Name + ":", c.Value); + } + } + } + else if (record is TypedRecord typed) + { + tab.AddRow("Notes:", typed.Notes); + foreach (var f in typed.Fields.Concat(typed.Custom)) + { + if (f.FieldName == "oneTimeCode") + { + if (totps == null) + { + totps = new List(); + } + + if (f is TypedField sf && sf.Count > 0) + { + totps.AddRange(sf.Values.Where(x => !string.IsNullOrEmpty(x))); + } + } + else + { + var label = f.GetTypedFieldName(); + var values = f.GetTypedFieldValues().ToArray(); + for (var i = 0; i < Math.Max(values.Length, 1); i++) + { + var v = i < values.Length ? values[i] : ""; + if (v.Length > 80) + { + v = v.Substring(0, 77) + "..."; + } + + tab.AddRow(i == 0 ? $"{label}:" : "", v); + } + } + } + } + else if (record is FileRecord file) + { + tab.AddRow("Name:", file.Name); + tab.AddRow("MIME Type:", file.MimeType ?? ""); + tab.AddRow("Size:", file.FileSize.ToString("N")); + if (file.ThumbnailSize > 0) + { + tab.AddRow("Thumbnail Size:", file.ThumbnailSize.ToString("N")); + } + } + + if (totps != null) + { + foreach (var url in totps) + { + tab.AddRow("$oneTimeCode:", url); + try + { + var tup = CryptoUtils.GetTotpCode(url); + if (tup != null) + { + tab.AddRow($"{tup.Item1}:", $"expires in {tup.Item3 - tup.Item2} sec."); + } + } + catch (Exception e) + { + Console.WriteLine(e.Message); + } + } + } + + tab.AddRow("Last Modified:", record.ClientModified.LocalDateTime.ToString("F")); + var shareInfo = (await context.Vault.GetSharesForRecords(new[] { record.Uid })) + .FirstOrDefault(x => x.RecordUid == record.Uid); + if (shareInfo != null) + { + if (shareInfo?.UserPermissions.Length > 0) + { + tab.AddRow("", ""); + tab.AddRow("User Shares:", ""); + foreach (var rs in shareInfo.UserPermissions) + { + var status = ""; + + if (rs.Owner) + { + status = "Owner"; + } + else + { + if (rs.AwaitingApproval) + { + status = "Awaiting Approval"; + } + else + { + if (!rs.CanEdit && !rs.CanShare) + { + status = "Read Only"; + } + else if (rs.CanEdit && rs.CanShare) + { + status = "Can Edit & Share"; + } + else if (rs.CanEdit) + { + status = "Can Edit"; + } + else + { + status = "Can Share"; + } + } + } + tab.AddRow(rs.Username, status); + } + } + if (shareInfo?.SharedFolderPermissions != null) + { + tab.AddRow("", ""); + tab.AddRow("Shared Folders:", ""); + foreach (var sfs in shareInfo.SharedFolderPermissions) + { + var status = ""; + if (!sfs.CanEdit && !sfs.CanShare) + { + status = "Read Only"; + } + else if (sfs.CanEdit && sfs.CanShare) + { + status = "Can Edit & Share"; + } + else if (sfs.CanEdit) + { + status = "Can Edit"; + } + else + { + status = "Can Share"; + } + var name = sfs.SharedFolderUid; + if (context.Vault.TryGetSharedFolder(sfs.SharedFolderUid, out var sf)) + { + name = sf.Name; + } + tab.AddRow(name, status); + } + } + + context.Vault.AuditLogRecordOpen(record.Uid); + } + } + else if (context.Vault.TryGetSharedFolder(uid, out var sf)) + { + tab.AddRow("Shared Folder UID:", sf.Uid); + tab.AddRow("Name:", sf.Name); + tab.AddRow("Default Manage Records:", sf.DefaultManageRecords.ToString()); + tab.AddRow("Default Manage Users:", sf.DefaultManageUsers.ToString()); + tab.AddRow("Default Can Edit:", sf.DefaultCanEdit.ToString()); + tab.AddRow("Default Can Share:", sf.DefaultCanShare.ToString()); + if (sf.RecordPermissions.Count > 0) + { + tab.AddRow(""); + tab.AddRow("Record Permissions:"); + foreach (var r in sf.RecordPermissions) + { + tab.AddRow(r.RecordUid + ":", + $"Can Edit: {(r.CanEdit ? "Y" : "N")} Can Share: {(r.CanShare ? "Y" : "N")}"); + } + } + + var teamLookup = context.Vault.Teams.ToDictionary(t => t.TeamUid, t => t.Name); + if (sf.UsersPermissions.Count > 0) + { + tab.AddRow(""); + tab.AddRow("User/Team Permissions:"); + var sortedList = sf.UsersPermissions.ToList(); + sortedList.Sort((x, y) => + { + var res = x.UserType.CompareTo(y.UserType); + if (res == 0) + { + if (x.UserType == UserType.User) + { + res = string.Compare(x.UserId, y.UserId, StringComparison.OrdinalIgnoreCase); + } + else + { + var xName = teamLookup[x.UserId] ?? x.UserId; + var yName = teamLookup[y.UserId] ?? y.UserId; + res = string.Compare(xName, yName, StringComparison.OrdinalIgnoreCase); + } + } + + return res; + }); + foreach (var u in sortedList) + { + var subjectName = u.UserType == UserType.User ? u.UserId : (teamLookup[u.UserId] ?? u.UserId); + tab.AddRow($"{u.UserType} {subjectName}:", $"Can Manage Records: {u.ManageRecords}", + $"Can Manage Users: {u.ManageUsers}"); + } + } + } + else if (context.Vault.TryGetFolder(uid, out var f)) + { + tab.AddRow("Folder UID:", f.FolderUid); + if (!string.IsNullOrEmpty(f.ParentUid)) + { + tab.AddRow("Parent Folder UID:", f.ParentUid); + } + + tab.AddRow("Folder Type:", f.FolderType.ToString()); + tab.AddRow("Name:", f.Name); + } + else + { + Console.WriteLine($"UID {uid} is not a valid Keeper object"); + } + + Console.WriteLine(); + tab.SetColumnRightAlign(0, true); + tab.LeftPadding = 4; + tab.Dump(); + } + } + + class SearchCommandOptions + { + [Option("limit", Required = false, Default = 0, HelpText = "limit output")] + public int Limit { get; set; } + + [Value(0, Required = false, MetaName = "pattern", HelpText = "search pattern")] + public string Pattern { get; set; } + } + + class ListCommandOptions + { + [Option('l', "list", Required = false, Default = false, HelpText = "detailed output")] + public bool Details { get; set; } + } + + internal class TreeCommandOptions + { + [Value(0, Required = false, MetaName = "folder", HelpText = "folder path or UID")] + public string Folder { get; set; } + } + + class SyncDownOptions + { + [Option("reset", Required = false, Default = false, HelpText = "resets on-disk storage")] + public bool Reset { get; set; } + } + + +} \ No newline at end of file diff --git a/KeeperSdk.sln b/KeeperSdk.sln index 701da4b..0ca40f6 100644 --- a/KeeperSdk.sln +++ b/KeeperSdk.sln @@ -1,12 +1,15 @@ Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30225.117 +# Visual Studio Version 17 +VisualStudioVersion = 17.2.32630.192 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "KeeperSdk", "KeeperSdk\KeeperSdk.csproj", "{29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tests", "Tests\Tests.csproj", "{5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Commander", "Commander\Commander.csproj", "{8CB5CA92-64AD-47E7-AE6A-AE71249755EF}" + ProjectSection(ProjectDependencies) = postProject + {D306EE2A-1B22-404D-A85E-8F3AD439E769} = {D306EE2A-1B22-404D-A85E-8F3AD439E769} + EndProjectSection EndProject Project("{F5034706-568F-408A-B7B3-4D38C6DB8A32}") = "PowerCommander", "PowerCommander\PowerCommander.pssproj", "{6CAFC0C6-A428-4D30-A9F9-700E829FEA51}" ProjectSection(ProjectDependencies) = postProject @@ -22,51 +25,179 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution README.md = README.md EndProjectSection EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityKey", "SecurityKey\SecurityKey.csproj", "{92DC07FC-F2D1-4325-9556-3C3CD09624F4}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample", "Sample\Sample.csproj", "{01037E06-F6F2-4A20-BAFE-3E56D856DEE6}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WinWebAuthn", "WinWebAuthn\WinWebAuthn.csproj", "{912A6A55-C062-42FF-AAFB-13B56F74B7E5}" -EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OfflineStorageSqlite", "OfflineStorageSqlite\OfflineStorageSqlite.csproj", "{D306EE2A-1B22-404D-A85E-8F3AD439E769}" EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Cli", "Cli\Cli.csproj", "{413E9A7A-BBCB-415D-932A-7E628BB0D7C8}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPFSample", "WPFSample\WPFSample.csproj", "{189F9A70-0767-4A48-AF0A-80B643455DBC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU + Debug|ARM = Debug|ARM + Debug|ARM64 = Debug|ARM64 + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 Release|Any CPU = Release|Any CPU + Release|ARM = Release|ARM + Release|ARM64 = Release|ARM64 + Release|x64 = Release|x64 + Release|x86 = Release|x86 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|ARM.ActiveCfg = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|ARM.Build.0 = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|ARM64.Build.0 = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|x64.ActiveCfg = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|x64.Build.0 = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|x86.ActiveCfg = Debug|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Debug|x86.Build.0 = Debug|Any CPU {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|Any CPU.ActiveCfg = Release|Any CPU {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|Any CPU.Build.0 = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|ARM.ActiveCfg = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|ARM.Build.0 = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|ARM64.ActiveCfg = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|ARM64.Build.0 = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|x64.ActiveCfg = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|x64.Build.0 = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|x86.ActiveCfg = Release|Any CPU + {29B50177-F7B4-46F6-B3DA-B9FEF269EEF2}.Release|x86.Build.0 = Release|Any CPU {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|ARM.ActiveCfg = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|ARM.Build.0 = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|ARM64.Build.0 = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|x64.ActiveCfg = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|x64.Build.0 = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|x86.ActiveCfg = Debug|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Debug|x86.Build.0 = Debug|Any CPU {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|ARM.ActiveCfg = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|ARM.Build.0 = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|ARM64.ActiveCfg = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|ARM64.Build.0 = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|x64.ActiveCfg = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|x64.Build.0 = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|x86.ActiveCfg = Release|Any CPU + {5B4AC1F3-3FEF-4701-9DF1-D20AFEF588AA}.Release|x86.Build.0 = Release|Any CPU {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|ARM.ActiveCfg = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|ARM.Build.0 = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|ARM64.Build.0 = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|x64.ActiveCfg = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|x64.Build.0 = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|x86.ActiveCfg = Debug|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Debug|x86.Build.0 = Debug|Any CPU {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|Any CPU.ActiveCfg = Release|Any CPU {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|Any CPU.Build.0 = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|ARM.ActiveCfg = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|ARM.Build.0 = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|ARM64.ActiveCfg = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|ARM64.Build.0 = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|x64.ActiveCfg = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|x64.Build.0 = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|x86.ActiveCfg = Release|Any CPU + {8CB5CA92-64AD-47E7-AE6A-AE71249755EF}.Release|x86.Build.0 = Release|Any CPU {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|ARM.ActiveCfg = Debug|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|x64.ActiveCfg = Debug|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Debug|x86.ActiveCfg = Debug|Any CPU {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.ActiveCfg = Release|Any CPU {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|Any CPU.Build.0 = Release|Any CPU - {92DC07FC-F2D1-4325-9556-3C3CD09624F4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {92DC07FC-F2D1-4325-9556-3C3CD09624F4}.Debug|Any CPU.Build.0 = Debug|Any CPU - {92DC07FC-F2D1-4325-9556-3C3CD09624F4}.Release|Any CPU.ActiveCfg = Release|Any CPU - {92DC07FC-F2D1-4325-9556-3C3CD09624F4}.Release|Any CPU.Build.0 = Release|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|ARM.ActiveCfg = Release|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|ARM64.ActiveCfg = Release|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|x64.ActiveCfg = Release|Any CPU + {6CAFC0C6-A428-4D30-A9F9-700E829FEA51}.Release|x86.ActiveCfg = Release|Any CPU {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|Any CPU.Build.0 = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|ARM.ActiveCfg = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|ARM.Build.0 = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|ARM64.Build.0 = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|x64.ActiveCfg = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|x64.Build.0 = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|x86.ActiveCfg = Debug|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Debug|x86.Build.0 = Debug|Any CPU {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|Any CPU.ActiveCfg = Release|Any CPU {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|Any CPU.Build.0 = Release|Any CPU - {912A6A55-C062-42FF-AAFB-13B56F74B7E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {912A6A55-C062-42FF-AAFB-13B56F74B7E5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {912A6A55-C062-42FF-AAFB-13B56F74B7E5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {912A6A55-C062-42FF-AAFB-13B56F74B7E5}.Release|Any CPU.Build.0 = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|ARM.ActiveCfg = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|ARM.Build.0 = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|ARM64.ActiveCfg = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|ARM64.Build.0 = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|x64.ActiveCfg = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|x64.Build.0 = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|x86.ActiveCfg = Release|Any CPU + {01037E06-F6F2-4A20-BAFE-3E56D856DEE6}.Release|x86.Build.0 = Release|Any CPU {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|ARM.ActiveCfg = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|ARM.Build.0 = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|ARM64.Build.0 = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|x64.ActiveCfg = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|x64.Build.0 = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|x86.ActiveCfg = Debug|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Debug|x86.Build.0 = Debug|Any CPU {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|Any CPU.ActiveCfg = Release|Any CPU {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|Any CPU.Build.0 = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|ARM.ActiveCfg = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|ARM.Build.0 = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|ARM64.ActiveCfg = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|ARM64.Build.0 = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|x64.ActiveCfg = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|x64.Build.0 = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|x86.ActiveCfg = Release|Any CPU + {D306EE2A-1B22-404D-A85E-8F3AD439E769}.Release|x86.Build.0 = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|ARM.ActiveCfg = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|ARM.Build.0 = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|ARM64.Build.0 = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|x64.ActiveCfg = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|x64.Build.0 = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|x86.ActiveCfg = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Debug|x86.Build.0 = Debug|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|Any CPU.Build.0 = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|ARM.ActiveCfg = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|ARM.Build.0 = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|ARM64.ActiveCfg = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|ARM64.Build.0 = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|x64.ActiveCfg = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|x64.Build.0 = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|x86.ActiveCfg = Release|Any CPU + {413E9A7A-BBCB-415D-932A-7E628BB0D7C8}.Release|x86.Build.0 = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|ARM.ActiveCfg = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|ARM.Build.0 = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|ARM64.ActiveCfg = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|ARM64.Build.0 = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|x64.ActiveCfg = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|x64.Build.0 = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|x86.ActiveCfg = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Debug|x86.Build.0 = Debug|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|Any CPU.Build.0 = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|ARM.ActiveCfg = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|ARM.Build.0 = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|ARM64.ActiveCfg = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|ARM64.Build.0 = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|x64.ActiveCfg = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|x64.Build.0 = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|x86.ActiveCfg = Release|Any CPU + {189F9A70-0767-4A48-AF0A-80B643455DBC}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/KeeperSdk/KeeperSdk.csproj b/KeeperSdk/KeeperSdk.csproj index 35e3c6f..b9cb9ae 100644 --- a/KeeperSdk/KeeperSdk.csproj +++ b/KeeperSdk/KeeperSdk.csproj @@ -1,9 +1,9 @@  - netstandard2.0;net45 + netstandard2.0;net452 7.1 - 1.0.2-beta04 + 1.0.7-beta02 Keeper Security Inc. .NET Keeper Sdk keeper password manager @@ -13,28 +13,44 @@ Github https://github.com/Keeper-Security/keeper-sdk-dotnet false - 1.0.2.4 - 1.0.2.4 + 1.0.7.43 + 1.0.7.43 MIT false true snupkg KeeperSecurity en-US + False + false DEBUG + 1701;1702;1591 + + + + 1701;1702;1591 + + + + 1701;1702;1591 + + + + 1701;1702;1591 - - + + - + + diff --git a/KeeperSdk/KeeperSdk.xml b/KeeperSdk/KeeperSdk.xml index a556114..df23442 100644 --- a/KeeperSdk/KeeperSdk.xml +++ b/KeeperSdk/KeeperSdk.xml @@ -81,6 +81,16 @@ The number of seconds until this user’s file plan subscription expires. Unix time. + + + File storage plan. Total bytes + + + + + File storage plan. Used bytes + + Represents user's account settings. @@ -154,17 +164,26 @@ Enterprise administrator requested data key sharing. - + + If true data key is nor shared with device key + + + + Persistent login. + + + Record types enabled flag. + + Defines the user interface methods required for authentication with Keeper. - @@ -259,28 +278,11 @@ When user picks a channel, client invokes channel's action channels.InvokeGetDataKeyAction - - - Defines a method that returns HTTP Web proxy credentials. Optional. - - - Keeper SDK calls this interface if it detects that access to the Internet is protected with HTTP Proxy. - Clients requests HTTP proxy credentials from the user and return them to the library. - - - - - - Requests HTTP Proxy credentials. - - HTTP Proxy information - Awaitable boolean result. TrueTrue resume login, False cancel. - Represents Keeper authentication. (async) - + @@ -293,9 +295,7 @@ Keeper Endpoint. - - Gets configuration storage. - + @@ -306,127 +306,25 @@ - - Gets or sets session resumption flag - + - - Forces master password login for SSO accounts. - + - - Gets or sets username. - - - - + - - Gets or sets device token - + - - Login to Keeper account with SSO provider. - - SSO provider name. - Force new login with SSO IdP. - Awaitable task. - - Login is cancelled. - Unrecoverable login exception. - Generic exception. + - - Login to Keeper account with email. - - Keeper account email address. - Master password(s) - Awaitable task - - Unrecoverable login error. - Login cancelled. - Other exceptions. + - - - - - Provides types for connecting to Keeper servers (async). - - - This example shows how to authenticate at Keeper server. - - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using KeeperSecurity.Authentication; - using KeeperSecurity.Authentication.Async; - using KeeperSecurity.Configuration; - - class AuthUi : IAuthUI - { - public Task<bool> WaitForDeviceApproval(IDeviceApprovalChannelInfo[] channels, CancellationToken token) - { - // find email device approval channel. - var emailChannel = channels - .Cast<IDeviceApprovalPushInfo>() - .FirstOrDefault(x => x.Channel == DeviceApprovalChannel.Email); - if (emailChannel != null) - { - // invoke send email action. - _ = Task.Run(async () => - { - await emailChannel.InvokeDeviceApprovalPushAction(); - }); - } - return new TaskCompletionSource<bool>().Task; - } - public async Task<bool> WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, CancellationToken token) - { - // find 2FA code channel. - var codeChannel = channels - .Cast<ITwoFactorAppCodeInfo>() - .FirstOrDefault(); - if (codeChannel != null) - { - Console.WriteLine("Enter 2FA code: "); - var code = Console.ReadLine(); - await codeChannel.InvokeTwoFactorCodeAction("code"); - return true; - } - return false; - } - public async Task<bool> WaitForUserPassword(IPasswordInfo info, CancellationToken token) - { - Console.WriteLine($"Enter password for {info.Username}: "); - var password = Console.ReadLine(); - await info.InvokePasswordActionDelegate(password); - return true; - } - } - - internal static class Program - { - private static async Task Main() - { - var auth = new Auth(new AuthUi(), new JsonConfigurationStorage()); - await auth.Login("username@company.com"); - } - } - - - - - - - - + @@ -485,6 +383,59 @@ Gets device token + + + Defines user or team keys + + + + + + + + AES key + + + + + RSA public key + + + + + ECC public key + + + + + Loads user's keys + + list of user emails + + + + + Gets user's keys. + + Username + user's keys + true if keys exist false if does not + + + + Gets team's keys. + + Team UID + team's keys + true if keys exist false if does not + + + + Load team's keys + + list of team Uids + List of unknown teams + Defines the properties and methods of not connected Keeper authentication object. @@ -560,17 +511,18 @@ Type of response. throws exception on error. Task returning JSON response. - + - + Executes Keeper Protobuf request. Request endpoint. Protobuf request. Expected response type + Request version Task returning Protobuf response. - + @@ -578,6 +530,15 @@ Awaitable Task + + + + + + + + + Defines properties of connected user. @@ -598,11 +559,24 @@ User's Client Key. - + User's RSA Private Key. + + + User's EC Private key + + + + + Enterprise EC Public key + + + + + Gets user's account license. @@ -655,60 +629,67 @@ Represents base authentication class - - + - - Gets Keeper endpoint. - + - - Gets user email address. - + - - Gets device token - + - - Gets connected user context. - + + + + - - Executes Keeper JSON command. - - JSON command. - Type of response. - if True throw exception on Keeper error. - JSON response. - Keeper JSON API Exception + - - - Executes Keeper Protobuf request. - - Request endpoint. - Protobuf request. - Expected response type - Task returning Protobuf response. - + + + + + + + + + + + + + + + + + + + + - - Logout from Keeper server. - - Awaitable Task + - + + + + + + + + + + + + + @@ -720,13 +701,51 @@ Provides base types for establishing connection to Keeper servers. - - - - Provides types for connecting to Keeper servers (sync). - + + Provides types for connecting to Keeper servers (sync). + + + + using System; + using System.Threading.Tasks; + using Cli; + using KeeperSecurity.Authentication; + using KeeperSecurity.Authentication.Sync; + using KeeperSecurity.Configuration; + using KeeperSecurity.Vault; + + namespace Sample + { + internal static class Program + { + private static async Task Main() + { + // Keeper SDK needs a storage to save configuration + // such as: last login name, device token, etc + var configuration = new JsonConfigurationStorage("config.json"); + var inputManager = new SimpleInputManager(); + + // Login to Keeper + Console.WriteLine("Logging in..."); + var authFlow = new AuthSync(configuration); + await Utils.LoginToKeeper(authFlow, inputManager, "username@company.com"); + + if (authFlow.Step is ErrorStep es) + { + Console.WriteLine(es.Message); + return; + } + if (!authFlow.IsAuthenticated()) return; + var auth = authFlow; + var vault = new VaultOnline(auth); + await vault.SyncDown(); + } + } + } + + @@ -738,11 +757,6 @@ Ready to login - - - HTTP Proxy Authentication - - Device Approval @@ -750,7 +764,7 @@ - Two Factor Authentication + Two-Factor Authentication @@ -787,8 +801,7 @@ Represents base Keeper authentication step - - + @@ -840,6 +853,12 @@ Verification code Awaitable task + + + Resumes login flow + + Awaitable task + Represents Two Factor Authentication step @@ -886,7 +905,6 @@ Sends push action to the channel Push action - Awaitable task @@ -894,7 +912,11 @@ - Awaitable task + + + + Resumes login + @@ -915,24 +937,6 @@ Biometric key Awaitable task - - - Represents HTTP Proxy Authentication step - - - - - Gets HTTP Proxy URI - - - - - Sets HTTP Proxy credentials - - Proxy username - Proxy password - Awaitable task - Represents SSO Login step @@ -986,7 +990,11 @@ Requests SSO Approval SSO approval channel - + + + + Resumes login flow + @@ -1044,32 +1052,19 @@ Keeper Endpoint. - - Gets configuration storage. - + > - - Gets or sets session resumption flag - + > - - Forces master password login for SSO accounts. - + > - - Gets or sets username. - - - - + > - - Gets or sets device token - + > @@ -1087,22 +1082,13 @@ - - Login to Keeper account with email. - - Keeper account email address. - Master password(s) - Awaitable task - + > - - Login to Keeper account with SSO provider. - - SSO provider name. - Force new login with SSO IdP. - Awaitable task. - + > + + + > @@ -1120,10 +1106,18 @@ Executes JSON authenticated command that does not return data. - The authenticated connection. - JSON authenticated command. - A Task returning basic JSON response. - + The authenticated connection + JSON authenticated command + A JSON response + + + + + Execute JSON authenticated command in a batch + + The authenticated connection + JSON authenticated commands + A list of JSON responses @@ -1136,7 +1130,7 @@ if True throw exception on Keeper error. A Task returning JSON response. Keeper API Exception. - + @@ -1147,9 +1141,9 @@ SON authenticated command. Awaitable task. Keeper API Exception. - + - + Executes Protobuf authenticated request. @@ -1158,8 +1152,9 @@ The authenticated connection. URL path for request. + request version Task returning Protobuf response. - + @@ -1174,6 +1169,9 @@ + + + Describes Keeper server endpoint. @@ -1221,7 +1219,7 @@ - + @@ -1260,19 +1258,27 @@ locale in format xx_YY where xx - 2 character language code, YY - 2 character country code + + + - - User is not allowed to login. - + Keeper JSON API error. + + + Creates KeeperApiException + + Kepper Error Code + Error Message + Error code. @@ -1310,19 +1316,31 @@ - + + + + + + + - + - + + + + + + + - + @@ -1516,32 +1534,6 @@ Password complexity rule matcher. A task returning a new password. - - - Http Proxy credentials action - - - - - - Defines methods and properties for http proxy authentication. - - - - - Gets HTTP proxy URI - - - - - Gets Proxy-Authentication header - - - - - Accepts HTTP proxy credentials - - Base 2FA channel interface @@ -1760,17 +1752,17 @@ Defines the method that starts U2F Security Key 2FA. Optional. - Implement this interface along with Auth UI + Implement this interface along with Auth UI if you plan to support Security Key (Yubikey and any other U2F compatible keys). - + - + U2F key authentications required. - a list of registered U2F key requests. - A task that returns U2F signature. + Public Key Credential request. + A task that returns WebAuthn signature. @@ -1785,10 +1777,104 @@ Proxy Password - - - TwoFactorChannel - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1976,9 +2062,7 @@ User's device entity - - Gets / sets device token. - + > @@ -2000,6 +2084,21 @@ User entity. + + > + + + > + + + > + + + > + + + > + @@ -2020,6 +2119,12 @@ Keeper server entity. + + > + + + > + @@ -2040,6 +2145,12 @@ Device server entity. + + > + + + > + @@ -2060,6 +2171,15 @@ Device entity. + + > + + + > + + + > + @@ -2186,6 +2306,9 @@ JSON loader + + + Gets / sets read timeout in milliseconds. @@ -2277,16 +2400,174 @@ + > + + + > + + - Loads configuration from the file. + Represents Event Period Filter - JSON data - + + + Maximum value. + + UNIX epoch time in seconds + + + + Mimimum value. + + UNIX epoch time in seconds + + + + Exclude Maximum value. + + Less than Maxinum value if true + + + + Exclude Minimum value. + + Greater than Mininum value if true + + + + Represents Audit Report Filter + + + + + Event Types + + + + + + Users + + + + + Target Users + + + + + Record UIDs + + + + + Shared Folder UIDs + + + + + Event Time + + + Predefined Filters: today, yesterday, last_30_days, last_7_days, month_to_date, last_month, year_to_date, last_year + + + + Represents Audit Report Command + + + + + + + + Report Type + + Report TypeDescription + rawPlain audit events. Default. + spanEvents consolidated by . Creation time is dropped. + monthEvents consolidated by event month and . + weekconsolidated by event week ... + dayconsolidated by event day ... + hourconsolidated by event hour ... + + + + + + Report Scope + + ScopeDescription + enterpriseEnterprise + userLogged in user + + + + + + Sort Order + + Sort OrderDescription + descendingDefault + ascending + + + + + + Number of rows to return + + Maximum: 1000 - raw reports, 2000 - consolidated reports + + + + Repord Filder + + + + + + Aggregate columns + + ColumnDescription + occurrencesEvent count + first_createdFirst event time. MIN(Created) + last_createdLast event time. MAX(Created) + + + Consolidated reports only. + + + + Group by columns + + ColumnDescription + audit_event_typeEvent Type + usernameUsername + ip_addressIP Address + keeper_versionKeeper Client Version + to_usernameTarget Username + record_uidRecord UID + shared_folder_uidShared Folder UID + team_uidTeam UID + + + + + + Represents Audit Report Response + + + + + Events + + + - Stores configuration to the file. + Provides Audit Report Commands - JSON data @@ -2300,11 +2581,26 @@ Keeper Connection Awaitable task returning supported audit events - + Gets audit events in descending order. Keeper Connection + Audit report filetr + Recent event epoch time in seconds + Latest event epoch time in seconds + Awaitable task returning a tuple. Item1 contains the audit event list. Item2 the epoch time in seconds to resume + + + This method returns first 1000 events. To get the next chunk of audit events pass the second parameter of result into recentUnixTime parameter. + Created property of is ignored. + + + + + Gets audit events for a user in descending order. + + Keeper Connection User email Recent event epoch time in seconds Latest event epoch time in seconds @@ -2336,8 +2632,6 @@ Instantiates instance. - Keeper authentication. - Enterprise tree key. Optional. @@ -2432,44 +2726,37 @@ - + - Creates Enterprise Team. + Invites user to enterprise - Enterprise Team - Created Team + Email Address + Optional + Invited User + + + + + + + + + + + + - - Updates Enterprise Team - - Enterprise Team - Updated Team + - - Deletes Enterprise Team. - - Enterprise Team UID. - Awaitable task. + - - Add Enterprise User(s) to Team(s). - - A list of user emails - A list of team UIDs - A callback that receives warnings - Awaitable task. + - - Removes Users(s) from Team(s) - - A list of user emails - A list of team UIDs - A callback that receives warnings - Awaitable task. + @@ -2508,16 +2795,15 @@ - - Provides types for manipulating Keeper Enterprise data. - - - + + Provides types for manipulating Keeper Enterprise data. + + + using System.Linq; - using System.Threading; using System.Threading.Tasks; using KeeperSecurity.Authentication; - using KeeperSecurity.Vault; + using KeeperSecurity.Enterprise; internal static class Program { @@ -2526,15 +2812,15 @@ IAuthentication auth = await ConnectToKeeperAs("username@company.com"); if (auth.AuthContext.IsEnterpriseAdmin) { - // Load enterprise data. + // Load base enterprise data. var enterprise = new EnterpriseData(); - var enterpriseLoader = new EnterpriseLoader(auth, new [] { enterprise }); + var enterpriseLoader = new EnterpriseLoader(auth, new[] { enterprise }); await enterpriseLoader.Load(); // Find team with name "Google". var team = enterprise.Teams - .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); - if (team == null) + .FirstOrDefault(x => string.Equals(x.Name, "Google", System.StringComparison.InvariantCultureIgnoreCase)); + if (team == null) { // Create team. team = await enterprise.CreateTeam(new EnterpriseTeam @@ -2545,18 +2831,18 @@ RestrictView = false, }); } + // Add users to the "Google" team. await enterprise.AddUsersToTeams( new[] { "username@company.com", "username1@company.com" }, - new[] { team.Uid }, - Console.WriteLine); + new[] { team.Uid }); } } } - - - - + + + + @@ -2567,7 +2853,7 @@ Toggles "Node Isolation" flag for enterprise node. - Enterprise Data. + Enterprise Data. Node ID Awaitable Task @@ -2575,7 +2861,7 @@ Creates Enterprise Node - Enterprise Data + Enterprise Data Node Name Parent Node Awaitable task returning created node @@ -2584,7 +2870,7 @@ Updates existing node - Enterprise Data + Enterprise Data Enterprise node New Parent Node Awaitable task @@ -2593,7 +2879,7 @@ Deletes existing node - Enterprise Data + Enterprise Data Node ID to be deleted Awaitable task @@ -2626,13 +2912,15 @@ - + + + + Initialises EnterpriseLoader instance. Keeper Authentication Enterprise data plugins - Enterprise tree key. Optional. @@ -2656,21 +2944,154 @@ - - - - - - - - - - + - Represents Enterprise Node. + Defines optional Invite User properties - + + + User Full Name + + + + + Enterprise Node ID + + + + + Defines Transfer Account Result properties + + + + + Number of records + + + + + Number of shared folders + + + + + Number of teams + + + + + Number of user folders + + + + + Number of corrupted records + + + + + Number of corrupted shared folders + + + + + Number of corrupted teams + + + + + Number of corrupted user folders + + + + + Defines methods for modifying enterprise users and teams. + + + + + Invides User to Enterprise. + + User email + Invided user options + Invited User + + + + Locks or Unlocks Enterprise User. + + Enterprise User + Lock flag + User + + + + Deletes Enterprise User. + + Enterprise User + Task + + + + Transfers Enterprise User account to another user. + + Enterprise Role data + Enterprise User to transfer account from + Target Enterprise User + Task + + + + Creates Enterprise Team. + + Enterprise Team + Created Team + + + + Modifies Enterprise Team. + + Enterprise Team + Updated Team + + + + Deletes Enterprise Team. + + Team UID + Task + + + + Adds Users to Team. + + Emails + Array of team Uids + (Optional) + Task + + + + Removes Users(s) from Team(s) + + A list of user emails + A list of team UIDs + A callback that receives warnings + Awaitable task. + + + + + + + + + + Represents Enterprise Node. + + + A list of child node IDs @@ -2695,6 +3116,18 @@ Node Isolation flag. + + + + + + + + + + + + Specifies Enterprise User statuses. @@ -2759,6 +3192,20 @@ Node that owns the user. + + + + + + + + + + + + Account Share Expiration. Unix epoch time in milliseconds. + + Represents Enterprise Role @@ -2832,6 +3279,46 @@ Node that owns the team. + + + Represends Managed Company Add-On + + + + + Add-On name + + + + + Is Add-On enabled + + + + + Is Add-On trial + + + + + Number of Seats + + + + + Add-On expiration time. UNIX epoch + + + + + Add-On creation time. UNIX epoch + + + + + Add-On activation time. UNIX epoch + + Represents Enterprise Managed Company. @@ -2862,6 +3349,11 @@ Number of Users + + + File / Storage Plan Type + + Is Managed Company Expired @@ -2872,6 +3364,12 @@ Node that owns the managed company. + + + + + + Cannot proceed with enterprise operation. @@ -2883,6 +3381,15 @@ + + + + + + + + + Represends Managed Companies enterprise data. @@ -2896,157 +3403,333 @@ Get a list of all managed companies in the enterprise. + + + + + + + + + + + + + + + - - + + - + - Represents Role enterprise data. + Represends Managed Companies create/update options - - + + + Managed Company Name + - + - Get a list of all roles in the enterprise + Enterprise Node ID - + - Gets the enterprise role assocoated with the specified ID. + Managed Company Product ID - Enterprise Role ID - When this method returns true, contains requested enterprise role; otherwise null. - true if the enterprise contains a role with specified ID; otherwise, false - + - Gets a list of user IDs for specified role. + Maximum Number of Seats. -1 unlimited - Enterprise Role ID. - List of Enterprise User IDs. - + - Gets a list of role IDs for specified user. + File/Storage Plan - Enterprise User ID. - List of Enterprise Role IDs - + - Gets a list of team UIDs for specified role. + Addons - Enterprise Role ID. - List of Enterprise Team UIDs. - + - Gets a list of role IDs for specified team. + Defines Managed Company actions - Team UID. - List of Enterprise Role IDs - + - Gets a list of role enforcements for specified role. + Creates Managed Company - Enterprise Role ID. - List of Role Enforcements + Company options + Created managed company - + - Gets a list of privileges for specified role and node + Updates Managed Company - Enterprise Role ID. - Enterprise Node ID. - List of Role Privileges + Managed Company ID + Company options + Updated managed company - + - Gets a list of all managed nodes in the enterprise + Removes Managed Company + Managed Company ID - - - - - - - - + + + Defines Queued Team storage + - - + + + Represents Queued Team + - - + + + Represents Queued Team Enterprise Plugin + - - + + + Instantiates instance. + - + - + - Provides a set of encryption methods. + Gets list of all queued teams - + - Generates secure random bytes. + Gets the number of all queued teams in the enterprise. - Length in bytes. - An array of random bytes. - + - Generate AES encryption key. Random 32 bytes. + Gets Gets a list of user IDs for specified queued team. - AES encryption key. 32 random bytes. + Queued Team UID + A list of user IDs - + + + + + + + - Generates UID. Random 16 bytes encoded to Base64 URL encoded. + Defines Role enterprise data. - UID. 16 random bytes Base64 URL encoded. - + - Encodes byte array to string using Base64 URL encoding. + Get a list of all roles in the enterprise - Byte array. - Base64 URL encoded string. - + - Decodes Base64 URL encoded string to byte array. + Gets the number of all roles in the enterprise. - Base64 URL encoded string. - Byte array. - + - Loads RSA public key. + Gets the enterprise role assocoated with the specified ID. - RSA public key DER encoded. - RSA Public Key + Enterprise Role ID + When this method returns true, contains requested enterprise role; otherwise null. + true if the enterprise contains a role with specified ID; otherwise, false - + - Loads RSA private key. + Gets a list of user IDs for specified role. - RSA private key DER encoded. - RSA Private Key + Enterprise Role ID. + List of Enterprise User IDs. + + + + Gets a list of role IDs for specified user. + + Enterprise User ID. + List of Enterprise Role IDs + + + + Gets a list of team UIDs for specified role. + + Enterprise Role ID. + List of Enterprise Team UIDs. + + + + Gets a list of role IDs for specified team. + + Team UID. + List of Enterprise Role IDs + + + + Gets a list of role enforcements for specified role. + + Enterprise Role ID. + List of Role Enforcements + + + + Gets role key. + + Enterprise Role ID. + Role Key + + + + Represents Role enterprise data. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Gets a list of privileges for specified role and node + + Enterprise Role ID. + Enterprise Node ID. + List of Role Privileges + + + + Gets a list of all managed nodes in the enterprise + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides a set of encryption methods. + + + + + Generates secure random bytes. + + Length in bytes. + An array of random bytes. + + + + Generate AES encryption key. Random 32 bytes. + + AES encryption key. 32 random bytes. + + + + Generates UID. Random 16 bytes encoded to Base64 URL encoded. + + UID. 16 random bytes Base64 URL encoded. + + + + Encodes byte array to string using Base64 URL encoding. + + Byte array. + Base64 URL encoded string. + + + + Decodes Base64 URL encoded string to byte array. + + Base64 URL encoded string. + Byte array. + + + + Loads RSA public key. + + RSA public key DER encoded. + RSA Public Key + + + + Loads RSA private key. + + RSA private key DER encoded. + RSA Private Key @@ -3190,7 +3873,7 @@ - Load EC public key. + LoadV2 EC public key. public key bytes. EC public key @@ -3230,6 +3913,58 @@ + + + Special characters for password generator + + + + + Generates random password. + + Password generation rules. Optional + Generated password + + + + Defines password generation rules. + + + + + Password Length + + Default: 20 + + + + Minimal number of lowercase characters. + + -1 to exclude lowercase characters + + + + Minimal number of uppercase characters. + + -1 to exclude uppercase characters + + + + Minimal number of digits + + -1 to exclude digits + + + + Minimal number of special characters + + -1 to exclude special characters + + + + Special character vocabulary. + + @@ -3242,6 +3977,12 @@ + + + + + + @@ -3290,6 +4031,9 @@ + + + Notification callback delegate. @@ -3331,12 +4075,6 @@ - - - - - - Provides methods for JSON (de)serialization. @@ -3350,14 +4088,18 @@ JSON data. Parsed JSON object. - + Serializes object to JSON format. Type of JSON object. JSON object. + Pretty print JSON data. + + + Represents a password complexity rule matcher. @@ -3382,5284 +4124,11019 @@ - - - - + - Provides utilities common for all Keeper modules. + Provides extension methods for Vault Record Types - - - + + + + - Creates an attachment upload task. + Returns record type information. + Keeper Record + - + - Initializes a new instance of class. + Returns common record information. + Does not include sensitive data - - + Keeper Record + General record information - + - Attachment name. + Encodes record field name + Field definition + Record field full name. - + - Attachment title. + Returns typed field values converted to string + Record Field + Field values. - + - Attachment MIME type. + Returns general typed field values masking sensitive information. + Record Field + Field common values - + - Attachment input stream. + Verifies Typed record. + Vault + Typed Record - + - Creates a file attachment upload task. + Provides utilities common for all Keeper modules. + + - + - Initializes a new instance of class. + Specifies log message severity - File name. - Thumbnail upload task. Optional. - + - Represents Keeper Vault connected to Keeper server. + Fatal error - + - Creates a file attachment download HTTP request. + Warning - Record UID. - Attachment ID. - A signed WebRequest instance (awaitable) - + - Downloads and decrypts file attachment. + Information - Keeper record. - Attachment name, title, or ID. - Writable stream. - Awaitable task. - - + - Encrypts and uploads file attachment. + Represents record existing match strategy - Keeper record. - Upload task - Awaitable task. - - + - Adds (if needed) user or team to the shared folder and set user access permissions. + Do not match existing records when added. - Shared Folder UID. - User email or Team UID. - Type of parameter. - Shared Folder User Permissions. - Awaitable task. - - If options parameter is null then user gets default user permissions when added. - - - - + - Removes user or team from shared folder. + Match only main fields. Skip notes and custom fields - Shared Folder UID. - User email or Team UID. - Type of userId parameter. - Awaitable task. - - - + - Changes record permissions in shared folder. + Match all record fields. - Shared Folder UID. - Record UID. - Record permissions. - Awaitable task - - This method does not add a record to shared folder. - Use or . - - - + - Instantiate instance. + Represents Batch Vault Updater Summary - Keeper authentication. - Keeper offline storage. - + - Gets Keeper authentication. + Gets number of added shared folders - + - Gets or sets vault auto sync flag. + Gets number of added folders - When True the library subscribes to the Vault change notifications. - + - Gets User Interaction interface. + Gets number of added legacy records - + - Schedules sync down. + Get number of added typed records - delay - Awaitable task - + - Immediately executes sync down. + Get number of updated records - Awaitable task - + - Creates a password record. + Get number of updated folders - Password Record. - Folder UID where the record to be created. Optional. - A task returning created password record. - - - + - Modifies a password record. + Declares Batch Vault Updater methods - Password Record. - Do not update file attachment information on the record. - A task returning created password record. - - - + - Stores non shared (or per user) data associated with the record. + Gets the root folder - App specific per-user data type - Record UID - Non shared data - Awaitable task. - Keeper API error - - + - Deletes password records. + Gets folder node by folder UID - an array of record paths. - Awaitable task. - - + folder UID + folder node + + true if folder is found - + - Moves records to a folder. + Gets record by record UID. Returns both pending and active records. - an array of record paths. - Destination folder UID. - truecreates a link. The source record in not deleted; otherwise record will be removed from the source. - Awaitable task. - - + record UID + Keeper record + - + - Moves a folder to the another folder. + Finds folder node by folder path - Source Folder UID. - Destination Folder UID. - truecreates a link. The source folder in not deleted; otherwise source folder will be removed. - Awaitable task. - + Folder Path + + folder node - + - Creates a folder. + Appends folder to folder structure - Folder Name. - Parent Folder UID. - Shared Folder creation options. Optional. - A task returning created folder. - Pass parameter to create a Shared Folder. - - + folder name + parent folder + shared folder options + folder node to be added - + - Renames a folder. + Checks if the folder has to be created - Folder UID. - New folder name. - A task returning renamed folder. - + + true if folder is scheduled to be added - + - Delete folder. + Checks if the record has to be created - Folder UID. - Awaitable task. - + + true if record is scheduled to be added - + - Retrieves all enterprise team descriptions. + Updates folder name - A list of all enterprise teams. (awaitable) + folder UID + new folder name + true if folder is scheduled to be added - + - Specifies key used for entity encryption. + Update a record + Keeper record + true is record is scheduled to be updated - + - No entity key. Use data key. + Appends record + record + folder + true is record is scheduled to be added - + - Key encrypted with the user data kay. + Adds (if needed) user or team to the shared folder and set user access permissions. + Shared Folder UID. + User email or Team UID. + Type of userId parameter. + Shared Folder User Permissions. + true if parameters are accepted + + If optionsc> parameter is null then user gets default user permissions when added./> + + + + - + - Key is encrypted with the user RSA key. + Removes user or team from shared folder. + Shared Folder UID. + User email or Team UID. + Type of userId parameter. + true if parameters are accepted + - + - Key is encrypted with shared folder key. + Applies pending changes + Change status - + - Key is encrypted with team key. + Resets pending changes - + - Key is encrypted with team RSA key. + Gets record matching strategy - - - - - - - + - Defines Record Key Metadata properties. + Represents Batch Vault Updater + - + - Record UID. + Instantiate . + Vault instance + Record matching strategy - - - Shared Folder UID if record key is encrypted with shared folder key. - + + - - - Encrypted record key. - + + - - - Record key encryption key type. - - + + - - - Can user re-share record? - + + - - - Can user edit record? - + + - + - Defines Password Record properties. + Composes folder path + folder name list + folder path - + - Record UID. + Parses folder path to names + folder path + folder name list - - - Last Revision. - + + - - - Last modification time. Unix epoch in seconds. - + + - - - Encrypted record data - + + - - - Encrypted record extra data. - + + - - - Unencrypted record data - + + - - - Is record shared? - + + + + + + + + + + + - + + + + - Is user owner of the record? + Gets or sets logger - + - Defines non-shared data properties. + Gets number of folders to be added - + - Record UID. + Gets number of legacy records to be added - + - Encrypted record data. + Gets number of typed records to be added - + - Defines shared folder key properties. + Gets number of typed records to be updated - + - Shared Folder UID. + Gets the number of folder to be renamed + - + - Team Uid if shared folder UID is encrypted with team key. + Creates an attachment upload task. - + - Shared folder key encryption key type. + Initializes a new instance of class. + + - + + + + + + + + + + + + + + + + - Encrypted shared folder key. + Creates a file attachment upload task. - + - Defines properties for shared folder user permissions. + Initializes a new instance of class. + File name. + Thumbnail upload task. Optional. - + - Shared folder UID. + Represents Keeper Vault connected to Keeper server. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + > + + + > + + + > + + - User email or Team UID. + Instantiate instance. + Keeper authentication. + Keeper offline storage. - + - User type. + Gets Keeper authentication. - - + - Can manage records? + Gets or sets vault auto sync flag. + When True the library subscribes to the Vault change notifications. - + + + + - Can manage users? + Gets User Interaction interface. - + - Defines properties for shared folder. + Schedules sync down. + delay + Awaitable task - + - Shared folder UID. + Immediately executes sync down. + Awaitable task - - + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Shared folder name. Encrypted with the shared folder key. + Keeper Import methods - + - Can manage records by default? + Parses JSON object to import type + parsed JSON import file + parsed import object - + - Can manage users by default? + Import Keeper JSON file + Vault instance + Import object + Logger + - + - Can edit records by default? + Represents External / One-Time Share - + - Can re-share records by default. + Record UID - + + + + - Defines properties for Enterprise Team. + Share Name - + - Team UID. + Share Created - + + + + - Team name. Plain text. + Share Expiration - + - Team key. Encrypted with the + URL Opened - + - Encryption key type. + Last Accessed - - + - Team private key. Encrypted with the team key. + Miscellaneous External Share Methods - + - Does team restrict record edit? + Retrieve external shares for a record + Vault + Record UID + List of external shares - + - Does team restrict record re-share? + Deletes external shares for a record + Vault + Record UID + List of external share names + Awaitable task - + - Does team restrict record view? + Creates an external share for a record + Vault + Record UID + Share Expiration + Share Name + External Share URL + - + - Defines properties for folder. + Record Types Schema: Field Type definition. - + + + + - Parent folder UID. + Type name - + - Folder UID. + Type description - + - Folder type. + .Net Type object - + - Folder key. Encrypted with data key for user_folder or shared folder key for shared_folder_folder + Specifies if Record Field allows multiple values. - + - Shared Folder UID. + Single Value only - + - Revision. + Maybe multi-valued - + - Shared folder data. Encrypted with the shared folder key. + Multi-Value field - + - Defines properties record-folder link. + Record Types Schema: Field definition. - + + + + - Folder UID. + Record Field Name - + - Record UID. + Field Type - + - Defines entity storage methods. + Multi-Value attribute - Type of entity. - + - Gets entity by entity UID. + Defines common properties for Record Field - Entity UID. - Entity instance. - + - Stores entities. + Record Field Name - List of entities. - + - Deletes entity by entity UID. + Record Field Label - List of Entity UIDs to delete. - + - Gets all entities in the storage. + Record Types Schema: Record Field definition. - - + - Defines entity link storage methods. + Initializes a new instance of the RecordTypeField class - Type of entity link. + Field Name + Field Label - + - Stores entity links + Initializes a new instance of the RecordTypeField class - List of entity links. + Field + Field Label - + - Deletes entity link. + Gets Record Field - List links to delete. - + - Delete all links for subject entity UIDs + Gets field name - List of Subject UIDs to delete. - + - Delete all links for object entity UID + Gets field label - List of Object UIDs to delete. - + + + + - Gets all entity links for subject entity UID. + Record Types Schema: Record Type definition. - Subject UID. - A list of entity links. - + + + + + + + - Gets all entity links for object entity UID. + Gets record type ID - Object UID. - A list of entity links. - + - Gets all entity links in the storage. + Gets record type scope - A list of entity links. - + - Defines properties for offline Keeper vault storage. + Gets record type name - + - ID for logged in user. + Gets record type description - + - Gets or sets revision. + Gets record type fields - + - Gets record entity storage. + Defines access methods for compound record types - + - Gets shared folder entity storage. + Enumerates property names - + - Gets team entity storage. + Enumerates property values - + - Gets non-shared record data entity storage. + Sets property value + Property or element name + Property value + true is the property was set - + - Gets record key entity link storage. + Sets field value from human friendly text - - - Object UIDRecord UID - Subject UIDPersonalScopeUid or Shared Folder UID - - + String representation - + - Gets shared folder key entity link storage + Gets human friendly text - - - Object UIDShared Folder UID - Subject UIDPersonalScopeUid or Team UID - - + - + + + + + + + + + + - Gets shared folder user permission entity link storage. + "host" field type - - - Object UIDShared Folder UID - Subject UIDUser Email or Team UID - - - + + + + - Gets folder entity storage. + Gets or sets hostname - + - Gets folder's record entity link storage. + Gets or sets port - - - Object UIDFolder UID - Subject UIDRecord UID - - - + + + + + + + + + + + + + - Clear offline Keeper vault storage. + "phone" field type - + + + + - Provides in memory implementation of IKeeperStorage interface. + Gets or sets phone region - - + - Gets pseudo UID for logged in user. + Gets or sets phone number - + - Gets or sets revision. + Gets or sets phone extension - + - Gets record entity storage. + Gets or sets phone type - + + + + + + + + + + + + + + + + - Gets shared folder entity storage. + "name" field type - + + + + - Gets team entity storage. + Gets or sets first name - + - Gets non-shared record data entity storage. + Gets or sets last name - + - Gets record key entity link storage. + Gets or sets middle name - - - Object UIDRecord UID - Subject UIDPersonalScopeUid or Shared Folder UID - - - + + + + + + + + + + + + + + + + - Gets shared folder key entity link storage + "address" field type - - - Object UIDShared Folder UID - Subject UIDPersonalScopeUid or Team UID - - - + + + + - Gets shared folder user permission entity link storage. + Gets or sets Street 1 - - - Object UIDShared Folder UID - Subject UIDUser Email or Team UID - - - + - Gets folder entity storage. + Gets or sets Street 1 - + - Gets folder's record entity link storage. + Gets or sets City - - - Object UIDFolder UID - Subject UIDRecord UID - - - + - Clear offline Keeper vault storage. + Gets or sets State - + - Provides a set of static methods for syncing down vault. + Gets or sets Zip/Postal Code - + - Incrementally downloads vault data. + Gets or sets Country - Vault connected to Keeper. - - - - Represents Keeper vault loaded from the and decrypted. - + + - - - Instantiates instance. - - encryption key. - Vault storage. + + - - + + - + + + + + + + - Provides types for loading and storing the Keeper Vault data. + "securityQuestion" field type - - - using System.Linq; - using System.Threading; - using System.Threading.Tasks; - using KeeperSecurity.Authentication; - using KeeperSecurity.Vault; - - internal static class Program - { - private static async Task Main() - { - IAuthentication auth = await ConnectToKeeperAs("username@company.com"); - var vault = new VaultOnline(auth); - Console.WriteLine("\nRetrieving records..."); - await vault.SyncDown(); - - Console.WriteLine($"Hello {auth.Username}!"); - Console.WriteLine($"Your vault has {vault.RecordCount} records."); - - // Find record with title "Google" - var search = vault.Records.FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); - // Create a record if it does not exist. - if (search == null) - { - search = new PasswordRecord - { - Title = "Google", - Login = "/Account Name/", - Password = "/Account Password/", - Link = "https://google.com", - Notes = "Stores google credentials" - }; - search = await vault.CreateRecord(search); - } - - // Update record. - search.SetCustomField("Security Token", "11111111"); - search = await vault.UpdateRecord(search); - - // find file attachment. - var attachment = search.Attachments - .FirstOrDefault(x => string.Compare(x.Title, "google", StringComparison.InvariantCultureIgnoreCase) == 0); - if (attachment == null) - { - // Upload local file "google.txt" - var uploadTask = new FileAttachmentUploadTask("google.txt") - { - Title = "Google", - }; - await vault.UploadAttachment(search, uploadTask); - } - else - { - // Download attachment into local file "google.txt" - await using var stream = File.OpenWrite("google.txt"); - await vault.DownloadAttachment(search, attachment.Id, stream); - - // Delete attachment. Remove it from the record - search.Attachments.Remove(attachment); - await vault.UpdateRecord(search); - } - - // Find shared folder with name "Google". - var sharedFolder = vault.SharedFolders - .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); - if (sharedFolder == null) - { - // Create shared folder. - var folder = await vault.CreateFolder("Google", null, new SharedFolderOptions - { - ManageRecords = true, - ManageUsers = false, - CanEdit = false, - CanShare = false, - }); - vault.TryGetSharedFolder(folder.FolderUid, out sharedFolder); - } - - // Add user to shared folder. - await vault.PutUserToSharedFolder(sharedFolder.Uid, "user@google.com", UserType.User, new SharedFolderUserOptions - { - ManageRecords = false, - ManageUsers = false, - }); - - // Add record to shared folder. - await vault.MoveRecords(new[] { new RecordPath { RecordUid = search.Uid } }, sharedFolder.Uid, true); - } - } - - - - - - - - + + - + - Represents shared folder record permissions. + Gets or sets Security Question - + - Defines shared folder user permissions. + Gets or sets Security Answer - + + + + + + + + + + + + + + + + - Defines shared folder user and record permissions. + "bankAccount" field type - + + + + - Defines properties and methods of decrypted Vault data. + Gets or sets Account Type - - + - Gets encrypted vault storage. + Gets or sets Routing Number - + - Gets client key. AES encryption key that encrypts data in the local storage + Gets or setsAccount Number - + + + + + + + + + + + + + + + + - Gets vault root folder. My Vault + "paymentCard" field type - + + + + - Get the list of all folders in the vault. Both user and shared folders. + Gets or sets Card Number - + - Gets the folder associated with the specified folder UID. + Gets or sets Card Expiration Date - Folder UID - When this method returns true, contains requested folder; otherwise null. - true in the vault contains a folder with specified UID; otherwise, false - + - Gets the number of all records in the vault. + Gets or sets Card Security Code - + + + + + + + + + + + + + + + + - Get the list of all records in the vault. + "keyPair" field type - + - Gets the record associated with the specified record UID. + Gets or sets Public Key - Record UID. - When this method returns true, contains requested record; otherwise null. - true in the vault contains a record with specified UID; otherwise, false - + - Gets the number of all shared folders in the vault. + Gets or sets Private Key - + + + + + + + + + + + + + + + + + + + + + + - Get the list of all shared folders in the vault. + "passkey" field type - + - Gets the shared folder associated with the specified record UID. + Gets or sets Relying Party - Shared Folder UID - When this method returns true, contains requested shared folder; otherwise null. - true in the vault contains a shared folder with specified UID; otherwise, false. - + - Gets the number of all teams user is member of. + Gets or sets Credential Id - + - Get the list of all teams user is member of. + Gets or sets User Id - + - Gets the team associated with the specified team UID. + Gets or sets Username - Team UID. - When this method returns true, contains requested team; otherwise null. - true in the vault contains a team with specified UID; otherwise, false. - + - Loads non shared (or per user) data associated with the record. + Gets or sets Sign Count - App specific per-user data type - Record UID - Non shared data associated with the record - + - Represents a record in folder. + Gets or sets Created Date - + + + + - Record UID. + Record Types Schema: Fields - + - Folder UID. + Gets supported Field Types - + - Defines shared folder record permissions. + Gets supported Fields - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - Record can be edited. + Specifies key used for entity encryption. - + - Record can be re-shared. + No entity key. Use data key. - + - Defines shared folder user permissions. + Key encrypted with the user data kay. - + - User can manage other users. + Key is encrypted with the user RSA key. - + - User can manage records. + Key is encrypted with shared folder key. - + - Defines methods for interaction between Vault API and user. + Key is encrypted with team key. - + - Ask confirmation from user. + Key is encrypted with team RSA key. - text to be displayed in the dialog. - Task returning bool; true means Yes/Accept; false No/Decline - - - + - Defines methods for modifying the vault records and folders. + Key is encrypted with record key. - - + + + + + + + - Gets Vault user interaction interface. + Defines Record Key Metadata properties. - + - Gets or Sets automatic sync down flag. + Record UID. - + - Creates a password record. + Shared Folder UID if record key is encrypted with shared folder key. - Password Record. - Folder UID where the record to be created. Optional. - A task returning created password record. - - + - Modifies a password record. + Encrypted record key. - Password Record. - Do not update file attachment information on the record. - A task returning created password record. - - + - Deletes password records. + Record key encryption key type. - an array of record paths. - Awaitable task. - + - + - Moves records to a folder. + Can user re-share record? - an array of record paths. - Destination folder UID. - truecreates a link. The source record in not deleted; otherwise record will be removed from the source. - Awaitable task. - - + - Stores non shared (or per user) data associated with the record. + Can user edit record? - App specific per-user data type - Record UID - Non shared data - Awaitable task. - Keeper API error - + - Creates a folder. + Defines Password Record properties. - Folder Name. - Parent Folder UID. - Shared Folder creation options. Optional. - A task returning created folder. - Pass parameter to create a Shared Folder. - - - + - Renames a folder. + Record UID. - Folder UID. - New folder name. - A task returning renamed folder. - - + - Moves a folder to the another folder. + Last Revision. - Source Folder UID. - Destination Folder UID. - truecreates a link. The source folder in not deleted; otherwise source folder will be removed. - Awaitable task. - - + - Delete folder. + Record Version. + 2 - Legacy + 3 - Typed + 4 - File + 5 - Application - Folder UID. - Awaitable task. - - + - Defines methods to manipulate Shared Folders. + Last modification time. Unix epoch in seconds. - - + - Adds (if needed) user or team to the shared folder and set user access permissions. + Encrypted record data - Shared Folder UID. - User email or Team UID. - Type of parameter. - Shared Folder User Permissions. - Awaitable task. - - If parameter is null then user gets default user permissions when added./> - - - - + - Removes user or team from shared folder. + Encrypted record extra data. - Shared Folder UID. - User email or Team UID. - Type of parameter. - Awaitable task. - - + - Changes record permissions in shared folder. + Unencrypted record data - Shared Folder UID. - Record UID. - Record permissions. - - - This method does not add a record to shared folder. - Use or . - - - + - Defines properties of thumbnail upload task. + Is record shared? - + - Thumbnail MIME type. + Is user owner of the record? - + - Thumbnail size in pixels. + Defines non-shared data properties. - + - Thumbnail read stream. + Record UID. - + - Defines properties of file upload task. + Encrypted record data. - + - Attachment name. + Defines shared folder key properties. - + - Attachment title. + Shared Folder UID. - + - Attachment MIME type. + Team Uid if shared folder UID is encrypted with team key. - + - Attachment read stream. + Shared folder key encryption key type. - + - Thumbnail upload task. Optional. + Encrypted shared folder key. - + - Defines methods to manipulate file attachments. + Defines properties for shared folder user permissions. - + - Downloads and decrypts file attachment. + Shared folder UID. - Keeper record. - Attachment name, title, or ID. - Writable stream. - Awaitable task. - + - Encrypts and uploads file attachment. + User email or Team UID. - Keeper record. - Upload task - Awaitable task. - + - The exception that is thrown by the Vault module. + User type. + - - - - - - - - - - + - Represents a decrypted Keeper Password Record. + Can manage records? - + - Record UID. + Can manage users? - + - Is user Owner? + Defines properties for shared folder. - + - Is record Shared? + Shared folder UID. - + + + + - Title. + Shared folder name. Encrypted with the shared folder key. - + - Login or Username. + Can manage records by default? - + - Password. + Can manage users by default? - + - Web URL. + Can edit records by default? - + - Notes. + Can re-share records by default. - + - Last modification time. + Defines properties for Enterprise Team. - + - A list of Custom Fields. + Team UID. - + - A list of Attachments. + Team name. Plain text. - + - A list of Extra Fields. + Team key. Encrypted with the - + - Record key. + Encryption key type. + - + - Deletes a custom field. + Team private key. Encrypted with the team key. - Custom field name. - Deleted custom field or null is it was not found. - + - Adds or Changes custom field. + Does team restrict record edit? - Name. - Value. - Added or modified custom field. - + - Represents a custom field. + Does team restrict record re-share? - + - Custom field name. + Does team restrict record view? - + - Custom field value. + Defines properties for folder. - + - Custom field type. + Parent folder UID. - + - Represents an extra field. + Folder UID. - + - Extra field ID. + Folder type. - + - Extra field type. + Folder key. Encrypted with data key for user_folder or shared folder key for shared_folder_folder - + - Extra field title. + Shared Folder UID. - + - Additional extra field values. + Revision. - + - Represents a thumbnail of attachment. + Shared folder data. Encrypted with the shared folder key. - It usually is used for large image thumbnails. - + - Thumbnail ID. + Defines properties record-folder link. - + - Thumbnail MIME type. + Folder UID. - + - Thumbnail size. pixels. + Record UID. - + - Represents attachment file. + Defines entity storage methods. + Type of entity. - + - Attachment ID. + Gets entity by entity UID. + Entity UID. + Entity instance. - + - Attachment encryption key. + Stores entities. + List of entities. - + - Attachment name. + Deletes entity by entity UID. - Usually it is an original file name. + List of Entity UIDs to delete. - + - Attachment title. + Gets all entities in the storage. + - + - Attachment MIME type. + Defines entity link storage methods. + Type of entity link. - + - Attachment size in bytes. + Stores entity links + List of entity links. - + - Last time modified. + Deletes entity link. + List links to delete. - + - A list of thumbnails. + Delete all links for subject entity UIDs + List of Subject UIDs to delete. - + - Specifies shared folder user type. + Delete all links for object entity UID + List of Object UIDs to delete. - + - Regular user. + Gets all entity links for subject entity UID. + Subject UID. + A list of entity links. - + - Enterprise Team. + Gets all entity links for object entity UID. + Object UID. + A list of entity links. - + - Represents shared folder user permissions. + Gets all entity links in the storage. + A list of entity links. - + - User email or team UID. + Defines properties for offline Keeper vault storage. - + - The type of property. + ID for logged in user. - + - Can Manage Records? + Gets or sets revision. - + - Can Manage Users? + Gets record entity storage. - + - Represents shared folder record permissions. + Gets shared folder entity storage. - + - Record UID. + Gets team entity storage. - + - Can be re-shared? + Gets non-shared record data entity storage. - + - Can be edited? + Gets record key entity link storage. + + + Object UIDRecord UID + Subject UIDPersonalScopeUid or Shared Folder UID + + - + - Represents Shared Folder. + Gets shared folder key entity link storage + + + Object UIDShared Folder UID + Subject UIDPersonalScopeUid or Team UID + + - + - Shared folder UID. + Gets shared folder user permission entity link storage. + + + Object UIDShared Folder UID + Subject UIDUser Email or Team UID + + - + - Shared folder name. + Gets folder entity storage. - + - Default manage records permission. + Gets folder's record entity link storage. + + + Object UIDFolder UID + Subject UIDRecord UID + + - + - Default manage users permission. + Gets record type's entity storage - + - Default record can be re-shared permission. + Clear offline Keeper vault storage. - + - Default record can be edited permission. + Specifies Record Type Scope - + - A list of user permissions. + Pre-Defined - + - A list of record permissions. + User-Defined - + - Shared Folder key. + Enterprise-Defined - + - Represents basic team properties. + Defines properties for Record Types. - + - Team UID. + Record Type ID - + - Team Name. + Record Type Scope - + - Represents team properties that user is member of. + Record Type Content (JSON). - + - Team restricts record edit. + Provides in memory implementation of IKeeperStorage interface. + - - - Team restricts record re-share. - + + - - - Team restricts record view. - + + - - - Team key. - + + - - - Team RSA private key. - + + - - - Specifies folder types. - + + - - - User folder. - + + - - - Shared folder. + + + + + + + + + + + + + + + + + + + + + Provides a set of static methods for syncing down vault. + + + + + Incrementally downloads vault data. + + Vault connected to Keeper. + + + + + Represents Keeper vault loaded from the and decrypted. + + + + + Instantiates instance. + + encryption key. + Vault storage. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides types for loading and storing the Keeper Vault data. + + + + using System; + using System.Linq; + using System.IO; + using System.Threading.Tasks; + using KeeperSecurity.Authentication; + using KeeperSecurity.Vault; + + internal static class Program + { + private static async Task Main() + { + IAuthentication auth = await ConnectToKeeperAs("username@company.com"); + var vault = new VaultOnline(auth); + Console.WriteLine("\nRetrieving records..."); + await vault.SyncDown(); + + Console.WriteLine($"Hello {auth.Username}!"); + Console.WriteLine($"Your vault has {vault.RecordCount} records."); + + // Find record with title "Google" + var search = vault.KeeperRecords.FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); + // Create a record if it does not exist. + if (search == null) + { + var typed = new TypedRecord("login") + { + Title = "Google", + Notes = "Stores google credentials" + }; + var loginRecord = new TypedRecordFacade<LoginRecordType>(typed); + loginRecord.Fields.Login = "/Account Name/"; + loginRecord.Fields.Password = "/Account Password/"; + loginRecord.Fields.Url = "https://google.com"; + + search = await vault.CreateRecord(typed); + } + + // Update record + if (search is TypedRecord tr) + { + var recordField = new RecordTypeField("secret", "Security Token"); + if (!tr.FindTypedField(recordField, out var rf)) + { + rf = recordField.CreateTypedField(); + tr.Custom.Add(rf); + } + var tokenValue = rf.ObjectValue == null ? "1" : rf.ObjectValue.ToString() + "1"; + } + else if (search is PasswordRecord pr) + { + pr.SetCustomField("Security Token", "11111111"); + } + search = await vault.UpdateRecord(search); + + // find file attachment + var attachment = vault.RecordAttachments(search) + .FirstOrDefault(x => string.Equals(x.Title, "google", StringComparison.InvariantCultureIgnoreCase)); + if (attachment == null) + { + // Upload local file "google.txt" + var uploadTask = new FileAttachmentUploadTask("google.txt") + { + Title = "Google", + }; + await vault.UploadAttachment(search, uploadTask); + } + else + { + // Download attachment into local file "google.txt" + await using var stream = File.OpenWrite("google.txt"); + await vault.DownloadAttachment(search, attachment.Id, stream); + + // Delete attachment. Remove it from the record + await vault.DeleteAttachment(search, attachment.Id); + } + + // Find shared folder with name "Google". + var sharedFolder = vault.SharedFolders + .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); + if (sharedFolder == null) + { + // Create shared folder. + var folder = await vault.CreateFolder("Google", null, new SharedFolderOptions + { + ManageRecords = true, + ManageUsers = false, + CanEdit = false, + CanShare = false, + }); + vault.TryGetSharedFolder(folder.FolderUid, out sharedFolder); + } + + // Add user to shared folder. + await vault.PutUserToSharedFolder(sharedFolder.Uid, "user@google.com", UserType.User, new SharedFolderUserOptions + { + ManageRecords = false, + ManageUsers = false, + }); + + // Add record to shared folder. + await vault.MoveRecords(new[] { new RecordPath { RecordUid = search.Uid } }, sharedFolder.Uid, true); + } + } + + + + + + + + + + + + > + + + > + + + > + + + > + + + > + + + > + + + + Defines shared folder user and record permissions. + + + + > + + + > + + + > + + + > + + + + Defines properties and methods of decrypted Vault data. + + + + + + Gets encrypted vault storage. + + + + + Gets client key. AES encryption key that encrypts data in the local storage + + + + + Gets vault root folder. My Vault + + + + + Get the list of all folders in the vault. Both user and shared folders. + + + + + Gets the folder associated with the specified folder UID. + + Folder UID + When this method returns true, contains requested folder; otherwise null. + true in the vault contains a folder with specified UID; otherwise, false + + + + Gets the number of all records in the vault. + + + + + Get the list of all records in the vault. + + + + + Gets the Keeper record associated with the specified record UID from a record cache. + + Record UID + When this method returns true, contains requested record; otherwise null + true in the vault contains a record with specified UID; otherwise, false + + + + + Tries to load a Keeper from storage. + The loaded record can be modified and discarded without changing a record cache. + + Record UID + When this method returns true, contains requested record; otherwise null + true in the vault contains a record with specified UID; otherwise, false + + + + + Get the list of all legacy records in the vault. + + + + + Gets the legacy record associated with the specified record UID. + + Record UID. + When this method returns true, contains requested record; otherwise null. + true in the vault contains a record with specified UID; otherwise, false + + + + Gets number of all shared folders in the vault. + + + + + Get the list of all shared folders in the vault. + + + + + Gets shared folder associated with a specified record UID. + + Shared Folder UID + When this method returns true, contains requested shared folder; otherwise null. + true in the vault contains a shared folder with specified UID; otherwise, false. + + + + Gets the number of all teams user is member of. + + + + + Get list of all teams user is member of. + + + + + Gets a team associated with a specified team UID. + + Team UID. + When this method returns true, contains requested team; otherwise null. + true in the vault contains a team with specified UID; otherwise, false. + + + + Loads non shared (or per user) data associated with the record. + + App specific per-user data type + Record UID + Non shared data associated with the record + + + + Gets list of all registered record types. + + + + + Gets record type meta data associated with the record type name. + + Record type name. + When this method returns true, contains requested record type; otherwise null. + true if record type exists; otherwise, false. + + + + Gets number of all Keeper Secret Manager Applications. + + + + + Gets list of all Keeper Secret Manager Applications. + + + + + Gets a KSM application associated with a specified team UID. + + Team UID. + When this method returns true, contains requested team; otherwise null. + true in the vault contains a application with specified UID; otherwise, false. + + + + Represents a record in folder. + + + + + Record UID. + + + + + Folder UID. + + + + + Defines shared folder record permissions. + + + + + Record can be edited. + + + + + Record can be re-shared. + + + + + Defines shared folder user permissions. + + + + + User can manage other users. + + + + + User can manage records. + + + + + Defines methods for interaction between Vault API and user. + + + + + Ask confirmation from user. + + text to be displayed in the dialog. + Task returning bool; true means Yes/Accept; false No/Decline + + + + + + Represents an exception that occurs when current user requests other user's public for the first time. + + + + + + + + Gets user email to send share invite + + + + + Represents a record history + + + + + Keeper record + + + + + User modified the record + + + + + Summary of changes + + + + + Defines methods for modifying the vault records and folders. + + + + + + Gets Vault user interaction interface. + + + + + Gets or Sets automatic sync down flag. + + + + + Records "open_record" audit event for enterprise accounts + + + + + + Records "copy_password" audit event for enterprise accounts + + + + + + Creates a password record. + + Keeper Record. + Folder UID where the record to be created. Optional. + A task returning created password record. + + + + + Modifies a password record. + + Keeper Record. + Do not update file attachment information on the record. + A task returning updated password record. + + + + + Modifies multiple password records. + + Keeper Records. + A task returning record update statuses. + + + + + Deletes records. + + an array of record paths. + Awaitable task. + + + + + Moves records to a folder. + + an array of record paths. + Destination folder UID. + truecreates a link. The source record in not deleted; otherwise record will be removed from the source. + Awaitable task. + + + + + Stores non shared (or per user) data associated with the record. + + App specific per-user data type + Record UID + Non shared data + Awaitable task. + Keeper API error + + + + Creates a folder. + + Folder Name. + Parent Folder UID. + Shared Folder creation options. Optional. + A task returning created folder. + Pass sharedFolderOptions parameter to create a Shared Folder. + + + + + + Renames a folder. + + Folder UID. + New folder name. + A task returning renamed folder. + + + + + Renames a folder. + + Folder UID. + New folder name. + Shared Folder creation options. Optional. + A task returning renamed folder. + + + + + Moves a folder to the another folder. + + Source Folder UID. + Destination Folder UID. + truecreates a link. The source folder in not deleted; otherwise source folder will be removed. + Awaitable task. + + + + + Delete folder. + + Folder UID. + Awaitable task. + + + + + Retrieves all enterprise team descriptions. + + A list of all enterprise teams. (awaitable) + + + + Retrieves all known users for sharing + + + + + + Gets user public keys. + + + + + Awaitable task returning RSA and ECC public keys + + + + Sends share invitation request to the user. + + User email + Awaitable task + + + + + Retrieves record sharing information. + + List of record UIDs + Awaitable task returning record share details + + + + Cancels all shares with a user. + + User account email. + Awaitable task. + + + + + Shares a record with a user + + Record UID. + User account email + Can record be re-shared + Can record be modified + + Awaitable task. + + + + Transfers a record to user + + Record UID. + User account email + Awaitable task. + + + + Removes a record share from a user + + Record UID. + User account email + Awaitable task. + + + + Defines properties of Secrets Manager configuration + + + + + Keeper Hostname + + + + + Client or Device ID + + + + + Device Private Key + + + + + Application Key + + + + + + + + Public Key for record creation + + + + + Define methods for Keeper Secret Maneger (KSM) + + + + + Gets Keeper Secret Manager Application Details + + Application UID. + Force reloading + Secret Manager Application Info + + + + Creates Secret Manager Application + + Application Title + Application Record + + + + Deletes Secret Manager Application + + + Awaitable Task + + + + Grants Shared Folder or Record Access to Secret Manager Application + + Application ID + Shared Folder or Record UID + permission to edit + Secret Manager Application + + + + Revokes Shared Folder or Record access from Secret Manager Application + + Application ID + Shared Folder or Record UID + Secret Manager Application + + + + Adds a client/device to Secret Manager Application + + Application ID + Optional. If false the first call from the client locks IP. If true no IP locking + Optional. First access duration in minutes. Default: an hour (60). Maximum: a day (1440) + Optional. Access Expiration duration in minutes. + Optional. Client/Device name + Tuple: Client Device, Client Key + + + + Creates SecretsManager Configuration Storage + + One time token + Configuration Storage + + + + Deletes a client/device from Secret Manager Application + + Application ID + Device ID or Name + Awaitable Task + + + + Defines methods to manipulate Shared Folders. + + + + + + Adds (if needed) user or team to the shared folder and set user access permissions. + + Shared Folder UID. + User email or Team UID. + Type of userId parameter. + Shared Folder User Permissions. + Awaitable task. + + If optionsc> parameter is null then user gets default user permissions when added./> + + + + + + + + Removes user or team from shared folder. + + Shared Folder UID. + User email or Team UID. + Type of userId parameter. + Awaitable task. + + + + + Changes record permissions in shared folder. + + Shared Folder UID. + Record UID. + Record permissions. + + + This method does not add a record to shared folder. + Use or . + + + + + + Defines properties of thumbnail upload task. + + + + + Thumbnail MIME type. + + + + + Thumbnail size in pixels. + + + + + Thumbnail read stream. + + + + + Defines properties of file upload task. + + + + + Attachment name. + + + + + Attachment title. + + + + + Attachment MIME type. + + + + + Attachment read stream. + + + + + Thumbnail upload task. Optional. + + + + + Defines methods to manipulate file attachments. + + + + + Returns Record attachments + + Keeper record + List od attachments + + + + Downloads and decrypts file attachment. + + Keeper record. + Attachment name, title, or ID. + Writable stream. + Awaitable task. + + + + Encrypts and uploads file attachment. + + Keeper record + Upload task + Awaitable task. + + + + Deletes file attachment. + + Keeper record. + Attachment ID + Awaitable task. + + + + The exception that is thrown by the Vault module. + + + + + + + + + + + + + + Represents generic Keeper Record + + + + + Record UID. + + + + + Record version + + + + + Record revision + + + + + Title. + + + + + Last modification time. + + + + + Is user Owner? + + + + + Is record Shared? + + + + + Record key. + + + + + + + + Defines properties for typed record field + + + + + Gets or sets the first field value + + + + + Gets default field value. + + + + + + Deletes value at index. + + Index + + + + Gets value at index + + Index + + + + + Sets value at index. + + Index + Value + + + + Gets the number of values + + + + + Gets required flag + + + + + Represents a Typed Record + + + + + + Record notes + + + + + Record type name. + + + + + + + + Record mandatory fields. + + + + + Record custom data. + + + + + + + + Defines methods for typed field serialization + + + + + Imports the content of typed field from text + + external field representation + + + + Exports typed field to text + + external field representation + + + + Represents a typed field. + + Field Data Type + + + + + + + + + + Field type name. + + + + + Field Label. + + + + + Field values. + + + + + + + + Default field value. + + + + + + + + Gets field value at index + + value index + + + + + Deletes field value at index + + Value index + + + + Sets field value at index + + Value index + Value + + + + Value Count + + + + + Appends a value. + + Default value + + + + Represents a Legacy Keeper Record. + + + + + Notes. + + + + + Login or Username. + + + + + Password. + + + + + Web URL. + + + + + TOTP URL. + + + + + A list of Custom Fields. + + + + + A list of Attachments. + + + + + Gets a custom field. + + Custom field Name. + Returns custom field or null is it was not found. + + + + Deletes a custom field. + + Custom field Name. + Deleted custom field or null is it was not found. + + + + Adds or Changes custom field. + + Name. + Value. + Added or modified custom field. + + + + Represents a custom field. + + + + + Custom field name. + + + + + Custom field value. + + + + + Custom field type. + + + + + Represents an extra field. + + + + + Extra field ID. + + + + + Extra field type. + + + + + Extra field title. + + + + + Additional extra field values. + + + + + Represents a thumbnail of attachment. + + It usually is used for large image thumbnails. + + + + Thumbnail ID. + + + + + Thumbnail MIME type. + + + + + Thumbnail size. pixels. + + + + + Defines property for file attachment + + + + + Attachment ID. + + + + + Attachment name. + + Usually it is an original file name. + + + + Attachment title. + + + + + Attachment MIME type. + + + + + Attachment size in bytes. + + + + + Last time modified. + + + + + Attachment encryption key. + + + + + Represents attachment file. + + + + + Attachment ID. + + + + + Attachment encryption key. + + + + + Attachment name. + + Usually it is an original file name. + + + + Attachment title. + + + + + Attachment MIME type. + + + + + Attachment size in bytes. + + + + + Last time modified. + + + + + A list of thumbnails. + + + + + Represents a Keeper File Record. + + + + + File Name. + + + + + File MIME type. + + + + + File size in bytes. + + + + + File size in bytes. + + + + + Last time modified. + + + + + On storage file size in bytes. + + + + + On storage thumbnail size in bytes. + + + + + Represents a Keeper Secret Manager Application Record. + + + + + Application Type. + + + + + + + + + + + + + + + + + Represents record permissions for user. + + + + + Keeper username. + + + + + Flag indicating if the user has share permissions. + + + + + Flag indicating if the user has rights to edit the record + + + + + Flag indicating if the user is record owner. + + + + + Flag indicating if the user has pending invitation. + + + + + Represents record permissions in shared folder. + + + + + Shared Folder UID. + + + + + Flag indicating if the shared folder has share permissions. + + + + + Flag indicating if the shared folder has rights to edit the record + + + + + Represent record sharing information + + + + + Record UID + + + + + List of direct record share permissions + + + + + List of shared folder permissions + + + + + Represent user list available for sharing + + + + + Array of users shared from + + + + + Array of users shared to + + + + + Array of users in the enterprise + + + + + Specifies shared folder user type. + + + + + Regular user. + + + + + Enterprise Team. + + + + + Represents shared folder user permissions. + + + + + User email or team UID. + + + + + The type of property. + + + + + Can Manage Records? + + + + + Can Manage Users? + + + + + Represents shared folder record permissions. + + + + + Record UID. + + + + + Can be re-shared? + + + + + Can be edited? + + + + + Represents Shared Folder. + + + + + Shared folder UID. + + + + + Shared folder name. + + + + + Default manage records permission. + + + + + Default manage users permission. + + + + + Default record can be re-shared permission. + + + + + Default record can be edited permission. + + + + + A list of user permissions. + + + + + A list of record permissions. + + + + + Shared Folder key. + + + + + Represents basic team properties. + + + + + Team UID. + + + + + Team Name. + + + + + Represents team properties that user is member of. + + + + + Team restricts record edit. + + + + + Team restricts record re-share. + + + + + Team restricts record view. + + + + + Team key. + + + + + Team RSA private key. + + + + + Specifies folder types. + + + + + User folder. + + + + + Shared folder. + + + + + Subfolder of shared folder. + + inherits user and record permissions from the parent shared folder. + + + + Represents folder. + + + + + Folder UID. + + + + + Parent folder UID. + + + + + Shared Folder UID. + + Populated for SharedFolderFolder + + + + Folder type. + + + + + Folder name. + + + + + A UID list of subfolders + + + + + A UID list of records. + + + + + Folder key + + + + + Defines record access path properties. + + + Access to the record can be granted through: + + Record is owned by user. + Record is directly shared with user. + Record is added to shared folder and user is a member of that shared folder. + Record is added to shared folder and user is a member of team that is added that shared folder. + + + + + + Record UID. + + + + + Shared Folder UID. + + + + + Team UID. + + + + + Defines shared folder access path properties. + + + Access to the shared folder can be granted through: + + User is member of shared folder. + User is member of team that is member of shared folder. + + + + + + Shared Folder UID. + + + + + Team UID. + + + + Holder for reflection information generated from AccountSummary.proto + + + File descriptor for AccountSummary.proto + + + Field number for the "summaryVersion" field. + + + Field number for the "includeRecentActivity" field. + + + Field number for the "clientKey" field. + + + Field number for the "settings" field. + + + Field number for the "keysInfo" field. + + + Field number for the "syncLogs" field. + + + Field number for the "isEnterpriseAdmin" field. + + + Field number for the "license" field. + + + Field number for the "group" field. + + + Field number for the "Enforcements" field. + + + Field number for the "Images" field. + + + Field number for the "personalLicense" field. + + + Field number for the "fixSharedFolderRecords" field. + + + Field number for the "usernames" field. + + + Field number for the "devices" field. + + + Field number for the "isShareAdmin" field. + + + Field number for the "accountRecovery" field. + + + Field number for the "accountRecoveryPrompt" field. + + + Field number for the "minMasterPasswordLengthNoPrompt" field. + + + Field number for the "forbidKeyType2" field. + + + + If true, we will not accept RSA-encryped data from clients, although we + may continue to send previously-RSA-encrypted data to them. If false, + clients must continue to send RSA-encrypted keys in all the places where + we used to assume RSA. + + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "deviceName" field. + + + Field number for the "deviceStatus" field. + + + Field number for the "devicePublicKey" field. + + + Field number for the "encryptedDataKeyDoNotUse" field. + + + Field number for the "clientVersion" field. + + + Field number for the "username" field. + + + Field number for the "ipAddress" field. + + + Field number for the "approveRequestTime" field. + + + Field number for the "encryptedDataKeyPresent" field. + + + Field number for the "groupId" field. + + + Field number for the "encryptionParams" field. + + + Field number for the "encryptedDataKey" field. + + + Field number for the "dataKeyBackupDate" field. + + + Field number for the "userAuthUid" field. + + + Field number for the "encryptedPrivateKey" field. + + + Field number for the "encryptedEccPrivateKey" field. + + + Field number for the "eccPublicKey" field. + + + Field number for the "countryName" field. + + + Field number for the "secondsAgo" field. + + + Field number for the "deviceName" field. + + + Field number for the "countryCode" field. + + + Field number for the "deviceUID" field. + + + Field number for the "ipAddress" field. + + + Field number for the "subscriptionCode" field. + + + Field number for the "productTypeId" field. + + + Field number for the "productTypeName" field. + + + Field number for the "expirationDate" field. + + + Field number for the "secondsUntilExpiration" field. + + + Field number for the "maxDevices" field. + + + Field number for the "filePlanType" field. + + + Field number for the "bytesUsed" field. + + + Field number for the "bytesTotal" field. + + + Field number for the "secondsUntilStorageExpiration" field. + + + Field number for the "storageExpirationDate" field. + + + Field number for the "hasAutoRenewableAppstoreSubscription" field. + + + Field number for the "accountType" field. + + + Field number for the "uploadsRemaining" field. + + + Field number for the "enterpriseId" field. + + + Field number for the "chatEnabled" field. + + + Field number for the "auditAndReportingEnabled" field. + + + Field number for the "breachWatchFeatureDisable" field. + + + Field number for the "accountUid" field. + + + Field number for the "allowPersonalLicense" field. + + + Field number for the "licensedBy" field. + + + Field number for the "email" field. + + + Field number for the "breachWatchEnabled" field. + + + Field number for the "breachWatchScanned" field. + + + Field number for the "breachWatchExpiration" field. + + + Field number for the "breachWatchDateCreated" field. + + + Field number for the "error" field. + + + Field number for the "pendingEnterprise" field. + + + + repeated AddOn addOns = 28; + + + + Field number for the "licenseKeyId" field. + + + Field number for the "name" field. + + + Field number for the "expirationDate" field. + + + Field number for the "createdDate" field. + + + Field number for the "isTrial" field. + + + Field number for the "enabled" field. + + + Field number for the "scanned" field. + + + Field number for the "featureDisable" field. + + + Field number for the "audit" field. + + + Field number for the "mustPerformAccountShareBy" field. + + + Field number for the "shareAccountTo" field. + + + Field number for the "rules" field. + + + Field number for the "passwordRulesIntro" field. + + + Field number for the "autoBackupDays" field. + + + Field number for the "theme" field. + + + Field number for the "channel" field. + + + Field number for the "channelValue" field. + + + Field number for the "rsaConfigured" field. + + + Field number for the "emailVerified" field. + + + Field number for the "masterPasswordLastModified" field. + + + Field number for the "accountFolderKey" field. + + + Field number for the "securityKeys" field. + + + Field number for the "keyValues" field. + + + + //// ????? + + + + Field number for the "ssoUser" field. + + + Field number for the "onlineAccessOnly" field. + + + + could be in "keyValues" + + + + Field number for the "masterPasswordExpiry" field. + + + Field number for the "twoFactorRequired" field. + + + Field number for the "disallowExport" field. + + + Field number for the "restrictFiles" field. + + + Field number for the "restrictAllSharing" field. + + + Field number for the "restrictSharing" field. + + + Field number for the "restrictSharingIncomingAll" field. + + + + json response field is "restrict_sharing_incoming_all" + + + + Field number for the "restrictSharingIncomingEnterprise" field. + + + + json response field is "restrict_sharing_incoming_enterprise" + + + + Field number for the "logoutTimer" field. + + + Field number for the "persistentLogin" field. + + + Field number for the "ipDisableAutoApprove" field. + + + Field number for the "shareDataKeyWithEccPublicKey" field. + + + Field number for the "shareDataKeyWithDevicePublicKey" field. + + + Field number for the "RecordTypesCounter" field. + + + Field number for the "RecordTypesEnterpriseCounter" field. + + + Field number for the "recordTypesEnabled" field. + + + Field number for the "canManageRecordTypes" field. + + + Field number for the "recordTypesPAMCounter" field. + + + Field number for the "logoutTimerMinutes" field. + + + Field number for the "securityKeysNoUserVerify" field. + + + Field number for the "channels" field. + + + Field number for the "key" field. + + + Field number for the "value" field. + + + Field number for the "key" field. + + + Field number for the "value" field. + + + Field number for the "key" field. + + + Field number for the "value" field. + + + Field number for the "resultCode" field. + + + Field number for the "message" field. + + + Field number for the "result" field. + + + Field number for the "strings" field. + + + Field number for the "booleans" field. + + + Field number for the "longs" field. + + + Field number for the "jsons" field. + + + Field number for the "role_id" field. + + + Field number for the "publicKey" field. + + + Field number for the "ruleType" field. + + + Field number for the "pattern" field. + + + Field number for the "match" field. + + + Field number for the "minimum" field. + + + Field number for the "description" field. + + + Field number for the "value" field. + + + Field number for the "deviceId" field. + + + Field number for the "deviceName" field. + + + Field number for the "dateAdded" field. + + + Field number for the "isValid" field. + + + Field number for the "deviceRegistration" field. + + + Field number for the "keyHandle" field. + + + Field number for the "publicKey" field. + + + Field number for the "attestationCert" field. + + + Field number for the "counter" field. + + + Field number for the "compromised" field. + + + Field number for the "admin" field. + + + Field number for the "groupVerificationCode" field. + + + Field number for the "administrator" field. + + + + repeated KeyValue groupSettings = 3; ///// ? + + + + Field number for the "firstName" field. + + + Field number for the "lastName" field. + + + Field number for the "email" field. + + + Field number for the "currentNumberOfUsers" field. + + + Field number for the "numberOfUsers" field. + + + Field number for the "subscriptionCode" field. + + + + int32 numberOfDevices = 6; + + + + Field number for the "expirationDate" field. + + + Field number for the "purchaseDate" field. + + + + string total = 10; + + + + Holder for reflection information generated from APIRequest.proto + + + File descriptor for APIRequest.proto + + + + trial for bw + + + + + can do everything + + + + + can only change password + + + + + must first agree to share their account + + + + + can only get sku's for purchase + + + + + This is for a session token where the account is expired, but can still log in + + + + + can only accept the enterprise invite + + + + + from BI (Token object is created manually in Chat Server after decrypting BI's json token) + + + + + user has tried to log into the console but no enterprise exists + + + + + for webapp + + + + + can only accept the family invite + + + + + user has purchased enterprise license but no enterprise created yet + + + + + protobuf enum has to start with 0. + + + + + loginMethod is one of ( existing_account, sso_domain, after_sso ) + + + + + something is wrong, should never be in this state + + + + + the client has been logged out + + + + + device needs to be approved to use for this user + + + + + the device is locked for all accounts + + + + + the account is locked + + + + + the account on this device is locked + + + + + client version is disallowed + + + + + enterprise account cannot log in + + + + + account is in a different region, device should know that already + + + + + 2fa needs satisfying + + + + + the device is 2fa's and now we need the auth hash + + + + + no username is supplied and we need one to continue + + + + + returned from saml/sso/finish_login + + + + + for a cloud sso user that doesn't yet exist + + + + + device needs approval with a dedk + + + + + a login token is not valid forever, if you get this, start over + + + + + v3 and forward + + + + + Google authenticator etc. + + + + + See get_change_key_types and change_key_types. Replaces ObjectType. + + + + + Keys in record_ref and record_owner_key_history. uid is record UID. + + + + + Keys in shared_folder_user. uid is shared folder UID. + + + + + Keys in shared_folder_team. uid is shared folder UID; secondaryUid is + team UID. + + + + + Keys in team_user. uid is team UID. + + + + + Keys in user_folder. uid is the folder UID. + + + + + Data in security_data. uid is the record UID. + + + + + Ignored/broken. + + + + + Keys in record_ref and record_owner_key_history for v2 records. uid is + record UID. + + + + + * + The names and IDs in this class correspond to the Kinfo database entries and to the Region class in Keeperpap. + + + + + Our region numbers start at 1 + + + + + Europe + + + + + North America + + + + + US Government + + + + + Australia + + + + + Japan + + + + + Canada + + + + Field number for the "encryptedTransmissionKey" field. + + + Field number for the "publicKeyId" field. + + + Field number for the "locale" field. + + + Field number for the "encryptedPayload" field. + + + Field number for the "encryptionType" field. + + + Field number for the "recaptcha" field. + + + Field number for the "subEnvironment" field. + + + + possible values are 'beta', 'v2', etc. + + + + Field number for the "payload" field. + + + Field number for the "encryptedSessionToken" field. + + + Field number for the "timeToken" field. + + + Field number for the "apiVersion" field. + + + Field number for the "key" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "clientVersion" field. + + + Field number for the "deviceName" field. + + + Field number for the "clientVersion" field. + + + Field number for the "username" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "minimumIterations" field. + + + Field number for the "passwordMatchRegex" field. + + + Field number for the "passwordMatchDescription" field. + + + Field number for the "isEnterpriseDomain" field. + + + Field number for the "enterpriseEccPublicKey" field. + + + Field number for the "forbidKeyType2" field. + + + Field number for the "authRequest" field. + + + Field number for the "loginType" field. + + + Field number for the "twoFactorToken" field. + + + + optional - if supplied, it will be validated if it needs refreshing + + + + Field number for the "authRequest" field. + + + Field number for the "loginType" field. + + + Field number for the "authenticationHashPrime" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "authResponse" field. + + + Field number for the "mcEnterpriseId" field. + + + + input.getInt("enterprise_id") + + + + Field number for the "push_token" field. + + + + needed to receive DNA notifications per login Command wiki page + + + + Field number for the "platform" field. + + + + needed to receive DNA notifications per login Command wiki page + + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "status" field. + + + Field number for the "iterations" field. + + + Field number for the "salt" field. + + + Field number for the "algorithm" field. + + + Field number for the "uid" field. + + + Field number for the "name" field. + + + Field number for the "type" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "username" field. + + + Field number for the "clientVersion" field. + + + Field number for the "messageSessionUid" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "loginType" field. + + + Field number for the "mcEnterpriseId" field. + + + Field number for the "loginMethod" field. + + + Field number for the "forceNewLogin" field. + + + Field number for the "cloneCode" field. + + + Field number for the "v2TwoFactorToken" field. + + + Field number for the "accountUid" field. + + + + for think clients, if supplied and accountUid != user's accountUid return error reset_cache_invalid_account_uid + + + + Field number for the "loginState" field. + + + Field number for the "accountUid" field. + + + Field number for the "primaryUsername" field. + + + Field number for the "encryptedDataKey" field. + + + Field number for the "encryptedDataKeyType" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "encryptedSessionToken" field. + + + Field number for the "sessionTokenType" field. + + + Field number for the "message" field. + + + Field number for the "url" field. + + + Field number for the "channels" field. + + + Field number for the "salt" field. + + + Field number for the "cloneCode" field. + + + Field number for the "stateSpecificValue" field. + + + Field number for the "ssoClientVersion" field. + + + Field number for the "sessionTokenTypeModifier" field. + + + Field number for the "companyName" field. + + + Field number for the "samlRequest" field. + + + Field number for the "samlRequestType" field. + + + Field number for the "ssoDomainName" field. + + + Field number for the "loginUrl" field. + + + Field number for the "logoutUrl" field. + + + Field number for the "deviceStatus" field. + + + Field number for the "salt" field. + + + Field number for the "OBSOLETE_FIELD" field. + + + + DO NOT RE-USE. placeholder for backwards compatability + + + + Field number for the "ssoUserInfo" field. + + + Field number for the "username" field. + + + Field number for the "encryptedSessionToken" field. + + + Field number for the "encryptedSharedAccountKey" field. + + + Field number for the "passwordMethod" field. + + + Field number for the "authResponse" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "channelType" field. + + + Field number for the "channel_uid" field. + + + Field number for the "channelName" field. + + + Field number for the "challenge" field. + + + + for security keys + + + + Field number for the "capabilities" field. + + + + for DUO + + + + Field number for the "phoneNumber" field. + + + + for SMS and DUO + + + + Field number for the "maxExpiration" field. + + + + maximum allowed expiration + + + + Field number for the "createdOn" field. + + + Field number for the "lastFrequency" field. + + + + for login and 2fa list response + + + + Field number for the "capabilities" field. + + + Field number for the "phoneNumber" field. + + + Field number for the "enroll_url" field. + + + Field number for the "message" field. + + + Field number for the "channelType" field. + + + Field number for the "channel_uid" field. + + + Field number for the "channelName" field. + + + Field number for the "phoneNumber" field. + + + Field number for the "duoPushType" field. + + + Field number for the "channel_uid" field. + + + Field number for the "channelName" field. + + + Field number for the "challenge" field. + + + + for totp and security keys + + + + Field number for the "backupKeys" field. + + + + for backup keys + + + + Field number for the "channel_uid" field. + + + Field number for the "channels" field. + + + Field number for the "expireOn" field. + + + Field number for the "expireIn" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "valueType" field. + + + Field number for the "value" field. + + + Field number for the "channel_uid" field. + + + Field number for the "expireIn" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "pushType" field. + + + Field number for the "channel_uid" field. + + + Field number for the "expireIn" field. + + + + for TWO_FA_PUSH_KEEPER and TWO_FA_PUSH_DUO_PUSH + + + + Field number for the "created" field. + + + Field number for the "expiration" field. + + + Field number for the "licenseStatus" field. + + + Field number for the "paid" field. + + + Field number for the "message" field. + + + Field number for the "recordUid" field. + + + + used in get request, set request, set response + + + + Field number for the "recordKey" field. + + + + used in set request + + + + Field number for the "status" field. + + + + used in set response + + + + Field number for the "ownerlessRecord" field. + + + Field number for the "uid" field. + + + Field number for the "salt" field. + + + Field number for the "iterations" field. + + + Field number for the "encryptedClientKey" field. + + + Field number for the "authHash" field. + + + Field number for the "encryptedDataKey" field. + + + Field number for the "loginType" field. + + + Field number for the "name" field. + + + Field number for the "algorithm" field. + + + Field number for the "uid" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "clientVersion" field. + + + Field number for the "deviceName" field. + + + Field number for the "devicePublicKey" field. + + + Field number for the "deviceStatus" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "clientVersion" field. + + + Field number for the "deviceName" field. + + + Field number for the "devicePublicKey" field. + + + Field number for the "authRequest" field. + + + Field number for the "userAuthRequest" field. + + + Field number for the "encryptedClientKey" field. + + + + encrypted with the data key + + + + Field number for the "encryptedPrivateKey" field. + + + + encrypted with the data key + + + + Field number for the "publicKey" field. + + + Field number for the "verificationCode" field. + + + Field number for the "deprecatedAuthHashHash" field. + + + + these will be ignored once the v2 clients are obsolete + + + + Field number for the "deprecatedEncryptedClientKey" field. + + + Field number for the "deprecatedEncryptedPrivateKey" field. + + + Field number for the "deprecatedEncryptionParams" field. + + + Field number for the "authRequest" field. + + + Field number for the "userAuthRequest" field. + + + Field number for the "encryptedClientKey" field. + + + + gcm encrypted with the data key + + + + Field number for the "encryptedPrivateKey" field. + + + + gcm encrypted with the data key + + + + Field number for the "publicKey" field. + + + + TODO add alternate passwords + + + + Field number for the "revision" field. + + + Field number for the "newEmail" field. + + + Field number for the "encryptedChangeEmailToken" field. + + + Field number for the "emailVerified" field. + + + + used in SecurityDataRequest + + + + Field number for the "uid" field. + + + Field number for the "data" field. + + + + to update a records security data + + + + Field number for the "recordSecurityData" field. + + + Field number for the "masterPasswordSecurityData" field. + + + Field number for the "encryptionType" field. + + + + if mp or not, by user, include reused passwords + + + + Field number for the "enterpriseUserId" field. + + + Field number for the "currentSecurityData" field. + + + Field number for the "currentSecurityDataRevision" field. + + + Field number for the "oldSecurityData" field. + + + Field number for the "oldSecurityDataRevision" field. + + + Field number for the "currentDataEncryptionType" field. + + + Field number for the "oldDataEncryptionType" field. + + + + used for both get and save + + + + Field number for the "enterpriseUserId" field. + + + Field number for the "encryptedReportData" field. + + + Field number for the "revision" field. + + + + for save this was returned in get, for get this is the saved revision + + + + Field number for the "twoFactor" field. + + + + for get not save + + + + Field number for the "lastLogin" field. + + + + for get not save + + + + Field number for the "numberOfReusedPassword" field. + + + Field number for the "securityReportIncrementalData" field. + + + Field number for the "userId" field. + + + Field number for the "hasOldEncryption" field. + + + + specifically, RSA encrypted keys + + + + Field number for the "securityReport" field. + + + Field number for the "fromPage" field. + + + Field number for the "enterprisePrivateKey" field. + + + Field number for the "securityReport" field. + + + Field number for the "asOfRevision" field. + + + + the revision the data was retrieved for + + + + Field number for the "fromPage" field. + + + Field number for the "toPage" field. + + + Field number for the "complete" field. + + + Field number for the "enterpriseEccPrivateKey" field. + + + Field number for the "count" field. + + + Field number for the "reportType" field. + + + Field number for the "reportData" field. + + + Field number for the "objectType" field. + + + Field number for the "primaryUid" field. + + + Field number for the "secondaryUid" field. + + + Field number for the "key" field. + + + Field number for the "changeToKeyTypeOne" field. + + + Field number for the "uid" field. + + + Field number for the "type" field. + + + Field number for the "status" field. + + + Field number for the "reason" field. + + + Field number for the "changeToKeyTypeOneStatus" field. + + + + See get_change_key_types + + + + Field number for the "onlyTheseObjects" field. + + + Field number for the "limit" field. + + + Field number for the "includeRecommended" field. + + + Field number for the "includeKeys" field. + + + Field number for the "includeAllowedKeyTypes" field. + + + + See get_change_key_types + + + + Field number for the "keys" field. + + + Field number for the "allowedKeyTypes" field. + + + Field number for the "objectType" field. + + + Field number for the "allowedKeyTypes" field. + + + + This is the request and response for change_key_types; replaces + ChangeToKeyTypeOneRequest and ChangeToKeyTypeOneResponse. + + + + Field number for the "keys" field. + + + + See get_change_key_types and change_key_types. Replaces ChangeToKeyTypeOne + and ChangeToKeyTypeOneStatus. + + + + Field number for the "objectType" field. + + + Field number for the "uid" field. + + + + see EncryptedObjectType comments for what this is + + + + Field number for the "secondaryUid" field. + + + Field number for the "key" field. + + + Field number for the "keyType" field. + + + Field number for the "status" field. + + + + ignored in requests + + + + + for setting keys where the id is a long value + + + + Field number for the "id" field. + + + + role_id + + + + Field number for the "key" field. + + + + role key GCM encrypted with the tree key + + + + Field number for the "keys" field. + + + + same input as the register command + + + + Field number for the "username" field. + + + + must be valid email + + + + Field number for the "authVerifier" field. + + + + new Field("auth_verifier", new AuthVerifierFieldValidator(), true); size=(70, 70)? + + + + Field number for the "encryptionParams" field. + + + + new Field("encryption_params", new EncryptionParamsFieldValidator(), true); size=(134, 134)? + + + + Field number for the "rsaPublicKey" field. + + + + new Field("public_key", new PublicKeyFieldValidator(), true); size=(10, 2000)? + + + + Field number for the "rsaEncryptedPrivateKey" field. + + + + new Field("encrypted_private_key", new DataKeyEncPrivateKeyFieldValidator(), true); size=(10, 2000)? + + + + Field number for the "eccPublicKey" field. + + + + 65 bytes, on curve + + + + Field number for the "eccEncryptedPrivateKey" field. + + + + 60 bytes + + + + Field number for the "encryptedDeviceToken" field. + + + + 65 bytes + + + + Field number for the "encryptedClientKey" field. + + + + switch to gcm? old clients can't be used 60 bytes, otherwise 64 bytes; new Field("client_key", new DataKeyEncDataKeyFieldValidator(), false); + + + + Field number for the "clientVersion" field. + + + Field number for the "encryptedDeviceDataKey" field. + + + + have to check + + + + Field number for the "encryptedLoginToken" field. + + + + this is from cloud sso + + + + Field number for the "messageSessionUid" field. + + + Field number for the "installReferrer" field. + + + + new Field("install_referrer", new StringFieldValidator(0, 1024), false); size=(0, 1024)? + + + + Field number for the "mccMNC" field. + + + + input.optString("mcc_mnc") in verifyDevice(); carrier_sim_codes.mcc_mnc int(6) + + + + Field number for the "mfg" field. + + + + input.optString("mfg") in verifyDevice(); appstore_device_history.mfg char(64) + + + + Field number for the "model" field. + + + + input.optString("model") in verifyDevice(); appstore_device_history.model char(64) + + + + Field number for the "brand" field. + + + + input.optString("brand") in verifyDevice(); appstore_device_history.brand char(64) + + + + Field number for the "product" field. + + + + input.optString("product") in verifyDevice(); appstore_device_history.product char(64) + + + + Field number for the "device" field. + + + + input.optString("device"); used in PromotionMatcher; appstore_device_history.device char(64)? + + + + Field number for the "carrier" field. + + + + input.optString("carrier"); used in PromotionMatcher; appstore_device_history.carrier char(64)? + + + + Field number for the "verificationCode" field. + + + Field number for the "enterpriseRegistration" field. + + + + optinal for creating an account when creating an enterprise + + + + Field number for the "encryptedVerificationToken" field. + + + Field number for the "enterpriseUsersDataKey" field. + + + + user's data key encrypted with enterprise ecc public key + + + + Field number for the "nodeId" field. + + + Field number for the "enforcement" field. + + + Field number for the "value" field. + + + Field number for the "nodeId" field. + + + Field number for the "enforcement" field. + + + Field number for the "keyId" field. + + + Field number for the "payload" field. + + + Field number for the "username" field. + + + Field number for the "locale" field. + + + Field number for the "supportedLanguage" field. + + + Field number for the "type" field. + + + Field number for the "sourceRegion" field. + + + Field number for the "payload" field. + + + Field number for the "supportedLanguage" field. + + + Field number for the "destinationRegion" field. + + + Field number for the "key" field. + + + Field number for the "userId" field. + + + Field number for the "key" field. + + + Field number for the "value" field. + + + Field number for the "pbkdf2Password" field. + + + Field number for the "action" field. + + + Field number for the "status" field. + + + Field number for the "clientVersion" field. + + + Field number for the "deviceName" field. + + + Field number for the "devicePublicKey" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "username" field. + + + Field number for the "verificationChannel" field. + + + + email for now, could be "sms" if we allow username as cell number in the future. + + + + Field number for the "messageSessionUid" field. + + + Field number for the "clientVersion" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "username" field. + + + Field number for the "messageSessionUid" field. + + + Field number for the "clientVersion" field. + + + Field number for the "deviceStatus" field. + + + Field number for the "email" field. + + + Field number for the "twoFactorChannel" field. + + + + TwoFactorChannel, only "sms", "duo", "on_device" or "on_approved_device"; default to email verification + + + + Field number for the "clientVersion" field. + + + Field number for the "locale" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "totpCode" field. + + + Field number for the "deviceIp" field. + + + + This is the ip address of the original device that needs to be approved, which will be included in the TwoFactorToken. + + + + Field number for the "deviceTokenExpireDays" field. + + + + equivalent to the device_token_expire_days that is used in the Login command + + + + Field number for the "encryptedTwoFactorToken" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "encryptedDeviceDataKey" field. + + + + required for cloud sso and link + + + + Field number for the "denyApproval" field. + + + Field number for the "linkDevice" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "alias" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "alias" field. + + + Field number for the "primary" field. + + + Field number for the "enterpriseUserAddAliasRequest" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "status" field. + + + Field number for the "status" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "encryptedDeviceDataKey" field. + + + Field number for the "username" field. + + + Field number for the "clientVersion" field. + + + Field number for the "verificationCode" field. + + + Field number for the "username" field. + + + Field number for the "clientVersion" field. + + + Field number for the "verificationCode" field. + + + Field number for the "messageSessionUid" field. + + + Field number for the "encryptedDeviceToken" field. + + + Field number for the "messageSessionUid" field. + + + Field number for the "command" field. + + + Field number for the "username" field. + + + Field number for the "username" field. + + + Field number for the "accountUid" field. + + + Field number for the "regionName" field. + + + Field number for the "username" field. + + + Field number for the "dateActive" field. + + + + * + This is the input to the get_sso_service_provider command. + + + + Field number for the "name" field. + + + + the name entered by the user + + + + Field number for the "clientVersion" field. + + + Field number for the "locale" field. + + + + such as "en_US" + + + + + * + This is the response from the get_sso_service_provider command. + + + + Field number for the "name" field. + + + + the official name + + + + Field number for the "spUrl" field. + + + Field number for the "isCloud" field. + + + Field number for the "clientVersion" field. + + + Field number for the "setting" field. + + + Field number for the "value" field. + + + Field number for the "type" field. + + + Field number for the "key" field. + + + Field number for the "value" field. + + + Field number for the "state" field. + + + Field number for the "key" field. + + + Field number for the "keyDescription" field. + + + Field number for the "value" field. + + + Field number for the "valueDescription" field. + + + Field number for the "identifier" field. + + + Field number for the "locked" field. + + + Field number for the "includedInAllClear" field. + + + Field number for the "expireSeconds" field. + + + Field number for the "deviceId" field. + + + Field number for the "deviceName" field. + + + Field number for the "clientVersion" field. + + + Field number for the "lastLogin" field. + + + + for get not save + + + + Field number for the "deviceStatus" field. + + + Field number for the "name" field. + + + Field number for the "value" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "encryptedDataKey" field. + + + Field number for the "keyType" field. + + + Field number for the "roleId" field. + + + Field number for the "roleKey" field. + + + Field number for the "privateKey" field. + + + Field number for the "enterpriseUserIdDataKeyPairs" field. + + + Field number for the "userDataKeys" field. + + + Field number for the "accessDenied" field. + + + Field number for the "noEncryptedDataKey" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "verificationCode" field. + + + Field number for the "securityQuestion" field. + + + Field number for the "backupKeyDate" field. + + + Field number for the "salt" field. + + + Field number for the "iterations" field. + + + Field number for the "encryptedLoginToken" field. + + + Field number for the "verificationCode" field. + + + Field number for the "securityAnswerHash" field. + + + Field number for the "ruleType" field. + + + Field number for the "match" field. + + + Field number for the "pattern" field. + + + Field number for the "description" field. + + + Field number for the "minimum" field. + + + Field number for the "value" field. + + + Field number for the "dataKeyBackup" field. + + + Field number for the "dataKeyBackupDate" field. + + + Field number for the "publicKey" field. + + + Field number for the "encryptedPrivateKey" field. + + + Field number for the "clientKey" field. + + + Field number for the "encryptedSessionToken" field. + + + Field number for the "passwordRules" field. + + + Field number for the "passwordRulesIntro" field. + + + Field number for the "minimumPbkdf2Iterations" field. + + + + when EnforcementType.MINIMUM_PBKDF2_ITERATIONS exists + + + + Field number for the "keyType" field. + + + + describes publicKey/encryptedPrivateKey pair + + + + Field number for the "usernames" field. + + + Field number for the "username" field. + + + Field number for the "publicKey" field. + + + Field number for the "publicEccKey" field. + + + Field number for the "message" field. + + + Field number for the "errorCode" field. + + + Field number for the "keyResponses" field. + + + Field number for the "publicKey" field. + + + Field number for the "encryptedPrivateKey" field. + + + + used for teams & roles + + + + Field number for the "teamKeys" field. + + + + repeated RoleEccKeyPair roleKeys = 2; + + + + Field number for the "teamKeys" field. + + + + repeated RoleEccKeyPairResponse roleKeys = 2; + + + + Field number for the "teamUid" field. + + + Field number for the "publicKey" field. + + + Field number for the "encryptedPrivateKey" field. + + + Field number for the "teamUid" field. + + + Field number for the "status" field. + + + Field number for the "clientIds" field. + + + Field number for the "controllerUids" field. + + + Field number for the "clientId" field. + + + Field number for the "publicKey" field. + + + Field number for the "controllerUid" field. + + + Field number for the "keyResponses" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "shares" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "shares" field. + + + Field number for the "secretUid" field. + + + Field number for the "shareType" field. + + + Field number for the "encryptedSecretKey" field. + + + Field number for the "editable" field. + + + Field number for the "secretUid" field. + + + Field number for the "shareType" field. + + + Field number for the "editable" field. + + + Field number for the "createdOn" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "encryptedAppKey" field. + + + Field number for the "clientId" field. + + + Field number for the "lockIp" field. + + + Field number for the "firstAccessExpireOn" field. + + + Field number for the "accessExpireOn" field. + + + Field number for the "id" field. + + + + optional, defaults to obfuscated device id + + + + Field number for the "appClientType" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "clients" field. + + + Field number for the "recordUid" field. + + + Field number for the "encryptedRecordKey" field. + + + Field number for the "clientId" field. + + + Field number for the "accessExpireOn" field. + + + Field number for the "id" field. + + + + optional, defaults to obfuscated device id + + + + Field number for the "isSelfDestruct" field. + + + Field number for the "id" field. + + + Field number for the "clientId" field. + + + Field number for the "createdOn" field. + + + Field number for the "firstAccess" field. + + + Field number for the "lastAccess" field. + + + Field number for the "publicKey" field. + + + Field number for the "lockIp" field. + + + Field number for the "ipAddress" field. + + + Field number for the "firstAccessExpireOn" field. + + + Field number for the "accessExpireOn" field. + + + Field number for the "appClientType" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "shares" field. + + + Field number for the "clients" field. + + + Field number for the "isExternalShare" field. + + + Field number for the "appInfo" field. + + + Field number for the "appRecordUid" field. + + + Field number for the "lastAccess" field. + + + + last access time across all clients + + + + Field number for the "recordShares" field. + + + + number of records shared to the application + + + + Field number for the "folderShares" field. + + + + number of folders shared to the application + + + + Field number for the "folderRecords" field. + + + + number of records in the folders shared to the application + + + + Field number for the "clientCount" field. + + + + total number of clients + + + + Field number for the "expiredClientCount" field. + + + + number of clients that no longert can have access + + + + Field number for the "applicationSummary" field. + + + Field number for the "username" field. + + + Field number for the "encryptedVerificationToken" field. + + + Field number for the "email" field. + + + Field number for the "fileNames" field. + + + Field number for the "result" field. + + + Field number for the "message" field. + + + Field number for the "downloads" field. + + + Field number for the "fileName" field. + + + Field number for the "url" field. + + + Field number for the "successStatusCode" field. + + + Field number for the "reason" field. + + + + reason to delete + + + + Field number for the "authVerifier" field. + + + Field number for the "encryptionParams" field. + + + Field number for the "fromServiceProvider" field. + + + Field number for the "iterationsChange" field. + + + Field number for the "encryptedSessionToken" field. + + + Field number for the "recoveryEncryptedDataKey" field. + + + Field number for the "recoveryAuthHash" field. + + + Field number for the "backupKeyType" field. + + + Field number for the "backupKeyDate" field. + + + Field number for the "securityQuestion" field. + + + Field number for the "salt" field. + + + Field number for the "iterations" field. + + + Field number for the "owner" field. + + + Field number for the "sessionToken" field. + + + Field number for the "dataKey" field. + + + Field number for the "rsaPrivateKey" field. + + + + may be empty + + + + Field number for the "eccPrivateKey" field. + + + + may be empty + + + + Field number for the "teamUid" field. + + + Field number for the "username" field. + + + + this is if the client has a username not an enterpriseUserId + + + + Field number for the "enterpriseUserId" field. + + + + note: this is because new sync down is sending enterpriseUserIds not usernames for queued team members + + + + Field number for the "encryptedTeamKeyRSA" field. + + + + team key shared to the user via user's RSA public key + + + + Field number for the "encryptedTeamKeyEC" field. + + + + team key shared to the user via user's EC public key + + + + Field number for the "status" field. + + + + used in the response to state success or failure, blank means success + + + + Field number for the "request" field. + + + + this is just a repeated list of whatever request message the api called for as a bytestring + + + + Holder for reflection information generated from BI.proto + + + File descriptor for BI.proto + + + Field number for the "encryptedSessionToken" field. + + + Field number for the "returnMcEnterpiseIds" field. + + + Field number for the "ip" field. + + + Field number for the "username" field. + + + Field number for the "userId" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "status" field. + + + Field number for the "statusMessage" field. + + + Field number for the "mcEnterpriseIds" field. + + + Field number for the "hasMSPPermission" field. + + + Field number for the "deletedMcEnterpriseIds" field. + + + Container for nested types declared in the ValidateSessionTokenResponse message type. + + + + -- POST: /bi_api/v2/console/subscription/status gzgb + + + + Field number for the "autoRenewal" field. + + + Field number for the "currentPaymentMethod" field. + + + Field number for the "checkoutLink" field. + + + Field number for the "licenseCreateDate" field. + + + Field number for the "isDistributor" field. + + + Field number for the "isLegacyMsp" field. + + + Field number for the "licenseStats" field. + + + Field number for the "gradientStatus" field. + + + Field number for the "hideTrialBanner" field. + + + Field number for the "gradientLastSyncDate" field. + + + Field number for the "gradientNextSyncDate" field. + + + Field number for the "isGradientMappingPending" field. + + + Field number for the "type" field. + + + Field number for the "available" field. + + + Field number for the "used" field. + + + Container for nested types declared in the LicenseStats message type. + + + Field number for the "nextOn" field. + + + Field number for the "daysLeft" field. + + + Field number for the "isTrial" field. + + + Field number for the "type" field. + + + Field number for the "card" field. + + + Field number for the "sepa" field. + + + Field number for the "paypal" field. + + + Field number for the "failedBilling" field. + + + Field number for the "vendor" field. + + + Field number for the "purchaseOrder" field. + + + Container for nested types declared in the PaymentMethod message type. + + + Field number for the "last4" field. + + + Field number for the "brand" field. + + + Field number for the "last4" field. + + + Field number for the "country" field. + + + Field number for the "name" field. + + + Field number for the "name" field. + + + + -- POST: /bi_api/v2/console/subscription/mc_pricing + + + + Field number for the "addons" field. + + + Field number for the "filePlans" field. + + + + -- POST: /bi_api/v2/console/subscription/mc_pricing + + + + Field number for the "basePlans" field. + + + Field number for the "addons" field. + + + Field number for the "filePlans" field. + + + Field number for the "id" field. + + + Field number for the "cost" field. + + + Field number for the "id" field. + + + Field number for the "cost" field. + + + Field number for the "amountConsumed" field. + + + Field number for the "id" field. + + + Field number for the "cost" field. + + + Field number for the "amount" field. + + + Field number for the "amountPer" field. + + + Field number for the "currency" field. + + + Container for nested types declared in the Cost message type. + + + + -- POST: /bi_api/v2/console/invoice/search + + + + Field number for the "size" field. + + + Field number for the "startingAfterId" field. + + + Field number for the "invoices" field. + + + Field number for the "id" field. + + + Field number for the "invoiceNumber" field. + + + Field number for the "invoiceDate" field. + + + Field number for the "licenseCount" field. + + + Field number for the "totalCost" field. + + + Field number for the "invoiceType" field. + + + Container for nested types declared in the Invoice message type. + + + Field number for the "amount" field. + + + Field number for the "currency" field. + + + + -- POST: /bi_api/v2/console/invoice/download + + + + Field number for the "invoiceNumber" field. + + + Field number for the "link" field. + + + Field number for the "fileName" field. + + + + -- POST: /bi_api/v2/console/reporting/daily_snapshot + + + + Field number for the "month" field. + + + Field number for the "year" field. + + + Field number for the "records" field. + + + Field number for the "mcEnterprises" field. + + + Field number for the "date" field. + + + Field number for the "mcEnterpriseId" field. + + + Field number for the "maxLicenseCount" field. + + + Field number for the "maxFilePlanTypeId" field. + + + Field number for the "maxBasePlanId" field. + + + Field number for the "addons" field. + + + Container for nested types declared in the SnapshotRecord message type. + + + Field number for the "maxAddonId" field. + + + Field number for the "units" field. + + + Field number for the "id" field. + + + Field number for the "name" field. + + + + -- POST: /bi_api/v2/enterprise_console/mapping/addons + + + + Field number for the "addons" field. + + + Field number for the "filePlans" field. + + + Field number for the "id" field. + + + Field number for the "name" field. + + + + -- POST: /bi_api/v2/enterprise_console/gradient/validate-key + + + + Field number for the "gradientKey" field. + + + Field number for the "success" field. + + + Field number for the "message" field. + + + + -- POST: /bi_api/v2/enterprise_console/gradient/save + + + + Field number for the "gradientKey" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "success" field. + + + Field number for the "status" field. + + + Field number for the "message" field. + + + + -- POST: /bi_api/v2/enterprise_console/gradient/remove + + + + Field number for the "enterpriseUserId" field. + + + Field number for the "success" field. + + + Field number for the "message" field. + + + + -- POST: /bi_api/v2/enterprise_console/gradient/sync + + + + Field number for the "enterpriseUserId" field. + + + Field number for the "success" field. + + + Field number for the "status" field. + + + Field number for the "message" field. + + + Holder for reflection information generated from breachwatch.proto + + + File descriptor for breachwatch.proto + + + + note: this also is used for master password where the recordUid is blank + + + + + for any user_auth passwords, including the passwords used through Pythia + + + + Field number for the "recordUid" field. + + + Field number for the "encryptedData" field. + + + Field number for the "breachWatchInfoType" field. + + + Field number for the "updateUserWhoScanned" field. + + + Field number for the "breachWatchRecordRequest" field. + + + Field number for the "encryptedData" field. + + + Field number for the "recordUid" field. + + + Field number for the "status" field. + + + Field number for the "reason" field. + + + Field number for the "breachWatchRecordStatus" field. + + + Field number for the "breachWatchToken" field. + + + Field number for the "breachWatchToken" field. + + + Field number for the "clientEncrypted" field. + + + Field number for the "domainToken" field. + + + Field number for the "emailToken" field. + + + Field number for the "passwordToken" field. + + + Field number for the "hash1" field. + + + + if supplied, check this hash + + + + Field number for the "euid" field. + + + + if supplied, check this euid - if hash is also supplied, update the hash for this euid + + + + Field number for the "anonymizedToken" field. + + + Field number for the "hashCheck" field. + + + Field number for the "removedEuid" field. + + + Field number for the "hash1" field. + + + + if supplied a uid is supplied for this hash + + + + Field number for the "euid" field. + + + + if not supplied, this hash is not being tracked + + + + Field number for the "breachDetected" field. + + + Field number for the "hashStatus" field. + + + Field number for the "enterprisePublicKey" field. + + + Field number for the "enterpriseECCPublicKey" field. + + + Field number for the "hashedEmail" field. + + + Field number for the "emailBreaches" field. + + + Field number for the "passwordBreaches" field. + + + Field number for the "email" field. + + + Field number for the "paidUser" field. + + + Field number for the "email" field. + + + Field number for the "token" field. + + + Field number for the "site" field. + + + Field number for the "email" field. + + + Field number for the "passwordInBreach" field. + + + Field number for the "date" field. + + + Field number for the "description" field. + + + Field number for the "emailBreaches" field. + + + Field number for the "passwordBreaches" field. + + + Field number for the "breachEvents" field. + + + Field number for the "email" field. + + + Field number for the "email" field. + + + Field number for the "pad" field. + + + Field number for the "hashedPassword" field. + + + Field number for the "passwordBreaches" field. + + + Holder for reflection information generated from client.proto + + + File descriptor for client.proto + + + + note: this also is used for master password where the recordUid is blank + + + + + for any user_auth passwords, including the passwords used through Pythia + + + + Field number for the "breachWatchRecordRequest" field. + + + Field number for the "encryptedData" field. + + + Field number for the "recordUid" field. + + + + if you store the recordUid as a string this is URLSafeBase64.decode(recordUid) + + + + Field number for the "encryptedData" field. + + + + This is a BreachWatchRecordData message encrypted with the record key + + + + Field number for the "breachWatchInfoType" field. + + + Field number for the "updateUserWhoScanned" field. + + + Field number for the "passwords" field. + + + Field number for the "emails" field. + + + Field number for the "domains" field. + + + Field number for the "value" field. + + + + the original password + + + + Field number for the "resolved" field. + + + + time stamp for when it was resolved + + + + Field number for the "status" field. + + + Field number for the "euid" field. + + + + if breached this is empty, else this is the value returned by keeperapp after submission + + + + Holder for reflection information generated from enterprise.proto + + + File descriptor for enterprise.proto + + + + the supplied role_id already exists + + + + + the supplied enterprise_user_id does not belong to the same enterprise as the calling user + + + + + cannot add a pending enterprise user to a role + + + + + the supplied node_id is not valid + + + + + can't use OK because it's already defined in AuditUserStatus + + + + + same deal for ACCESS_DENIED + + + + + on a node with no privilege + + + + + because user isn't in enterprise, i.e. deleted + + + + + the delete user is not an enterprise user + + + + + the delete user is the same as the calling user + + + + + bridge cannot delete active user + + + + + unexpected internal error + + + + Field number for the "enterprisePublicKey" field. + + + Field number for the "encryptedEnterprisePrivateKey" field. + + + Field number for the "keyType" field. + + + Field number for the "teamUid" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "email" field. + + + Field number for the "enterpriseUsername" field. + + + Field number for the "isShareAdmin" field. + + + Field number for the "username" field. + + + Field number for the "enterpriseUser" field. + + + Field number for the "enterpriseUserId" field. + + + Field number for the "email" field. + + + Field number for the "OBSOLETE_FIELD" field. + + + + DO NOT RE-USE. placeholder for backwards compatability + + + + Field number for the "teamUid" field. + + + Field number for the "encryptedTeamKey" field. + + + Field number for the "force" field. + + + + if false, existing team key must be null to succeed - - - Subfolder of shared folder. - - inherits user and record permissions from the parent shared folder. + + Field number for the "id" field. + + + Field number for the "data" field. + + + Field number for the "role_id" field. + + + Field number for the "encryptedRoleKey" field. + + + Field number for the "companyId" field. + + + Field number for the "nodes" field. + + + Field number for the "roles" field. + + + Field number for the "users" field. + + + Field number for the "roleKeys" field. + + + Field number for the "teamKeys" field. + + + Field number for the "role_id" field. - - - Represents folder. - + + Field number for the "teamUid" field. - - - Folder UID. - + + Field number for the "role_team" field. - + - Parent folder UID. + 100 max - - - Shared Folder UID. - - Populated for SharedFolderFolder + + Field number for the "enterpriseUserId" field. - - - Folder type. - + + Field number for the "treeKey" field. - - - Folder name. - + + + TODO: is this necessary? we only use it for validation. URLSafe base 64 key encrypted with the user's public key if this role is a role with managed nodes + - - - A UID list of subfolders - + + Field number for the "roleAdminKey" field. - - - A UID list of records. - + + + TODO: is this necessary? we only use it for validation. URLSafe base 64 role_key encrypted with the user's public key. cannot add a user to a role that has a key and you are not a member of. + - - - Defines record access path properties. - - - Access to the record can be granted through: - - Record is owned by user. - Record is directly shared with user. - Record is added to shared folder and user is a member of that shared folder. - Record is added to shared folder and user is a member of team that is added that shared folder. - - + + Field number for the "role_id" field. - - - Record UID. - + + Field number for the "roleUserAddKeys" field. - - - Shared Folder UID. - + + Field number for the "roleUserAdds" field. - + - Team UID. + 1000 max - - - Defines shared folder access path properties. - - - Access to the shared folder can be granted through: - - User is member of shared folder. - User is member of team that is member of shared folder. - - + + Field number for the "roleId" field. - + + Field number for the "enterpriseUserId" field. + + + Field number for the "status" field. + + + Field number for the "message" field. + + + Field number for the "results" field. + + + Field number for the "role_id" field. + + + Field number for the "enterpriseUserIds" field. + + - Shared Folder UID. + 1000 max - + + Field number for the "roleUserRemoves" field. + + - Team UID. + 100 max - - Holder for reflection information generated from AccountSummary.proto - - - File descriptor for AccountSummary.proto + + Field number for the "roleId" field. - - Field number for the "summaryVersion" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "clientKey" field. + + Field number for the "status" field. - - Field number for the "settings" field. + + Field number for the "message" field. - - Field number for the "keysInfo" field. + + Field number for the "results" field. - - Field number for the "syncLogs" field. + + Field number for the "encryptedTreeKey" field. - - Field number for the "isEnterpriseAdmin" field. + + + AES 256 key encrypted with admin's data key + - - Field number for the "license" field. + + Field number for the "enterpriseName" field. - - Field number for the "group" field. + + + plain text name + - - Field number for the "Enforcements" field. + + Field number for the "rootNodeData" field. - - Field number for the "Images" field. + + + encrypted node data + - - Field number for the "personalLicense" field. + + Field number for the "adminUserData" field. - - Field number for the "fixSharedFolderRecords" field. + + + encrypted user data + - - Field number for the "usernames" field. + + Field number for the "adminName" field. - - Field number for the "devices" field. + + + full name of admin + - - Field number for the "encryptedDeviceToken" field. + + Field number for the "roleData" field. - - Field number for the "deviceName" field. + + + encrypted role data for admin role + - - Field number for the "deviceStatus" field. + + Field number for the "rsaKeyPair" field. - - Field number for the "devicePublicKey" field. + + + for sharing to the enterprise + - - Field number for the "encryptedDataKeyDoNotUse" field. + + Field number for the "numberSeats" field. - - Field number for the "clientVersion" field. + + + should this be part of the request? + - - Field number for the "username" field. + + Field number for the "enterpriseType" field. - - Field number for the "ipAddress" field. + + Field number for the "rolePublicKey" field. - - Field number for the "approveRequestTime" field. + + Field number for the "rolePrivateKeyEncryptedWithRoleKey" field. - - Field number for the "encryptedDataKeyPresent" field. + + Field number for the "roleKeyEncryptedWithTreeKey" field. - - Field number for the "groupId" field. + + Field number for the "eccKeyPair" field. - - Field number for the "encryptionParams" field. + + Field number for the "allUsersRoleData" field. - - Field number for the "encryptedDataKey" field. + + + encrypted role data for all_users role + - - Field number for the "dataKeyBackupDate" field. + + Field number for the "username" field. - - Field number for the "userAuthUid" field. + + Field number for the "verificationCode" field. - - Field number for the "encryptedPrivateKey" field. + + + If supplied and is valid, will use the password rules for the given user's account + - - Field number for the "encryptedEccPrivateKey" field. + + Field number for the "type" field. - - Field number for the "eccPublicKey" field. + + Field number for the "minimum" field. - - Field number for the "countryName" field. + + Field number for the "maximum" field. - - Field number for the "secondsAgo" field. + + Field number for the "allowed" field. - - Field number for the "deviceName" field. + + Field number for the "mcEnterpriseId" field. - - Field number for the "countryCode" field. + + Field number for the "messageSessionUid" field. - - Field number for the "deviceUID" field. + + Field number for the "encryptedSessionToken" field. - - Field number for the "ipAddress" field. + + Field number for the "encryptedTreeKey" field. - - Field number for the "subscriptionCode" field. + + + MC's tree key encrypted with MSP's tree key + - - Field number for the "productTypeId" field. + + Field number for the "domainPasswordRulesFields" field. - - Field number for the "productTypeName" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "expirationDate" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "secondsUntilExpiration" field. + + Field number for the "encryptedDeviceDataKey" field. - - Field number for the "maxDevices" field. + + + required for cloud sso + - - Field number for the "filePlanType" field. + + Field number for the "denyApproval" field. - - Field number for the "bytesUsed" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "bytesTotal" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "secondsUntilStorageExpiration" field. + + Field number for the "failed" field. - - Field number for the "storageExpirationDate" field. + + Field number for the "message" field. - - Field number for the "hasAutoRenewableAppstoreSubscription" field. + + Field number for the "deviceRequests" field. - - Field number for the "accountType" field. + + Field number for the "deviceResponses" field. - - Field number for the "uploadsRemaining" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "enterpriseId" field. + + Field number for the "userEncryptedDataKey" field. - - Field number for the "chatEnabled" field. + + Field number for the "keyTypeId" field. - - Field number for the "auditAndReportingEnabled" field. + + Field number for the "roleKey" field. - - Field number for the "breachWatchFeatureDisable" field. + + + Used for migration + - - Field number for the "accountUid" field. + + Field number for the "privateKey" field. - - Field number for the "allowPersonalLicense" field. + + + Used for migration + - - Field number for the "licensedBy" field. + + Field number for the "keys" field. - - Field number for the "email" field. + + Field number for the "continuationToken" field. - - Field number for the "breachWatchEnabled" field. + + Field number for the "url" field. - - Field number for the "breachWatchScanned" field. + + Field number for the "name" field. - - Field number for the "breachWatchExpiration" field. + + Field number for the "enterpriseName" field. - - Field number for the "breachWatchDateCreated" field. + + Field number for the "restrictVisibility" field. - - Field number for the "error" field. + + Field number for the "specialProvisioning" field. - - - repeated AddOn addOns = 28; - + + Field number for the "userPrivilege" field. - - Field number for the "licenseKeyId" field. + + Field number for the "distributor" field. - - Field number for the "name" field. + + Field number for the "forbidAccountTransfer" field. - - Field number for the "expirationDate" field. + + + If true: + - role_enforcement_add won't let you add the REQUIRE_ACCOUNT_SHARE enforcement + - account_summary won't ask clients to share their data key for account share + - share_account, pre_account_transfer, & transfer_and_delete_user will abort + - - Field number for the "createdDate" field. + + Field number for the "nodeId" field. - - Field number for the "isTrial" field. + + Field number for the "parentId" field. - - Field number for the "enabled" field. + + Field number for the "bridgeId" field. - - Field number for the "scanned" field. + + Field number for the "scimId" field. - - Field number for the "featureDisable" field. + + Field number for the "licenseId" field. - - Field number for the "audit" field. + + Field number for the "encryptedData" field. - - Field number for the "mustPerformAccountShareBy" field. + + Field number for the "duoEnabled" field. - - Field number for the "shareAccountTo" field. + + Field number for the "rsaEnabled" field. - - Field number for the "rules" field. + + Field number for the "ssoServiceProviderId" field. - - Field number for the "passwordRulesIntro" field. + + Field number for the "restrictVisibility" field. - - Field number for the "autoBackupDays" field. + + Field number for the "ssoServiceProviderIds" field. - - Field number for the "theme" field. + + + Nov 2021 - Nodes can now have more than one sso ServiceProviderId. + - - Field number for the "channel" field. + + Field number for the "roleId" field. - - Field number for the "channelValue" field. + + Field number for the "nodeId" field. - - Field number for the "rsaConfigured" field. + + Field number for the "encryptedData" field. - - Field number for the "emailVerified" field. + + Field number for the "keyType" field. - - Field number for the "masterPasswordLastModified" field. + + Field number for the "visibleBelow" field. - - Field number for the "accountFolderKey" field. + + Field number for the "newUserInherit" field. - - Field number for the "securityKeys" field. + + Field number for the "roleType" field. - - Field number for the "keyValues" field. + + Field number for the "enterpriseUserId" field. - - - Field number for the "ssoUser" field. + + Field number for the "nodeId" field. - - Field number for the "onlineAccessOnly" field. + + Field number for the "encryptedData" field. - - - could be in "keyValues" - + + Field number for the "keyType" field. - - Field number for the "masterPasswordExpiry" field. + + Field number for the "username" field. - - Field number for the "twoFactorRequired" field. + + Field number for the "status" field. - - Field number for the "disallowExport" field. + + Field number for the "lock" field. - - Field number for the "restrictFiles" field. + + Field number for the "userId" field. - - Field number for the "restrictAllSharing" field. + + Field number for the "accountShareExpiration" field. - - Field number for the "restrictSharing" field. + + Field number for the "fullName" field. - - Field number for the "restrictSharingIncomingAll" field. + + Field number for the "jobTitle" field. - - - json response field is "restrict_sharing_incoming_all" - + + Field number for the "tfaEnabled" field. - - Field number for the "restrictSharingIncomingEnterprise" field. + + Field number for the "transferAcceptanceStatus" field. - - - json response field is "restrict_sharing_incoming_enterprise" - + + Field number for the "enterpriseUserId" field. - - Field number for the "logoutTimer" field. + + Field number for the "username" field. - - Field number for the "persistentLogin" field. + + Field number for the "reportUid" field. - - Field number for the "ipDisableAutoApprove" field. + + Field number for the "nodeId" field. - - Field number for the "shareDataKeyWithEccPublicKey" field. + + + node where the report was generated + - - Field number for the "shareDataKeyWithDevicePublicKey" field. + + Field number for the "reportName" field. - - Field number for the "RecordTypesCounter" field. + + Field number for the "dateGenerated" field. - - Field number for the "RecordTypesEnterpriseCounter" field. + + Field number for the "runByName" field. - - Field number for the "recordTypesEnabled" field. + + + user who generated the report + - - Field number for the "canManageRecordTypes" field. + + Field number for the "numberOfOwners" field. - - Field number for the "key" field. + + + number of record owners included in the report + - - Field number for the "value" field. + + Field number for the "numberOfRecords" field. - - Field number for the "key" field. + + + number of records included in the report + - - Field number for the "value" field. + + Field number for the "roleId" field. - - Field number for the "key" field. + + Field number for the "managedNodeId" field. - - Field number for the "value" field. + + Field number for the "cascadeNodeManagement" field. - - Field number for the "resultCode" field. + + Field number for the "nodeId" field. - - Field number for the "message" field. + + Field number for the "cascadeNodeManagement" field. - - Field number for the "result" field. + + Field number for the "privileges" field. - - Field number for the "strings" field. + + Field number for the "userManagedNodes" field. - - Field number for the "booleans" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "longs" field. + + Field number for the "encryptedData" field. - - Field number for the "jsons" field. + + Field number for the "roleId" field. - - Field number for the "role_id" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "publicKey" field. + + + possible values for privilegeType + UNKNOWN = 0 + MANAGE_USER = 1 + MANAGE_NODES = 2 + MANAGE_LICENCES = 3 + MANAGE_ROLES = 4 + MANAGE_TEAMS = 5 + TRANSFER_ACCOUNT = 6 + RUN_REPORTS = 7 + VIEW_TREE = 8 + MANAGE_BRIDGE = 9 + MANAGE_COMPANIES = 10 + ALLOCATE_POOL_LICENSES = 11 + APPROVE_DEVICE = 13 + - - Field number for the "ruleType" field. + + Field number for the "managedNodeId" field. - - Field number for the "pattern" field. + + Field number for the "roleId" field. - - Field number for the "match" field. + + Field number for the "privilegeType" field. - - Field number for the "minimum" field. + + Field number for the "roleId" field. - - Field number for the "description" field. + + Field number for the "enforcementType" field. - + Field number for the "value" field. - - Field number for the "deviceId" field. + + Field number for the "teamUid" field. - - Field number for the "deviceName" field. + + Field number for the "name" field. - - Field number for the "dateAdded" field. + + Field number for the "nodeId" field. - - Field number for the "isValid" field. + + Field number for the "restrictEdit" field. - - Field number for the "deviceRegistration" field. + + Field number for the "restrictShare" field. - - Field number for the "keyHandle" field. + + Field number for the "restrictView" field. - - Field number for the "publicKey" field. + + Field number for the "encryptedData" field. - - Field number for the "attestationCert" field. + + Field number for the "encryptedTeamKey" field. - - Field number for the "counter" field. + + + possible value for userType + USER = 0; + ADMIN = 1; + ADMIN_HIDE_SHARED_FOLDERS = 2; + - - Field number for the "compromised" field. + + Field number for the "teamUid" field. - - Field number for the "admin" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "groupVerificationCode" field. + + Field number for the "userType" field. - - Field number for the "administrator" field. + + Field number for the "distributors" field. - - - repeated KeyValue groupSettings = 3; ///// ? - + + Field number for the "name" field. - - Field number for the "firstName" field. + + Field number for the "mspInfos" field. - - Field number for the "lastName" field. + + Field number for the "enterpriseId" field. - - Field number for the "email" field. + + Field number for the "enterpriseName" field. - - Field number for the "currentNumberOfUsers" field. + + Field number for the "allocatedLicenses" field. - - Field number for the "numberOfUsers" field. + + + MAX_INT is infinity + - - Field number for the "subscriptionCode" field. + + Field number for the "allowedMcProducts" field. - + - int32 numberOfDevices = 6; + codes of allowed MC Products - - Field number for the "expirationDate" field. + + Field number for the "allowedAddOns" field. - - Field number for the "purchaseDate" field. + + Field number for the "maxFilePlanType" field. - - - string total = 10; - + + Field number for the "managedCompanies" field. - - Holder for reflection information generated from APIRequest.proto + + Field number for the "allowUnlimitedLicenses" field. - - File descriptor for APIRequest.proto + + + Allows MSP allocate Infinity as number of licenses to its MCs. + - - - trial for bw - + + Field number for the "addOns" field. - - - can do everything - + + Field number for the "mcEnterpriseId" field. - - - can only change password - + + Field number for the "mcEnterpriseName" field. - - - must first agree to share their account - + + Field number for the "mspNodeId" field. - - - can only get sku's for purchase - + + Field number for the "numberOfSeats" field. - - - This is for a session token where the account is expired, but can still log in - + + Field number for the "numberOfUsers" field. + + + Field number for the "productId" field. - - - can only accept the enterprise invite - + + Field number for the "isExpired" field. - + - from BI (Token object is created manually in Chat Server after decrypting BI's json token) + this is also the indication of whether or not it is expired as it gets expired when it is paused. - - - user has tried to log into the console but no enterprise exists - + + Field number for the "treeKey" field. - - - for webapp - + + Field number for the "tree_key_role" field. - - - protobuf enum has to start with 0. - + + Field number for the "filePlanType" field. - - - loginMethod is one of ( existing_account, sso_domain, after_sso ) - + + Field number for the "addOns" field. - - - something is wrong, should never be in this state - + + Field number for the "productId" field. - - - the client has been logged out - + + Field number for the "seats" field. - - - device needs to be approved to use for this user - + + Field number for the "availableSeats" field. - - - the device is locked for all accounts - + + Field number for the "stash" field. - - - the account is locked - + + Field number for the "enterpriseId" field. - - - the account on this device is locked - + + Field number for the "enterpriseName" field. - - - client version is disallowed - + + Field number for the "name" field. - - - enterprise account cannot log in - + + Field number for the "enabled" field. - - - account is in a different region, device should know that already - + + Field number for the "isTrial" field. - - - 2fa needs satisfying - + + Field number for the "expiration" field. - - - the device is 2fa's and now we need the auth hash - + + Field number for the "created" field. - - - no username is supplied and we need one to continue - + + Field number for the "seats" field. - - - returned from saml/sso/finish_login - + + Field number for the "activationTime" field. - - - for a cloud sso user that doesn't yet exist - + + Field number for the "includedInProduct" field. - - - device needs approval with a dedk - + + Field number for the "apiCallCount" field. - - - a login token is not valid forever, if you get this, start over - + + Field number for the "mcProduct" field. - - - v3 and forward - + + Field number for the "addOns" field. - - - Google authenticator etc. - + + Field number for the "filePlanType" field. - - - * - The names and IDs in this class correspond to the Kinfo database entries and to the Region class in Keeperpap. - + + Field number for the "maxLicenses" field. - - - Our region numbers start at 1 - + + Field number for the "fixedMaxLicenses" field. - + - Europe + permits granted by a distributor to its MSP to pass to MC - - - North America - + + Field number for the "restricted" field. - + - US Government + if false then no need to check the rest - + + Field number for the "maxAllowedLicenses" field. + + - Australia + obsolete in favor of allowUnlimitedLicenses - - Field number for the "encryptedTransmissionKey" field. - - - Field number for the "publicKeyId" field. - - - Field number for the "locale" field. - - - Field number for the "encryptedPayload" field. - - - Field number for the "encryptionType" field. - - - Field number for the "recaptcha" field. - - - Field number for the "subEnvironment" field. - - - - possible values are 'beta', 'v2', etc. - + + Field number for the "allowedMcProducts" field. - - Field number for the "payload" field. + + Field number for the "allowedAddOns" field. - - Field number for the "encryptedSessionToken" field. + + Field number for the "maxFilePlanType" field. - - Field number for the "timeToken" field. + + Field number for the "allowUnlimitedLicenses" field. - - Field number for the "apiVersion" field. + + Field number for the "mcDefaults" field. - - Field number for the "key" field. + + Field number for the "paid" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "numberOfSeats" field. - - Field number for the "clientVersion" field. + + Field number for the "expiration" field. - - Field number for the "deviceName" field. + + Field number for the "licenseKeyId" field. - - Field number for the "clientVersion" field. + + Field number for the "productTypeId" field. - - Field number for the "username" field. + + Field number for the "name" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "enterpriseLicenseId" field. - - Field number for the "minimumIterations" field. + + Field number for the "seatsAllocated" field. - - Field number for the "passwordMatchRegex" field. + + Field number for the "seatsPending" field. - - Field number for the "passwordMatchDescription" field. + + Field number for the "tier" field. - - Field number for the "isEnterpriseDomain" field. + + Field number for the "filePlanTypeId" field. - - Field number for the "authRequest" field. + + Field number for the "maxBytes" field. - - Field number for the "loginType" field. + + Field number for the "storageExpiration" field. - - Field number for the "twoFactorToken" field. + + Field number for the "licenseStatus" field. - - - optional - if supplied, it will be validated if it needs refreshing - + + Field number for the "mspPool" field. - - Field number for the "authRequest" field. + + Field number for the "managedBy" field. - - Field number for the "loginType" field. + + Field number for the "addOns" field. - - Field number for the "authenticationHashPrime" field. + + Field number for the "nextBillingDate" field. - - Field number for the "encryptedLoginToken" field. + + Field number for the "hasMSPLegacyLog" field. - - Field number for the "authResponse" field. + + Field number for the "mspPermits" field. - - Field number for the "mcEnterpriseId" field. + + Field number for the "distributor" field. - - - input.getInt("enterprise_id") - + + Field number for the "bridgeId" field. - - Field number for the "push_token" field. + + Field number for the "nodeId" field. - - - needed to receive DNA notifications per login Command wiki page - + + Field number for the "wanIpEnforcement" field. - - Field number for the "platform" field. + + Field number for the "lanIpEnforcement" field. - - - needed to receive DNA notifications per login Command wiki page - + + Field number for the "status" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "scimId" field. - + + Field number for the "nodeId" field. + + Field number for the "status" field. - - Field number for the "iterations" field. + + Field number for the "lastSynced" field. - - Field number for the "salt" field. + + Field number for the "rolePrefix" field. - - Field number for the "algorithm" field. + + Field number for the "uniqueGroups" field. - - Field number for the "uid" field. + + Field number for the "id" field. - - Field number for the "name" field. + + Field number for the "nodeId" field. - - Field number for the "type" field. + + Field number for the "domain" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "method" field. - - Field number for the "username" field. + + Field number for the "teamUid" field. - - Field number for the "clientVersion" field. + + Field number for the "name" field. - - Field number for the "messageSessionUid" field. + + Field number for the "nodeId" field. - - Field number for the "encryptedLoginToken" field. + + Field number for the "encryptedData" field. - - Field number for the "loginType" field. + + Field number for the "teamUid" field. - - Field number for the "mcEnterpriseId" field. + + Field number for the "users" field. - - Field number for the "loginMethod" field. + + + * + This is not used in an API yet. + It can be used in a new teams_add API if we do one. + It is currently used internally when creating teams. + + The command is successful if at least one of the teams was added successfully. + The top-level errorMessage field is used only when the top-level result is "error". + - - Field number for the "forceNewLogin" field. + + Field number for the "successfulTeamAdd" field. - - Field number for the "cloneCode" field. + + Field number for the "unsuccessfulTeamAdd" field. - - Field number for the "v2TwoFactorToken" field. + + Field number for the "result" field. - - Field number for the "accountUid" field. + + + "success" or "fail" + - - - for think clients, if supplied and accountUid != user's accountUid return error reset_cache_invalid_account_uid - + + Field number for the "errorMessage" field. - - Field number for the "loginState" field. + + + only used if result == "fail" + - - Field number for the "accountUid" field. + + Field number for the "team" field. - - Field number for the "primaryUsername" field. + + + team info. May not be completely filled out + - - Field number for the "encryptedDataKey" field. + + Field number for the "result" field. - - Field number for the "encryptedDataKeyType" field. + + + "success" or "fail" + - - Field number for the "encryptedLoginToken" field. + + Field number for the "errorMessage" field. - - Field number for the "encryptedSessionToken" field. + + + only used if result == "fail" + - - Field number for the "sessionTokenType" field. + + Field number for the "ssoServiceProviderId" field. - - Field number for the "message" field. + + Field number for the "nodeId" field. - - Field number for the "url" field. + + Field number for the "name" field. - - Field number for the "channels" field. + + Field number for the "sp_url" field. - - Field number for the "salt" field. + + Field number for the "inviteNewUsers" field. - - Field number for the "cloneCode" field. + + Field number for the "active" field. - - Field number for the "stateSpecificValue" field. + + Field number for the "isCloud" field. - - Field number for the "ssoClientVersion" field. + + Field number for the "userId" field. - - Field number for the "companyName" field. + + Field number for the "email" field. - - Field number for the "samlRequest" field. + + Field number for the "deviceId" field. - - Field number for the "samlRequestType" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "ssoDomainName" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "loginUrl" field. + + Field number for the "devicePublicKey" field. - - Field number for the "logoutUrl" field. + + Field number for the "deviceName" field. - - Field number for the "deviceStatus" field. + + Field number for the "clientVersion" field. - - Field number for the "salt" field. + + Field number for the "deviceType" field. - - Field number for the "OBSOLETE_FIELD" field. + + Field number for the "date" field. - - - DO NOT RE-USE. placeholder for backwards compatability - + + Field number for the "ipAddress" field. - - Field number for the "ssoUserInfo" field. + + Field number for the "location" field. - - Field number for the "username" field. + + Field number for the "email" field. - - Field number for the "encryptedSessionToken" field. + + Field number for the "accountUid" field. - - Field number for the "encryptedSharedAccountKey" field. + + Field number for the "entity" field. - - Field number for the "passwordMethod" field. + + Field number for the "delete" field. - - Field number for the "authResponse" field. + + Field number for the "data" field. - - Field number for the "encryptedLoginToken" field. + + + If delete==false then it's list of entity objects (Node, Users etc...). If delete==true then those objects have only ids but no other info. + - - Field number for the "channelType" field. + + Field number for the "continuationToken" field. - - Field number for the "channel_uid" field. + + Field number for the "hasMore" field. - - Field number for the "channelName" field. + + Field number for the "cacheStatus" field. + + + Field number for the "data" field. - - Field number for the "challenge" field. + + Field number for the "generalData" field. - - - for security keys - + + Field number for the "continuationToken" field. - - Field number for the "capabilities" field. + + Field number for the "userId" field. - - - for DUO - + + Field number for the "recordUid" field. - - Field number for the "phoneNumber" field. + + Field number for the "key" field. - - - for SMS and DUO - + + Field number for the "keyType" field. - - Field number for the "maxExpiration" field. + + Field number for the "version" field. - - - maximum allowed expiration - + + Field number for the "data" field. - - Field number for the "encryptedLoginToken" field. + + Field number for the "extra" field. - - Field number for the "valueType" field. + + Field number for the "userId" field. - - Field number for the "value" field. + + Field number for the "backupKey" field. - - Field number for the "channel_uid" field. + + Field number for the "userId" field. - - Field number for the "expireIn" field. + + Field number for the "userName" field. - - Field number for the "encryptedLoginToken" field. + + Field number for the "dataKey" field. - - Field number for the "encryptedLoginToken" field. + + Field number for the "dataKeyType" field. - - Field number for the "pushType" field. + + Field number for the "privateKey" field. - - Field number for the "channel_uid" field. + + Field number for the "treeKey" field. - - Field number for the "expireIn" field. + + Field number for the "treeKeyType" field. - - - for TWO_FA_PUSH_KEEPER and TWO_FA_PUSH_DUO_PUSH - + + Field number for the "backupKeys" field. - - Field number for the "created" field. + + Field number for the "privateECKey" field. - - Field number for the "expiration" field. + + Field number for the "enterpriseEccPrivateKey" field. - - Field number for the "licenseStatus" field. + + Field number for the "users" field. - - Field number for the "paid" field. + + Field number for the "records" field. - - Field number for the "message" field. + + Field number for the "continuationToken" field. - - Field number for the "recordUid" field. + + Field number for the "user" field. - - - used in get request, set request, set response - + + Field number for the "backupUid" field. - - Field number for the "recordKey" field. + + Field number for the "fileName" field. - - - used in set request - + + Field number for the "created" field. - - Field number for the "status" field. + + Field number for the "downloadUrl" field. - - - used in set response - + + Field number for the "files" field. - - Field number for the "ownerlessRecord" field. + + Field number for the "roleId" field. - - Field number for the "uid" field. + + Field number for the "reEncryptedRoleKey" field. - - Field number for the "salt" field. + + Field number for the "roleKey" field. - - Field number for the "iterations" field. + + Field number for the "mspKey" field. - - Field number for the "encryptedClientKey" field. + + Field number for the "enterpriseKeys" field. - - Field number for the "authHash" field. + + Field number for the "treeKey" field. - - Field number for the "encryptedDataKey" field. + + Field number for the "roleId" field. - - Field number for the "loginType" field. + + Field number for the "encryptedKey" field. - - Field number for the "name" field. + + Field number for the "keyType" field. - - Field number for the "algorithm" field. + + Field number for the "encryptedMspTreeKey" field. - - Field number for the "uid" field. + + Field number for the "encryptedMspTreeKeyType" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "rsaPublicKey" field. - - Field number for the "clientVersion" field. + + Field number for the "rsaEncryptedPrivateKey" field. - - Field number for the "deviceName" field. + + Field number for the "eccPublicKey" field. - - Field number for the "devicePublicKey" field. + + Field number for the "eccEncryptedPrivateKey" field. - - Field number for the "deviceStatus" field. + + Field number for the "treeKey" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "keyTypeId" field. - - Field number for the "clientVersion" field. + + Field number for the "events" field. - - Field number for the "deviceName" field. + + Field number for the "recordUid" field. - - Field number for the "devicePublicKey" field. + + Field number for the "userName" field. - - Field number for the "authRequest" field. + + Field number for the "canEdit" field. - - Field number for the "userAuthRequest" field. + + Field number for the "canReshare" field. - - Field number for the "encryptedClientKey" field. + + Field number for the "shareFrom" field. - - - encrypted with the data key - + + + 1 is direct share, 2 share folder, 3 share team folder + - - Field number for the "encryptedPrivateKey" field. + + Field number for the "nodeId" field. - + - encrypted with the data key + Note that this guy's not currently used! We will probably make + enterprise_user_add take multiple users like enterprise_user_update. - - Field number for the "publicKey" field. - - - Field number for the "verificationCode" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "deprecatedAuthHashHash" field. + + Field number for the "nodeId" field. - - - these will be ignored once the v2 clients are obsolete - + + Field number for the "encryptedData" field. - - Field number for the "deprecatedEncryptedClientKey" field. + + + Data encrypted with the tree key, i.e. { display_name="first name middle last name"} + - - Field number for the "deprecatedEncryptedPrivateKey" field. + + Field number for the "keyType" field. - - Field number for the "deprecatedEncryptionParams" field. + + Field number for the "fullName" field. - - Field number for the "authRequest" field. + + + The user full name, i.e. {John Doe} + - - Field number for the "userAuthRequest" field. + + Field number for the "jobTitle" field. - - Field number for the "encryptedClientKey" field. + + + The job tile, i.e. {Chief Financial Officer} + - - - gcm encrypted with the data key - + + Field number for the "email" field. - - Field number for the "encryptedPrivateKey" field. + + + The email address of new the enterprise user + - - - gcm encrypted with the data key - + + Field number for the "suppressEmailInvite" field. - - Field number for the "publicKey" field. + + + Optional field, if true, server will not send the user an invite email, but instead will return the verification code in the response + - + + Field number for the "users" field. + + - TODO add alternate passwords + Note that ONLY fullName is currently supported! - - Field number for the "revision" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "newEmail" field. + + Field number for the "nodeId" field. - - Field number for the "encryptedChangeEmailToken" field. + + Field number for the "encryptedData" field. - - Field number for the "emailVerified" field. + + + Data encrypted with the tree key, i.e. { display_name="first name middle last name"} + - - - used in SecurityDataReqeust - + + Field number for the "keyType" field. - - Field number for the "uid" field. + + Field number for the "fullName" field. - - Field number for the "data" field. + + + The user full name, e.g. "Explodin' Dr. Jaggers Flymo". Sending an empty string will leave the name unchanged; sending all whitespace will clear the name. + - - - to update a records security data - + + Field number for the "jobTitle" field. - - Field number for the "recordSecurityData" field. + + + The job tile, e.g. "Drums". Sending an empty string will leave the title unchanged; sending all whitespace will clear the title. + - - Field number for the "masterPasswordSecurityData" field. + + Field number for the "email" field. - - - if mp or not, by user, include reused passwords - + + + The new email address of the enterprise user. + - + + Field number for the "users" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "currentSecurityData" field. + + Field number for the "status" field. - - Field number for the "currentSecurityDataRevision" field. + + Field number for the "nodeIds" field. - - Field number for the "oldSecurityData" field. + + Field number for the "includeNonShared" field. - - Field number for the "oldSecurityDataRevision" field. + + Field number for the "recordOwners" field. - + + Field number for the "enterpriseUserId" field. + + + Field number for the "shared" field. + + - used for both get and save + true if at least one owned record is shared. - - Field number for the "enterpriseUserId" field. + + Field number for the "enterpriseUserIds" field. - - Field number for the "encryptedReportData" field. + + Field number for the "includeNonShared" field. - - Field number for the "revision" field. + + + Default is false, meaning we'll consider only records which are shared. If true, we'll include the list of records that are not shared. + - - - for save this was returned in get, for get this is the saved revision - + + Field number for the "continuationToken" field. - - Field number for the "twoFactor" field. + + Field number for the "includeTotalMatchingRecordsInFirstResponse" field. - - - for get not save - + + Field number for the "auditUserData" field. - - Field number for the "lastLogin" field. + + Field number for the "continuationToken" field. - - - for get not save - + + Field number for the "hasMore" field. - - Field number for the "numberOfReusedPassword" field. + + Field number for the "totalMatchingRecords" field. - - Field number for the "securityReportIncrementalData" field. + + Field number for the "recordUid" field. - - Field number for the "securityReport" field. + + Field number for the "encryptedData" field. - - Field number for the "fromPage" field. + + + audit data encrypted with the audit key. + - - Field number for the "enterprisePrivateKey" field. + + Field number for the "shared" field. - - Field number for the "securityReport" field. + + + Default is false. If true, this record is shared. + - - Field number for the "asOfRevision" field. + + Field number for the "enterpriseUserId" field. - - - the revision the data was retrieved for - + + Field number for the "auditUserRecords" field. - - Field number for the "fromPage" field. + + + The list of record owned or owned and shared by this user. + - - Field number for the "toPage" field. + + Field number for the "status" field. - - Field number for the "complete" field. + + + Status of user for report + - - Field number for the "count" field. + + Field number for the "recordTitles" field. - - Field number for the "reportType" field. + + + The list of record titles. + - - Field number for the "reportData" field. + + Field number for the "recordUids" field. - - Field number for the "objectType" field. + + + The list of record UIDs. + - - Field number for the "primaryUid" field. + + Field number for the "jobTitles" field. - - Field number for the "secondaryUid" field. + + + The list of user job titles. + - - Field number for the "key" field. + + Field number for the "urls" field. - - Field number for the "changeToKeyTypeOne" field. + + + The list of record URLs. + - - Field number for the "uid" field. + + Field number for the "enterpriseUserIds" field. - - Field number for the "type" field. + + + The list of users chosen. + - - Field number for the "status" field. + + Field number for the "complianceReportRun" field. - - Field number for the "reason" field. + + Field number for the "reportName" field. - - Field number for the "changeToKeyTypeOneStatus" field. + + + The report name (only required when we want to save the report). + - - - for setting keys where the id is a long value - + + Field number for the "saveReport" field. - - Field number for the "id" field. + + + Default is false. True means we will save the report. + - - - role_id - + + Field number for the "reportCriteriaAndFilter" field. - - Field number for the "key" field. + + Field number for the "users" field. - - - role key GCM encrypted with the tree key - + + + List of enterprise user IDs sent to get_preliminary_compliance_data. + - - Field number for the "keys" field. + + Field number for the "records" field. - + - same input as the register command + These are the records that will be run. Max number of recordUids is 1000. - - Field number for the "username" field. + + Field number for the "nodeId" field. - - - must be valid email - + + Field number for the "criteriaUid" field. - - Field number for the "authVerifier" field. + + + Uid provided by the client + - + + Field number for the "criteriaName" field. + + + Field number for the "criteria" field. + + + Field number for the "filters" field. + + + Field number for the "lastModified" field. + + + Field number for the "nodeEncryptedData" field. + + - new Field("auth_verifier", new AuthVerifierFieldValidator(), true); size=(70, 70)? + The node data object encrypted with the tree key that contains the nodeName - - Field number for the "encryptionParams" field. + + Field number for the "jobTitles" field. - + - new Field("encryption_params", new EncryptionParamsFieldValidator(), true); size=(134, 134)? + The list of job titles chosen. - - Field number for the "rsaPublicKey" field. + + Field number for the "enterpriseUserIds" field. - + - new Field("public_key", new PublicKeyFieldValidator(), true); size=(10, 2000)? + The list of users chosen. - - Field number for the "rsaEncryptedPrivateKey" field. + + Field number for the "includeNonShared" field. - + - new Field("encrypted_private_key", new DataKeyEncPrivateKeyFieldValidator(), true); size=(10, 2000)? + If true, include the list the records that are not shared - - Field number for the "eccPublicKey" field. + + Field number for the "recordTitles" field. + + + Field number for the "recordUids" field. + + + Field number for the "jobTitles" field. + + + Field number for the "urls" field. + + + Field number for the "recordTypes" field. + + + Field number for the "dateGenerated" field. + + + Field number for the "runByUserName" field. + + + Field number for the "reportName" field. + + + Field number for the "reportUid" field. + + + Field number for the "complianceReportRun" field. + + + Field number for the "userProfiles" field. + + + Field number for the "auditTeams" field. + + + Field number for the "auditRecords" field. + + + Field number for the "userRecords" field. + + + Field number for the "sharedFolderRecords" field. - - - 65 bytes, on curve - + + Field number for the "sharedFolderUsers" field. - - Field number for the "eccEncryptedPrivateKey" field. + + Field number for the "sharedFolderTeams" field. - - - 60 bytes - + + Field number for the "auditTeamUsers" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "auditRoles" field. - - - 65 bytes - + + Field number for the "linkedRecords" field. - - Field number for the "encryptedClientKey" field. + + Field number for the "recordUid" field. - + + Field number for the "auditData" field. + + + Field number for the "hasAttachments" field. + + + Field number for the "inTrash" field. + + - switch to gcm? old clients can't be used 60 bytes, otherwise 64 bytes; new Field("client_key", new DataKeyEncDataKeyFieldValidator(), false); + true if this record is in its owner's trash/"deleted items". Not set on older saved reports. - - Field number for the "clientVersion" field. - - - Field number for the "encryptedDeviceDataKey" field. + + Field number for the "treeLeft" field. - + - have to check + record's owner's node. Not set in older saved reports. - - Field number for the "encryptedLoginToken" field. + + Field number for the "treeRight" field. - + - this is from cloud sso + record's owner's node. Not set in older saved reports. - - Field number for the "messageSessionUid" field. + + Field number for the "roleId" field. - - Field number for the "installReferrer" field. + + Field number for the "encryptedData" field. - + + Field number for the "restrictShareOutsideEnterprise" field. + + - new Field("install_referrer", new StringFieldValidator(0, 1024), false); size=(0, 1024)? + True means cannot share records to others not in the same enterprise - - Field number for the "mccMNC" field. + + Field number for the "restrictShareAll" field. - + - input.optString("mcc_mnc") in verifyDevice(); carrier_sim_codes.mcc_mnc int(6) + True means can't share records - - Field number for the "mfg" field. + + Field number for the "restrictShareOfAttachments" field. - + - input.optString("mfg") in verifyDevice(); appstore_device_history.mfg char(64) + True means can't share records with attachments - - Field number for the "model" field. + + Field number for the "restrictMaskPasswordsWhileEditing" field. - + - input.optString("model") in verifyDevice(); appstore_device_history.model char(64) + True means you can't even see the password when you are editing - - Field number for the "brand" field. + + Field number for the "roleNodeManagements" field. - - - input.optString("brand") in verifyDevice(); appstore_device_history.brand char(64) - + + Field number for the "treeLeft" field. - - Field number for the "product" field. + + Field number for the "treeRight" field. - - - input.optString("product") in verifyDevice(); appstore_device_history.product char(64) - + + Field number for the "cascade" field. - - Field number for the "device" field. + + Field number for the "privileges" field. - - - input.optString("device"); used in PromotionMatcher; appstore_device_history.device char(64)? - + + + bit field; 1 is SHARING_ADMINISTRATOR + - - Field number for the "carrier" field. + + Field number for the "enterpriseUserId" field. - + + Field number for the "fullName" field. + + - input.optString("carrier"); used in PromotionMatcher; appstore_device_history.carrier char(64)? + The user's full name. - - Field number for the "verificationCode" field. - - - Field number for the "enterpriseRegistration" field. + + Field number for the "jobTitle" field. - - - optinal for creating an account when creating an enterprise - + + Field number for the "email" field. - - Field number for the "encryptedVerificationToken" field. + + Field number for the "roleIds" field. - - Field number for the "nodeId" field. + + Field number for the "recordUid" field. - - Field number for the "enforcement" field. + + Field number for the "permissionBits" field. - - Field number for the "value" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "nodeId" field. + + Field number for the "recordPermissions" field. - - Field number for the "enforcement" field. + + Field number for the "teamUid" field. - - Field number for the "accountUid" field. + + Field number for the "teamName" field. - - Field number for the "keyId" field. + + Field number for the "restrictEdit" field. - - Field number for the "payload" field. + + Field number for the "restrictShare" field. - - Field number for the "username" field. + + Field number for the "teamUid" field. - - Field number for the "locale" field. + + Field number for the "enterpriseUserIds" field. - - Field number for the "supportedLanguage" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "type" field. + + Field number for the "recordPermissions" field. - - Field number for the "key" field. + + Field number for the "shareAdminRecords" field. - - Field number for the "userId" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "key" field. + + Field number for the "recordPermissionIndexes" field. - - Field number for the "value" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "pbkdf2Password" field. + + Field number for the "enterpriseUserIds" field. - - Field number for the "action" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "clientVersion" field. + + Field number for the "teamUids" field. - - Field number for the "deviceName" field. + + Field number for the "reportUid" field. - - Field number for the "devicePublicKey" field. + + Field number for the "downloadUrl" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "criteriaUid" field. - - Field number for the "username" field. + + Field number for the "criteriaUid" field. - - Field number for the "verificationChannel" field. + + Field number for the "ownerUid" field. - + - email for now, could be "sms" if we allow username as cell number in the future. + This is the owner *record* UID. - - Field number for the "messageSessionUid" field. + + Field number for the "recordUids" field. - - Field number for the "clientVersion" field. + + + A child record may have multiple parent/"owner" records, but will not itself be an owner. + - - Field number for the "encryptedDeviceToken" field. + + Field number for the "sharedFolderUid" field. - + + Field number for the "recordUid" field. + + Field number for the "username" field. - - Field number for the "messageSessionUid" field. + + Field number for the "email" field. - - Field number for the "clientVersion" field. + + Field number for the "fullName" field. - - Field number for the "deviceStatus" field. + + + The user's full name. + - - Field number for the "email" field. + + Field number for the "jobTitle" field. - - Field number for the "twoFactorChannel" field. + + Field number for the "isMSPMCAdmin" field. - - - TwoFactorChannel, only "sms", "duo", "on_device" or "on_approved_device"; default to email verification - + + Field number for the "isInSharedFolder" field. - - Field number for the "clientVersion" field. + + Field number for the "isShareAdminForRequestedObject" field. - - Field number for the "locale" field. + + Field number for the "isShareAdminForSharedFolderOwner" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "hasAccessToObject" field. - - Field number for the "totpCode" field. + + Field number for the "userProfileExts" field. - - Field number for the "deviceIp" field. + + Field number for the "teams" field. - - - This is the ip address of the original device that needs to be approved, which will be included in the TwoFactorToken. - + + Field number for the "teamUid" field. - - Field number for the "deviceTokenExpireDays" field. + + Field number for the "users" field. - - - equivalent to the device_token_expire_days that is used in the Login command - + + Field number for the "enterpriseUserId" field. - - Field number for the "encryptedTwoFactorToken" field. + + Field number for the "userType" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "teamKey" field. - - Field number for the "encryptedDeviceDataKey" field. + + + encrypted with the user's public key - KT_ENCRYPTED_BY_PUBLIC_KEY aka RSA + - + + Field number for the "typedTeamKey" field. + + - required for cloud sso and link + the substitute for teamKey, explicitly specifies key type (primarily will be KT_ENCRYPTED_BY_PUBLIC_KEY_ECC in this case) - - Field number for the "denyApproval" field. + + Field number for the "key" field. - - Field number for the "linkDevice" field. + + Field number for the "keyType" field. - + + Field number for the "teams" field. + + + Field number for the "revision" field. + + + Field number for the "teamUid" field. + + + Field number for the "users" field. + + + Field number for the "success" field. + + + Field number for the "message" field. + + + Field number for the "resultCode" field. + + + Field number for the "additionalInfo" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "alias" field. + + Field number for the "revision" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "success" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "message" field. - - Field number for the "encryptedDeviceDataKey" field. + + Field number for the "resultCode" field. - - Field number for the "username" field. + + Field number for the "additionalInfo" field. - - Field number for the "clientVersion" field. + + Field number for the "domain" field. - - Field number for the "verificationCode" field. + + Field number for the "alias" field. - - Field number for the "username" field. + + Field number for the "status" field. - - Field number for the "clientVersion" field. + + + 0-Success else Error + - - Field number for the "verificationCode" field. + + Field number for the "message" field. - - Field number for the "messageSessionUid" field. + + Field number for the "domainAlias" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "domainAlias" field. - - Field number for the "messageSessionUid" field. + + Field number for the "users" field. - - Field number for the "command" field. + + Field number for the "clientVersion" field. - - Field number for the "username" field. + + Field number for the "enterpriseUserId" field. - + + + from enterprise_user_add + + + Field number for the "username" field. - - Field number for the "accountUid" field. + + Field number for the "nodeId" field. - - Field number for the "regionName" field. + + Field number for the "encryptedData" field. - - Field number for the "username" field. + + Field number for the "keyType" field. - - Field number for the "dateActive" field. + + Field number for the "fullName" field. - - - * - This is the input to the get_sso_service_provider command. - + + Field number for the "jobTitle" field. - - Field number for the "name" field. + + Field number for the "enterpriseUsersDataKey" field. - + - the name entered by the user + from set_enterprise_user_data_key_by_admin - - Field number for the "clientVersion" field. - - - Field number for the "locale" field. + + Field number for the "authVerifier" field. - + - such as "en_US" + from APIRequest.CreateUserRequest, used in /authentication/request_create_user - - - * - This is the response from the get_sso_service_provider command. - + + Field number for the "encryptionParams" field. - - Field number for the "name" field. + + Field number for the "rsaPublicKey" field. - - - the official name - + + Field number for the "rsaEncryptedPrivateKey" field. - - Field number for the "spUrl" field. + + Field number for the "eccPublicKey" field. - - Field number for the "isCloud" field. + + Field number for the "eccEncryptedPrivateKey" field. - - Field number for the "clientVersion" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "setting" field. + + Field number for the "encryptedClientKey" field. - - Field number for the "value" field. + + Field number for the "results" field. - - Field number for the "type" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "key" field. + + Field number for the "code" field. - - Field number for the "value" field. + + Field number for the "message" field. - - Field number for the "state" field. + + Field number for the "additionalInfo" field. - - Field number for the "key" field. + + Field number for the "users" field. - - Field number for the "keyDescription" field. + + Field number for the "clientVersion" field. - - Field number for the "value" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "valueDescription" field. + + Field number for the "username" field. - - Field number for the "identifier" field. + + Field number for the "nodeId" field. - - Field number for the "locked" field. + + Field number for the "encryptedData" field. - - Field number for the "includedInAllClear" field. + + Field number for the "keyType" field. - - Field number for the "expireSeconds" field. + + Field number for the "fullName" field. - - Field number for the "deviceId" field. + + Field number for the "jobTitle" field. - - Field number for the "deviceName" field. + + Field number for the "suppressEmailInvite" field. - - Field number for the "clientVersion" field. + + Field number for the "inviteeLocale" field. - - Field number for the "lastLogin" field. + + Field number for the "move" field. - - - for get not save - + + Field number for the "roleId" field. - - Field number for the "deviceStatus" field. + + Field number for the "results" field. - - Field number for the "name" field. + + Field number for the "success" field. - - Field number for the "value" field. + + Field number for the "code" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "message" field. - + + Field number for the "additionalInfo" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "encryptedDataKey" field. + + Field number for the "success" field. - - Field number for the "roleId" field. + + Field number for the "verificationCode" field. - - Field number for the "roleKey" field. + + Field number for the "code" field. - - Field number for the "privateKey" field. + + Field number for the "message" field. - - Field number for the "enterpriseUserIdDataKeyPairs" field. + + Field number for the "additionalInfo" field. - - Field number for the "userDataKeys" field. + + Field number for the "mspEnterpriseId" field. - - Field number for the "accessDenied" field. + + Field number for the "maxAllowedLicenses" field. - - Field number for the "noEncryptedDataKey" field. + + + obsolete in favor of allowUnlimitedLicenses + - - Field number for the "encryptedLoginToken" field. + + Field number for the "allowedMcProducts" field. - - Field number for the "encryptedLoginToken" field. + + Field number for the "allowedAddOns" field. - - Field number for the "verificationCode" field. + + Field number for the "maxFilePlanType" field. - - Field number for the "securityQuestion" field. + + Field number for the "allowUnlimitedLicenses" field. - - Field number for the "backupKeyDate" field. + + Field number for the "enterpriseUserIds" field. - - Field number for the "salt" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "iterations" field. + + + the enterprise user id + - - Field number for the "encryptedLoginToken" field. + + Field number for the "status" field. - - Field number for the "verificationCode" field. + + + the delete result + - - Field number for the "securityAnswerHash" field. + + Field number for the "deleteStatus" field. - - Field number for the "ruleType" field. + + Field number for the "enterpriseUserId" field. - - Field number for the "match" field. + + Field number for the "allUsers" field. - - Field number for the "pattern" field. + + Field number for the "type" field. - - Field number for the "description" field. + + Holder for reflection information generated from folder.proto - - Field number for the "minimum" field. + + File descriptor for folder.proto - - Field number for the "value" field. + + Field number for the "encryptedKey" field. - - Field number for the "dataKeyBackup" field. + + Field number for the "encryptedKeyType" field. - - Field number for the "dataKeyBackupDate" field. + + Field number for the "folderUid" field. - - Field number for the "publicKey" field. + + Field number for the "recordUid" field. - - Field number for the "encryptedPrivateKey" field. + + Field number for the "userId" field. - - Field number for the "clientKey" field. + + Field number for the "encryptedDataKey" field. - - Field number for the "encryptedSessionToken" field. + + + in the order of encryptedRecordKey, encryptedSharedFolderKey and optional encryptedTeamKey + - - Field number for the "passwordRules" field. + + Field number for the "sharedFolderRecordData" field. - - Field number for the "passwordRulesIntro" field. + + Field number for the "folderUid" field. - - Field number for the "minimumPbkdf2Iterations" field. + + Field number for the "recordUid" field. + + + Field number for the "encryptedRecordFolderKey" field. + + + Field number for the "sharedFolderRecordFix" field. + + + Field number for the "recordUid" field. - - - when EnforcementType.MINIMUM_PBKDF2_ITERATIONS exists - + + Field number for the "recordType" field. - - Field number for the "usernames" field. + + Field number for the "recordData" field. - - Field number for the "username" field. + + Field number for the "encryptedRecordKey" field. - - Field number for the "publicKey" field. + + Field number for the "folderType" field. - - Field number for the "publicEccKey" field. + + Field number for the "howLongAgo" field. - - Field number for the "message" field. + + Field number for the "folderUid" field. - - Field number for the "errorCode" field. + + Field number for the "encryptedRecordFolderKey" field. - - Field number for the "keyResponses" field. + + Field number for the "extra" field. - - Field number for the "publicKey" field. + + Field number for the "nonSharedData" field. - - Field number for the "encryptedPrivateKey" field. + + Field number for the "fileIds" field. - - Field number for the "appRecordUid" field. + + Field number for the "recordUid" field. - - Field number for the "secretUid" field. + + Field number for the "revision" field. - - Field number for the "shareType" field. + + Field number for the "status" field. - - Field number for the "encryptedSecretKey" field. + + Field number for the "encryptedFolderName" field. - - Field number for the "appRecordUid" field. + + Field number for the "manageUsers" field. - - Field number for the "encryptedMasterKey" field. + + Field number for the "manageRecords" field. - - Field number for the "clientId" field. + + Field number for the "canEdit" field. - - Field number for the "username" field. + + Field number for the "canShare" field. - - Field number for the "encryptedVerificationToken" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "email" field. + + Field number for the "folderUid" field. - - Holder for reflection information generated from breachwatch.proto + + Field number for the "folderType" field. - - File descriptor for breachwatch.proto + + Field number for the "parentFolderUid" field. - - - note: this also is used for master password where the recordUid is blank - + + Field number for the "folderData" field. - - - for any user_auth passwords, including the passwords used through Pythia - + + Field number for the "encryptedFolderKey" field. - - Field number for the "recordUid" field. + + Field number for the "sharedFolderFields" field. - - Field number for the "encryptedData" field. + + Field number for the "sharedFolderFolderFields" field. - - Field number for the "breachWatchInfoType" field. + + Field number for the "folderUid" field. - - Field number for the "updateUserWhoScanned" field. + + Field number for the "revision" field. - - Field number for the "breachWatchRecordRequest" field. + + Field number for the "status" field. - - Field number for the "encryptedData" field. + + Field number for the "folderRequest" field. - - Field number for the "recordUid" field. + + Field number for the "recordRequest" field. - - Field number for the "status" field. + + Field number for the "folderResponse" field. - - Field number for the "reason" field. + + Field number for the "recordResponse" field. - - Field number for the "breachWatchRecordStatus" field. + + Field number for the "recordUid" field. - - Field number for the "breachWatchToken" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "breachWatchToken" field. + + + Only used when adding a record, or updating the permission to a record + - - Field number for the "clientEncrypted" field. + + Field number for the "teamUid" field. - - Field number for the "domainToken" field. + + + Only used when adding a record, or updating the permission to a record + - - Field number for the "emailToken" field. + + Field number for the "canEdit" field. - - Field number for the "passwordToken" field. + + Field number for the "canShare" field. - - Field number for the "hash1" field. + + Field number for the "encryptedRecordKey" field. - + - if supplied, check this hash + record key encrypted with the shared folder key - - Field number for the "euid" field. + + Field number for the "revision" field. - - - if supplied, check this euid - if hash is also supplied, update the hash for this euid - + + Field number for the "expiration" field. - - Field number for the "anonymizedToken" field. + + Field number for the "timerNotificationType" field. - - Field number for the "hashCheck" field. + + Field number for the "username" field. - - Field number for the "removedEuid" field. + + Field number for the "manageUsers" field. - - Field number for the "hash1" field. + + Field number for the "manageRecords" field. - + + Field number for the "sharedFolderKey" field. + + - if supplied a uid is supplied for this hash + shared folder AES key encrypted with user's "key" (for the caller, the user's data key, for a different user, the user's public key) - use typedSharedFolderKey instead - - Field number for the "euid" field. + + Field number for the "expiration" field. - - - if not supplied, this hash is not being tracked - + + Field number for the "timerNotificationType" field. - - Field number for the "breachDetected" field. + + Field number for the "typedSharedFolderKey" field. - - Field number for the "hashStatus" field. + + Field number for the "teamUid" field. - - Field number for the "enterprisePublicKey" field. + + Field number for the "manageUsers" field. - - Field number for the "enterpriseECCPublicKey" field. + + Field number for the "manageRecords" field. - - Field number for the "hashedEmail" field. + + Field number for the "sharedFolderKey" field. - - Field number for the "emailBreaches" field. + + + shared folder AES key encrypted with the team key retrieved from team_get_keys, for team member, which is team key; for a non member, the team's public key - use typedSharedFolderKey instead + - - Field number for the "passwordBreaches" field. + + Field number for the "expiration" field. - - Field number for the "email" field. + + Field number for the "timerNotificationType" field. - - Field number for the "paidUser" field. + + Field number for the "typedSharedFolderKey" field. - - Field number for the "email" field. + + Field number for the "sharedFolderUpdateOperation_dont_use" field. - - Field number for the "token" field. + + + obsolete field. we only use this request for shared folder update now. + - - Field number for the "site" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "email" field. + + + required + - - Field number for the "passwordInBreach" field. + + Field number for the "encryptedSharedFolderName" field. - - Field number for the "date" field. + + + shared folder name encrypted with the shared folder key + - - Field number for the "description" field. + + Field number for the "revision" field. - - Field number for the "emailBreaches" field. + + + clientSharedFolderRevision + - - Field number for the "passwordBreaches" field. + + Field number for the "forceUpdate" field. - - Field number for the "breachEvents" field. + + + true if the requestor does not want the revision to be validated for out of sync; either force_update must be true, or revision is required + - - Field number for the "email" field. + + Field number for the "fromTeamUid" field. - - Field number for the "email" field. + + + for update/delete only; this is the team that gives you the permission to perform the operations you are trying to perform + - - Field number for the "pad" field. + + Field number for the "defaultManageUsers" field. + + + Field number for the "defaultManageRecords" field. + + + Field number for the "defaultCanEdit" field. + + + Field number for the "defaultCanShare" field. - - Field number for the "hashedPassword" field. + + Field number for the "sharedFolderAddRecord" field. - - Field number for the "passwordBreaches" field. + + Field number for the "sharedFolderAddUser" field. - - Holder for reflection information generated from enterprise.proto + + Field number for the "sharedFolderAddTeam" field. - - File descriptor for enterprise.proto + + Field number for the "sharedFolderUpdateRecord" field. - - Field number for the "enterprisePublicKey" field. + + Field number for the "sharedFolderUpdateUser" field. - - Field number for the "encryptedEnterprisePrivateKey" field. + + Field number for the "sharedFolderUpdateTeam" field. - - Field number for the "keyType" field. + + Field number for the "sharedFolderRemoveRecord" field. - - Field number for the "teamUid" field. + + Field number for the "sharedFolderRemoveUser" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "sharedFolderRemoveTeam" field. - - Field number for the "email" field. + + Field number for the "sharedFolderOwner" field. - - Field number for the "enterpriseUsername" field. + + + should have a sharing relationship w/ the calling user; ""=No Change(default); "delete"=unset + - - Field number for the "enterpriseUser" field. + + Field number for the "sharedFoldersUpdateV3" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "recordUid" field. - - Field number for the "email" field. + + Field number for the "status" field. - - Field number for the "OBSOLETE_FIELD" field. + + Field number for the "username" field. - - - DO NOT RE-USE. placeholder for backwards compatability - + + Field number for the "status" field. - + Field number for the "teamUid" field. - - Field number for the "encryptedTeamKey" field. + + Field number for the "status" field. - - Field number for the "force" field. + + Field number for the "revision" field. - - - if false, existing team key must be null to succeed - + + Field number for the "sharedFolderAddRecordStatus" field. - - Field number for the "id" field. + + Field number for the "sharedFolderAddUserStatus" field. - - Field number for the "data" field. + + Field number for the "sharedFolderAddTeamStatus" field. - - Field number for the "role_id" field. + + Field number for the "sharedFolderUpdateRecordStatus" field. - - Field number for the "encryptedRoleKey" field. + + Field number for the "sharedFolderUpdateUserStatus" field. - - Field number for the "companyId" field. + + Field number for the "sharedFolderUpdateTeamStatus" field. - - Field number for the "nodes" field. + + Field number for the "sharedFolderRemoveRecordStatus" field. - - Field number for the "roles" field. + + Field number for the "sharedFolderRemoveUserStatus" field. - - Field number for the "users" field. + + Field number for the "sharedFolderRemoveTeamStatus" field. - - Field number for the "roleKeys" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "teamKeys" field. + + Field number for the "status" field. - - Field number for the "role_id" field. + + Field number for the "sharedFoldersUpdateV3Response" field. - - Field number for the "teamUid" field. + + Field number for the "sharedFolders" field. - - Field number for the "role_team" field. + + Field number for the "sharedFolderRecords" field. - - - 100 max - + + Field number for the "deletedRecordData" field. - - Field number for the "encryptedTreeKey" field. + + Field number for the "usernames" field. - - - AES 256 key encrypted with admin's data key - + + Field number for the "sharedFolderUid" field. - - Field number for the "enterpriseName" field. + + Field number for the "folderUid" field. - - - plain text name - + + Field number for the "parentUid" field. - - Field number for the "rootNodeData" field. + + Field number for the "sharedFolderKey" field. - - - encrypted node data - + + Field number for the "folderKeyType" field. - - Field number for the "adminUserData" field. + + Field number for the "data" field. - - - encrypted user data - + + Field number for the "dateDeleted" field. - - Field number for the "adminName" field. + + Field number for the "revision" field. - - - full name of admin - + + Field number for the "folderUid" field. - - Field number for the "roleData" field. + + Field number for the "recordUid" field. - - - encrypted role data for admin role - + + Field number for the "sharedRecordKey" field. - - Field number for the "rsaKeyPair" field. + + Field number for the "dateDeleted" field. - - - for sharing to the enterprise - + + Field number for the "revision" field. - - Field number for the "numberSeats" field. + + Field number for the "recordUid" field. - - - should this be part of the request? - + + Field number for the "ownerUid" field. - - Field number for the "enterpriseType" field. + + Field number for the "revision" field. - - Field number for the "rolePublicKey" field. + + Field number for the "clientModifiedTime" field. - - Field number for the "rolePrivateKeyEncryptedWithRoleKey" field. + + Field number for the "data" field. - - Field number for the "roleKeyEncryptedWithTreeKey" field. + + Field number for the "version" field. - - Field number for the "eccKeyPair" field. + + Field number for the "accountUid" field. - + Field number for the "username" field. - - Field number for the "type" field. + + Field number for the "folders" field. - - Field number for the "minimum" field. + + Field number for the "records" field. - - Field number for the "maximum" field. + + Field number for the "folderUid" field. - - Field number for the "allowed" field. + + Field number for the "recordUids" field. - - Field number for the "mcEnterpriseId" field. + + Holder for reflection information generated from push.proto - - Field number for the "messageSessionUid" field. + + File descriptor for push.proto - - Field number for the "encryptedSessionToken" field. + + + to one specific messageSessionUid + - - Field number for the "encryptedTreeKey" field. + + + not supported + - + - MC’s tree key encrypted with MSP’s tree key + to all user's messageSessionUid except one specific messageSessionUid (origin) - - Field number for the "domainPasswordRulesFields" field. + + + to all user's messageSessionUid except one specific messageSessionUid (origin) + - - Field number for the "enterpriseUserId" field. + + + to all messageSessionUid for enterpriseId not equal current messageSessionUid + - - Field number for the "encryptedDeviceToken" field. + + + KA or Chat connects to or disconnects from PS + - - Field number for the "encryptedDeviceDataKey" field. + + + to one specific messageSessionUid (somehow different from DNA) + - + - required for cloud sso + to all devices - - Field number for the "denyApproval" field. + + + to 2FA + - - Field number for the "enterpriseUserId" field. + + + KA registers login/logout + - - Field number for the "encryptedDeviceToken" field. + + Field number for the "messageSessionUid" field. - - Field number for the "failed" field. + + Field number for the "userId" field. - - Field number for the "message" field. + + Field number for the "enterpriseId" field. - - Field number for the "deviceRequests" field. + + + KA sends ws message + - - Field number for the "deviceResponses" field. + + Field number for the "messageType" field. + + + Field number for the "message" field. + + + Field number for the "messageSessionUid" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "userEncryptedDataKey" field. + + + aka platformDeviceToken + - - Field number for the "keyTypeId" field. + + Field number for the "userId" field. - - Field number for the "keys" field. + + Field number for the "enterpriseId" field. - - Field number for the "continuationToken" field. + + + Client sends to push + - - Field number for the "url" field. + + Field number for the "messageSessionUid" field. - - Field number for the "name" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "enterpriseName" field. + + + aka platformDeviceToken + - - Field number for the "restrictVisibility" field. + + Field number for the "deviceTimeStamp" field. - - Field number for the "specialProvisioning" field. + + + PS sends to clients + - - Field number for the "userPrivilege" field. + + Field number for the "messageType" field. - - Field number for the "nodeId" field. + + Field number for the "message" field. - - Field number for the "parentId" field. + + Field number for the "encryptedDeviceToken" field. - - Field number for the "bridgeId" field. + + Field number for the "pushToken" field. - - Field number for the "scimId" field. + + Field number for the "mobilePushPlatform" field. - - Field number for the "licenseId" field. + + Field number for the "transmissionKey" field. - - Field number for the "encryptedData" field. + + Field number for the "messageType" field. - - Field number for the "duoEnabled" field. + + Field number for the "message" field. - - Field number for the "rsaEnabled" field. + + Holder for reflection information generated from record.proto - - Field number for the "ssoServiceProviderId" field. + + File descriptor for record.proto - - Field number for the "restrictVisibility" field. + + + used for scheduler callback + - - Field number for the "roleId" field. + + + used for scheduler callback + - - Field number for the "nodeId" field. + + Field number for the "recordTypeId" field. - - Field number for the "encryptedData" field. + + Field number for the "content" field. - - Field number for the "keyType" field. + + Field number for the "scope" field. - - Field number for the "visibleBelow" field. + + Field number for the "standard" field. - - Field number for the "newUserInherit" field. + + Field number for the "user" field. - - Field number for the "roleType" field. + + Field number for the "enterprise" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "pam" field. - - Field number for the "nodeId" field. + + Field number for the "recordTypes" field. - - Field number for the "encryptedData" field. + + Field number for the "standardCounter" field. - - Field number for the "keyType" field. + + Field number for the "userCounter" field. - - Field number for the "username" field. + + Field number for the "enterpriseCounter" field. - - Field number for the "status" field. + + Field number for the "pamCounter" field. - - Field number for the "lock" field. + + Field number for the "recordTypeId" field. - - Field number for the "userId" field. + + + record id of the added, updated or removed record + - - Field number for the "accountShareExpiration" field. + + Field number for the "counter" field. - - Field number for the "enterpriseUserId" field. + + + updated counter for the scope affected + - - Field number for the "username" field. + + Field number for the "record_uids" field. - - Field number for the "roleId" field. + + Field number for the "client_time" field. - - Field number for the "managedNodeId" field. + + Field number for the "record_uid" field. - - Field number for the "cascadeNodeManagement" field. + + Field number for the "record_key" field. - - Field number for the "nodeId" field. + + Field number for the "record_key_type" field. - - Field number for the "cascadeNodeManagement" field. + + Field number for the "data" field. - - Field number for the "privileges" field. + + Field number for the "extra" field. - - Field number for the "userManagedNodes" field. + + Field number for the "version" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "client_modified_time" field. - - Field number for the "encryptedData" field. + + Field number for the "revision" field. - - Field number for the "roleId" field. + + Field number for the "file_ids" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "folder_uid" field. - - - possible values for privilegeType - UNKNOWN = 0 - MANAGE_USER = 1 - MANAGE_NODES = 2 - MANAGE_LICENCES = 3 - MANAGE_ROLES = 4 - MANAGE_TEAMS = 5 - TRANSFER_ACCOUNT = 6 - RUN_REPORTS = 7 - VIEW_TREE = 8 - MANAGE_BRIDGE = 9 - MANAGE_COMPANIES = 10 - ALLOCATE_POOL_LICENSES = 11 - APPROVE_DEVICE = 13 - + + Field number for the "record_uid" field. - - Field number for the "managedNodeId" field. + + Field number for the "record_key" field. - - Field number for the "roleId" field. + + Field number for the "folder_uid" field. - - Field number for the "privilegeType" field. + + Field number for the "folder_key" field. - - Field number for the "roleId" field. + + Field number for the "folder_key_type" field. - - Field number for the "enforcementType" field. + + Field number for the "team_uid" field. - - Field number for the "value" field. + + Field number for the "team_key" field. - - Field number for the "teamUid" field. + + Field number for the "team_private_key" field. - - Field number for the "name" field. + + Field number for the "team_key_type" field. - - Field number for the "nodeId" field. + + Field number for the "folders" field. - - Field number for the "restrictEdit" field. + + Field number for the "records" field. - - Field number for the "restrictShare" field. + + Field number for the "folder_record_keys" field. - - Field number for the "restrictView" field. + + Field number for the "folders" field. - - Field number for the "encryptedData" field. + + Field number for the "teams" field. - - Field number for the "encryptedTeamKey" field. + + Field number for the "record_uid" field. - - - possible value for userType - USER = 0; - ADMIN = 1; - ADMIN_HIDE_SHARED_FOLDERS = 2; - + + Field number for the "record_key" field. - - Field number for the "teamUid" field. + + Field number for the "version" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "data" field. - - Field number for the "userType" field. + + Field number for the "record_uid" field. - - Field number for the "mcEnterpriseId" field. + + Field number for the "record_key" field. - - Field number for the "mcEnterpriseName" field. + + Field number for the "client_modified_time" field. - - Field number for the "mspNodeId" field. + + Field number for the "data" field. - - Field number for the "numberOfSeats" field. + + Field number for the "non_shared_data" field. - - Field number for the "numberOfUsers" field. + + Field number for the "folder_type" field. - - Field number for the "productId" field. + + Field number for the "folder_uid" field. - - Field number for the "isExpired" field. + + Field number for the "folder_key" field. - - Field number for the "treeKey" field. + + Field number for the "record_links" field. - - Field number for the "tree_key_role" field. + + Field number for the "audit" field. - - Field number for the "productId" field. + + Field number for the "records" field. - - Field number for the "seats" field. + + Field number for the "client_time" field. - - Field number for the "availableSeats" field. + + Field number for the "record_uid" field. - - Field number for the "stash" field. + + Field number for the "client_modified_time" field. - - Field number for the "enterpriseId" field. + + Field number for the "revision" field. - - Field number for the "enterpriseName" field. + + Field number for the "data" field. - - Field number for the "name" field. + + Field number for the "non_shared_data" field. - - Field number for the "enabled" field. + + Field number for the "record_links_add" field. - - Field number for the "isTrial" field. + + Field number for the "record_links_remove" field. - - Field number for the "expiration" field. + + Field number for the "audit" field. - - Field number for the "created" field. + + Field number for the "records" field. - - Field number for the "paid" field. + + Field number for the "client_time" field. - - Field number for the "numberOfSeats" field. + + Field number for the "record_uid" field. - - Field number for the "expiration" field. + + Field number for the "file_file_id" field. - - Field number for the "licenseKeyId" field. + + Field number for the "thumb_file_id" field. - - Field number for the "productTypeId" field. + + Field number for the "data" field. - - Field number for the "name" field. + + Field number for the "record_key" field. - - Field number for the "enterpriseLicenseId" field. + + + record_ref + - - Field number for the "seatsAllocated" field. + + Field number for the "link_key" field. - - Field number for the "seatsPending" field. + + + record_link + - - Field number for the "tier" field. + + Field number for the "folder_uid" field. - - Field number for the "filePlanTypeId" field. + + Field number for the "record_folder_key" field. - - Field number for the "maxBytes" field. + + + GCM-encrypted shared folder key + - - Field number for the "storageExpiration" field. + + Field number for the "record_uid" field. - - Field number for the "licenseStatus" field. + + Field number for the "client_modified_time" field. - - Field number for the "mspPool" field. + + Field number for the "revision" field. - - Field number for the "managedBy" field. + + Field number for the "data" field. - - Field number for the "addOns" field. + + Field number for the "non_shared_data" field. - - Field number for the "bridgeId" field. + + Field number for the "audit" field. - - Field number for the "nodeId" field. + + Field number for the "record_file" field. - - Field number for the "wanIpEnforcement" field. + + Field number for the "folder_key" field. - - Field number for the "lanIpEnforcement" field. + + Field number for the "records" field. - - Field number for the "status" field. + + Field number for the "client_time" field. - - Field number for the "scimId" field. + + + to be used with records_remove and records_delete + - - Field number for the "nodeId" field. + + Field number for the "records" field. - - Field number for the "status" field. + + Field number for the "record_uid" field. - - Field number for the "lastSynced" field. + + Field number for the "revert_to_revision" field. - - Field number for the "rolePrefix" field. + + Field number for the "records" field. - - Field number for the "uniqueGroups" field. + + Field number for the "record_uid" field. - - Field number for the "id" field. + + Field number for the "status" field. - - Field number for the "nodeId" field. + + Field number for the "message" field. - - Field number for the "domain" field. + + Field number for the "record_uid" field. - - Field number for the "method" field. + + Field number for the "status" field. - - Field number for the "teamUid" field. + + Field number for the "message" field. - - Field number for the "name" field. + + Field number for the "link_errors" field. - - Field number for the "nodeId" field. + + Field number for the "records" field. - - Field number for the "encryptedData" field. + + Field number for the "revision" field. - - Field number for the "teamUid" field. + + Field number for the "record_uid" field. - - Field number for the "users" field. + + Field number for the "revision" field. - - Field number for the "ssoServiceProviderId" field. + + Field number for the "data" field. - - Field number for the "nodeId" field. + + Field number for the "version" field. - - Field number for the "name" field. + + Field number for the "records" field. - - Field number for the "sp_url" field. + + Field number for the "record_uid" field. - - Field number for the "inviteNewUsers" field. + + Field number for the "record_key" field. - - Field number for the "active" field. + + Field number for the "data" field. - - Field number for the "isCloud" field. + + Field number for the "fileSize" field. - - Field number for the "userId" field. + + Field number for the "thumbSize" field. - - Field number for the "email" field. + + Field number for the "is_script" field. - - Field number for the "deviceId" field. + + Field number for the "files" field. - - Field number for the "enterpriseUserId" field. + + Field number for the "client_time" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "record_uid" field. - - Field number for the "devicePublicKey" field. + + Field number for the "status" field. - - Field number for the "deviceName" field. + + Field number for the "url" field. - - Field number for the "clientVersion" field. + + Field number for the "parameters" field. - - Field number for the "deviceType" field. + + Field number for the "thumbnail_parameters" field. - - Field number for the "date" field. + + Field number for the "success_status_code" field. - - Field number for the "ipAddress" field. + + Field number for the "files" field. - - Field number for the "location" field. + + Field number for the "revision" field. - - Field number for the "email" field. + + Field number for the "record_uids" field. - - Field number for the "accountUid" field. + + Field number for the "for_thumbnails" field. - - Field number for the "entity" field. + + Field number for the "emergency_access_account_owner" field. - - Field number for the "delete" field. + + Field number for the "record_uid" field. - - Field number for the "data" field. + + Field number for the "status" field. - - - If delete==false then it's list of entity objects (Node, Users etc...). If delete==true then those objects have only ids but no other info. - + + Field number for the "url" field. - - Field number for the "continuationToken" field. + + Field number for the "success_status_code" field. - - Field number for the "hasMore" field. + + Field number for the "fileKeyType" field. - - Field number for the "cacheStatus" field. + + Field number for the "files" field. - - Field number for the "data" field. + + Field number for the "app_uid" field. - - Field number for the "generalData" field. + + Field number for the "record_key" field. - - Field number for the "continuationToken" field. + + Field number for the "client_modified_time" field. - - Field number for the "userId" field. + + Field number for the "data" field. - + + Field number for the "clientTime" field. + + Field number for the "recordUid" field. - - Field number for the "key" field. + + Field number for the "recordDetailsInclude" field. - - Field number for the "keyType" field. + + Field number for the "username" field. - - Field number for the "version" field. + + Field number for the "owner" field. - - Field number for the "data" field. + + Field number for the "shareAdmin" field. - - Field number for the "extra" field. + + Field number for the "sharable" field. - - Field number for the "userId" field. + + Field number for the "editable" field. - - Field number for the "backupKey" field. + + Field number for the "awaitingApproval" field. - - Field number for the "userId" field. + + + flag indicating if the record is awaiting approval from the user referenced in username + - - Field number for the "userName" field. + + Field number for the "expiration" field. - - Field number for the "dataKey" field. + + + time limit for the record directly shared to a user + - - Field number for the "dataKeyType" field. + + Field number for the "accountUid" field. - - Field number for the "privateKey" field. + + Field number for the "timerNotificationType" field. - - Field number for the "treeKey" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "treeKeyType" field. + + Field number for the "resharable" field. - - Field number for the "backupKeys" field. + + Field number for the "editable" field. - - Field number for the "enterpriseEccPrivateKey" field. + + Field number for the "revision" field. - - Field number for the "users" field. + + Field number for the "expiration" field. - - Field number for the "records" field. + + + time limit for the record in a shared folder + - - Field number for the "continuationToken" field. + + Field number for the "timerNotificationType" field. - - Field number for the "roleId" field. + + Field number for the "revision" field. - - Field number for the "reEncryptedRoleKey" field. + + Field number for the "version" field. - - Field number for the "roleKey" field. + + + ORIGINAL(1), SUPPORTS_EXTRA(2), RECORD_TYPES(3), FILE(4), APP(5); + - - Field number for the "mspKey" field. + + Field number for the "shared" field. - - Field number for the "enterpriseKeys" field. + + Field number for the "encryptedRecordData" field. - - Field number for the "treeKey" field. + + + record data encrypted with the record key + - - Field number for the "roleId" field. + + Field number for the "encryptedExtraData" field. - - Field number for the "encryptedKey" field. + + + extra record data encrypted with the record key + - - Field number for the "keyType" field. + + Field number for the "clientModifiedTime" field. - - Field number for the "encryptedMspTreeKey" field. + + Field number for the "nonSharedData" field. - - Field number for the "encryptedMspTreeKeyType" field. + + Field number for the "linkedRecordData" field. - - Field number for the "rsaPublicKey" field. + + + a list of child record data + - - Field number for the "rsaEncryptedPrivateKey" field. + + Field number for the "fileId" field. - - Field number for the "eccPublicKey" field. + + + json object of unencrypted data (currently contains only file ids) + - - Field number for the "eccEncryptedPrivateKey" field. + + Field number for the "fileSize" field. - - Field number for the "treeKey" field. + + Field number for the "thumbnailSize" field. - - Field number for the "keyTypeId" field. + + Field number for the "recordKeyType" field. - - Field number for the "events" field. + + Field number for the "recordKey" field. - + Field number for the "recordUid" field. - - Field number for the "userName" field. + + Field number for the "recordUid" field. - - Field number for the "canEdit" field. + + Field number for the "recordData" field. - - Field number for the "canReshare" field. + + Field number for the "userPermission" field. - - Field number for the "shareFrom" field. + + Field number for the "sharedFolderPermission" field. - - - 1 is direct share, 2 share folder, 3 share team folder - + + Field number for the "recordDataWithAccessInfo" field. - - Field number for the "nodeId" field. + + Field number for the "noPermissionRecordUid" field. - - Holder for reflection information generated from folder.proto + + Field number for the "uid" field. - - File descriptor for folder.proto + + Field number for the "isAdmin" field. - - Field number for the "encryptedKey" field. + + + used in the response + - - Field number for the "encryptedKeyType" field. + + Field number for the "objectType" field. - - Field number for the "folderUid" field. + + + used for both request and response + - - Field number for the "recordUid" field. + + Field number for the "isObjectShareAdmin" field. - - Field number for the "userId" field. + + Field number for the "addSharedRecord" field. - - Field number for the "encryptedDataKey" field. + + Field number for the "updateSharedRecord" field. - - - in the order of encryptedRecordKey, encryptedSharedFolderKey and optional encryptedTeamKey - + + Field number for the "removeSharedRecord" field. - - Field number for the "sharedFolderRecordData" field. + + Field number for the "pt" field. - - Field number for the "folderUid" field. + + Field number for the "toUsername" field. - + Field number for the "recordUid" field. - - Field number for the "encryptedRecordFolderKey" field. + + Field number for the "recordKey" field. - - Field number for the "sharedFolderRecordFix" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "recordUid" field. + + Field number for the "teamUid" field. - - Field number for the "recordType" field. + + Field number for the "editable" field. - - Field number for the "recordData" field. + + Field number for the "shareable" field. - - Field number for the "encryptedRecordKey" field. + + Field number for the "transfer" field. - - Field number for the "folderType" field. + + Field number for the "useEccKey" field. - - Field number for the "howLongAgo" field. + + Field number for the "removeVaultData" field. - - Field number for the "folderUid" field. + + Field number for the "expiration" field. - - Field number for the "encryptedRecordFolderKey" field. + + Field number for the "timerNotificationType" field. - - Field number for the "extra" field. + + Field number for the "addSharedRecordStatus" field. - - Field number for the "nonSharedData" field. + + Field number for the "updateSharedRecordStatus" field. - - Field number for the "fileIds" field. + + Field number for the "removeSharedRecordStatus" field. - + Field number for the "recordUid" field. - - Field number for the "revision" field. - - + Field number for the "status" field. - - Field number for the "encryptedFolderName" field. + + + success, pending_accept, user_not_found, already_shared, not_allowed_to_share, access_denied, not_allowed_to_set_permission + - - Field number for the "manageUsers" field. + + Field number for the "message" field. - - Field number for the "manageRecords" field. + + Field number for the "username" field. - + + Field number for the "recordUids" field. + + + Field number for the "isShareAdmin" field. + + + Field number for the "recordPermissions" field. + + + Field number for the "recordUid" field. + + + Field number for the "owner" field. + + Field number for the "canEdit" field. - + Field number for the "canShare" field. - + + Field number for the "canTransfer" field. + + + Field number for the "startWith" field. + + + + return share objects that start with this value + + + + Field number for the "contains" field. + + + + return share objects that contains this value + + + + Field number for the "filtered" field. + + + + users with status != ACTIVE will not be returned if true - used for autoshare, false - used for manage share relationships + + + Field number for the "sharedFolderUid" field. - - Field number for the "folderUid" field. + + + the shared folder uid + - - Field number for the "folderType" field. + + Field number for the "shareRelationships" field. - - Field number for the "parentFolderUid" field. + + + for user sharing relationships + - - Field number for the "folderData" field. + + Field number for the "shareFamilyUsers" field. - - Field number for the "encryptedFolderKey" field. + + + for family + - - Field number for the "sharedFolderFields" field. + + Field number for the "shareEnterpriseUsers" field. - - Field number for the "sharedFolderFolderFields" field. + + + for visible users of enterprise + - - Field number for the "folderUid" field. + + Field number for the "shareTeams" field. - - Field number for the "revision" field. + + + for visible teams of enterprise + - - Field number for the "status" field. + + Field number for the "shareMCTeams" field. - - Field number for the "folderRequest" field. + + + only for mc admins, teams associated with the MC + - - Field number for the "recordRequest" field. + + Field number for the "shareMCEnterpriseUsers" field. - - Field number for the "folderResponse" field. + + + only for mc admins + - - Field number for the "recordResponse" field. + + Field number for the "shareEnterpriseNames" field. - - Holder for reflection information generated from push.proto + + + to send the names of enterprises in which the users are members of + - - File descriptor for push.proto + + Field number for the "username" field. - - - to one specific messageSessionUid - + + Field number for the "fullname" field. - - - not supported - + + Field number for the "enterpriseId" field. - + - to all user's messageSessionUid except one specific messageSessionUid (origin) + only for enterprise user - - - to all user's messageSessionUid except one specific messageSessionUid (origin) - + + Field number for the "status" field. - - - to all messageSessionUid for enterpriseId not equal current messageSessionUid - + + Field number for the "isShareAdmin" field. - + - KA or Chat connects to or disconnects from PS + only for enterprise user - - - to one specific messageSessionUid (somehow different from DNA) - + + Field number for the "isAdminOfSharedFolderOwner" field. - + - to all devices + only used for enterprise user - - - to 2FA - + + Field number for the "teamname" field. + + + Field number for the "enterpriseId" field. + + + Field number for the "teamUid" field. + + + Field number for the "enterprisename" field. + + + Field number for the "enterpriseId" field. + + + Field number for the "transferRecords" field. + + + Field number for the "username" field. + + + Field number for the "recordUid" field. + + + Field number for the "recordKey" field. + + + Field number for the "useEccKey" field. + + + Field number for the "transferRecordStatus" field. + + + Field number for the "username" field. + + + Field number for the "recordUid" field. + + + Field number for the "status" field. + + + Field number for the "message" field. + + + Field number for the "sharedFolders" field. + + + Field number for the "users" field. + + + Field number for the "sharedFolders" field. + + + Field number for the "users" field. - - - KA registers login/logout - + + Field number for the "recordUid" field. - - Field number for the "messageSessionUid" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "userId" field. + + Field number for the "recordUid" field. - - Field number for the "enterpriseId" field. + + Field number for the "accountUid" field. - - - KA sends ws message - + + Field number for the "recordUid" field. - - Field number for the "messageType" field. + + Field number for the "sharedFolderUid" field. - - Field number for the "message" field. + + Field number for the "recordUid" field. - - Field number for the "messageSessionUid" field. + + Field number for the "accountUid" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "timeLimitedAccessType" field. - - - aka platformDeviceToken - + + Field number for the "accountUid" field. - - Field number for the "userId" field. + + + list of users that have access to a record or shared folder + - - Field number for the "enterpriseId" field. + + Field number for the "teamUid" field. - + - Client sends to push + list of teams that have access to a shared folder - - Field number for the "messageSessionUid" field. + + Field number for the "recordUid" field. - - Field number for the "encryptedDeviceToken" field. + + + list of records that have access to a shared folder (aka that are shared via a shared folder) + - - - aka platformDeviceToken - + + Field number for the "sharedObjectUid" field. - - Field number for the "deviceTimeStamp" field. + + + recordUid or sharedFolderUid of which the timer will be set or deleted + - + + Field number for the "timeLimitedAccessType" field. + + + Field number for the "expiration" field. + + - PS sends to clients + delete timer when expiration==0 - - Field number for the "messageType" field. + + Field number for the "timerNotificationType" field. - + + Field number for the "uid" field. + + + + accountUid or teamUid or recordUid + + + Field number for the "message" field. - - Field number for the "encryptedDeviceToken" field. + + Field number for the "revision" field. - - Field number for the "pushToken" field. + + Field number for the "userAccessStatus" field. - - Field number for the "mobilePushPlatform" field. + + + uid is accountUid + - - Field number for the "transmissionKey" field. + + Field number for the "teamAccessStatus" field. - - Field number for the "messageType" field. + + + uid is teamUid + - - Field number for the "message" field. + + Field number for the "recordAccessStatus" field. + + + + uid is recordUid + Holder for reflection information generated from ssocloud.proto @@ -8682,6 +15159,11 @@ * Datatypes of SsoCloudSettings + + + This is actually type 11 in the DB + + * This is how the client can change a Configuration setting @@ -8836,6 +15318,20 @@ Field number for the "ssoCloudSettingAction" field. + + + * This represents the providers that share a given configuration + + + + Field number for the "ssoSpConfigurationId" field. + + + Field number for the "ssoServiceProviderId" field. + + + Field number for the "ssoNodeId" field. + * This is the response to an SsoConfigurationRequest @@ -8877,6 +15373,17 @@ Field number for the "ssoCloudSettingValue" field. + + Field number for the "isShared" field. + + + + If true, this configuration is in use by multiple service providers + + + + Field number for the "sharedConfigs" field. + * This is a request to the IdpType API. @@ -9023,6 +15530,33 @@ UTF-8 bytes of the file content + + + * + This request is by the API Test Tool to upload the IdP metadata file as its UTF-8 byte content. + The response is an SsoCloudConfigurationValidationResponse. + + + + Field number for the "ssoServiceProviderId" field. + + + Field number for the "ssoSpConfigurationId" field. + + + Field number for the "ssoEnterpriseId" field. + + + Field number for the "filename" field. + + + Field number for the "content" field. + + + + UTF-8 bytes of the file content + + * @@ -9065,28 +15599,56 @@ * - This request is sent to retrieve the list of configurations availble to a service provider. + This request is sent to retrieve the list of configurations defined in an enterprise. Field number for the "ssoServiceProviderId" field. + + + Not required, may be zero. + + * This represents one configuration in the list. - If isSelected is true this configuration is the one currently being used. + If isSelected is true this configuration is currently being used by the sso service provider(s) listed. Field number for the "ssoSpConfigurationId" field. + + + The ID of the configuration + + Field number for the "name" field. + + + The name of the configuration + + Field number for the "isSelected" field. + + + If true, this configuration is in use + + + + Field number for the "ssoServiceProviderId" field. + + + + If the configuration is in use, this is a list of service providers that use it. + + * @@ -9096,6 +15658,11 @@ Field number for the "configurationItem" field. + + + A list of all of the SSO Cloud configurations in an enterprise + + * @@ -9167,6 +15734,14 @@ Only used on Logout at this time. + + Field number for the "detached" field. + + + + If true, the login success HTML page contains a button to copy the login token to the clipboard. + + * @@ -9346,5 +15921,210 @@ Used if the messageSessionUid was generated by Keeper rather than the client + + Field number for the "deviceId" field. + + + + Used to differentiate different login attempts by the same user + + + + Field number for the "detached" field. + + + + Whether the HTML page is "detached" from the login process, as in Commander or other CLI clients + + + + + * + This is used when migrating from SSO Connect to SSO Connect Cloud. + This retrieves the current status of the migration. + + If fullStatus == false but limit == 0, a default limit (probably 25) will be used. + + Example 1: (nodeId=123, fullStatus=true, includeMigratedUsers=true, limit=any). ALL users, migrated and unmigrated, will be returned. + Example 2: (nodeId=123, fullStatus=true, includeMigratedUsers=false, limit=any). ALL unmigrated users will be returned. + Example 3: (nodeId=123, fullStatus=false, includeMigratedUsers=true, limit=-1). No users will be returned + Example 4: (nodeId=123, fullStatus=false, includeMigratedUsers=true, limit=0). The first 25 users of each type, migrated and unmigrated, will be returned. + Example 5: (nodeId=123, fullStatus=false, includeMigratedUsers=false, limit=0). The first 25 unmigrated users will be returned. + Example 6: (nodeId=123, fullStatus=false, includeMigratedUsers=false, limit=15). The first 15 unmigrated users will be returned. + Example 7: (nodeId=123, fullStatus=false, includeMigratedUsers=false, limit=-1). Just stats will be returned, no users will be returned. + + @see SsoCloudMigrationStatusResponse + @since MH: 2022-01-11 + + + + Field number for the "nodeId" field. + + + + Required. The node being queried. It should have an SSO migration in process. + + + + Field number for the "fullStatus" field. + + + + If true, the full status will be returned, including a list of all unmigrated users - beware this could be large! + + + + Field number for the "includeMigratedUsers" field. + + + + If true, the list of migrated users will also be returned. This applies to both regular status and full status. Default is false. + + + + Field number for the "limit" field. + + + + Return, say, the first 50 migrated and/or unmigrated users. 0 means use the default (25). -1 means don't return any. Ignored if fullStatus is true. + + + + + * + Returns the status of an SSO Connect migration in progress. + If there is an error, success will be false and message will contain an error message. + User records will be sorted by last name. + + @see SsoCloudMigrationStatusRequest + @since MH: 2022-01-11 + + + + Field number for the "success" field. + + + + If true, the call was successful. Otherwise check the message field. + + + + Field number for the "message" field. + + + + Contains an error message if there was an error. + + + + Field number for the "nodeId" field. + + + + ID of the node being queried. + + + + Field number for the "ssoConnectId" field. + + + + ID of the SSO Connect on-premise service provider + + + + Field number for the "ssoConnectName" field. + + + + Name of the SSO Connect on-premise service provider + + + + Field number for the "ssoConnectCloudId" field. + + + + ID of the SSO Connect Cloud service provider + + + + Field number for the "ssoConnectCloudName" field. + + + + Name of the SSO Connect Cloud service provider + + + + Field number for the "totalUsersCount" field. + + + + The number of users serviced by this node + + + + Field number for the "usersMigratedCount" field. + + + + The number of users who have migrated + + + + Field number for the "migratedUsers" field. + + + + The list of migrated users, can be constrained via the limit parameter in the request + + + + Field number for the "unmigratedUsers" field. + + + + The list of unmigrated users, can be constrained via the limit parameter in the request + + + + + * + @since MH: 2022-01-11 + + + + Field number for the "userId" field. + + + + The user ID of the user + + + + Field number for the "email" field. + + + + The primary email address of the user + + + + Field number for the "fullName" field. + + + + The full name of the user + + + + Field number for the "isMigrated" field. + + + + Whether the user has migrated to SSO Cloud + + diff --git a/KeeperSdk/auth/AccountSummaryTypes.cs b/KeeperSdk/auth/AccountSummaryTypes.cs index f6cc358..5303e43 100644 --- a/KeeperSdk/auth/AccountSummaryTypes.cs +++ b/KeeperSdk/auth/AccountSummaryTypes.cs @@ -81,6 +81,16 @@ public class AccountLicense /// public float SecondsUntilStorageExpiration { get; internal set; } + /// + /// File storage plan. Total bytes + /// + public long BytesTotal { get; internal set; } + + /// + /// File storage plan. Used bytes + /// + public long BytesUsed { get; set; } + internal static AccountLicense LoadFromProtobuf(AccountSummary.License license) { return new AccountLicense @@ -92,7 +102,9 @@ internal static AccountLicense LoadFromProtobuf(AccountSummary.License license) SecondsUntilExpiration = license.SecondsUntilExpiration, FilePlanType = license.FilePlanType, StorageExpirationDate = license.StorageExpirationDate, - SecondsUntilStorageExpiration = license.SecondsUntilStorageExpiration + SecondsUntilStorageExpiration = license.SecondsUntilStorageExpiration, + BytesTotal = license.BytesTotal, + BytesUsed = license.BytesUsed, }; } } @@ -168,9 +180,19 @@ public class AccountSettings : PasswordRequirements /// public bool? ShareDatakeyWithEnterprise { get; internal set; } /// + /// If true data key is nor shared with device key + /// + public bool? ShareDataKeyWithDevicePublicKey { get; internal set; } + /// /// Persistent login. /// public bool PersistentLogin { get; internal set; } + /// + /// Record types enabled flag. + /// + + public bool RecordTypesEnabled { get; internal set; } + internal string AccountFolderKey { get; set; } internal AccountShareTo[] ShareAccountTo { get; set; } @@ -193,8 +215,10 @@ internal static AccountSettings LoadFromProtobuf(AccountSummary.Settings setting Theme = settings.Theme, SsoUser = settings.SsoUser, ShareDatakeyWithEnterprise = settings.ShareDataKeyWithEccPublicKey, + ShareDataKeyWithDevicePublicKey = settings.ShareDataKeyWithDevicePublicKey, LogoutTimerInSec = settings.LogoutTimer > 1000 ? settings.LogoutTimer / 1000 : (long?) null, PersistentLogin = settings.PersistentLogin, + RecordTypesEnabled = settings.RecordTypesEnabled, }; } } @@ -207,6 +231,8 @@ internal class AccountKeys public string EncryptedPrivateKey { get; internal set; } + public string EncryptedEcPrivateKey { get; internal set; } + public double? DataKeyBackupDate { get; internal set; } internal static AccountKeys LoadFromProtobuf(AccountSummary.KeysInfo keyInfo) @@ -215,6 +241,7 @@ internal static AccountKeys LoadFromProtobuf(AccountSummary.KeysInfo keyInfo) { EncryptionParams = keyInfo.EncryptionParams.ToByteArray().Base64UrlEncode(), EncryptedPrivateKey = keyInfo.EncryptedPrivateKey.ToByteArray().Base64UrlEncode(), + EncryptedEcPrivateKey = keyInfo.EncryptedEccPrivateKey?.Length > 0 ? keyInfo.EncryptedEccPrivateKey.ToByteArray().Base64UrlEncode() : null, EncryptedDataKey = keyInfo.EncryptedDataKey.ToByteArray().Base64UrlEncode(), DataKeyBackupDate = keyInfo.DataKeyBackupDate > 1 ? keyInfo.DataKeyBackupDate : (double?) null }; diff --git a/KeeperSdk/auth/Auth.cs b/KeeperSdk/auth/Auth.cs index dde815a..4a9e0eb 100644 --- a/KeeperSdk/auth/Auth.cs +++ b/KeeperSdk/auth/Auth.cs @@ -9,8 +9,8 @@ using KeeperSecurity.Configuration; using KeeperSecurity.Utils; + [assembly: InternalsVisibleTo("Tests")] -[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] namespace KeeperSecurity.Authentication.Async { @@ -18,7 +18,6 @@ namespace KeeperSecurity.Authentication.Async /// Defines the user interface methods required for authentication with Keeper. /// /// - /// /// /// public interface IAuthUI : IAuthCallback @@ -116,31 +115,10 @@ public interface IAuthSsoUI : ISsoLogoutCallback Task WaitForDataKey(IDataKeyChannelInfo[] channels, CancellationToken token); } - /// - /// Defines a method that returns HTTP Web proxy credentials. Optional. - /// - /// - /// Keeper SDK calls this interface if it detects that access to the Internet is protected with HTTP Proxy. - /// Clients requests HTTP proxy credentials from the user and return them to the library. - /// - /// - public interface IHttpProxyCredentialUi - { - /// - /// Requests HTTP Proxy credentials. - /// - /// HTTP Proxy information - /// Awaitable boolean result. TrueTrue resume login, False cancel. - Task WaitForHttpProxyCredentials(IHttpProxyInfo proxyInfo); - } - - - - /// /// Represents Keeper authentication. (async) /// - /// + /// /// /// public class Auth : AuthCommon, IAuth @@ -158,9 +136,7 @@ public Auth(IAuthUI authUi, IConfigurationStorage storage, IKeeperEndpoint endpo Ui = authUi; } - /// - /// Gets configuration storage. - /// + /// public IConfigurationStorage Storage { get; } /// @@ -171,40 +147,27 @@ public Auth(IAuthUI authUi, IConfigurationStorage storage, IKeeperEndpoint endpo /// public override IAuthCallback AuthCallback => Ui; - /// - /// Gets or sets session resumption flag - /// + /// public bool ResumeSession { get; set; } - /// - /// Forces master password login for SSO accounts. - /// + /// public bool AlternatePassword { get; set; } - /// - /// Gets or sets username. - /// + /// public new string Username { get => base.Username; set => base.Username = value; } - /// - public void SetPushNotifications(IFanOut pushNotifications) - { - PushNotifications = pushNotifications; - } - - /// - /// Gets or sets device token - /// + /// public new byte[] DeviceToken { get => base.DeviceToken; set => base.DeviceToken = value; } + /* private async Task DetectProxyAsync(Func resumeWhenDone) { var keeperUri = new Uri($"https://{Endpoint.Server}/api/rest/ping"); @@ -233,12 +196,12 @@ private async Task DetectProxyAsync(Func resumeWhenDone) var uiTask = proxyUi.WaitForHttpProxyCredentials(proxyInfo); var index = Task.WaitAny(uiTask, credentialsTask.Task); var result = await(index == 0 ? uiTask : credentialsTask.Task); - if (!result) throw new KeeperCanceled(); + if (!result) throw new KeeperCanceled("proxy_detected", "HTTP proxy credential canceled."); await resumeWhenDone.Invoke(); } else { - throw new KeeperCanceled(); + throw new KeeperCanceled("proxy_detected", "HTTP proxy credential UI is not implemented."); } } else @@ -246,17 +209,9 @@ private async Task DetectProxyAsync(Func resumeWhenDone) await resumeWhenDone.Invoke(); } } + */ - /// - /// Login to Keeper account with SSO provider. - /// - /// SSO provider name. - /// Force new login with SSO IdP. - /// Awaitable task. - /// - /// Login is cancelled. - /// Unrecoverable login exception. - /// Generic exception. + /// public async Task LoginSso(string providerName, bool forceLogin = false) { var v3 = new LoginContext(); @@ -283,53 +238,42 @@ public async Task LoginSso(string providerName, bool forceLogin = false) return; } - throw new KeeperCanceled(); + throw new KeeperCanceled("cancelled", "Too many unsuccessful login attempts."); } - /// - /// Login to Keeper account with email. - /// - /// Keeper account email address. - /// Master password(s) - /// Awaitable task - /// - /// Unrecoverable login error. - /// Login cancelled. - /// Other exceptions. + /// public async Task Login(string username, params string[] passwords) { - await DetectProxyAsync(async () => + if (string.IsNullOrEmpty(username)) { - if (string.IsNullOrEmpty(username)) - { - throw new KeeperStartLoginException(LoginState.RequiresUsername, "Username is required."); - } + throw new KeeperStartLoginException(LoginState.RequiresUsername, "Username is required."); + } - Username = username.ToLowerInvariant(); - var v3 = new LoginContext(); - foreach (var p in passwords) - { - if (string.IsNullOrEmpty(p)) continue; - v3.PasswordQueue.Enqueue(p); - } + Username = username.ToLowerInvariant(); + var v3 = new LoginContext(); + foreach (var p in passwords) + { + if (string.IsNullOrEmpty(p)) continue; + v3.PasswordQueue.Enqueue(p); + } - try - { - authContext = await LoginV3(v3); - } - catch (KeeperRegionRedirect krr) - { - await this.RedirectToRegionV3(krr.RegionHost); - authContext = await LoginV3(v3); - } + try + { + authContext = await LoginV3(v3); + } + catch (KeeperRegionRedirect krr) + { + await this.RedirectToRegionV3(krr.RegionHost); + authContext = await LoginV3(v3); + } - this.StoreConfigurationIfChangedV3(v3); - await PostLogin(); - }); + this.StoreConfigurationIfChangedV3(v3); + await PostLogin(); } private async Task LoginSsoV3(LoginContext v3, string providerName, bool forceLogin) { + SetPushNotifications(null); if (Ui != null && Ui is IAuthSsoUI) { var rs = await this.GetSsoServiceProvider(v3, providerName); @@ -338,11 +282,12 @@ private async Task LoginSsoV3(LoginContext v3, string providerName, return await AuthorizeUsingSso(v3, rs.IsCloud, rs.SpUrl, forceLogin); } - throw new KeeperCanceled(); + throw new KeeperCanceled("not_implemented", "SSO Login UI is not implemented"); } private async Task LoginV3(LoginContext v3) { + SetPushNotifications(null); try { var loginMethod = v3.AccountAuthType == AccountAuthType.Regular || v3.PasswordQueue.Count == 0 @@ -363,7 +308,7 @@ private async Task ExecuteStartLogin(LoginContext v3, StartLoginReq Debug.WriteLine($"REST Request: endpoint \"start_login\": {request}"); #endif - var rs = await Endpoint.ExecuteRest("authentication/start_login", new ApiRequestPayload {Payload = request.ToByteString()}); + var rs = await Endpoint.ExecuteRest("authentication/start_login", new ApiRequestPayload { Payload = request.ToByteString() }); var response = LoginResponse.Parser.ParseFrom(rs); #if DEBUG Debug.WriteLine($"REST Response: endpoint \"start_login\": {response}"); @@ -390,7 +335,11 @@ private async Task ExecuteStartLogin(LoginContext v3, StartLoginReq return context; case LoginState.RequiresUsername: - return await ResumeLogin(v3, response.EncryptedLoginToken); + if (!string.IsNullOrEmpty(Username)) + { + return await ResumeLogin(v3, response.EncryptedLoginToken); + } + break; case LoginState.Requires2Fa: if (Ui != null) @@ -505,7 +454,6 @@ private async Task StartLogin( loginMethod); } - private Task ResumeLogin( LoginContext v3, ByteString loginToken, @@ -526,7 +474,7 @@ private async Task TwoFactorValidate( var loginTokenSource = new TaskCompletionSource(); var t = this.TwoFactorValidatePrepare( - token => loginTokenSource.SetResult(token), + token => { loginTokenSource.SetResult(token); return Task.FromResult(true); }, loginToken, channels); var channelInfo = t.Item1; @@ -540,7 +488,7 @@ private async Task TwoFactorValidate( onDone?.Invoke(); if (index == 0) { - if (!await userTask) throw new KeeperCanceled(); + if (!await userTask) throw new KeeperCanceled("canceled", "2FA authentication canceled."); } else { @@ -602,7 +550,7 @@ private async Task ValidateAuthHash(LoginContext v3, ByteString log return await ResumeLogin(v3, loginToken); } - throw new KeeperCanceled(); + throw new KeeperCanceled("canceled", "Enter Master Pasword is canceled"); } } @@ -610,7 +558,7 @@ private async Task ApproveDevice(LoginContext v3, ByteString loginT { var loginTokenTask = new TaskCompletionSource(); var t = this.ApproveDevicePrepare(v3, - (token) => { loginTokenTask.SetResult(token); }, + (token) => { loginTokenTask.SetResult(token); return Task.FromResult(true); }, loginToken); var channelInfo = t.Item1; var onDone = t.Item2; @@ -624,7 +572,7 @@ private async Task ApproveDevice(LoginContext v3, ByteString loginT { onDone?.Invoke(); var resume = await uiTask; - if (!resume) throw new KeeperCanceled(); + if (!resume) throw new KeeperCanceled("canceled", "Device approval canceled"); } else { @@ -666,7 +614,7 @@ private async Task AuthorizeUsingSso( if (index == 0) { var result = await uiTask; - if (!result) throw new KeeperCanceled(); + if (!result) throw new KeeperCanceled("canceled", "SSO Login canceled"); } else { @@ -683,12 +631,12 @@ private async Task AuthorizeUsingSso( } } - throw new KeeperCanceled(); + throw new KeeperCanceled("not_implemented", "SSO Login UI is not implemented"); } private async Task RequestDataKey(LoginContext v3, ByteString loginToken) { - if (!(Ui is IAuthSsoUI ssoUi)) throw new KeeperCanceled(); + if (!(Ui is IAuthSsoUI ssoUi)) throw new KeeperCanceled("not_implemented", "SSO Login UI is not implemented"); var completeTask = new TaskCompletionSource(); var t = this.RequestDataKeyPrepare( @@ -706,7 +654,7 @@ private async Task RequestDataKey(LoginContext v3, ByteString login if (index == 0) { var result = await uiTask; - if (!result) throw new KeeperCanceled(); + if (!result) throw new KeeperCanceled("canceled", "Admin Approval is canceled"); } else { @@ -718,7 +666,7 @@ private async Task RequestDataKey(LoginContext v3, ByteString login return await ResumeLogin(v3, loginToken); } - /// + /// public override void Dispose() { Ui = null; diff --git a/KeeperSdk/auth/AuthCommon.cs b/KeeperSdk/auth/AuthCommon.cs index 0dcc0a4..5467dda 100644 --- a/KeeperSdk/auth/AuthCommon.cs +++ b/KeeperSdk/auth/AuthCommon.cs @@ -78,6 +78,66 @@ public interface IAuthEndpoint byte[] DeviceToken { get; } } + /// + /// Defines user or team keys + /// + public class UserKeys + { + /// + public UserKeys(byte[] aes = null, byte[] rsa = null, byte[] ec = null) + { + AesKey = aes; + RsaPublicKey = rsa; + EcPublicKey = ec; + } + /// + /// AES key + /// + public byte[] AesKey { get; } + /// + /// RSA public key + /// + public byte[] RsaPublicKey { get; } + /// + /// ECC public key + /// + public byte[] EcPublicKey { get; } + } + + public interface IKeyLoader + { + /// + /// Loads user's keys + /// + /// list of user emails + /// + Task> LoadUsersKeys(IEnumerable users); + + /// + /// Gets user's keys. + /// + /// Username + /// user's keys + /// true if keys exist false if does not + bool TryGetUserKeys(string username, out UserKeys keys); + + /// + /// Gets team's keys. + /// + /// Team UID + /// team's keys + /// true if keys exist false if does not + bool TryGetTeamKeys(string teamUid, out UserKeys keys); + + /// + /// Load team's keys + /// + /// list of team Uids + /// List of unknown teams + Task> LoadTeamKeys(IEnumerable teamUids); + + } + /// /// Defines the properties and methods of not connected Keeper authentication object. /// @@ -139,7 +199,7 @@ public interface IAuth: IAuthEndpoint /// /// Defines properties and methods of connected Keeper authentication object. /// - public interface IAuthentication : IAuthEndpoint + public interface IAuthentication : IAuthEndpoint, IKeyLoader { /// /// Gets authentication context @@ -153,7 +213,7 @@ public interface IAuthentication : IAuthEndpoint /// Type of response. /// throws exception on error. /// Task returning JSON response. - /// + /// Task ExecuteAuthCommand(AuthenticatedCommand command, Type responseType, bool throwOnError); /// @@ -162,15 +222,23 @@ public interface IAuthentication : IAuthEndpoint /// Request endpoint. /// Protobuf request. /// Expected response type + /// Request version /// Task returning Protobuf response. - /// - Task ExecuteAuthRest(string endpoint, IMessage request, Type responseType = null); + /// + Task ExecuteAuthRest(string endpoint, IMessage request, Type responseType = null, int apiVersion=0); /// /// Logout from Keeper server. /// /// Awaitable Task Task Logout(); + + /// + Task AuditEventLogging(string eventType, AuditEventInput input = null); + /// + void ScheduleAuditEventLogging(string eventType, AuditEventInput input = null); + /// + Task FlushAuditEvents(); } /// @@ -196,6 +264,20 @@ public interface IAuthContext /// /// User's RSA Private Key. /// + RsaPrivateCrtKeyParameters PrivateRsaKey { get; } + + /// + /// User's EC Private key + /// + ECPrivateKeyParameters PrivateEcKey { get; } + + /// + /// Enterprise EC Public key + /// + ECPublicKeyParameters EnterprisePublicEcKey { get; } + + /// + [Obsolete("Use PrivateRsaKey")] RsaPrivateCrtKeyParameters PrivateKey { get; } /// @@ -261,7 +343,9 @@ internal class AuthContext : IAuthContext { public byte[] DataKey { get; internal set; } public byte[] ClientKey { get; internal set; } - public RsaPrivateCrtKeyParameters PrivateKey { get; internal set; } + public RsaPrivateCrtKeyParameters PrivateRsaKey { get; internal set; } + public ECPrivateKeyParameters PrivateEcKey { get; internal set; } + public ECPublicKeyParameters EnterprisePublicEcKey { get; internal set; } public byte[] SessionToken { get; internal set; } public SessionTokenRestriction SessionTokenRestriction { get; set; } public AccountLicense License { get; internal set; } @@ -285,41 +369,34 @@ public bool CheckPasswordValid(string password) return false; } } + public RsaPrivateCrtKeyParameters PrivateKey => PrivateRsaKey; } /// /// Represents base authentication class /// - /// - /// - public abstract class AuthCommon : IAuthentication, IDisposable + /// + public abstract partial class AuthCommon : IAuthentication, IDisposable { - /// - /// Gets Keeper endpoint. - /// + /// public IKeeperEndpoint Endpoint { get; protected set; } - /// - /// Gets user email address. - /// + /// public string Username { get; protected set; } - /// - /// Gets device token - /// + /// public byte[] DeviceToken { get; protected set; } internal AuthContext authContext; - /// - /// Gets connected user context. - /// + /// public IAuthContext AuthContext => authContext; /// public IFanOut PushNotifications { get; internal set; } + /// public abstract IAuthCallback AuthCallback { get; } internal void ResetKeepAliveTimer() @@ -360,14 +437,7 @@ internal void SetKeepAliveTimer(int timeoutInMinutes, IAuthentication auth) (long) timeout.TotalMilliseconds / 2); } - /// - /// Executes Keeper JSON command. - /// - /// JSON command. - /// Type of response. - /// if True throw exception on Keeper error. - /// JSON response. - /// Keeper JSON API Exception + /// public async Task ExecuteAuthCommand(AuthenticatedCommand command, Type responseType, bool throwOnError) { command.username = Username; @@ -392,15 +462,8 @@ public async Task ExecuteAuthCommand(AuthenticatedCommand com return response; } - /// - /// Executes Keeper Protobuf request. - /// - /// Request endpoint. - /// Protobuf request. - /// Expected response type - /// Task returning Protobuf response. - /// - public async Task ExecuteAuthRest(string endpoint, IMessage request, Type responseType = null) + /// + public async Task ExecuteAuthRest(string endpoint, IMessage request, Type responseType = null, int apiVersion=0) { #if DEBUG Debug.WriteLine($"REST Request: endpoint \"{endpoint}\": {request}"); @@ -408,7 +471,7 @@ public async Task ExecuteAuthRest(string endpoint, IMessage request, T var rq = new ApiRequestPayload { EncryptedSessionToken = ByteString.CopyFrom(authContext.SessionToken), - ApiVersion = 3, + ApiVersion = apiVersion, }; if (request != null) { @@ -430,12 +493,19 @@ public async Task ExecuteAuthRest(string endpoint, IMessage request, T return response; } - private bool _storeProxyReturned; + /// + public void SetPushNotifications(IFanOut pushNotifications) + { + if (!ReferenceEquals(PushNotifications, pushNotifications)) + { + PushNotifications?.Dispose(); + PushNotifications = pushNotifications; + } + } + protected virtual IWebProxy GetStoredProxy(Uri proxyUri, string[] proxyAuth) { - if (_storeProxyReturned) return null; - _storeProxyReturned = true; -#if NET45 +#if NET452_OR_GREATER if (CredentialManager.GetCredentials(proxyUri.DnsSafeHost, out var username, out var password)) { return AuthUIExtensions.GetWebProxyForCredentials(proxyUri, proxyAuth, username, password); @@ -444,53 +514,52 @@ protected virtual IWebProxy GetStoredProxy(Uri proxyUri, string[] proxyAuth) return null; } - protected async Task DetectProxy(Uri uri, Func onProxyDetected) - where T : class + /// + public async Task DetectProxy(Action onProxyDetected) { - IWebProxy proxy = Endpoint.WebProxy; - do + var keeperUri = new Uri($"https://{Endpoint.Server}/api/rest/ping"); + string authHeader = ""; + try + { + await PingKeeperServer(keeperUri, Endpoint.WebProxy); + return true; + } + catch (WebException e) + { + var response = (HttpWebResponse) e.Response; + if (response?.StatusCode != HttpStatusCode.ProxyAuthenticationRequired) throw e; + + authHeader = response.Headers.AllKeys + .Where(x => string.Compare(x, "Proxy-Authenticate", StringComparison.OrdinalIgnoreCase) == 0) + .Select(x => response.Headers[x]) + .FirstOrDefault(); + } + var systemProxy = WebRequest.GetSystemWebProxy(); + var directUri = systemProxy.GetProxy(keeperUri); + var proxyAuthenticate = KeeperSettings.ParseProxyAuthentication(authHeader).ToArray(); + + var proxy = GetStoredProxy(directUri, proxyAuthenticate); + if (proxy != null && !ReferenceEquals(proxy, Endpoint.WebProxy)) { try { - await PingKeeperServer(uri, proxy); - if (proxy != null) - { - Endpoint.WebProxy = proxy; - } - - return null; + await PingKeeperServer(keeperUri, proxy); + Endpoint.WebProxy = proxy; + return true; } catch (WebException e) { var response = (HttpWebResponse) e.Response; - if (response?.StatusCode != HttpStatusCode.ProxyAuthenticationRequired) return null; - - var authHeader = response.Headers.AllKeys - .FirstOrDefault(x => - string.Compare(x, "Proxy-Authenticate", StringComparison.OrdinalIgnoreCase) == - 0); - var systemProxy = WebRequest.GetSystemWebProxy(); - var directUri = systemProxy.GetProxy(uri); - var proxyAuthenticate = KeeperSettings.ParseProxyAuthentication(authHeader).ToArray(); - - - var storedProxy = GetStoredProxy(directUri, proxyAuthenticate); - if (storedProxy != null && ReferenceEquals(proxy, storedProxy)) - { - storedProxy = null; - } - - proxy = storedProxy; - if (proxy != null) continue; - - return onProxyDetected?.Invoke(directUri, proxyAuthenticate); + if (response?.StatusCode != HttpStatusCode.ProxyAuthenticationRequired) throw e; } - } while (true); + } + onProxyDetected?.Invoke(directUri, proxyAuthenticate); + return false; } - internal virtual async Task PingKeeperServer(Uri serverUri, IWebProxy proxy) + internal virtual async Task PingKeeperServer(Uri keeperUri, IWebProxy proxy) { - var request = (HttpWebRequest) WebRequest.Create(serverUri); + var request = (HttpWebRequest) WebRequest.Create(keeperUri); if (proxy != null) { request.Proxy = proxy; @@ -508,6 +577,7 @@ internal virtual async Task PingKeeperServer(Uri serverUri, IWebProxy prox } } + /// public bool SupportRestrictedSession { get; set; } protected async Task PostLogin() @@ -579,7 +649,13 @@ protected async Task PostLogin() var privateKeyData = CryptoUtils.DecryptAesV1(keys.EncryptedPrivateKey.Base64UrlDecode(), authContext.DataKey); - authContext.PrivateKey = CryptoUtils.LoadPrivateKey(privateKeyData); + authContext.PrivateRsaKey = CryptoUtils.LoadPrivateKey(privateKeyData); + } + if (keys.EncryptedEcPrivateKey != null) { + var privateKeyData = + CryptoUtils.DecryptAesV2(keys.EncryptedEcPrivateKey.Base64UrlDecode(), + authContext.DataKey); + authContext.PrivateEcKey = CryptoUtils.LoadPrivateEcKey(privateKeyData); } if (!string.IsNullOrEmpty(clientKey)) @@ -598,7 +674,8 @@ protected async Task PostLogin() { if ((authContext.SessionTokenRestriction & SessionTokenRestriction.AccountExpired) != 0) { - var accountExpiredDescription = "Your Keeper account has expired. Please open the Keeper app to renew " + + var accountExpiredDescription = + "Your Keeper account has expired. Please open the Keeper app to renew " + $"or visit the Web Vault at https://{Endpoint.Server}/vault"; await postUi.Confirmation(accountExpiredDescription); } @@ -614,7 +691,8 @@ protected async Task PostLogin() var validatorSalt = CryptoUtils.GetRandomBytes(16); authContext.PasswordValidator = - CryptoUtils.CreateEncryptionParams(newPassword, validatorSalt, 100000, CryptoUtils.GetRandomBytes(32)); + CryptoUtils.CreateEncryptionParams(newPassword, validatorSalt, 100000, + CryptoUtils.GetRandomBytes(32)); authContext.SessionTokenRestriction &= ~SessionTokenRestriction.AccountRecovery; } @@ -659,10 +737,12 @@ protected async Task PostLogin() if ((authContext.SessionTokenRestriction & SessionTokenRestriction.AccountRecovery) != 0) { - throw new KeeperPostLoginErrors("expired_master_password_description", "Your Master Password has expired, you are required to change it before you can login."); + throw new KeeperPostLoginErrors("expired_master_password_description", + "Your Master Password has expired, you are required to change it before you can login."); } - throw new KeeperPostLoginErrors("need_vault_settings_update", "Please log into the web Vault to update your account settings."); + throw new KeeperPostLoginErrors("need_vault_settings_update", + "Please log into the web Vault to update your account settings."); } } } @@ -670,14 +750,82 @@ protected async Task PostLogin() { if (authContext.Settings.LogoutTimerInSec.HasValue) { - if (authContext.Settings.LogoutTimerInSec > TimeSpan.FromMinutes(10).TotalSeconds && authContext.Settings.LogoutTimerInSec < TimeSpan.FromHours(12).TotalSeconds) + if (authContext.Settings.LogoutTimerInSec > TimeSpan.FromMinutes(10).TotalSeconds && + authContext.Settings.LogoutTimerInSec < TimeSpan.FromHours(12).TotalSeconds) + { + SetKeepAliveTimer( + (int) TimeSpan.FromSeconds(authContext.Settings.LogoutTimerInSec.Value).TotalMinutes, this); + } + } + + if (authContext.License.AccountType == 2) + { + try + { + var rs = (BreachWatch.EnterprisePublicKeyResponse) await ExecuteAuthRest( + "enterprise/get_enterprise_public_key", null, + typeof(BreachWatch.EnterprisePublicKeyResponse)); + authContext.EnterprisePublicEcKey = + CryptoUtils.LoadPublicEcKey(rs.EnterpriseECCPublicKey.ToByteArray()); + } + catch (Exception e) { - SetKeepAliveTimer((int) TimeSpan.FromSeconds(authContext.Settings.LogoutTimerInSec.Value).TotalMinutes, this); + Debug.WriteLine(e.Message); } } } } + private readonly List _auditEventQueue = new List(); + + /// + public void ScheduleAuditEventLogging(string eventType, AuditEventInput input = null) + { + if (AuthContext.EnterprisePublicEcKey != null) + { + _auditEventQueue.Add(new AuditEventItem + { + AuditEventType = eventType, + Inputs = input + }); + } + } + + /// + public async Task FlushAuditEvents() + { + if (AuthContext.EnterprisePublicEcKey != null) + { + List events = null; + lock (_auditEventQueue) + { + events = new List(_auditEventQueue); + _auditEventQueue.Clear(); + } + while (events.Count > 0) + { + var chunk = events.Take(99).ToArray(); + events.RemoveRange(0, chunk.Length); + + var rq = new AuditEventLoggingCommand + { + ItemLogs = chunk + }; + _ = await AuthExtensions.ExecuteAuthCommand(this, rq); + } + } + } + + /// + public async Task AuditEventLogging(string eventType, AuditEventInput input = null) + { + if (AuthContext.EnterprisePublicEcKey != null) + { + ScheduleAuditEventLogging(eventType, input); + await FlushAuditEvents(); + } + } + private async Task DoLogout() { try @@ -696,16 +844,13 @@ private async Task DoLogout() } } - /// - /// Logout from Keeper server. - /// - /// Awaitable Task + /// public virtual async Task Logout() { await DoLogout(); } - /// + /// public virtual void Dispose() { authContext = null; diff --git a/KeeperSdk/auth/AuthDoc.cs b/KeeperSdk/auth/AuthDoc.cs index c32b999..d0c0dac 100644 --- a/KeeperSdk/auth/AuthDoc.cs +++ b/KeeperSdk/auth/AuthDoc.cs @@ -16,8 +16,6 @@ namespace KeeperSecurity.Authentication /// /// Provides base types for establishing connection to Keeper servers. /// - /// - /// [CompilerGenerated] internal class NamespaceDoc { @@ -28,82 +26,46 @@ namespace Sync /// /// Provides types for connecting to Keeper servers (sync). /// - [CompilerGenerated] - internal class NamespaceDoc - { - } - } - - namespace Async - { - /// - /// Provides types for connecting to Keeper servers (async). - /// /// - /// This example shows how to authenticate at Keeper server. - /// - /// using System.Linq; - /// using System.Threading; - /// using System.Threading.Tasks; - /// using KeeperSecurity.Authentication; - /// using KeeperSecurity.Authentication.Async; - /// using KeeperSecurity.Configuration; - /// - /// class AuthUi : IAuthUI - /// { - /// public Task<bool> WaitForDeviceApproval(IDeviceApprovalChannelInfo[] channels, CancellationToken token) - /// { - /// // find email device approval channel. - /// var emailChannel = channels - /// .Cast<IDeviceApprovalPushInfo>() - /// .FirstOrDefault(x => x.Channel == DeviceApprovalChannel.Email); - /// if (emailChannel != null) - /// { - /// // invoke send email action. - /// _ = Task.Run(async () => - /// { - /// await emailChannel.InvokeDeviceApprovalPushAction(); - /// }); - /// } - /// return new TaskCompletionSource<bool>().Task; - /// } - /// public async Task<bool> WaitForTwoFactorCode(ITwoFactorChannelInfo[] channels, CancellationToken token) - /// { - /// // find 2FA code channel. - /// var codeChannel = channels - /// .Cast<ITwoFactorAppCodeInfo>() - /// .FirstOrDefault(); - /// if (codeChannel != null) - /// { - /// Console.WriteLine("Enter 2FA code: "); - /// var code = Console.ReadLine(); - /// await codeChannel.InvokeTwoFactorCodeAction("code"); - /// return true; - /// } - /// return false; - /// } - /// public async Task<bool> WaitForUserPassword(IPasswordInfo info, CancellationToken token) - /// { - /// Console.WriteLine($"Enter password for {info.Username}: "); - /// var password = Console.ReadLine(); - /// await info.InvokePasswordActionDelegate(password); - /// return true; - /// } - /// } - /// - /// internal static class Program - /// { - /// private static async Task Main() - /// { - /// var auth = new Auth(new AuthUi(), new JsonConfigurationStorage()); - /// await auth.Login("username@company.com"); - /// } - /// } - /// - /// - /// - /// - /// + /// + ///using System; + ///using System.Threading.Tasks; + ///using Cli; + ///using KeeperSecurity.Authentication; + ///using KeeperSecurity.Authentication.Sync; + ///using KeeperSecurity.Configuration; + ///using KeeperSecurity.Vault; + /// + ///namespace Sample + ///{ + /// internal static class Program + /// { + /// private static async Task Main() + /// { + /// // Keeper SDK needs a storage to save configuration + /// // such as: last login name, device token, etc + /// var configuration = new JsonConfigurationStorage("config.json"); + /// var inputManager = new SimpleInputManager(); + /// + /// // Login to Keeper + /// Console.WriteLine("Logging in..."); + /// var authFlow = new AuthSync(configuration); + /// await Utils.LoginToKeeper(authFlow, inputManager, "username@company.com"); + /// + /// if (authFlow.Step is ErrorStep es) + /// { + /// Console.WriteLine(es.Message); + /// return; + /// } + /// if (!authFlow.IsAuthenticated()) return; + /// var auth = authFlow; + /// var vault = new VaultOnline(auth); + /// await vault.SyncDown(); + /// } + /// } + ///} + /// + /// [CompilerGenerated] internal class NamespaceDoc { diff --git a/KeeperSdk/auth/AuthExtensions.cs b/KeeperSdk/auth/AuthExtensions.cs index a9d15aa..bad70ed 100644 --- a/KeeperSdk/auth/AuthExtensions.cs +++ b/KeeperSdk/auth/AuthExtensions.cs @@ -1,4 +1,7 @@ -using System.Threading.Tasks; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; using AccountSummary; using Authentication; using Google.Protobuf; @@ -25,15 +28,77 @@ public static bool IsAuthenticated(this IAuthentication auth) /// /// Executes JSON authenticated command that does not return data. /// - /// The authenticated connection. - /// JSON authenticated command. - /// A Task returning basic JSON response. - /// + /// The authenticated connection + /// JSON authenticated command + /// A JSON response + /// public static async Task ExecuteAuthCommand(this IAuthentication auth, AuthenticatedCommand command) { return await auth.ExecuteAuthCommand(command, typeof(KeeperApiResponse), true); } + /// + /// Execute JSON authenticated command in a batch + /// + /// The authenticated connection + /// JSON authenticated commands + /// A list of JSON responses + public static async Task> ExecuteBatch(this IAuthentication auth, IList commands) + { + var responses = new List(); + int pos = 0; + int delayInSec = 0; + while (pos < commands.Count) + { + if (delayInSec > 0) + { + await Task.Delay(TimeSpan.FromSeconds(delayInSec)); + } + + var rq = new ExecuteCommand() + { + Requests = commands.Skip(pos).Take(100).ToList(), + }; + var execRs = await auth.ExecuteAuthCommand(rq); + pos += execRs.Results.Count; + + if (execRs.Results.Count == rq.Requests.Count) + { + responses.AddRange(execRs.Results); + delayInSec = 5; + } + else if (execRs.Results.Count > 0) + { + delayInSec = 0; + if (execRs.Results.Count > 50) + { + delayInSec = 5; + } + if (execRs.Results.Count > 1) + { + responses.AddRange(execRs.Results.Take(execRs.Results.Count - 1)); + } + var lastStatus = responses.Last(); + if (lastStatus.resultCode == "throttled") + { + pos -= 1; + delayInSec = 10; + } + else + { + responses.Add(lastStatus); + } + } + else + { + break; + } + + } + + return responses; + } + /// /// Executes JSON authenticated command. /// @@ -44,7 +109,7 @@ public static async Task ExecuteAuthCommand(this IAuthenticat /// if True throw exception on Keeper error. /// A Task returning JSON response. /// Keeper API Exception. - /// + /// public static async Task ExecuteAuthCommand(this IAuthentication auth, TC command, bool throwOnError = true) where TC : AuthenticatedCommand where TR : KeeperApiResponse @@ -60,7 +125,7 @@ public static async Task ExecuteAuthCommand(this IAuthentication aut /// SON authenticated command. /// Awaitable task. /// Keeper API Exception. - /// + /// public static Task ExecuteAuthCommand(this IAuthentication auth, TC command) where TC : AuthenticatedCommand { @@ -75,14 +140,15 @@ public static Task ExecuteAuthCommand(this IAuthentication auth, TC command) /// The authenticated connection. /// URL path for request. /// + /// request version /// Task returning Protobuf response. /// /// - public static async Task ExecuteAuthRest(this IAuthentication auth, string endpoint, TC request) + public static async Task ExecuteAuthRest(this IAuthentication auth, string endpoint, TC request, int apiVersion=0) where TC : IMessage where TR : IMessage { - return (TR) await auth.ExecuteAuthRest(endpoint, request, typeof(TR)); + return (TR) await auth.ExecuteAuthRest(endpoint, request, typeof(TR), apiVersion); } /// @@ -134,5 +200,17 @@ public static async Task LoadAccountSummary(this IAuthen }; return await auth.ExecuteAuthRest("login/account_summary", rq); } + + /// + public static string GetBiUrl(this IAuthentication auth, string endpoint) + { + var builder = new UriBuilder(auth.Endpoint.Server) + { + Path = "/bi_api/v2/enterprise_console/", + Scheme = "https", + Port = 443 + }; + return new Uri(builder.Uri, endpoint).AbsoluteUri; + } } } diff --git a/KeeperSdk/auth/AuthSteps.cs b/KeeperSdk/auth/AuthSteps.cs index 28a353a..83eaebc 100644 --- a/KeeperSdk/auth/AuthSteps.cs +++ b/KeeperSdk/auth/AuthSteps.cs @@ -13,15 +13,11 @@ public enum AuthState /// NotConnected, /// - /// HTTP Proxy Authentication - /// - ProxyAuth, - /// /// Device Approval /// DeviceApproval, /// - /// Two Factor Authentication + /// Two-Factor Authentication /// TwoFactor, /// @@ -53,8 +49,7 @@ public enum AuthState /// /// Represents base Keeper authentication step /// - /// - /// + /// /// /// /// @@ -139,11 +134,23 @@ public Task SendCode(DeviceApprovalChannel channel, string code) return OnSendCode?.Invoke(channel, code); } - internal Action onDispose; + internal Func OnResume; + + /// + /// Resumes login flow + /// + /// Awaitable task + public Task Resume() + { + return OnResume?.Invoke(); + } + + + internal Action OnDispose; protected override void Dispose(bool disposing) { - onDispose?.Invoke(); + OnDispose?.Invoke(); base.Dispose(disposing); } } @@ -214,7 +221,6 @@ public string GetPhoneNumber(TwoFactorChannel channel) /// Sends push action to the channel /// /// Push action - /// Awaitable task public Task SendPush(TwoFactorPushAction action) { return OnSendPush?.Invoke(action); @@ -227,12 +233,21 @@ public Task SendPush(TwoFactorPushAction action) /// /// /// - /// Awaitable task public Task SendCode(TwoFactorChannel channel, string code) { return OnSendCode?.Invoke(channel, code); } + internal Func OnResume; + + /// + /// Resumes login + /// + public Task Resume() + { + return OnResume?.Invoke(); + } + internal Action OnDispose; protected override void Dispose(bool disposing) @@ -251,7 +266,7 @@ internal PasswordStep() : base(AuthState.Password) { } - internal Func onPassword; + internal Func OnPassword; /// /// Verifies master password @@ -260,10 +275,10 @@ internal PasswordStep() : base(AuthState.Password) /// Awaitable task public Task VerifyPassword(string password) { - return onPassword?.Invoke(password); + return OnPassword?.Invoke(password); } - internal Func onBiometricKey; + internal Func OnBiometricKey; /// /// Verifies biometric key /// @@ -271,35 +286,7 @@ public Task VerifyPassword(string password) /// Awaitable task public Task VerifyBiometricKey(byte[] biometricKey) { - return onBiometricKey?.Invoke(biometricKey); - } - } - - /// - /// Represents HTTP Proxy Authentication step - /// - public class HttpProxyStep : AuthStep - { - internal HttpProxyStep() : base(AuthState.ProxyAuth) - { - } - - /// - /// Gets HTTP Proxy URI - /// - public Uri ProxyUri { get; internal set; } - - internal Func OnSetProxyCredentials; - - /// - /// Sets HTTP Proxy credentials - /// - /// Proxy username - /// Proxy password - /// Awaitable task - public Task SetProxyCredentials(string username, string password) - { - return OnSetProxyCredentials?.Invoke(username, password); + return OnBiometricKey?.Invoke(biometricKey); } } @@ -374,11 +361,19 @@ internal SsoDataKeyStep() : base(AuthState.SsoDataKey) /// Requests SSO Approval /// /// SSO approval channel - /// public Task RequestDataKey(DataKeyShareChannel channel) { return OnRequestDataKey?.Invoke(channel); } + + internal Func OnResume; + /// + /// Resumes login flow + /// + public Task Resume() + { + return OnResume?.Invoke(); + } } /// diff --git a/KeeperSdk/auth/AuthSync.cs b/KeeperSdk/auth/AuthSync.cs index ace265d..4952751 100644 --- a/KeeperSdk/auth/AuthSync.cs +++ b/KeeperSdk/auth/AuthSync.cs @@ -49,46 +49,29 @@ public AuthSync(IConfigurationStorage storage, IKeeperEndpoint endpoint = null) Cancel(); } - /// - /// Gets configuration storage. - /// + /// > public IConfigurationStorage Storage { get; } - /// - /// Gets or sets session resumption flag - /// + /// > public bool ResumeSession { get; set; } - /// - /// Forces master password login for SSO accounts. - /// + /// > public bool AlternatePassword { get; set; } - /// - /// Gets or sets username. - /// + /// > public new string Username { get => base.Username; set => base.Username = value; } - /// - public void SetPushNotifications(IFanOut pushNotifications) - { - PushNotifications = pushNotifications; - } - - /// - /// Gets or sets device token - /// + /// > public new byte[] DeviceToken { get => base.DeviceToken; set => base.DeviceToken = value; } - /// /// Gets a value that indicates whether login to Keeper has completed. /// @@ -122,40 +105,13 @@ protected set /// public void Cancel() { + SetPushNotifications(null); Step = new ReadyToLoginStep(); } private LoginContext _loginContext; - private async Task DetectProxySync(Func resumeWhenDone) - { - var keeperUri = new Uri($"https://{Endpoint.Server}/api/rest/ping"); - var proxyStep = await DetectProxy(keeperUri, - (proxyUri, proxyAuth) => - { - return new HttpProxyStep - { - ProxyUri = proxyUri, - OnSetProxyCredentials = async (proxyUsername, proxyPassword) => - { - var proxy = AuthUIExtensions.GetWebProxyForCredentials(proxyUri, proxyAuth, proxyUsername, proxyPassword); - await PingKeeperServer(keeperUri, proxy); - Endpoint.WebProxy = proxy; - await resumeWhenDone.Invoke(); - }, - }; - }); - if (proxyStep != null) - { - Step = proxyStep; - } - else - { - await resumeWhenDone.Invoke(); - } - } - - private async Task DoLogin(string username) + internal async Task DoLogin(string username) { Username = username.ToLowerInvariant(); try @@ -174,40 +130,34 @@ private async Task DoLogin(string username) } catch (Exception e) { + SetPushNotifications(null); var code = e is KeeperApiException kae ? kae.Code : "unknown_error"; Step = new ErrorStep(code, e.Message); } } - /// - /// Login to Keeper account with email. - /// - /// Keeper account email address. - /// Master password(s) - /// Awaitable task - /// + /// > public async Task Login(string username, params string[] passwords) { - await DetectProxySync(async () => + Cancel(); + if (string.IsNullOrEmpty(username)) { - if (Step.State != AuthState.NotConnected) - { - Cancel(); - } - - if (string.IsNullOrEmpty(username)) - { - throw new KeeperStartLoginException(LoginState.RequiresUsername, "Username is required."); - } + throw new KeeperStartLoginException(LoginState.RequiresUsername, "Username is required."); + } - _loginContext = new LoginContext(); - foreach (var password in passwords) - { - _loginContext.PasswordQueue.Enqueue(password); - } + _loginContext = new LoginContext(); + foreach (var password in passwords) + { + if (string.IsNullOrEmpty(password)) continue; + _loginContext.PasswordQueue.Enqueue(password); + } + var uc = Storage.Users.Get(username); + if (!string.IsNullOrEmpty(uc?.Password)) + { + _loginContext.PasswordQueue.Enqueue(uc.Password); + } - await DoLogin(username); - }); + await DoLogin(username); } private async Task DoLoginSso(string providerName, bool forceLogin) @@ -219,23 +169,15 @@ private async Task DoLoginSso(string providerName, bool forceLogin) Step = step; } - /// - /// Login to Keeper account with SSO provider. - /// - /// SSO provider name. - /// Force new login with SSO IdP. - /// Awaitable task. - /// + /// > public async Task LoginSso(string providerName, bool forceLogin = false) { - await DetectProxySync(async () => - { - Cancel(); - _loginContext = new LoginContext(); - await DoLoginSso(providerName, forceLogin); - }); + Cancel(); + _loginContext = new LoginContext(); + await DoLoginSso(providerName, forceLogin); } + /// > public override async Task Logout() { await base.Logout(); @@ -275,13 +217,17 @@ private async Task StartLoginSync(StartLoginRequest request) return await OnConnected(context); case LoginState.RequiresUsername: - return await this.ResumeLogin(_loginContext, StartLoginSync, response.EncryptedLoginToken); + if (!string.IsNullOrEmpty(Username)) + { + return await this.ResumeLogin(_loginContext, StartLoginSync, response.EncryptedLoginToken); + } + break; case LoginState.Requires2Fa: return TwoFactorValidate(response.EncryptedLoginToken, response.Channels.ToArray()); case LoginState.RequiresAuthHash: - return ValidateAuthHash(response.EncryptedLoginToken, response.Salt.ToArray()); + return await ValidateAuthHash(response.EncryptedLoginToken, response.Salt.ToArray()); case LoginState.DeviceApprovalRequired: return ApproveDevice(response.EncryptedLoginToken); @@ -352,12 +298,21 @@ private async Task StartLoginSync(StartLoginRequest request) private async Task OnConnected(AuthContext context) { authContext = context; + + this.StoreConfigurationIfChangedV3(_loginContext); + if (authContext.SessionTokenRestriction == 0 && PushNotifications is IPushNotificationChannel push) { - await push.SendToWebSocket(authContext.SessionToken, false); + try + { + await push.SendToWebSocket(authContext.SessionToken, false); + } + catch (Exception e) + { + Debug.WriteLine(e); + } } - this.StoreConfigurationIfChangedV3(_loginContext); try { await PostLogin(); @@ -367,10 +322,12 @@ private async Task OnConnected(AuthContext context) } catch (KeeperApiException kae) { + SetPushNotifications(null); return new ErrorStep(kae.Code, kae.Message); } catch (Exception e) { + SetPushNotifications(null); return new ErrorStep("unknown_error", e.Message); } } @@ -379,11 +336,11 @@ private TwoFactorStep TwoFactorValidate(ByteString loginToken, IEnumerable + async (token) => { if (ReferenceEquals(Step, tfaStep)) { - Step = this.ResumeLogin(_loginContext, StartLoginSync, token).Result; + Step = await this.ResumeLogin(_loginContext, StartLoginSync, token); } }, loginToken, @@ -392,7 +349,7 @@ private TwoFactorStep TwoFactorValidate(ByteString loginToken, IEnumerable x.Channel).ToArray(); - tfaStep.Duration = TwoFactorDuration.Every30Days; + tfaStep.Duration = TwoFactorDuration.EveryLogin; tfaStep.DefaultChannel = channelInfo[0].Channel; tfaStep.OnGetChannelPushActions = (channel) => { @@ -450,10 +407,14 @@ private TwoFactorStep TwoFactorValidate(ByteString loginToken, IEnumerable + { + Step = await this.ResumeLogin(_loginContext, StartLoginSync, loginToken); + }; return tfaStep; } - private PasswordStep ValidateAuthHash(ByteString loginToken, Salt[] salts) + private async Task ValidateAuthHash(ByteString loginToken, Salt[] salts) { var passwordInfo = this.ValidateAuthHashPrepare(_loginContext, async context => { Step = await OnConnected(context); }, @@ -466,7 +427,7 @@ private PasswordStep ValidateAuthHash(ByteString loginToken, Salt[] salts) var password = _loginContext.PasswordQueue.Dequeue(); try { - passwordInfo.InvokePasswordActionDelegate.Invoke(password).GetAwaiter().GetResult(); + await passwordInfo.InvokePasswordActionDelegate.Invoke(password); if (Step.State == AuthState.Connected) { return null; @@ -483,11 +444,11 @@ private PasswordStep ValidateAuthHash(ByteString loginToken, Salt[] salts) var step = new PasswordStep { - onPassword = async password => + OnPassword = async password => { await passwordInfo.InvokePasswordActionDelegate.Invoke(password); }, - onBiometricKey = async bioKey => + OnBiometricKey = async bioKey => { await passwordInfo.InvokeBiometricsActionDelegate.Invoke(bioKey); } @@ -502,11 +463,11 @@ private DeviceApprovalStep ApproveDevice(ByteString loginToken) var t = this.ApproveDevicePrepare( _loginContext, - (token) => + async (token) => { if (ReferenceEquals(Step, deviceApprovalStep)) { - Step = this.ResumeLogin(_loginContext, StartLoginSync, token).Result; + Step = await this.ResumeLogin(_loginContext, StartLoginSync, token); } }, loginToken); @@ -535,7 +496,11 @@ private DeviceApprovalStep ApproveDevice(ByteString loginToken) await otp.InvokeDeviceApprovalOtpAction.Invoke(code); } }; - deviceApprovalStep.onDispose = onDone; + deviceApprovalStep.OnResume = async () => + { + Step = await this.ResumeLogin(_loginContext, StartLoginSync, loginToken); + }; + deviceApprovalStep.OnDispose = onDone; return deviceApprovalStep; } @@ -552,11 +517,23 @@ Task ResumeAfterSso(ByteString ssoLoginToken) var ssoAction = isCloudSso ? this.AuthorizeUsingCloudSsoPrepare(_loginContext, - (token) => { Step = ResumeAfterSso(token).GetAwaiter().GetResult(); }, + (token) => + { + Task.Run(async () => + { + Step = await ResumeAfterSso(token); + }); + }, ssoBaseUrl, forceLogin) : this.AuthorizeUsingOnsiteSsoPrepare(_loginContext, - () => { Step = ResumeAfterSso(loginToken).GetAwaiter().GetResult(); }, + () => + { + Task.Run(async () => + { + Step = await ResumeAfterSso(loginToken); + }); + }, ssoBaseUrl, forceLogin); @@ -587,7 +564,7 @@ private SsoDataKeyStep RequestDataKey(ByteString loginToken) { if (ReferenceEquals(Step, dataKeyStep)) { - Step = await this.ResumeLogin(_loginContext, StartLoginSync, loginToken, LoginMethod.AfterSso); + Step = await this.ResumeLogin(_loginContext, StartLoginSync, loginToken); } }); }, @@ -603,6 +580,10 @@ private SsoDataKeyStep RequestDataKey(ByteString loginToken) await info.InvokeGetDataKeyAction(); } }; + dataKeyStep.OnResume = async () => + { + Step = await this.ResumeLogin(_loginContext, StartLoginSync, loginToken); + }; return dataKeyStep; } } diff --git a/KeeperSdk/auth/Commands.cs b/KeeperSdk/auth/Commands.cs index be80e67..f677559 100644 --- a/KeeperSdk/auth/Commands.cs +++ b/KeeperSdk/auth/Commands.cs @@ -168,4 +168,46 @@ public class ExecuteResponse : KeeperApiResponse [DataMember(Name = "results")] public IList Results { get; set; } } + + [DataContract] + public class AuditEventInput + { + [DataMember(Name = "record_uid", EmitDefaultValue = false)] + public string RecordUid { get; set; } + + [DataMember(Name = "attachment_id", EmitDefaultValue = false)] + public string AttachmentId { get; set; } + } + + [DataContract] + public class AuditEventItem + { + [DataMember(Name = "audit_event_type", EmitDefaultValue = false)] + public string AuditEventType { get; set; } + + [DataMember(Name = "inputs", EmitDefaultValue = false)] + public AuditEventInput Inputs { get; set; } + + [DataMember(Name = "event_time", EmitDefaultValue = false)] + public long? EventTime { get; set; } + + } + + [DataContract] + public class AuditEventLoggingCommand : AuthenticatedCommand + { + public AuditEventLoggingCommand() : base("audit_event_client_logging") { } + + [DataMember(Name = "item_logs", EmitDefaultValue = false)] + public AuditEventItem[] ItemLogs { get; set; } + } + + [DataContract] + public class AuditEventLoggingResponse : KeeperApiResponse + { + [DataMember(Name = "ignored", EmitDefaultValue = false)] + public AuditEventItem[] Ignored { get; set; } + } + } + diff --git a/KeeperSdk/auth/Configuration.cs b/KeeperSdk/auth/Configuration.cs index 1652079..2946e5d 100644 --- a/KeeperSdk/auth/Configuration.cs +++ b/KeeperSdk/auth/Configuration.cs @@ -211,9 +211,7 @@ public UserDeviceConfiguration(IUserDeviceConfiguration other) : this(other.Devi { } - /// - /// Gets / sets device token. - /// + /// > public string DeviceToken { get; set; } /// [Obsolete] public string ResumeCode { get; set; } @@ -248,10 +246,15 @@ public UserConfiguration(IUserConfiguration other) : this(other.Username) } } + /// > public string Username { get; } + /// > public string Password { get; set; } + /// > public string TwoFactorToken { get; set; } + /// > public string Server { get; set; } + /// > public IUserDeviceConfiguration LastDevice { get; set; } /// string IConfigurationId.Id => Username; @@ -280,7 +283,9 @@ public ServerConfiguration(IServerConfiguration other) : this(other.Server) ServerKeyId = other.ServerKeyId; } + /// > public string Server { get; } + /// > public int ServerKeyId { get; set; } = 1; /// @@ -310,7 +315,9 @@ public DeviceServerConfiguration(IDeviceServerConfiguration other): this(other.S CloneCode = other.CloneCode; } + /// > public string Server { get; } + /// > public string CloneCode { get; set; } /// @@ -350,8 +357,11 @@ public DeviceConfiguration(IDeviceConfiguration other) : this(other.DeviceToken) } } + /// > public string DeviceToken { get; } + /// > public byte[] DeviceKey { get; set; } + /// > public IConfigCollection ServerInfo => _serverInfo; /// string IConfigurationId.Id => DeviceToken; diff --git a/KeeperSdk/auth/Endpoint.cs b/KeeperSdk/auth/Endpoint.cs index 2438526..dbf338c 100644 --- a/KeeperSdk/auth/Endpoint.cs +++ b/KeeperSdk/auth/Endpoint.cs @@ -67,8 +67,6 @@ public interface IKeeperEndpoint /// string PushServer(); - /// - Task> ConnectToPushServer(WssConnectionRequest connectionRequest, CancellationToken token); /// byte[] EncryptWithKeeperKey(byte[] data, int keyId); } @@ -81,69 +79,121 @@ internal interface IPushNotificationChannel : IFanOut /// public class WebSocketChannel : FanOut, IPushNotificationChannel { - private readonly ClientWebSocket _webSocket; + private ClientWebSocket _webSocket; + private readonly byte[] _transmissionKey = CryptoUtils.GenerateEncryptionKey(); + private CancellationTokenSource _cancellationTokenSource; - public WebSocketChannel(ClientWebSocket webSocket, byte[] transmissionKey, CancellationToken token) + public async Task ConnectToPushServer(IKeeperEndpoint endpoint, WssConnectionRequest connectionRequest) { - _webSocket = webSocket; - var tk = transmissionKey; - _ = Task.Run(async () => + if (_cancellationTokenSource != null) + { + if (!_cancellationTokenSource.IsCancellationRequested) + { + _cancellationTokenSource.Cancel(); + } + _cancellationTokenSource.Dispose(); + } + _cancellationTokenSource = new CancellationTokenSource(); + + var apiRequest = endpoint.PrepareApiRequest(connectionRequest, _transmissionKey); + var builder = new UriBuilder + { + Scheme = "wss", + Host = endpoint.PushServer(), + Path = "wss_open_connection/" + apiRequest.ToByteArray().Base64UrlEncode() + }; + { + var ws = new ClientWebSocket(); + var delay = Task.Delay(TimeSpan.FromSeconds(5), _cancellationTokenSource.Token); + if (endpoint.WebProxy != null) + { + ws.Options.Proxy = endpoint.WebProxy; + } + await ws.ConnectAsync(builder.Uri, _cancellationTokenSource.Token); + if (ws.State == WebSocketState.Open) + { + _webSocket = ws; + } + else + { + ws.Dispose(); + } + } + if (_webSocket == null) + { + return; + } + + // TODO reconnect + try + { + var buffer = new byte[1024]; + var segment = new ArraySegment(buffer); + while (_webSocket.State == WebSocketState.Open) { - try + var rs = await _webSocket.ReceiveAsync(segment, _cancellationTokenSource.Token); + if (rs?.Count > 0) { - var buffer = new byte[1024]; - var segment = new ArraySegment(buffer); - while (_webSocket.State == WebSocketState.Open) - { - var rs = await _webSocket.ReceiveAsync(segment, token); - if (rs?.Count > 0) - { - var responseBytes = new byte[rs.Count]; - Array.Copy(buffer, segment.Offset, responseBytes, 0, responseBytes.Length); - responseBytes = CryptoUtils.DecryptAesV2(responseBytes, tk); - var wssRs = WssClientResponse.Parser.ParseFrom(responseBytes); + var responseBytes = new byte[rs.Count]; + Array.Copy(buffer, segment.Offset, responseBytes, 0, responseBytes.Length); + responseBytes = CryptoUtils.DecryptAesV2(responseBytes, _transmissionKey); + var wssRs = WssClientResponse.Parser.ParseFrom(responseBytes); #if DEBUG - Debug.WriteLine($"REST push notification: {wssRs}"); + Debug.WriteLine($"REST push notification: {wssRs}"); #endif - try - { - var notification = JsonUtils.ParseJson(Encoding.UTF8.GetBytes(wssRs.Message)); - Push(notification); - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - } + try + { + var notification = JsonUtils.ParseJson(Encoding.UTF8.GetBytes(wssRs.Message)); + Push(notification); } - - if (_webSocket.State == WebSocketState.Open) + catch (Exception e) { - await _webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", token); + Debug.WriteLine(e.Message); } } - catch (OperationCanceledException) - { - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } + } - Debug.WriteLine($"Websocket: Exited"); - }, - token); + if (_webSocket.State == WebSocketState.Open) + { + await _webSocket.CloseAsync(WebSocketCloseStatus.NormalClosure, "", _cancellationTokenSource.Token); + } + } + catch (OperationCanceledException) + { + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + } + Debug.WriteLine($"Websocket: Exited"); } protected override void Dispose(bool disposing) { base.Dispose(disposing); - if (_webSocket.State == WebSocketState.Open) + + if (_webSocket != null) { - _webSocket.Abort(); + if (_webSocket.State == WebSocketState.Open) + { + _webSocket.Abort(); + } + _webSocket.Dispose(); + _webSocket = null; } - _webSocket?.Dispose(); + if (_cancellationTokenSource != null) + { + if (!_cancellationTokenSource.IsCancellationRequested) + { + _cancellationTokenSource.Cancel(); + } + } + if (_cancellationTokenSource != null) + { + _cancellationTokenSource.Dispose(); + _cancellationTokenSource = null; + } } public async Task SendToWebSocket(byte[] payload, bool encrypted) @@ -214,7 +264,14 @@ public static async Task ExecuteV2Command(this IKeeperEndpoin #endif var rs = await endpoint.ExecuteRest("vault/execute_v2_command", apiPayload); #if DEBUG - Debug.WriteLine("Response: " + Encoding.UTF8.GetString(rs)); + if (rs.Length < 10000) + { + Debug.WriteLine("Response: " + Encoding.UTF8.GetString(rs)); + } + else + { + Debug.WriteLine($"Response: {rs.Length} bytes"); + } #endif using (var ms = new MemoryStream(rs)) { @@ -230,7 +287,7 @@ public class KeeperEndpoint : IKeeperEndpoint { private const string DefaultDeviceName = ".NET Keeper API"; public static string DefaultKeeperServer = "keepersecurity.com"; - private const string DefaultClientVersion = "c15.0.0"; + private const string DefaultClientVersion = "c16.8.0"; static KeeperEndpoint() { @@ -283,42 +340,34 @@ public ApiRequest PrepareApiRequest(IMessage request, byte[] transmissionKey, by }; } - public async Task> ConnectToPushServer(WssConnectionRequest connectionRequest, CancellationToken token) + public async Task ExecuteRest(string endpoint, ApiRequestPayload payload) { - var transmissionKey = CryptoUtils.GenerateEncryptionKey(); + Uri uri; - var apiRequest = PrepareApiRequest(connectionRequest, transmissionKey); - var builder = new UriBuilder + if (endpoint.StartsWith("https://")) { - Scheme = "wss", - Host = PushServer(), - Path = "wss_open_connection/" + apiRequest.ToByteArray().Base64UrlEncode() - }; - var ws = new ClientWebSocket(); - await ws.ConnectAsync(builder.Uri, token); - - return new WebSocketChannel(ws, transmissionKey, token); - } - - public async Task ExecuteRest(string endpoint, ApiRequestPayload payload) - { - var builder = new UriBuilder(Server) + uri = new Uri(endpoint); + } + else { - Path = "/api/rest/", - Scheme = "https", - Port = 443 - }; - var uri = new Uri(builder.Uri, endpoint); + var builder = new UriBuilder(Server) + { + Path = "/api/rest/", + Scheme = "https", + Port = 443 + }; + uri = new Uri(builder.Uri, endpoint); + } var keyId = ServerKeyId; - - payload.ApiVersion = 3; var attempt = 0; + Exception lastKeeperError = null; while (attempt < 3) { attempt++; - var request = (HttpWebRequest)WebRequest.Create(uri); + var request = (HttpWebRequest) WebRequest.Create(uri); + request.Timeout = (int) TimeSpan.FromMinutes(5).TotalMilliseconds; if (WebProxy != null) { request.Proxy = WebProxy; @@ -351,12 +400,12 @@ public async Task ExecuteRest(string endpoint, ApiRequestPayload payload var p = apiRequest.ToByteArray(); await requestStream.WriteAsync(p, 0, p.Length); } - response = (HttpWebResponse)request.GetResponse(); + response = (HttpWebResponse) request.GetResponse(); } catch (WebException e) { - response = (HttpWebResponse)e.Response; + response = (HttpWebResponse) e.Response; if (response == null) throw; if (response.StatusCode == HttpStatusCode.ProxyAuthenticationRequired) @@ -402,16 +451,23 @@ public async Task ExecuteRest(string endpoint, ApiRequestPayload payload var serializer = new DataContractJsonSerializer(typeof(KeeperApiErrorResponse)); var keeperRs = serializer.ReadObject(ms) as KeeperApiErrorResponse; + lastKeeperError = new KeeperApiException(keeperRs.Error, keeperRs.Message); switch (keeperRs.Error) { case "key": keyId = keeperRs.KeyId; continue; + case "throttled": +#if DEBUG + Debug.WriteLine("\"throttled\" sleeping for 10 seconds"); +#endif + await Task.Delay(TimeSpan.FromSeconds(10)); + continue; + case "region_redirect": throw new KeeperRegionRedirect(keeperRs.RegionHost); - case "bad_request": case "device_not_registered": throw new KeeperInvalidDeviceToken(keeperRs.AdditionalInfo); @@ -420,17 +476,16 @@ public async Task ExecuteRest(string endpoint, ApiRequestPayload payload throw new KeeperAuthFailed(keeperRs.Message); case "login_token_expired": - throw new KeeperCanceled(); + throw new KeeperCanceled(keeperRs.Error, keeperRs.Message); } - throw new KeeperApiException(keeperRs.Error, keeperRs.Message); + throw lastKeeperError; } } throw new Exception("Keeper Api Http error: " + response.StatusCode); } - - throw new Exception("Keeper Api error"); + throw lastKeeperError ?? new Exception("Keeper Api error"); } private readonly byte[] _transmissionKey = CryptoUtils.GetRandomBytes(32); diff --git a/KeeperSdk/auth/Exceptions.cs b/KeeperSdk/auth/Exceptions.cs index 225efe8..0ba5775 100644 --- a/KeeperSdk/auth/Exceptions.cs +++ b/KeeperSdk/auth/Exceptions.cs @@ -18,9 +18,7 @@ public KeeperInvalidParameter(string method, string parameter, string value, str public string Value { get; } } - /// - /// User is not allowed to login. - /// + /// public class KeeperPostLoginErrors : KeeperApiException { public KeeperPostLoginErrors(string code, string message) : base(code, message) @@ -33,7 +31,12 @@ public KeeperPostLoginErrors(string code, string message) : base(code, message) /// public class KeeperApiException : Exception { - internal KeeperApiException(string code, string message) : base(message) + /// + /// Creates KeeperApiException + /// + /// Kepper Error Code + /// Error Message + public KeeperApiException(string code, string message) : base(message) { Code = code; } @@ -72,6 +75,11 @@ public KeeperInvalidDeviceToken(string additionalInfo) /// public class KeeperCanceled : Exception { + public KeeperCanceled() : this("canceled", "Login session is canceled. Please start over.") { } + public string Reason { get; } + public KeeperCanceled(string reason, string message) : base(message) { + Reason = reason; + } } /// diff --git a/KeeperSdk/auth/JsonConfiguration.cs b/KeeperSdk/auth/JsonConfiguration.cs index 1bca6dc..94f2152 100644 --- a/KeeperSdk/auth/JsonConfiguration.cs +++ b/KeeperSdk/auth/JsonConfiguration.cs @@ -132,6 +132,9 @@ public JsonConfigurationCache(IJsonConfigurationLoader loader) WriteTimeout = 2000; } + /// + public IJsonConfigurationLoader Loader => _loader; + /// /// Gets / sets read timeout in milliseconds. /// @@ -511,10 +514,7 @@ public JsonConfigurationFileLoader(string fileName) /// public string FilePath { get; } - /// - /// Loads configuration from the file. - /// - /// JSON data + /// > public byte[] LoadJson() { if (File.Exists(FilePath)) @@ -532,10 +532,7 @@ public byte[] LoadJson() return null; } - /// - /// Stores configuration to the file. - /// - /// JSON data + /// > public void StoreJson(byte[] json) { try diff --git a/KeeperSdk/auth/KeyLoaders.cs b/KeeperSdk/auth/KeyLoaders.cs new file mode 100644 index 0000000..62f3c78 --- /dev/null +++ b/KeeperSdk/auth/KeyLoaders.cs @@ -0,0 +1,140 @@ +using KeeperSecurity.Commands; +using KeeperSecurity.Utils; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Threading.Tasks; +using Authentication; + +namespace KeeperSecurity.Authentication +{ + public abstract partial class AuthCommon + { + private readonly IDictionary _keyCache = new ConcurrentDictionary(); + + /// + public async Task> LoadTeamKeys(IEnumerable teamUids) + { + List skipped = null; + var newUids = teamUids.Where(x => !_keyCache.ContainsKey(x)).ToArray(); + const int chunkSize = 100; + var pos = 0; + while (pos < newUids.Length) + { + var size = Math.Min(chunkSize, newUids.Length - pos); + var tkRq = new TeamGetKeysCommand + { + teams = newUids.Skip(pos).Take(size).ToArray(), + }; + pos += chunkSize; + + var tkRs = await this.ExecuteAuthCommand(tkRq); + foreach (var key in tkRs.keys) + { + if (string.IsNullOrEmpty(key.key)) + { + if (skipped == null) + { + skipped = new List(); + } + skipped.Add(key.teamUid); + } + else + { + try + { + byte[] aes = null; + byte[] rsa = null; + byte[] ec = null; + var encryptedKey = key.key.Base64UrlDecode(); + switch (key.keyType) + { + case 1: + aes = CryptoUtils.DecryptAesV1(encryptedKey, AuthContext.DataKey); + break; + case 2: + aes = CryptoUtils.DecryptRsa(encryptedKey, AuthContext.PrivateRsaKey); + break; + case 3: + rsa = encryptedKey; + break; + /* + case 3: + aes = CryptoUtils.DecryptAesV2(encryptedKey, AuthContext.DataKey); + break; + case 4: + aes = CryptoUtils.DecryptEc(encryptedKey, AuthContext.PrivateEcKey); + break; + case -1: + ec = encryptedKey; + break; + case -3: + rsa = encryptedKey; + break; + */ + default: + throw new Exception($"Team key type {key.keyType} is not supported"); + } + _keyCache[key.teamUid] = new UserKeys(aes: aes, rsa: rsa, ec: ec); + } + catch (Exception e) + { + Trace.TraceError(e.Message); + } + } + } + } + return skipped ?? Enumerable.Empty(); + } + + /// + public async Task> LoadUsersKeys(IEnumerable usernames) + { + List skipped = null; + var newEmails = usernames.Where(x => !_keyCache.ContainsKey(x)).ToArray(); + var chunkSize = 1000; + var pos = 0; + while (pos < newEmails.Length) + { + var size = Math.Min(chunkSize, newEmails.Length - pos); + var pkRq = new GetPublicKeysRequest(); + pkRq.Usernames.AddRange(newEmails.Skip(pos).Take(size)); + pos += chunkSize; + var pkRss = await this.ExecuteAuthRest("vault/get_public_keys", pkRq); + foreach (var rs in pkRss.KeyResponses) + { + if (string.IsNullOrEmpty(rs.ErrorCode) || string.Equals(rs.ErrorCode, "success", StringComparison.InvariantCultureIgnoreCase)) + { + byte[] rsa = rs.PublicKey.Length > 0 ? rs.PublicKey.ToByteArray() : null; + byte[] ec = rs.PublicEccKey.Length > 0 ? rs.PublicEccKey.ToByteArray() : null; + _keyCache[rs.Username] = new UserKeys(rsa: rsa, ec: ec); + } + else + { + if (skipped == null) + { + skipped = new List(); + } + skipped.Add(rs.Username); + } + } + } + + return skipped ?? Enumerable.Empty(); + } + + /// + public bool TryGetTeamKeys(string teamUid, out UserKeys keys) + { + return _keyCache.TryGetValue(teamUid, out keys); + } + + /// + public bool TryGetUserKeys(string username, out UserKeys keys) + { + return _keyCache.TryGetValue(username, out keys); + } + } +} \ No newline at end of file diff --git a/KeeperSdk/auth/LoginV3Extensions.cs b/KeeperSdk/auth/LoginV3Extensions.cs index 35a0a6a..c47910c 100644 --- a/KeeperSdk/auth/LoginV3Extensions.cs +++ b/KeeperSdk/auth/LoginV3Extensions.cs @@ -4,7 +4,6 @@ using System.Linq; using System.Runtime.Serialization; using System.Text; -using System.Threading; using System.Threading.Tasks; using Authentication; using Google.Protobuf; @@ -31,7 +30,7 @@ public LoginContext() internal string V2TwoFactorToken { get; set; } - public ECPrivateKeyParameters DeviceKey { get; set; } + public ECPrivateKeyParameters DeviceKey { get; set; } public byte[] MessageSessionUid { get; } internal Queue PasswordQueue { get; } = new Queue(); @@ -42,6 +41,31 @@ public LoginContext() /// public static class LoginV3Extensions { + public static Action EnsurePushNotification = (IAuth auth, LoginContext v3) => + { + if (auth.PushNotifications == null) + { + var connectRequest = new WssConnectionRequest + { + EncryptedDeviceToken = ByteString.CopyFrom(auth.DeviceToken), + MessageSessionUid = ByteString.CopyFrom(v3.MessageSessionUid), + DeviceTimeStamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }; + var ws = new WebSocketChannel(); + auth.SetPushNotifications(ws); + Task.Run(async () => + { + try + { + await ws.ConnectToPushServer(auth.Endpoint, connectRequest); + } + catch + { + auth.SetPushNotifications(null); + } + }); + } + }; public static async Task EnsureDeviceTokenIsRegistered(this IAuth auth, LoginContext v3, string username) { if (string.Compare(auth.Username, username, StringComparison.InvariantCultureIgnoreCase) != 0) @@ -131,7 +155,6 @@ public static async Task EnsureDeviceTokenIsRegistered(this IAuth auth, LoginCon { try { - auth.PushNotifications.Dispose(); auth.SetPushNotifications(null); } catch (Exception e) @@ -140,30 +163,13 @@ public static async Task EnsureDeviceTokenIsRegistered(this IAuth auth, LoginCon } } - if (auth.PushNotifications == null) - { - var cancellationTokenSource = new CancellationTokenSource(); - try - { - var connectRequest = new WssConnectionRequest - { - EncryptedDeviceToken = ByteString.CopyFrom(auth.DeviceToken), - MessageSessionUid = ByteString.CopyFrom(v3.MessageSessionUid), - DeviceTimeStamp = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() - }; - var pushes = await auth.Endpoint.ConnectToPushServer(connectRequest, cancellationTokenSource.Token); - auth.SetPushNotifications(pushes); - } - catch (Exception e) - { - Debug.WriteLine(e.Message); - } - } + EnsurePushNotification(auth, v3); } } internal static async Task RedirectToRegionV3(this IAuth auth, string newRegion) { + auth.SetPushNotifications(null); auth.Endpoint.Server = newRegion; if (auth.AuthCallback is IAuthInfoUI infoUi) { @@ -199,7 +205,7 @@ private static async Task RegisterDeviceInRegion(this IAuth auth, IDeviceConfigu #endif try { - await auth.Endpoint.ExecuteRest("authentication/register_device_in_region", new ApiRequestPayload {Payload = request.ToByteString()}); + await auth.Endpoint.ExecuteRest("authentication/register_device_in_region", new ApiRequestPayload { Payload = request.ToByteString() }); } catch (KeeperApiException kae) { @@ -234,7 +240,7 @@ private static async Task RegisterDevice(this IAuth auth) #if DEBUG Debug.WriteLine($"REST Request: endpoint \"register_device\": {request}"); #endif - var rs = await auth.Endpoint.ExecuteRest("authentication/register_device", new ApiRequestPayload {Payload = request.ToByteString()}); + var rs = await auth.Endpoint.ExecuteRest("authentication/register_device", new ApiRequestPayload { Payload = request.ToByteString() }); var response = Device.Parser.ParseFrom(rs); #if DEBUG Debug.WriteLine($"REST Response: endpoint \"register_device\": {response}"); @@ -264,7 +270,7 @@ private static async Task RequestDeviceVerification(this IAuth auth, LoginContex Debug.WriteLine($"REST Request: endpoint \"request_device_verification\": {request}"); #endif await auth.Endpoint.ExecuteRest("authentication/request_device_verification", - new ApiRequestPayload {Payload = request.ToByteString()}); + new ApiRequestPayload { Payload = request.ToByteString() }); } internal static async Task ValidateDeviceVerificationCode(this IAuth auth, LoginContext v3, string code) @@ -281,7 +287,7 @@ internal static async Task ValidateDeviceVerificationCode(this IAuth auth, Login Debug.WriteLine($"REST Request: endpoint \"validate_device_verification_code\": {request}"); #endif await auth.Endpoint.ExecuteRest("authentication/validate_device_verification_code", - new ApiRequestPayload {Payload = request.ToByteString()}); + new ApiRequestPayload { Payload = request.ToByteString() }); } internal static Task ResumeLogin( @@ -359,7 +365,6 @@ internal static async Task StartLogin( } catch (Exception e) { - auth.PushNotifications?.Dispose(); auth.SetPushNotifications(null); if (attempt < 3 && e is KeeperInvalidDeviceToken) { @@ -421,7 +426,7 @@ private static async Task ExecuteValidateBiometricKey( return CryptoUtils.DecryptAesV2(encryptedKey, biometricKey); } - throw new KeeperCanceled(); + throw new KeeperCanceled("canceled", "Biometric Login: Method not supported"); }); return context; } @@ -451,7 +456,7 @@ private static async Task ExecuteValidatePassword( case EncryptedDataKeyType.ByPassword: return CryptoUtils.DecryptEncryptionParams(password, encryptedKey); } - throw new KeeperCanceled(); + throw new KeeperCanceled("not_supported", "Master Password Login: Method is not suppoprted"); }); var validatorSalt = CryptoUtils.GetRandomBytes(16); context.PasswordValidator = @@ -460,8 +465,8 @@ private static async Task ExecuteValidatePassword( } private static async Task ExecuteValidateAuthHash( - this IAuth auth, - LoginContext v3, + this IAuth auth, + LoginContext v3, ValidateAuthHashRequest request, Func dataKeyDecryptor) { @@ -469,7 +474,7 @@ private static async Task ExecuteValidateAuthHash( Debug.WriteLine($"REST Request: endpoint \"validate_auth_hash\": {request}"); #endif var rs = await auth.Endpoint.ExecuteRest("authentication/validate_auth_hash", - new ApiRequestPayload {Payload = request.ToByteString()}); + new ApiRequestPayload { Payload = request.ToByteString() }); var response = LoginResponse.Parser.ParseFrom(rs); #if DEBUG Debug.WriteLine($"REST response: endpoint \"validate_auth_hash\": {response}"); @@ -519,7 +524,7 @@ internal static MasterPasswordInfo ValidateAuthHashPrepare( if (saltInfo == null) { throw new KeeperStartLoginException( - LoginState.RequiresAuthHash, + LoginState.RequiresAuthHash, "Master Password has not been created."); } @@ -594,7 +599,7 @@ private static async Task ExecuteDeviceApproveOtpAction( internal static Tuple ApproveDevicePrepare( this IAuth auth, LoginContext v3, - Action onLoginToken, + Func onLoginToken, ByteString loginToken) { var email = new DeviceApprovalEmailResend(); @@ -606,7 +611,7 @@ internal static Tuple ApproveDevicePrepare email.InvokeDeviceApprovalOtpAction = async (code) => { await auth.ValidateDeviceVerificationCode(v3, code); - onLoginToken(loginToken); + await onLoginToken(loginToken); }; var push = new DeviceApprovalKeeperPushAction @@ -653,7 +658,7 @@ bool NotificationCallback(NotificationEvent message) auth.PushNotifications?.RegisterCallback(NotificationCallback); return Tuple.Create( - new IDeviceApprovalChannelInfo[] {email, push, otp}, + new IDeviceApprovalChannelInfo[] { email, push, otp }, () => { auth.PushNotifications?.RemoveCallback(NotificationCallback); }); } @@ -715,7 +720,7 @@ private static async Task ExecutePushAction(this IAuth auth, TwoFactorSendPushRe #if DEBUG Debug.WriteLine($"REST Request: endpoint \"2fa_send_push\": {request}"); #endif - await auth.Endpoint.ExecuteRest("authentication/2fa_send_push", new ApiRequestPayload {Payload = request.ToByteString()}); + await auth.Endpoint.ExecuteRest("authentication/2fa_send_push", new ApiRequestPayload { Payload = request.ToByteString() }); } private static async Task ExecuteTwoFactorValidateCode(this IAuth auth, TwoFactorValidateRequest request) @@ -737,7 +742,7 @@ private static async Task ExecuteTwoFactorValidateCod internal static Tuple TwoFactorValidatePrepare( this IAuth auth, - Action onLoginToken, + Func onLoginToken, ByteString loginToken, IEnumerable channels) { @@ -777,7 +782,7 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa Value = code, }; var validateRs = await auth.ExecuteTwoFactorValidateCode(request); - onLoginToken(validateRs.EncryptedLoginToken); + await onLoginToken(validateRs.EncryptedLoginToken); }; } @@ -792,7 +797,7 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa totp.InvokeTwoFactorCodeAction = GetCodeDelegate(totp, ch); availableChannels.Add(totp); } - break; + break; case TwoFactorChannelType.TwoFaCtRsa: { @@ -800,7 +805,7 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa rsa.InvokeTwoFactorCodeAction = GetCodeDelegate(rsa, ch); availableChannels.Add(rsa); } - break; + break; case TwoFactorChannelType.TwoFaCtSms: { @@ -812,7 +817,7 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa sms.InvokeTwoFactorCodeAction = GetCodeDelegate(sms, ch); availableChannels.Add(sms); } - break; + break; case TwoFactorChannelType.TwoFaCtDuo: { @@ -842,7 +847,7 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa duoTfa.InvokeTwoFactorCodeAction = GetCodeDelegate(duoTfa, ch); availableChannels.Add(duoTfa); } - break; + break; case TwoFactorChannelType.TwoFaCtDna: { @@ -854,30 +859,31 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa dna2Fa.InvokeTwoFactorCodeAction = GetCodeDelegate(dna2Fa, ch); availableChannels.Add(dna2Fa); } - break; + break; - case TwoFactorChannelType.TwoFaCtU2F: + case TwoFactorChannelType.TwoFaCtWebauthn: if (auth.AuthCallback is IAuthSecurityKeyUI keyUi) { try { - var rqs = JsonUtils.ParseJson(Encoding.UTF8.GetBytes(ch.Challenge)); - var key2Fa = new TwoFactorSecurityKeyChannel(); - key2Fa.InvokeTwoFactorPushAction = (action) => + var rqs = JsonUtils.ParseJson(Encoding.UTF8.GetBytes(ch.Challenge)); + var key2Fa = new TwoFactorSecurityKeyChannel { - return Task.Run(async () => + InvokeTwoFactorPushAction = async (action) => { - var signature = await keyUi.AuthenticateRequests(rqs.authenticateRequests); + var signature = await keyUi.AuthenticatePublicKeyRequest(rqs.publicKeyCredentialRequestOptions); + var request = new TwoFactorValidateRequest { + ChannelUid = ch.ChannelUid, EncryptedLoginToken = loginToken, ExpireIn = TwoFactorExpiration.TwoFaExpImmediately, - ValueType = ch.ChannelType == TwoFactorChannelType.TwoFaCtWebauthn ? TwoFactorValueType.TwoFaRespWebauthn : TwoFactorValueType.TwoFaRespU2F, + ValueType = TwoFactorValueType.TwoFaRespWebauthn, Value = signature, }; var validateRs = await auth.ExecuteTwoFactorValidateCode(request); - onLoginToken(validateRs.EncryptedLoginToken); - }); + await onLoginToken(validateRs.EncryptedLoginToken); + } }; availableChannels.Add(key2Fa); } @@ -888,7 +894,8 @@ TwoFactorCodeActionDelegate GetCodeDelegate(ITwoFactorAppCodeInfo channel, TwoFa } break; - case TwoFactorChannelType.TwoFaCtWebauthn: + + case TwoFactorChannelType.TwoFaCtU2F: case TwoFactorChannelType.TwoFaCtKeeper: break; } @@ -1047,7 +1054,8 @@ internal static GetSsoTokenActionInfo AuthorizeUsingCloudSsoPrepare( { ClientVersion = auth.Endpoint.ClientVersion, Embedded = true, - ForceLogin = forceLogin + ForceLogin = forceLogin, + Detached = true, }; var transmissionKey = CryptoUtils.GenerateEncryptionKey(); var apiRequest = auth.Endpoint.PrepareApiRequest(rq, transmissionKey); @@ -1109,7 +1117,7 @@ public static async Task RequestCreateUser(this IAuth auth, LoginContext v3, str { Payload = request.ToByteString() }; - + Debug.WriteLine($"REST Request: endpoint \"request_create_user\": {request}"); await auth.Endpoint.ExecuteRest("authentication/request_create_user", apiRequest); } @@ -1156,7 +1164,7 @@ private static async Task RequestDeviceAdminApproval #if DEBUG Debug.WriteLine($"REST Request: endpoint \"request_device_admin_approval\": {request}"); #endif - var payload = new ApiRequestPayload {Payload = request.ToByteString()}; + var payload = new ApiRequestPayload { Payload = request.ToByteString() }; var rs = await auth.Endpoint.ExecuteRest("authentication/request_device_admin_approval", payload); DeviceVerificationResponse response = null; if (rs?.Length > 0) @@ -1218,7 +1226,7 @@ bool ProcessDataKeyRequest(NotificationEvent message) auth.PushNotifications?.RegisterCallback(ProcessDataKeyRequest); return Tuple.Create( - new IDataKeyChannelInfo[] {pushChannel, adminChannel}, + new IDataKeyChannelInfo[] { pushChannel, adminChannel }, () => { auth.PushNotifications?.RemoveCallback(ProcessDataKeyRequest); } ); } @@ -1282,6 +1290,9 @@ internal static void SsoLogout(this IAuthentication auth) else { queryString.Add("embedded", ""); + queryString.Add("token", ""); + queryString.Add("user", auth.Username); + queryString.Add("session_id", auth.AuthContext.SsoLoginInfo.IdpSessionId); } var builder = new UriBuilder(new Uri(auth.AuthContext.SsoLoginInfo.SpBaseUrl.Replace("/login", "/logout"))) diff --git a/KeeperSdk/auth/SecurityKeyTypes.cs b/KeeperSdk/auth/SecurityKeyTypes.cs index d71c8c6..3a26e1f 100644 --- a/KeeperSdk/auth/SecurityKeyTypes.cs +++ b/KeeperSdk/auth/SecurityKeyTypes.cs @@ -4,37 +4,66 @@ namespace KeeperSecurity.Authentication { /// [DataContract] - public class SecurityKeyAuthenticateRequest + public class WebAuthnExtension { - [DataMember(Name = "version")] - public string version; + [DataMember(Name = "appid")] + public string appid; + [DataMember(Name = "uvm")] + public bool uvm; + [DataMember(Name = "loc")] + public string loc; + [DataMember(Name = "txAuthSimple")] + public string txAuthSimple; + } - [DataMember(Name = "appId")] - public string appId; + /// + [DataContract] + public class AllowCredential + { + [DataMember(Name = "type")] + public string type; + [DataMember(Name = "id")] + public string id; + } + /// + [DataContract] + public class PublicKeyCredentialRequestOptions + { [DataMember(Name = "challenge")] public string challenge; - - [DataMember(Name = "keyHandle")] - public string keyHandle; + [DataMember(Name = "rpId")] + public string rpId; + [DataMember(Name = "allowCredentials")] + public AllowCredential[] allowCredentials; + [DataMember(Name = "userVerification")] + public string userVerification; + [DataMember(Name = "extensions")] + public WebAuthnExtension extensions; } + /// [DataContract] - public class SecurityKeyRequest + public class KeeperWebAuthnRequest { - [DataMember(Name = "authenticateRequests")] - public SecurityKeyAuthenticateRequest[] authenticateRequests; + [DataMember(Name = "publicKeyCredentialRequestOptions")] + public PublicKeyCredentialRequestOptions publicKeyCredentialRequestOptions; + [DataMember(Name = "username")] + public string username; } /// [DataContract] public class SecurityKeyClientData { + public const string MAKE_CREDENTIAL = "webauthn.create"; + public const string GET_ASSERTION = "webauthn.get"; + public const string U2F_REGISTER = "navigator.id.finishEnrollment"; public const string U2F_SIGN = "navigator.id.getAssertion"; - [DataMember(Name = "typ", Order = 1)] + [DataMember(Name = "type", Order = 1)] public string dataType; [DataMember(Name = "challenge", Order = 2)] public string challenge; @@ -43,21 +72,45 @@ public class SecurityKeyClientData } /// - public class SecurityKeySignature + [DataContract] + public class SignatureResponse + { + [DataMember(Name = "authenticatorData", Order = 1)] + public string authenticatorData; + [DataMember(Name = "clientDataJSON", Order = 2)] + public string clientDataJSON; + [DataMember(Name = "signature", Order = 3)] + public string signature; + } + + /// + [DataContract] + public class ClientExtensionResults + { + } + + /// + [DataContract] + public class KeeperWebAuthnSignature { - [DataMember(Name = "clientData", Order = 1)] - public string clientData; - [DataMember(Name = "signatureData", Order = 2)] - public string signatureData; - [DataMember(Name = "keyHandle", Order = 3)] - public string keyHandle; + [DataMember(Name = "id", Order = 1)] + public string id; + [DataMember(Name = "rawId", Order = 2)] + public string rawId; + [DataMember(Name = "response", Order = 3)] + public SignatureResponse response; + [DataMember(Name = "type", Order = 4)] + public string type; + [DataMember(Name = "clientExtensionResults", Order = 5)] + public ClientExtensionResults clientExtensionResults; } /// - public class U2FSignature + public class WebAuthnSignature { public byte[] clientData; + public byte[] authenticatorData; public byte[] signatureData; - public byte[] keyHandle; + public byte[] credentialId; } } diff --git a/KeeperSdk/auth/Ui.cs b/KeeperSdk/auth/Ui.cs index 93539d2..83b27e0 100644 --- a/KeeperSdk/auth/Ui.cs +++ b/KeeperSdk/auth/Ui.cs @@ -191,31 +191,6 @@ public interface IPostLoginTaskUI Task GetNewPassword(PasswordRuleMatcher matcher); } - /// - /// Http Proxy credentials action - /// - /// - public delegate Task HttpProxyCredentialsDelegate(string username, string password); - - /// - /// Defines methods and properties for http proxy authentication. - /// - public interface IHttpProxyInfo - { - /// - /// Gets HTTP proxy URI - /// - Uri ProxyUri { get; } - /// - /// Gets Proxy-Authentication header - /// - string[] ProxyAuthenticationMethods { get; } - /// - /// Accepts HTTP proxy credentials - /// - HttpProxyCredentialsDelegate InvokeHttpProxyCredentialsDelegate { get; } - } - /// /// Base 2FA channel interface /// @@ -437,17 +412,17 @@ public interface ITwoFactorPushInfo : ITwoFactorChannelInfo /// Defines the method that starts U2F Security Key 2FA. Optional. /// /// - /// Implement this interface along with Auth UI + /// Implement this interface along with Auth UI /// if you plan to support Security Key (Yubikey and any other U2F compatible keys). /// - /// + /// public interface IAuthSecurityKeyUI { /// /// U2F key authentications required. /// - /// a list of registered U2F key requests. - /// A task that returns U2F signature. - Task AuthenticateRequests(SecurityKeyAuthenticateRequest[] requests); + /// Public Key Credential request. + /// A task that returns WebAuthn signature. + Task AuthenticatePublicKeyRequest(PublicKeyCredentialRequestOptions request); } } \ No newline at end of file diff --git a/KeeperSdk/auth/UiImpl.cs b/KeeperSdk/auth/UiImpl.cs index 3abcf8b..6d3c8c9 100644 --- a/KeeperSdk/auth/UiImpl.cs +++ b/KeeperSdk/auth/UiImpl.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Net; namespace KeeperSecurity.Authentication @@ -193,13 +194,6 @@ internal MasterPasswordInfo(string username) public BiometricsActionDelegate InvokeBiometricsActionDelegate { get; internal set; } } - internal class HttpProxyInfo : IHttpProxyInfo - { - public Uri ProxyUri { get; internal set; } - public string[] ProxyAuthenticationMethods { get; internal set; } - public HttpProxyCredentialsDelegate InvokeHttpProxyCredentialsDelegate { get; internal set; } - } - /// public static class AuthUIExtensions { @@ -261,19 +255,6 @@ public static bool TryParsePushAction(string text, out TwoFactorPushAction pushA {TwoFactorPushAction.SecurityKey, "key"}, }; - /// - /// TwoFactorChannel - /// - private static readonly IDictionary TwoFactorChannels = - new Dictionary - { - {TwoFactorChannel.Authenticator, "two_factor_channel_google"}, - {TwoFactorChannel.TextMessage, "two_factor_channel_sms"}, - {TwoFactorChannel.DuoSecurity, "two_factor_channel_duo"}, - {TwoFactorChannel.RSASecurID, "two_factor_channel_rsa"}, - {TwoFactorChannel.KeeperDNA, "two_factor_channel_push"}, - }; - public static string GetTwoFactorChannelText(this TwoFactorChannel channel) { return TwoFactorChannels.TryGetValue(channel, out var text) ? text : channel.ToString(); @@ -297,12 +278,16 @@ public static bool TryParseTwoFactorChannel(string text, out TwoFactorChannel ch return false; } - private static readonly IDictionary DeviceApproveChannels = new Dictionary - { - {DeviceApprovalChannel.Email, "device_approve_email"}, - {DeviceApprovalChannel.KeeperPush, "device_approve_push"}, - {DeviceApprovalChannel.TwoFactorAuth, "device_approve_tfa"}, - }; + private static readonly IDictionary TwoFactorChannels = + new Dictionary + { + {TwoFactorChannel.Authenticator, "totp"}, + {TwoFactorChannel.TextMessage, "sms"}, + {TwoFactorChannel.DuoSecurity, "duo"}, + {TwoFactorChannel.RSASecurID, "rsa"}, + {TwoFactorChannel.KeeperDNA, "dna"}, + {TwoFactorChannel.SecurityKey, "key"}, + }; public static string DeviceApprovalChannelText(this DeviceApprovalChannel channel) { @@ -324,10 +309,11 @@ public static bool TryParseDeviceApprovalChannel(string text, out DeviceApproval return false; } - private static readonly IDictionary DataKeyShareChannels = new Dictionary + private static readonly IDictionary DeviceApproveChannels = new Dictionary { - {DataKeyShareChannel.KeeperPush, "data_key_share_push"}, - {DataKeyShareChannel.AdminApproval, "data_key_share_admin"}, + {DeviceApprovalChannel.Email, "email"}, + {DeviceApprovalChannel.KeeperPush, "keeper_push"}, + {DeviceApprovalChannel.TwoFactorAuth, "2fa"}, }; public static string SsoDataKeyShareChannelText(this DataKeyShareChannel channel) @@ -352,5 +338,63 @@ public static bool TryParseDataKeyShareChannel(string text, out DataKeyShareChan channel = DataKeyShareChannel.KeeperPush; return false; } + + private static readonly IDictionary DataKeyShareChannels = new Dictionary + { + {DataKeyShareChannel.KeeperPush, "keeper_push"}, + {DataKeyShareChannel.AdminApproval, "request_admin"}, + }; + + public static string DurationToText(TwoFactorDuration duration) + { + switch (duration) + { + case TwoFactorDuration.EveryLogin: + return "never"; + case TwoFactorDuration.Forever: + return "forever"; + default: + return $"{(int) duration} days"; + } + } + + public static bool TryParseTextToDuration(string text, out TwoFactorDuration duration) + { + text = text.Trim().ToLowerInvariant(); + switch (text) + { + case "never": + duration = TwoFactorDuration.EveryLogin; + return true; + case "forever": + duration = TwoFactorDuration.Forever; + return true; + default: + var idx = text.IndexOf(' '); + if (idx > 0) + { + text = text.Substring(0, idx); + } + + if (int.TryParse(text, out var days)) + { + foreach (var d in Enum.GetValues(typeof(TwoFactorDuration)).OfType()) + { + if ((int) d == days) + { + duration = d; + return true; + } + } + } + + break; + } + + duration = TwoFactorDuration.EveryLogin; + return false; + } + + } } diff --git a/KeeperSdk/auth/WinWebAuthN.cs b/KeeperSdk/auth/WinWebAuthN.cs new file mode 100644 index 0000000..3193cd7 --- /dev/null +++ b/KeeperSdk/auth/WinWebAuthN.cs @@ -0,0 +1,406 @@ +#if NET452_OR_GREATER +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Threading; +using System.Threading.Tasks; +using KeeperSecurity.Authentication; +using KeeperSecurity.Utils; + +namespace WinWebAuthn +{ + public static class Authenticate + { + [DllImport("kernel32.dll")] + public static extern IntPtr GetConsoleWindow(); + + [StructLayout(LayoutKind.Sequential)] + public class GuidClass + { + public Guid TheGuid; + } + + public static Task GetAssertion(IntPtr hWnd, PublicKeyCredentialRequestOptions options) + { + return GetAssertion(hWnd, options, CancellationToken.None); + } + + public static Task GetAssertion(IntPtr hWnd, PublicKeyCredentialRequestOptions options, CancellationToken token) + { + var taskSource = new TaskCompletionSource(); + Task.Run(() => + { + var ptrList = new List(); + try + { + var clientData = new SecurityKeyClientData + { + dataType = SecurityKeyClientData.GET_ASSERTION, + challenge = options.challenge, + origin = options.extensions.appid, + }; + var clientDataBytes = JsonUtils.DumpJson(clientData, false); + var clientDataPtr = Marshal.AllocHGlobal(clientDataBytes.Length); + ptrList.Add(clientDataPtr); + Marshal.Copy(clientDataBytes, 0, clientDataPtr, clientDataBytes.Length); + + var data = new NativeWebAuthn.WEBAUTHN_CLIENT_DATA + { + dwVersion = NativeWebAuthn.WEBAUTHN_API_VERSION_2, + cbClientDataJSON = clientDataBytes.Length, + pbClientDataJSON = clientDataPtr, + pwszHashAlgId = NativeWebAuthn.WEBAUTHN_HASH_ALGORITHM_SHA_256, + }; + + var credentials = options.allowCredentials + .Where(x => x.type == NativeWebAuthn.WEBAUTHN_CREDENTIAL_TYPE_PUBLIC_KEY) + .Select(x => x.id.Base64UrlDecode()) + .ToArray(); + var credentialSize = Marshal.SizeOf(typeof(NativeWebAuthn.WEBAUTHN_CREDENTIAL)); + var credentialsPtr = Marshal.AllocHGlobal(options.allowCredentials.Length * credentialSize); + ptrList.Add(credentialsPtr); + var pubKeyPtr = Marshal.StringToHGlobalUni(NativeWebAuthn.WEBAUTHN_CREDENTIAL_TYPE_PUBLIC_KEY); + ptrList.Add(pubKeyPtr); + for (var i = 0; i < credentials.Length; i++) + { + var credLength = credentials[i].Length; + var credPtr = Marshal.AllocHGlobal(credLength); + ptrList.Add(credPtr); + Marshal.Copy(credentials[i], 0, credPtr, credLength); + var cred = new NativeWebAuthn.WEBAUTHN_CREDENTIAL + { + dwVersion = NativeWebAuthn.WEBAUTHN_CREDENTIAL_CURRENT_VERSION, + cbId = credLength, + pbId = credPtr, + pwszCredentialType = pubKeyPtr + }; + Marshal.StructureToPtr(cred, credentialsPtr + (i * credentialSize), false); + } + + var opts = new NativeWebAuthn.WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS + { + dwVersion = 4, + dwTimeoutMilliseconds = (uint) TimeSpan.FromMinutes(2).TotalMilliseconds, + CredentialList = new NativeWebAuthn.WEBAUTHN_CREDENTIALS + { + cCredentials = credentials.Length, + pCredentials = credentialsPtr + }, + Extensions = new NativeWebAuthn.WEBAUTHN_EXTENSIONS + { + cExtensions = 0, + pExtensions = IntPtr.Zero + }, + dwAuthenticatorAttachment = NativeWebAuthn.WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM_U2F_V2, + dwUserVerificationRequirement = 0, + dwFlags = 0, + pwszU2fAppId = IntPtr.Zero, + pbU2fAppId = IntPtr.Zero, + pCancellationId = IntPtr.Zero, + pAllowCredentialList = IntPtr.Zero, + }; + + IDisposable cancelToken = null; + if (token != CancellationToken.None) + { + var guidPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(GuidClass))); + ptrList.Add(guidPtr); + if (NativeWebAuthn.WebAuthNGetCancellationId(guidPtr) == NativeWebAuthn.HRESULT.S_OK) + { + opts.pCancellationId = guidPtr; + cancelToken = token.Register(() => { NativeWebAuthn.WebAuthNCancelCurrentOperation(guidPtr); }); + } + } + + var hr = NativeWebAuthn.WebAuthNAuthenticatorGetAssertion(hWnd, options.rpId, ref data, ref opts, out var assertionPtr); + cancelToken?.Dispose(); + + if (hr == NativeWebAuthn.HRESULT.S_OK) + { + var assertion = (NativeWebAuthn.WEBAUTHN_ASSERTION) Marshal.PtrToStructure(assertionPtr, typeof(NativeWebAuthn.WEBAUTHN_ASSERTION)); + + byte[] credentialId; + if (assertion.Credential.cbId > 0) + { + credentialId = new byte[assertion.Credential.cbId]; + if (assertion.Credential.pbId != IntPtr.Zero) + { + Marshal.Copy(assertion.Credential.pbId, credentialId, 0, assertion.Credential.cbId); + } + } + else + { + credentialId = new byte[0]; + } + + byte[] authenticatorData; + if (assertion.cbAuthenticatorData > 0) + { + authenticatorData = new byte[assertion.cbAuthenticatorData]; + if (assertion.pbAuthenticatorData != IntPtr.Zero) + { + Marshal.Copy(assertion.pbAuthenticatorData, authenticatorData, 0, assertion.cbAuthenticatorData); + } + } + else + { + authenticatorData = new byte[0]; + } + + byte[] signatureData; + if (assertion.cbSignature > 0) + { + signatureData = new byte[assertion.cbSignature]; + if (assertion.pbSignature != IntPtr.Zero) + { + Marshal.Copy(assertion.pbSignature, signatureData, 0, assertion.cbSignature); + } + } + else + { + signatureData = new byte[0]; + } + + NativeWebAuthn.WebAuthNFreeAssertion(assertionPtr); + taskSource.TrySetResult(new WebAuthnSignature + { + clientData = clientDataBytes, + authenticatorData = authenticatorData, + credentialId = credentialId, + signatureData = signatureData, + }); + } + else + { + var ptr = NativeWebAuthn.WebAuthNGetErrorName(hr); + var error = Marshal.PtrToStringUni(ptr); + taskSource.SetException(new Exception($"WebauthN GetAssertion error: {error}")); + } + } + finally + { + foreach (var ptr in ptrList) + { + Marshal.FreeHGlobal(ptr); + } + + ptrList.Clear(); + + } + }, + token); + + return taskSource.Task; + } + } + + internal static class NativeWebAuthn + { + internal const int WEBAUTHN_API_VERSION_1 = 1; + internal const int WEBAUTHN_API_VERSION_2 = 2; + internal enum HRESULT : uint + { + S_FALSE = 0x0001, + S_OK = 0x0000, + E_INVALIDARG = 0x80070057, + E_OUTOFMEMORY = 0x8007000E + } + + [DllImport("webauthn.dll", EntryPoint = "WebAuthNGetApiVersionNumber", CharSet = CharSet.Unicode)] + internal static extern int WebAuthNGetApiVersionNumber(); + + + [DllImport("webauthn.dll", EntryPoint = "WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable", CharSet = CharSet.Unicode)] + internal static extern HRESULT WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(out bool pbIsUserVerifyingPlatformAuthenticatorAvailable); + + internal const uint WEBAUTHN_CREDENTIAL_CURRENT_VERSION = 1; + internal const string WEBAUTHN_CREDENTIAL_TYPE_PUBLIC_KEY = "public-key"; + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_CREDENTIAL + { + // Version of this structure, to allow for modifications in the future. + public uint dwVersion; + + // Size of pbID. + public int cbId; + // Unique ID for this particular credential. + public IntPtr pbId; + + // Well-known credential type specifying what this particular credential is. + public IntPtr pwszCredentialType; + } + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_CREDENTIALS + { + public int cCredentials; + public IntPtr pCredentials; // PWEBAUTHN_CREDENTIALS + } + + [StructLayout(LayoutKind.Sequential)] + internal struct _WEBAUTHN_EXTENSION + { + [MarshalAs(UnmanagedType.LPWStr)] + public string pwszExtensionIdentifier; + public uint cbExtension; + public IntPtr pvExtension; + } + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_EXTENSIONS + { + public uint cExtensions; + public IntPtr pExtensions; // PWEBAUTHN_EXTENSION + } + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_CREDENTIAL_EX + { + // Version of this structure, to allow for modifications in the future. + public uint dwVersion; + + // Size of pbID. + public uint cbId; + // Unique ID for this particular credential. + public byte[] pbId; + + // Well-known credential type specifying what this particular credential is. + [MarshalAs(UnmanagedType.LPWStr)] + public string pwszCredentialType; + + // Transports. 0 implies no transport restrictions. + public uint dwTransports; + } + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_CREDENTIAL_LIST + { + public uint cCredentials; + public IntPtr ppCredentials; //PWEBAUTHN_CREDENTIAL_EX* + } + + public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_ANY = 0; + public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_PLATFORM = 1; + public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM = 2; + public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM_U2F_V2 = 3; + + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS + { + // Version of this structure, to allow for modifications in the future. + public uint dwVersion; + + // Time that the operation is expected to complete within. + // This is used as guidance, and can be overridden by the platform. + public uint dwTimeoutMilliseconds; + + // Allowed Credentials List. + public WEBAUTHN_CREDENTIALS CredentialList; + + // Optional extensions to parse when performing the operation. + public WEBAUTHN_EXTENSIONS Extensions; + + // Optional. Platform vs Cross-Platform Authenticators. + public uint dwAuthenticatorAttachment; + + // User Verification Requirement. + public uint dwUserVerificationRequirement; + + // Reserved for future Use + public uint dwFlags; + + // + // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_2 + // + + // Optional identifier for the U2F AppId. Converted to UTF8 before being hashed. Not lower cased. + public IntPtr pwszU2fAppId; + + // If the following is non-NULL, then, set to TRUE if the above pwszU2fAppid was used instead of + // PCWSTR pwszRpId; + public IntPtr pbU2fAppId; // BOOL* pbU2fAppId; + + // + // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_3 + // + + // Cancellation Id - Optional - See WebAuthNGetCancellationId + public IntPtr pCancellationId; //GUID *pCancellationId; + + // + // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_4 + // + + // Allow Credential List. If present, "CredentialList" will be ignored. + public IntPtr pAllowCredentialList; // PWEBAUTHN_CREDENTIAL_LIST + + } + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_CLIENT_DATA + { + // Version of this structure, to allow for modifications in the future. + // This field is required and should be set to CURRENT_VERSION above. + public uint dwVersion; + + // Size of the pbClientDataJSON field. + public int cbClientDataJSON; + + // UTF-8 encoded JSON serialization of the client data. + public IntPtr pbClientDataJSON; + + // Hash algorithm ID used to hash the pbClientDataJSON field. + [MarshalAs(UnmanagedType.LPWStr)] + public string pwszHashAlgId; + } + + [StructLayout(LayoutKind.Sequential)] + internal struct WEBAUTHN_ASSERTION + { + // Version of this structure, to allow for modifications in the future. + public uint dwVersion; + + // Size of cbAuthenticatorData. + public int cbAuthenticatorData; + // Authenticator data that was created for this assertion. + public IntPtr pbAuthenticatorData; + + // Size of pbSignature. + public int cbSignature; + // Signature that was generated for this assertion. + public IntPtr pbSignature; + + // Credential that was used for this assertion. + public WEBAUTHN_CREDENTIAL Credential; + + // Size of User Id + public int cbUserId; + // UserId + public IntPtr pbUserId; + } + internal const string WEBAUTHN_HASH_ALGORITHM_SHA_256 = "SHA-256"; + [DllImport("webauthn.dll", EntryPoint = "WebAuthNAuthenticatorGetAssertion", CharSet = CharSet.Unicode)] + internal static extern HRESULT WebAuthNAuthenticatorGetAssertion( + [In] IntPtr hWnd, + [MarshalAs(UnmanagedType.LPWStr)] + [In] string pwszRpId, + [In] ref WEBAUTHN_CLIENT_DATA pWebAuthNClientData, + [In] ref WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS pWebAuthNGetAssertionOptions, + [Out] out IntPtr ppWebAuthNAssertion); + + [DllImport("webauthn.dll", EntryPoint = "WebAuthNFreeAssertion", CharSet = CharSet.Unicode)] + internal static extern void WebAuthNFreeAssertion([In] IntPtr pWebAuthNAssertion); + + [DllImport("webauthn.dll", EntryPoint = "WebAuthNGetCancellationId", CharSet = CharSet.Unicode)] + internal static extern HRESULT WebAuthNGetCancellationId([Out] IntPtr pCancellationId); + + [DllImport("webauthn.dll", EntryPoint = "WebAuthNCancelCurrentOperation", CharSet = CharSet.Unicode)] + internal static extern HRESULT WebAuthNCancelCurrentOperation([In] IntPtr pCancellationId); + + [DllImport("webauthn.dll", EntryPoint = "WebAuthNGetErrorName", CharSet = CharSet.Unicode)] + internal static extern IntPtr WebAuthNGetErrorName([In] HRESULT hr); + } +} +#endif \ No newline at end of file diff --git a/KeeperSdk/enterprise/AuditLog.cs b/KeeperSdk/enterprise/AuditLog.cs index 1f3e336..b73d5a2 100644 --- a/KeeperSdk/enterprise/AuditLog.cs +++ b/KeeperSdk/enterprise/AuditLog.cs @@ -5,84 +5,15 @@ using System.Threading.Tasks; using KeeperSecurity.Authentication; using KeeperSecurity.Commands; -#if NET45 +using KeeperSecurity.Enterprise.AuditLogCommands; +#if NET452_OR_GREATER using KeeperSecurity.Utils; #endif namespace KeeperSecurity { - namespace Commands + namespace Commands { - [DataContract] - public class CreatedFilter - { - [DataMember(Name = "max", EmitDefaultValue = false)] - public long? Max { get; set; } - - [DataMember(Name = "min", EmitDefaultValue = false)] - public long? Min { get; set; } - - [DataMember(Name = "exclude_max")] - public bool ExcludeMax { get; set; } = true; - - [DataMember(Name = "exclude_min")] - public bool ExcludeMin { get; set; } - } - - [DataContract] - public class ReportFilter - { - [DataMember(Name = "audit_event_type", EmitDefaultValue = false)] - public string[] EventTypes { get; set; } - - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - [DataMember(Name = "to_username", EmitDefaultValue = false)] - public string ToUsername { get; set; } - - [DataMember(Name = "record_uid", EmitDefaultValue = false)] - public string RecordUid { get; set; } - - [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] - public string SharedFolderUid { get; set; } - - [DataMember(Name = "created", EmitDefaultValue = false)] - public object Created { get; set; } - - } - - [DataContract] - public class GetAuditEventReportsCommand : AuthenticatedCommand - { - public GetAuditEventReportsCommand() : base("get_audit_event_reports") - { - } - - [DataMember(Name = "report_type")] - public string ReportType { get; set; } = "raw"; - - [DataMember(Name = "scope")] - public string Scope { get; internal set; } = "enterprise"; - - [DataMember(Name = "order")] - public string Order { get; set; } = "descending"; - - [DataMember(Name = "limit")] - public int Limit { get; set; } = 1000; - - [DataMember(Name = "filter", EmitDefaultValue = false)] - public ReportFilter Filter { get; set; } - } - - [DataContract] - public class GetAuditEventReportsResponse : KeeperApiResponse - { - - [DataMember(Name = "audit_event_overview_report_rows")] - public List> Events { get; private set; } - } - [DataContract] public class GetAuditEventDimensionsCommand : AuthenticatedCommand { @@ -136,11 +67,204 @@ public class GetAuditEventDimensionsResponse : KeeperApiResponse namespace Enterprise { + + namespace AuditLogCommands + { + /// + /// Represents Event Period Filter + /// + [DataContract] + public class CreatedFilter + { + /// + /// Maximum value. + /// + /// UNIX epoch time in seconds + [DataMember(Name = "max", EmitDefaultValue = false)] + public long? Max { get; set; } + + /// + /// Mimimum value. + /// + /// UNIX epoch time in seconds + [DataMember(Name = "min", EmitDefaultValue = false)] + public long? Min { get; set; } + + /// + /// Exclude Maximum value. + /// + /// Less than Maxinum value if true + [DataMember(Name = "exclude_max")] + public bool ExcludeMax { get; set; } = true; + + /// + /// Exclude Minimum value. + /// + /// Greater than Mininum value if true + [DataMember(Name = "exclude_min")] + public bool ExcludeMin { get; set; } + } + + /// + /// Represents Audit Report Filter + /// + [DataContract] + public class ReportFilter + { + /// + /// Event Types + /// + /// + [DataMember(Name = "audit_event_type", EmitDefaultValue = false)] + public string[] EventTypes { get; set; } + + /// + /// Users + /// + [DataMember(Name = "username", EmitDefaultValue = false)] + public string[] Username { get; set; } + + /// + /// Target Users + /// + [DataMember(Name = "to_username", EmitDefaultValue = false)] + public string[] ToUsername { get; set; } + + /// + /// Record UIDs + /// + [DataMember(Name = "record_uid", EmitDefaultValue = false)] + public string[] RecordUid { get; set; } + + /// + /// Shared Folder UIDs + /// + [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] + public string[] SharedFolderUid { get; set; } + + /// + /// Event Time + /// + /// + /// Predefined Filters: today, yesterday, last_30_days, last_7_days, month_to_date, last_month, year_to_date, last_year + [DataMember(Name = "created", EmitDefaultValue = false)] + public object Created { get; set; } + } + + /// + /// Represents Audit Report Command + /// + [DataContract] + public class GetAuditEventReportsCommand : AuthenticatedCommand + { + /// + public GetAuditEventReportsCommand() : base("get_audit_event_reports") + { + } + + /// + /// Report Type + /// + /// Report TypeDescription + /// rawPlain audit events. Default. + /// spanEvents consolidated by . Creation time is dropped. + /// monthEvents consolidated by event month and . + /// weekconsolidated by event week ... + /// dayconsolidated by event day ... + /// hourconsolidated by event hour ... + /// + /// + [DataMember(Name = "report_type")] + public string ReportType { get; set; } = "raw"; + + /// + /// Report Scope + /// + /// ScopeDescription + /// enterpriseEnterprise + /// userLogged in user + /// + /// + [DataMember(Name = "scope")] + public string Scope { get; internal set; } = "enterprise"; + + /// + /// Sort Order + /// + /// Sort OrderDescription + /// descendingDefault + /// ascending + /// + /// + [DataMember(Name = "order")] + public string Order { get; set; } = "descending"; + + /// + /// Number of rows to return + /// + /// Maximum: 1000 - raw reports, 2000 - consolidated reports + [DataMember(Name = "limit")] + public int Limit { get; set; } = 1000; + + /// + /// Repord Filder + /// + /// + [DataMember(Name = "filter", EmitDefaultValue = false)] + public ReportFilter Filter { get; set; } + + /// + /// Aggregate columns + /// + /// ColumnDescription + /// occurrencesEvent count + /// first_createdFirst event time. MIN(Created) + /// last_createdLast event time. MAX(Created) + /// + /// + /// Consolidated reports only. + [DataMember(Name = "aggregate", EmitDefaultValue = false)] + public string[] Aggregate { get; set; } + + /// + /// Group by columns + /// + /// ColumnDescription + /// audit_event_typeEvent Type + /// usernameUsername + /// ip_addressIP Address + /// keeper_versionKeeper Client Version + /// to_usernameTarget Username + /// record_uidRecord UID + /// shared_folder_uidShared Folder UID + /// team_uidTeam UID + /// + /// + [DataMember(Name = "columns", EmitDefaultValue = false)] + public string[] Columns { get; set; } + } + + /// + /// Represents Audit Report Response + /// + [DataContract] + public class GetAuditEventReportsResponse : KeeperApiResponse + { + /// + /// Events + /// + [DataMember(Name = "audit_event_overview_report_rows")] + public List> Events { get; private set; } + } + + } + /// /// Enterprise Audit Log access methods. /// public static class AuditLogExtensions { + /// /// Gets the list of all available audit events /// @@ -157,14 +281,18 @@ public static async Task GetAvailableEvents(this IAuthenticati /// Gets audit events in descending order. /// /// Keeper Connection - /// User email + /// Audit report filetr /// Recent event epoch time in seconds /// Latest event epoch time in seconds /// Awaitable task returning a tuple. Item1 contains the audit event list. Item2 the epoch time in seconds to resume - /// This method returns first 1000 events. To get the next chunk of audit events pass the second parameter of result into recentUnixTime parameter. - public static async Task> GetUserEvents(this IAuthentication auth, string forUser, long recentUnixTime, long latestUnixTime = 0) + /// + /// + /// This method returns first 1000 events. To get the next chunk of audit events pass the second parameter of result into recentUnixTime parameter. + /// Created property of is ignored. + /// + public static async Task> GetEvents(this IAuthentication auth, ReportFilter filter, long recentUnixTime, long latestUnixTime = 0) { - if (recentUnixTime < 0 || latestUnixTime < 0 || string.IsNullOrEmpty(forUser)) + if (recentUnixTime < 0 || latestUnixTime < 0 || filter == null) { return null; } @@ -174,17 +302,15 @@ public static async Task> GetUserEvent recentUnixTime = DateTimeOffset.Now.ToUnixTimeMilliseconds() / 1000; } + filter.Created = new CreatedFilter + { + Max = recentUnixTime == 0 ? (long?) null : recentUnixTime, + Min = latestUnixTime == 0 ? (long?) null : latestUnixTime + }; + var rq = new GetAuditEventReportsCommand { - Filter = new ReportFilter - { - Username = forUser, - Created = new CreatedFilter - { - Max = recentUnixTime == 0 ? (long?) null : recentUnixTime, - Min = latestUnixTime == 0 ? (long?) null : latestUnixTime - } - }, + Filter = filter, Limit = 1000, ReportType = "raw", Order = "descending" @@ -219,6 +345,26 @@ public static async Task> GetUserEvent rs.Events.RemoveRange(pos + 1, rs.Events.Count - pos - 1); return Tuple.Create(rs, conv.ToInt64(CultureInfo.InvariantCulture) + 1); } + + + + /// + /// Gets audit events for a user in descending order. + /// + /// Keeper Connection + /// User email + /// Recent event epoch time in seconds + /// Latest event epoch time in seconds + /// Awaitable task returning a tuple. Item1 contains the audit event list. Item2 the epoch time in seconds to resume + /// This method returns first 1000 events. To get the next chunk of audit events pass the second parameter of result into recentUnixTime parameter. + public static Task> GetUserEvents(this IAuthentication auth, string forUser, long recentUnixTime, long latestUnixTime = 0) + { + var filter = new ReportFilter + { + Username = new[] { forUser }, + }; + return auth.GetEvents(filter, recentUnixTime, latestUnixTime); + } } } } diff --git a/KeeperSdk/enterprise/EnterpriseCommands.cs b/KeeperSdk/enterprise/EnterpriseCommands.cs index cd659c7..1011cde 100644 --- a/KeeperSdk/enterprise/EnterpriseCommands.cs +++ b/KeeperSdk/enterprise/EnterpriseCommands.cs @@ -7,6 +7,11 @@ public interface IDisplayName string DisplayName { get; set; } } + public interface IEncryptedData + { + string EncryptedData { get; } + } + [DataContract] public class EncryptedData : IExtensibleDataObject { @@ -27,7 +32,59 @@ public PreAccountTransferCommand() : base("pre_account_transfer") { } } [DataContract] - public class PreAccountTransferDataResponse : KeeperApiResponse + public class PreAccountTransferRecordKey + { + [DataMember(Name = "record_uid")] + public string RecordUid { get; set; } + + [DataMember(Name = "record_key")] + public string RecordKey { get; set; } + + [DataMember(Name = "record_key_type")] + public int RecordKeyType { get; set; } + } + + [DataContract] + public class PreAccountTransferSharedFolderKey + { + [DataMember(Name = "shared_folder_uid")] + public string SharedFolderUid { get; set; } + + [DataMember(Name = "shared_folder_key")] + public string SharedFolderKey { get; set; } + + [DataMember(Name = "shared_folder_key_type")] + public int SharedFolderKeyType { get; set; } + } + + [DataContract] + public class PreAccountTransferTeamKey + { + [DataMember(Name = "team_uid")] + public string TeamUid { get; set; } + + [DataMember(Name = "team_key")] + public string TeamKey { get; set; } + + [DataMember(Name = "team_key_type")] + public int TeamKeyType { get; set; } + } + + [DataContract] + public class PreAccountTransferUserFolderKey + { + [DataMember(Name = "user_folder_uid")] + public string UserFolderUid { get; set; } + + [DataMember(Name = "user_folder_key")] + public string UserFolderKey { get; set; } + + [DataMember(Name = "user_folder_key_type")] + public int UserFolderKeyType { get; set; } + } + + [DataContract] + public class PreAccountTransferResponse : KeeperApiResponse { [DataMember(Name = "username")] public string Username { get; set; } @@ -35,6 +92,9 @@ public class PreAccountTransferDataResponse : KeeperApiResponse [DataMember(Name = "user_private_key")] public string UserPrivateKey { get; set; } + [DataMember(Name = "user_ecc_private_key")] + public string UserEccPrivateKey { get; set; } + [DataMember(Name = "role_key")] public string RoleKey { get; set; } @@ -46,6 +106,111 @@ public class PreAccountTransferDataResponse : KeeperApiResponse [DataMember(Name = "transfer_key")] public string TransferKey { get; set; } + + [DataMember(Name = "record_keys")] + public PreAccountTransferRecordKey[] RecordKeys { get; set; } + + [DataMember(Name = "shared_folder_keys")] + public PreAccountTransferSharedFolderKey[] SharedFolderKeys { get; set; } + + [DataMember(Name = "team_keys")] + public PreAccountTransferTeamKey[] TeamKeys { get; set; } + + [DataMember(Name = "user_folder_keys")] + public PreAccountTransferUserFolderKey[] UserFolderKeys { get; set; } + } + + [DataContract] + public class TransferAndDeleteRecordKey + { + [DataMember(Name = "record_uid", EmitDefaultValue = false)] + public string RecordUid { get; set; } + + [DataMember(Name = "record_key", EmitDefaultValue = false)] + public string RecordKey { get; set; } + } + + [DataContract] + public class TransferAndDeleteSharedFolderKey + { + [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] + public string SharedFolderUid { get; set; } + + [DataMember(Name = "shared_folder_key", EmitDefaultValue = false)] + public string SharedFolderKey { get; set; } + } + + [DataContract] + public class TransferAndDeleteTeamKey + { + [DataMember(Name = "team_uid", EmitDefaultValue = false)] + public string TeamUid { get; set; } + + [DataMember(Name = "team_key", EmitDefaultValue = false)] + public string TeamKey { get; set; } + } + + [DataContract] + public class TransferAndDeleteUserFolderKey + { + [DataMember(Name = "user_folder_uid", EmitDefaultValue = false)] + public string UserFolderUid { get; set; } + + [DataMember(Name = "user_folder_key", EmitDefaultValue = false)] + public string UserFolderKey { get; set; } + } + + [DataContract] + public class TransferAndDeleteUserFolderTransfer + { + [DataMember(Name = "transfer_folder_uid", EmitDefaultValue = false)] + public string TransferFolderUid { get; set; } + + [DataMember(Name = "transfer_parent_uid", EmitDefaultValue = false)] + public string TransferParentUid { get; set; } + + [DataMember(Name = "transfer_folder_data", EmitDefaultValue = false)] + public string TransferFolderData { get; set; } + + [DataMember(Name = "transfer_folder_key", EmitDefaultValue = false)] + public string TransferFolderKey { get; set; } + } + + [DataContract] + public class TransferAndDeleteUserCommand : AuthenticatedCommand + { + public TransferAndDeleteUserCommand() : base("transfer_and_delete_user") { } + + [DataMember(Name = "from_user", EmitDefaultValue = false)] + public string FromUser { get; set; } + + [DataMember(Name = "to_user", EmitDefaultValue = false)] + public string ToUser { get; set; } + + [DataMember(Name = "record_keys", EmitDefaultValue = false)] + public TransferAndDeleteRecordKey[] RecordKeys { get; set; } + + [DataMember(Name = "shared_folder_keys", EmitDefaultValue = false)] + public TransferAndDeleteSharedFolderKey[] SharedFolderKeys { get; set; } + + [DataMember(Name = "team_keys", EmitDefaultValue = false)] + public TransferAndDeleteTeamKey[] TeamKeys { get; set; } + + [DataMember(Name = "user_folder_keys", EmitDefaultValue = false)] + public TransferAndDeleteUserFolderKey[] UserFolderKeys { get; set; } + + + [DataMember(Name = "corrupted_record_keys")] + public PreAccountTransferRecordKey[] CorruptedRecordKeys { get; set; } + [DataMember(Name = "corrupted_shared_folder_keys")] + public PreAccountTransferSharedFolderKey[] CorruptedSharedFolderKeys { get; set; } + [DataMember(Name = "corrupted_team_keys")] + public PreAccountTransferTeamKey[] CorruptedTeamKeys { get; set; } + [DataMember(Name = "corrupted_user_folder_keys")] + public PreAccountTransferUserFolderKey[] CorruptedUserFolderKeys { get; set; } + + [DataMember(Name = "user_folder_transfer")] + public TransferAndDeleteUserFolderTransfer UserFolderTransfer { get; set; } } @@ -183,7 +348,7 @@ public TeamCommand(string command) : base(command) public bool RestrictView { get; set; } [DataMember(Name = "node_id", EmitDefaultValue = false)] - public long? NodeId { get; set; } + public long NodeId { get; set; } } [DataContract] @@ -411,12 +576,124 @@ public EnterpriseUserLockCommand() : base("enterprise_user_lock") { } - [DataMember(Name = "lock", EmitDefaultValue = false)] + [DataMember(Name = "lock", EmitDefaultValue = false)] public string Lock { get; set; } // one of: locked, disabled, unlocked [DataMember(Name = "delete_if_pending", EmitDefaultValue = false)] public bool? DeleteIfPending { get; set; } } + [DataContract] + public class EnterpriseUserDeleteCommand : EnterpriseUserCommand + { + public EnterpriseUserDeleteCommand() : base("enterprise_user_delete") + { + } + } + + [DataContract] + public class MspAddon + { + [DataMember(Name = "seats", EmitDefaultValue = false)] + public int? Seats { get; set; } + + [DataMember(Name = "add_on")] + public string AddOn { get; set; } + } + + [DataContract] + public class EnterpriseManagedCompanyByMspCommand : AuthenticatedCommand + { + public EnterpriseManagedCompanyByMspCommand(string command) : base(command) + { + } + + [DataMember(Name = "enterprise_name")] + public string EnterpriseName { get; set; } + + [DataMember(Name = "node_id", EmitDefaultValue = false)] + public long? NodeId { get; set; } + + [DataMember(Name = "product_id")] + public string ProductId { get; set; } + + [DataMember(Name = "seats")] + public int Seats { get; set; } + + [DataMember(Name = "file_plan_type", EmitDefaultValue = false)] + public string FilePlanType { get; set; } + + [DataMember(Name = "add_ons", EmitDefaultValue = false)] + public MspAddon[] AddOns { get; set; } + } + + [DataContract] + public class EnterpriseRegistrationByMspCommand : EnterpriseManagedCompanyByMspCommand + { + public EnterpriseRegistrationByMspCommand() : base("enterprise_registration_by_msp") + { + } + + [DataMember(Name = "role_data")] + public string RoleData { get; set; } + + [DataMember(Name = "root_node")] + public string RootNode { get; set; } + + [DataMember(Name = "encrypted_tree_key")] + public string EncryptedTreeKey { get; set; } + } + + [DataContract] + public class EnterpriseUpdateByMspCommand : EnterpriseManagedCompanyByMspCommand + { + public EnterpriseUpdateByMspCommand() : base("enterprise_update_by_msp") + { + } + + [DataMember(Name = "enterprise_id")] + public int EnterpriseId { get; set; } + + [DataMember(Name = "notification", EmitDefaultValue = false)] + public int Notification { get; set; } + + [DataMember(Name = "price", EmitDefaultValue = false)] + public string Price { get; set; } + } + + [DataContract] + public class EnterpriseManagedCompanyByMspResponse : KeeperApiResponse + { + [DataMember(Name = "enterprise_id")] + public int EnterpriseId { get; set; } + } + + [DataContract] + public class EnterpriseRemoveByMspCommand : AuthenticatedCommand + { + public EnterpriseRemoveByMspCommand() : base("enterprise_remove_by_msp") + { + } + + [DataMember(Name = "enterprise_id")] + public int EnterpriseId { get; set; } + } + + [DataContract] + public class ExtendAccountShareExpirationCommand : AuthenticatedCommand + { + public ExtendAccountShareExpirationCommand() : base("extend_account_share_expiration") + { + } + [DataMember(Name = "enterprise_user_id")] + public long EnterpriseUserId { get; set; } + } + + [DataContract] + public class ExtendAccountShareExpirationResponse : KeeperApiResponse + { + [DataMember(Name = "account_share_expiration")] + public long AccountShareExpiration { get; set; } + } } diff --git a/KeeperSdk/enterprise/EnterpriseData.cs b/KeeperSdk/enterprise/EnterpriseData.cs index dfd3bf5..796158a 100644 --- a/KeeperSdk/enterprise/EnterpriseData.cs +++ b/KeeperSdk/enterprise/EnterpriseData.cs @@ -19,8 +19,6 @@ public partial class EnterpriseData : EnterpriseDataPlugin, IEnterpriseData /// /// Instantiates instance. /// - /// Keeper authentication. - /// Enterprise tree key. Optional. public EnterpriseData() { _nodes = new NodeDictionary(); @@ -186,8 +184,12 @@ protected override void PopulateSdkFromKeeper(EnterpriseNode sdk, Node keeper) { sdk.ParentNodeId = keeper.ParentId; sdk.RestrictVisibility = keeper.RestrictVisibility; + sdk.EncryptedData = keeper.EncryptedData; + sdk.BridgeId = keeper.BridgeId; + sdk.ScimId = keeper.ScimId; + sdk.SsoServiceProviderIds = keeper.SsoServiceProviderIds.ToArray(); var enterprise = GetEnterprise?.Invoke(); - if (enterprise != null && enterprise.TreeKey != null) + if (enterprise?.TreeKey != null) { EnterpriseUtils.DecryptEncryptedData(keeper.EncryptedData, enterprise.TreeKey, sdk); } @@ -253,7 +255,7 @@ public override void Clear() protected override void PopulateSdkFromKeeper(EnterpriseUser sdk, User keeper) { sdk.ParentNodeId = keeper.NodeId; - sdk.ParentNodeId = keeper.NodeId; + sdk.EncryptedData = keeper.EncryptedData; sdk.Email = keeper.Username; if (keeper.Status == "active") { @@ -286,11 +288,18 @@ protected override void PopulateSdkFromKeeper(EnterpriseUser sdk, User keeper) { sdk.UserStatus = UserStatus.Inactive; } - + sdk.AccountShareExpiration = keeper.AccountShareExpiration; var enterprise = GetEnterprise?.Invoke(); if (enterprise != null && enterprise.TreeKey != null) { - EnterpriseUtils.DecryptEncryptedData(keeper.EncryptedData, enterprise.TreeKey, sdk); + if (keeper.KeyType == "no_key") + { + sdk.DisplayName = keeper.EncryptedData; + } + else + { + EnterpriseUtils.DecryptEncryptedData(keeper.EncryptedData, enterprise.TreeKey, sdk); + } } } diff --git a/KeeperSdk/enterprise/EnterpriseDataManagement.cs b/KeeperSdk/enterprise/EnterpriseDataManagement.cs index c540269..2f86f2b 100644 --- a/KeeperSdk/enterprise/EnterpriseDataManagement.cs +++ b/KeeperSdk/enterprise/EnterpriseDataManagement.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.Linq; using System.Threading.Tasks; +using Enterprise; using KeeperSecurity.Authentication; using KeeperSecurity.Commands; using KeeperSecurity.Utils; @@ -15,7 +16,7 @@ public partial class EnterpriseData : IEnterpriseDataManagement /// Invites user to enterprise /// /// Email Address - /// Full Name + /// Optional /// Invited User public async Task InviteUser(string email, InviteUserOptions options = null) { @@ -30,16 +31,11 @@ public async Task InviteUser(string email, InviteUserOptions opt EncryptedData encrypted = new EncryptedData(); if (options != null) { - if (options.SuppressEmail != null) - { - rq.SuppressEmailInvite = true; - } - if (options.NodeId.HasValue) { - if (TryGetNode(options.NodeId.Value, out _)) + if (TryGetNode(options.NodeId.Value, out var node)) { - rq.NodeId = options.NodeId.Value; + rq.NodeId = node.Id; } } @@ -47,16 +43,13 @@ public async Task InviteUser(string email, InviteUserOptions opt } rq.EncryptedData = EnterpriseUtils.EncryptEncryptedData(encrypted, Enterprise.TreeKey); - var rs = await Enterprise.Auth.ExecuteAuthCommand(rq); - if (options != null && options.SuppressEmail != null) - { - options.SuppressEmail.Invoke(rs.VerificationCode); - } + var _ = await Enterprise.Auth.ExecuteAuthCommand(rq); await Enterprise.Load(); TryGetUserById(userId, out var user); return user; } + /// public async Task SetUserLocked(EnterpriseUser user, bool locked) { var userId = user.Id; @@ -64,7 +57,7 @@ public async Task SetUserLocked(EnterpriseUser user, bool locked { EnterpriseUserId = userId, Lock = locked ? "locked" : "unlocked", - DeleteIfPending = true + DeleteIfPending = false }; await Enterprise.Auth.ExecuteAuthCommand(rq); await Enterprise.Load(); @@ -72,11 +65,247 @@ public async Task SetUserLocked(EnterpriseUser user, bool locked return user; } - /// - /// Creates Enterprise Team. - /// - /// Enterprise Team - /// Created Team + /// + public async Task DeleteUser(EnterpriseUser user) + { + var rq = new EnterpriseUserDeleteCommand + { + EnterpriseUserId = user.Id + }; + + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + } + + /// + public async Task TransferUserAccount(IRoleData roleData, EnterpriseUser fromUser, EnterpriseUser targetUser) + { + if (fromUser.UserStatus == UserStatus.Inactive) + { + throw new KeeperApiException("user_not_active", "Cannot transfer inactive user"); + } + + if (fromUser.UserStatus != UserStatus.Locked) + { + var rq = new EnterpriseUserLockCommand + { + EnterpriseUserId = fromUser.Id, + Lock = "locked" + }; + await Enterprise.Auth.ExecuteAuthCommand(rq); + } + + var keys = new Dictionary + { + [targetUser.Email] = null + }; + + await this.PopulateUserPublicKeys(keys, (error) => + { + throw new KeeperApiException("public_key_error", error); + }); + var targetPublicKey = keys[targetUser.Email]; + if (targetPublicKey == null) + { + throw new KeeperApiException("public_key_error", $"Cannot get user {targetUser.Email} public key"); + } + var targetKey = CryptoUtils.LoadPublicKey(targetPublicKey); + + var preRq = new PreAccountTransferCommand + { + TargetUsername = fromUser.Email + }; + var preRs = await Enterprise.Auth.ExecuteAuthCommand(preRq); + var treeKey = Enterprise.TreeKey; + byte[] roleKey = null; + if (!string.IsNullOrEmpty(preRs.RoleKey)) + { + roleKey = CryptoUtils.DecryptRsa(preRs.RoleKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.PrivateRsaKey); + } + else if (preRs.RoleKeyId > 0) + { + roleKey = await roleData.GetRoleKey(preRs.RoleKeyId.Value); + } + if (roleKey == null) + { + throw new KeeperApiException("transfer_key_error", $"Cannot resolve Account Transfer role key for user {targetUser.Email}"); + } + var pk = CryptoUtils.DecryptAesV1(preRs.RolePrivateKey.Base64UrlDecode(), roleKey); + var rolePrivateKey = CryptoUtils.LoadPrivateKey(pk); + var userDataKey = CryptoUtils.DecryptRsa(preRs.TransferKey.Base64UrlDecode(), rolePrivateKey); + byte[] userRsaPrivateKey = null; + byte[] userEcPrivateKey = null; + if (!string.IsNullOrEmpty(preRs.UserPrivateKey)) + { + userRsaPrivateKey = CryptoUtils.DecryptAesV1(preRs.UserPrivateKey.Base64UrlDecode(), userDataKey); + } + if (!string.IsNullOrEmpty(preRs.UserEccPrivateKey)) + { + userEcPrivateKey = CryptoUtils.DecryptAesV2(preRs.UserEccPrivateKey.Base64UrlDecode(), userDataKey); + } + var userRsaKey = userRsaPrivateKey != null ? CryptoUtils.LoadPrivateKey(userRsaPrivateKey) : null; + var userEcKey = userEcPrivateKey != null ? CryptoUtils.LoadPrivateEcKey(userEcPrivateKey) : null; + + Func convert = (encryptedKey, keyType) => + { + byte[] key = null; + switch (keyType) + { + case (int) EncryptedKeyType.KtEncryptedByDataKey: + key = CryptoUtils.DecryptAesV1(encryptedKey, userDataKey); + break; + case (int) EncryptedKeyType.KtEncryptedByPublicKey: + if (userRsaKey != null) + { + key = CryptoUtils.DecryptRsa(encryptedKey, userRsaKey); + } + break; + case (int) EncryptedKeyType.KtEncryptedByDataKeyGcm: + key = CryptoUtils.DecryptAesV2(encryptedKey, userDataKey); + break; + case (int) EncryptedKeyType.KtEncryptedByPublicKeyEcc: + if (userRsaKey != null) + { + key = CryptoUtils.DecryptEc(encryptedKey, userEcKey); + } + break; + } + if (key != null) + { + return CryptoUtils.EncryptRsa(key, targetKey); + } + throw new KeeperApiException("wrong_key_type", $"Cannot decrypt key. Wrong key type {keyType}"); + }; + + var tdRq = new TransferAndDeleteUserCommand + { + FromUser = fromUser.Email, + ToUser = targetUser.Email, + }; + if (preRs.RecordKeys != null) + { + var transfered = new List(); + var corrupted = new List(); + foreach (var rk in preRs.RecordKeys) + { + try + { + transfered.Add(new TransferAndDeleteRecordKey + { + RecordUid = rk.RecordUid, + RecordKey = convert(rk.RecordKey.Base64UrlDecode(), rk.RecordKeyType).Base64UrlEncode() + }); + } + catch (Exception e) + { + Debug.WriteLine(e); + corrupted.Add(rk); + } + } + tdRq.RecordKeys = transfered.ToArray(); + tdRq.CorruptedRecordKeys = corrupted.ToArray(); + } + if (preRs.SharedFolderKeys != null) + { + var transfered = new List(); + var corrupted = new List(); + foreach (var sfk in preRs.SharedFolderKeys) + { + try + { + transfered.Add(new TransferAndDeleteSharedFolderKey + { + SharedFolderUid = sfk.SharedFolderUid, + SharedFolderKey = convert(sfk.SharedFolderKey.Base64UrlDecode(), sfk.SharedFolderKeyType).Base64UrlEncode() + }); + } + catch (Exception e) + { + Debug.WriteLine(e); + corrupted.Add(sfk); + } + } + tdRq.SharedFolderKeys = transfered.ToArray(); + tdRq.CorruptedSharedFolderKeys = corrupted.ToArray(); + } + if (preRs.TeamKeys != null) + { + var transfered = new List(); + var corrupted = new List(); + foreach (var tk in preRs.TeamKeys) + { + try + { + transfered.Add(new TransferAndDeleteTeamKey + { + TeamUid = tk.TeamUid, + TeamKey = convert(tk.TeamKey.Base64UrlDecode(), tk.TeamKeyType).Base64UrlEncode() + }); + } + catch (Exception e) + { + Debug.WriteLine(e); + corrupted.Add(tk); + } + } + tdRq.TeamKeys = transfered.ToArray(); + tdRq.CorruptedTeamKeys = corrupted.ToArray(); + } + if (preRs.UserFolderKeys != null) + { + var transfered = new List(); + var corrupted = new List(); + foreach (var ufk in preRs.UserFolderKeys) + { + try + { + transfered.Add(new TransferAndDeleteUserFolderKey + { + UserFolderUid = ufk.UserFolderUid, + UserFolderKey = convert(ufk.UserFolderKey.Base64UrlDecode(), ufk.UserFolderKeyType).Base64UrlEncode() + }); + } + catch (Exception e) + { + Debug.WriteLine(e); + corrupted.Add(ufk); + } + } + tdRq.UserFolderKeys = transfered.ToArray(); + tdRq.CorruptedUserFolderKeys = corrupted.ToArray(); + + var targetFolderKey = CryptoUtils.GenerateEncryptionKey(); + var data = new FolderData + { + name = $"Transfer from {fromUser.Email}", + }; + var dataBytes = JsonUtils.DumpJson(data); + tdRq.UserFolderTransfer = new TransferAndDeleteUserFolderTransfer + { + TransferFolderUid = CryptoUtils.GenerateUid(), + TransferFolderKey = CryptoUtils.EncryptRsa(targetFolderKey, targetKey).Base64UrlEncode(), + TransferFolderData = CryptoUtils.EncryptAesV1(dataBytes, targetFolderKey).Base64UrlEncode() + }; + } + + await Enterprise.Auth.ExecuteAuthCommand(tdRq); + await Enterprise.Load(); + + return new AccountTransferResult + { + RecordsTransfered = tdRq.RecordKeys?.Length ?? 0, + SharedFoldersTransfered = tdRq.SharedFolderKeys?.Length ?? 0, + TeamsTransfered = tdRq.TeamKeys?.Length ?? 0, + UserFoldersTransfered = tdRq.UserFolderKeys?.Length ?? 0, + RecordsCorrupted = tdRq.CorruptedRecordKeys?.Length ?? 0, + SharedFoldersCorrupted = tdRq.CorruptedSharedFolderKeys?.Length ?? 0, + TeamsCorrupted = tdRq.CorruptedTeamKeys?.Length ?? 0, + UserFoldersCorrupted = tdRq.CorruptedUserFolderKeys?.Length ?? 0 + }; + } + + + /// public async Task CreateTeam(EnterpriseTeam team) { var teamKey = CryptoUtils.GenerateEncryptionKey(); @@ -92,7 +321,7 @@ public async Task CreateTeam(EnterpriseTeam team) RestrictView = team.RestrictView, PublicKey = publicKey.Base64UrlEncode(), PrivateKey = encryptedPrivateKey.Base64UrlEncode(), - NodeId = team.ParentNodeId, + NodeId = team.ParentNodeId == 0 ? RootNode.Id : team.ParentNodeId, ManageOnly = true, EncryptedTeamKey = CryptoUtils.EncryptAesV2(teamKey, Enterprise.TreeKey).Base64UrlEncode() }; @@ -102,11 +331,7 @@ public async Task CreateTeam(EnterpriseTeam team) return team; } - /// - /// Updates Enterprise Team - /// - /// Enterprise Team - /// Updated Team + /// public async Task UpdateTeam(EnterpriseTeam team) { if (string.IsNullOrEmpty(team.Uid)) return await CreateTeam(team); @@ -128,11 +353,7 @@ public async Task UpdateTeam(EnterpriseTeam team) return team; } - /// - /// Deletes Enterprise Team. - /// - /// Enterprise Team UID. - /// Awaitable task. + /// public async Task DeleteTeam(string teamUid) { var rq = new TeamDeleteCommand @@ -143,13 +364,7 @@ public async Task DeleteTeam(string teamUid) await Enterprise.Load(); } - /// - /// Add Enterprise User(s) to Team(s). - /// - /// A list of user emails - /// A list of team UIDs - /// A callback that receives warnings - /// Awaitable task. + /// public async Task AddUsersToTeams(string[] emails, string[] teamUids, Action warnings = null) { var userPublicKeys = new Dictionary(StringComparer.InvariantCultureIgnoreCase); @@ -261,13 +476,7 @@ public async Task AddUsersToTeams(string[] emails, string[] teamUids, Action - /// Removes Users(s) from Team(s) - /// - /// A list of user emails - /// A list of team UIDs - /// A callback that receives warnings - /// Awaitable task. + /// public async Task RemoveUsersFromTeams(string[] emails, string[] teamUids, Action warnings = null) { var commands = new List(); diff --git a/KeeperSdk/enterprise/EnterpriseDataTypes.cs b/KeeperSdk/enterprise/EnterpriseDataTypes.cs index 8112efd..2778fed 100644 --- a/KeeperSdk/enterprise/EnterpriseDataTypes.cs +++ b/KeeperSdk/enterprise/EnterpriseDataTypes.cs @@ -196,24 +196,10 @@ public abstract class EnterpriseDataLink : KeeperEnterpriseDat where TD2 : IComparable { - private readonly Comparer comp1; - private readonly Comparer comp2; - protected readonly List _links = new List(); public EnterpriseDataLink(EnterpriseDataEntity dataEntity) : base(dataEntity) { - comp1 = Comparer.Create((x, y) => { - var x1 = GetEntity1Id(x); - var y1 = GetEntity1Id(y); - return x1.CompareTo(y1); - }); - - comp2 = Comparer.Create((x, y) => { - var x2 = GetEntity2Id(x); - var y2 = GetEntity2Id(y); - return x2.CompareTo(y2); - }); } protected abstract TD1 GetEntity1Id(TS keeperData); diff --git a/KeeperSdk/enterprise/EnterpriseDoc.cs b/KeeperSdk/enterprise/EnterpriseDoc.cs index 7559320..39a3e8b 100644 --- a/KeeperSdk/enterprise/EnterpriseDoc.cs +++ b/KeeperSdk/enterprise/EnterpriseDoc.cs @@ -17,48 +17,47 @@ namespace KeeperSecurity.Enterprise /// Provides types for manipulating Keeper Enterprise data. /// /// - /// - /// using System.Linq; - /// using System.Threading; - /// using System.Threading.Tasks; - /// using KeeperSecurity.Authentication; - /// using KeeperSecurity.Vault; - /// - /// internal static class Program - /// { - /// private static async Task Main() - /// { - /// IAuthentication auth = await ConnectToKeeperAs("username@company.com"); - /// if (auth.AuthContext.IsEnterpriseAdmin) - /// { - /// // Load enterprise data. - /// var enterprise = new EnterpriseData(); - /// var enterpriseLoader = new EnterpriseLoader(auth, new [] { enterprise }); - /// await enterpriseLoader.Load(); - /// - /// // Find team with name "Google". - /// var team = enterprise.Teams - /// .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); - /// if (team == null) - /// { - /// // Create team. - /// team = await enterprise.CreateTeam(new EnterpriseTeam - /// { - /// Name = "Google", - /// RestrictEdit = false, - /// RestrictSharing = true, - /// RestrictView = false, - /// }); - /// } - /// // Add users to the "Google" team. - /// await enterprise.AddUsersToTeams( - /// new[] { "username@company.com", "username1@company.com" }, - /// new[] { team.Uid }, - /// Console.WriteLine); - /// } - /// } - /// } - /// + /// + ///using System.Linq; + ///using System.Threading.Tasks; + ///using KeeperSecurity.Authentication; + ///using KeeperSecurity.Enterprise; + /// + ///internal static class Program + ///{ + /// private static async Task Main() + /// { + /// IAuthentication auth = await ConnectToKeeperAs("username@company.com"); + /// if (auth.AuthContext.IsEnterpriseAdmin) + /// { + /// // Load base enterprise data. + /// var enterprise = new EnterpriseData(); + /// var enterpriseLoader = new EnterpriseLoader(auth, new[] { enterprise }); + /// await enterpriseLoader.Load(); + /// + /// // Find team with name "Google". + /// var team = enterprise.Teams + /// .FirstOrDefault(x => string.Equals(x.Name, "Google", System.StringComparison.InvariantCultureIgnoreCase)); + /// if (team == null) + /// { + /// // Create team. + /// team = await enterprise.CreateTeam(new EnterpriseTeam + /// { + /// Name = "Google", + /// RestrictEdit = false, + /// RestrictSharing = true, + /// RestrictView = false, + /// }); + /// } + /// + /// // Add users to the "Google" team. + /// await enterprise.AddUsersToTeams( + /// new[] { "username@company.com", "username1@company.com" }, + /// new[] { team.Uid }); + /// } + /// } + ///} + /// /// /// /// @@ -67,3 +66,13 @@ internal class NamespaceDoc { } } +namespace KeeperSecurity.Enterprise.AuditLogCommands +{ + /// + /// Provides Audit Report Commands + /// + [CompilerGenerated] + internal class NamespaceDoc + { + } +} \ No newline at end of file diff --git a/KeeperSdk/enterprise/EnterpriseExtensions.cs b/KeeperSdk/enterprise/EnterpriseExtensions.cs index 060e1c9..ca65d63 100644 --- a/KeeperSdk/enterprise/EnterpriseExtensions.cs +++ b/KeeperSdk/enterprise/EnterpriseExtensions.cs @@ -13,7 +13,7 @@ public static class EnterpriseExtensions /// /// Toggles "Node Isolation" flag for enterprise node. /// - /// Enterprise Data. + /// Enterprise Data. /// Node ID /// Awaitable Task public static async Task SetRestrictVisibility(this EnterpriseData enterpriseData, long nodeId) @@ -34,7 +34,7 @@ public static async Task SetRestrictVisibility(this EnterpriseData enterpriseDat /// /// Creates Enterprise Node /// - /// Enterprise Data + /// Enterprise Data /// Node Name /// Parent Node /// Awaitable task returning created node @@ -72,7 +72,7 @@ public static async Task CreateNode(this EnterpriseData enterpri /// /// Updates existing node /// - /// Enterprise Data + /// Enterprise Data /// Enterprise node /// New Parent Node /// Awaitable task @@ -96,7 +96,7 @@ public static async Task UpdateNode(this EnterpriseData enterpriseData, Enterpri /// /// Deletes existing node /// - /// Enterprise Data + /// Enterprise Data /// Node ID to be deleted /// Awaitable task public static async Task DeleteNode(this EnterpriseData enterpriseData, long nodeId) diff --git a/KeeperSdk/enterprise/EnterpriseLoader.cs b/KeeperSdk/enterprise/EnterpriseLoader.cs index a8affc8..e7921c6 100644 --- a/KeeperSdk/enterprise/EnterpriseLoader.cs +++ b/KeeperSdk/enterprise/EnterpriseLoader.cs @@ -36,30 +36,28 @@ public class EnterpriseLoader : IEnterpriseLoader /// public byte[] TreeKey { get; private set; } - /// public byte[] RsaPrivateKey { get; set; } /// public byte[] EcPrivateKey { get; set; } - private byte[] _continuationToken; + /// + public byte[] ContinuationToken { get; set; } /// /// Initialises EnterpriseLoader instance. /// /// Keeper Authentication /// Enterprise data plugins - /// Enterprise tree key. Optional. /// /// /// /// - public EnterpriseLoader(IAuthentication auth, IEnumerable plugins, byte[] treeKey = null) + public EnterpriseLoader(IAuthentication auth, IEnumerable plugins) { Auth = auth; - TreeKey = treeKey; - _continuationToken = new byte[0]; + ContinuationToken = new byte[0]; foreach (var plugin in plugins) { @@ -71,6 +69,43 @@ public EnterpriseLoader(IAuthentication auth, IEnumerable } } + public async Task LoadKeys(byte[] treeKey = null) + { + TreeKey = treeKey; + var krq = new GetEnterpriseDataKeysRequest(); + var krs = await Auth.ExecuteAuthRest("enterprise/get_enterprise_data_keys", krq); + if (TreeKey == null) + { + var encTreeKey = krs.TreeKey.TreeKey_.Base64UrlDecode(); + switch (krs.TreeKey.KeyTypeId) + { + case BackupKeyType.EncryptedByDataKey: + TreeKey = CryptoUtils.DecryptAesV1(encTreeKey, Auth.AuthContext.DataKey); + break; + case BackupKeyType.EncryptedByPublicKey: + if (encTreeKey.Length > 60) + { + TreeKey = CryptoUtils.DecryptRsa(encTreeKey, Auth.AuthContext.PrivateRsaKey); + } + break; + default: + throw new Exception("cannot decrypt tree key"); + } + } + + if (krs.EnterpriseKeys != null) + { + if (!krs.EnterpriseKeys.RsaEncryptedPrivateKey.IsEmpty) + { + RsaPrivateKey = CryptoUtils.DecryptAesV2(krs.EnterpriseKeys.RsaEncryptedPrivateKey.ToByteArray(), TreeKey); + } + if (!krs.EnterpriseKeys.EccEncryptedPrivateKey.IsEmpty) + { + EcPrivateKey = CryptoUtils.DecryptAesV2(krs.EnterpriseKeys.EccEncryptedPrivateKey.ToByteArray(), TreeKey); + } + } + } + private readonly ConcurrentDictionary> _entities = new ConcurrentDictionary>(); @@ -103,34 +138,13 @@ public async Task Load() { if (TreeKey == null) { - var krq = new GetEnterpriseDataKeysRequest(); - var krs = await Auth.ExecuteAuthRest("enterprise/get_enterprise_data_keys", krq); - var encTreeKey = krs.TreeKey.TreeKey_.Base64UrlDecode(); - switch (krs.TreeKey.KeyTypeId) + if (Auth is ManagedCompanyAuth mca) { - case BackupKeyType.EncryptedByDataKey: - TreeKey = CryptoUtils.DecryptAesV1(encTreeKey, Auth.AuthContext.DataKey); - break; - case BackupKeyType.EncryptedByPublicKey: - if (encTreeKey.Length > 60) - { - TreeKey = CryptoUtils.DecryptRsa(encTreeKey, Auth.AuthContext.PrivateKey); - } - break; - default: - throw new Exception("cannot decrypt tree key"); + await LoadKeys(mca.TreeKey); } - - if (krs.EnterpriseKeys != null) + else { - if (!krs.EnterpriseKeys.RsaEncryptedPrivateKey.IsEmpty) - { - RsaPrivateKey = CryptoUtils.DecryptAesV2(krs.EnterpriseKeys.RsaEncryptedPrivateKey.ToByteArray(), TreeKey); - } - if (!krs.EnterpriseKeys.EccEncryptedPrivateKey.IsEmpty) - { - EcPrivateKey = CryptoUtils.DecryptAesV2(krs.EnterpriseKeys.EccEncryptedPrivateKey.ToByteArray(), TreeKey); - } + await LoadKeys(); } } @@ -139,7 +153,7 @@ public async Task Load() { var rrq = new EnterpriseDataRequest { - ContinuationToken = Google.Protobuf.ByteString.CopyFrom(_continuationToken) + ContinuationToken = Google.Protobuf.ByteString.CopyFrom(ContinuationToken) }; var rrs = await Auth.ExecuteAuthRest("enterprise/get_enterprise_data_for_user", rrq); if (rrs.CacheStatus == CacheStatus.Clear) @@ -156,7 +170,7 @@ public async Task Load() { } done = !rrs.HasMore; - _continuationToken = rrs.ContinuationToken.ToByteArray(); + ContinuationToken = rrs.ContinuationToken.ToByteArray(); if (string.IsNullOrEmpty(EnterpriseName) && rrs.GeneralData != null) { EnterpriseName = rrs.GeneralData.EnterpriseName; diff --git a/KeeperSdk/enterprise/EnterpriseTypes.cs b/KeeperSdk/enterprise/EnterpriseTypes.cs index 5a303a6..190f7e6 100644 --- a/KeeperSdk/enterprise/EnterpriseTypes.cs +++ b/KeeperSdk/enterprise/EnterpriseTypes.cs @@ -26,6 +26,7 @@ public interface IEnterpriseData int UserCount { get; } IEnumerable Teams { get; } int TeamCount { get; } + bool TryGetNode(long nodeId, out EnterpriseNode node); bool TryGetUserById(long userId, out EnterpriseUser user); bool TryGetUserByEmail(string email, out EnterpriseUser user); @@ -45,22 +46,115 @@ public class InviteUserOptions /// Enterprise Node ID /// public long? NodeId { get; set; } + } + + /// + /// Defines Transfer Account Result properties + /// + public class AccountTransferResult + { /// - /// Callback method that receives enterprise invitation code. - /// When provided the enterprise invitation email will not be sent. + /// Number of records /// - public Action SuppressEmail { get; set; } - } - /// + public int RecordsTransfered { get; internal set; } + /// + /// Number of shared folders + /// + public int SharedFoldersTransfered { get; internal set; } + /// + /// Number of teams + /// + public int TeamsTransfered { get; internal set; } + /// + /// Number of user folders + /// + public int UserFoldersTransfered { get; internal set; } + + /// + /// Number of corrupted records + /// + public int RecordsCorrupted { get; internal set; } + /// + /// Number of corrupted shared folders + /// + public int SharedFoldersCorrupted { get; internal set; } + /// + /// Number of corrupted teams + /// + public int TeamsCorrupted { get; internal set; } + /// + /// Number of corrupted user folders + /// + public int UserFoldersCorrupted { get; internal set; } + }; + + /// + /// Defines methods for modifying enterprise users and teams. + /// public interface IEnterpriseDataManagement { + /// + /// Invites a User to Enterprise. + /// + /// User email + /// Invided user options + /// Invited User Task InviteUser(string email, InviteUserOptions options = null); + /// + /// Locks or Unlocks an Enterprise User. + /// + /// Enterprise User + /// Lock flag + /// User Task SetUserLocked(EnterpriseUser user, bool locked); + /// + /// Deletes an Enterprise User. + /// + /// Enterprise User + /// Task + Task DeleteUser(EnterpriseUser user); + /// + /// Transfers Enterprise User account to another user. + /// + /// Enterprise Role data + /// Enterprise User to transfer account from + /// Target Enterprise User + /// Task + Task TransferUserAccount(IRoleData roleData, EnterpriseUser fromUser, EnterpriseUser targetUser); + /// + /// Creates Enterprise Team. + /// + /// Enterprise Team + /// Created Team Task CreateTeam(EnterpriseTeam team); + /// + /// Modifies Enterprise Team. + /// + /// Enterprise Team + /// Updated Team Task UpdateTeam(EnterpriseTeam team); + /// + /// Deletes Enterprise Team. + /// + /// Team UID + /// Task Task DeleteTeam(string teamUid); + /// + /// Adds Users to Team. + /// + /// Emails + /// Array of team Uids + /// (Optional) + /// Task Task AddUsersToTeams(string[] emails, string[] teamUids, Action warnings = null); + /// + /// Removes Users(s) from Team(s) + /// + /// A list of user emails + /// A list of team UIDs + /// A callback that receives warnings + /// Awaitable task. Task RemoveUsersFromTeams(string[] emails, string[] teamUids, Action warnings = null); } @@ -79,7 +173,7 @@ public interface IParentNodeEntity /// /// Represents Enterprise Node. /// - public class EnterpriseNode : IEnterpriseEntity, IParentNodeEntity, IDisplayName + public class EnterpriseNode : IEnterpriseEntity, IParentNodeEntity, IEncryptedData, IDisplayName { /// /// A list of child node IDs @@ -105,6 +199,18 @@ public class EnterpriseNode : IEnterpriseEntity, IParentNodeEntity, IDisplayName /// Node Isolation flag. /// public bool RestrictVisibility { get; internal set; } + + /// + public string EncryptedData { get; internal set; } + + /// + public long BridgeId { get; internal set; } + + /// + public long ScimId { get; internal set; } + + /// + public long[] SsoServiceProviderIds { get; internal set; } } /// @@ -145,7 +251,7 @@ public enum UserStatus /// /// Represents Enterprise User /// - public class EnterpriseUser : IEnterpriseEntity, IParentNodeEntity, IDisplayName + public class EnterpriseUser : IEnterpriseEntity, IParentNodeEntity, IEncryptedData, IDisplayName { /// /// User email address. @@ -171,12 +277,26 @@ public class EnterpriseUser : IEnterpriseEntity, IParentNodeEntity, IDisplayName /// Node that owns the user. /// public long ParentNodeId { get; internal set; } + + /// + public int UserId { get; internal set; } + + /// + public string KeyType { get; internal set; } + + /// + public string EncryptedData { get; internal set; } + + /// + /// Account Share Expiration. Unix epoch time in milliseconds. + /// + public long AccountShareExpiration { get; internal set; } } /// /// Represents Enterprise Role /// - public class EnterpriseRole : IEnterpriseEntity, IParentNodeEntity, IDisplayName + public class EnterpriseRole : IEnterpriseEntity, IParentNodeEntity, IEncryptedData, IDisplayName { /// /// Role ID. @@ -205,6 +325,7 @@ public class EnterpriseRole : IEnterpriseEntity, IParentNodeEntity, IDisplayName /// Node that owns the role. /// public long ParentNodeId { get; set; } + public string EncryptedData { get; set; } } @@ -249,6 +370,47 @@ public class EnterpriseTeam : IParentNodeEntity public long ParentNodeId { get; set; } } + /// + /// Represends Managed Company Add-On + /// + public class ManagedCompanyLicenseAddOn + { + /// + /// Add-On name + /// + public string Name { get; internal set; } + + /// + /// Is Add-On enabled + /// + public bool IsEnabled { get; internal set; } + + /// + /// Is Add-On trial + /// + public bool IsTrial { get; internal set; } + + /// + /// Number of Seats + /// + public int Seats { get; internal set; } + + /// + /// Add-On expiration time. UNIX epoch + /// + public long Expiration { get; internal set; } + + /// + /// Add-On creation time. UNIX epoch + /// + public long Creation { get; internal set; } + + /// + /// Add-On activation time. UNIX epoch + /// + public long Activation { get; internal set; } + } + /// /// Represents Enterprise Managed Company. /// @@ -279,6 +441,11 @@ public class EnterpriseManagedCompany : IParentNodeEntity /// public int NumberOfUsers { get; internal set; } + /// + /// File / Storage Plan Type + /// + public string FilePlanType { get; internal set; } + /// /// Is Managed Company Expired /// @@ -287,7 +454,15 @@ public class EnterpriseManagedCompany : IParentNodeEntity /// /// Node that owns the managed company. /// - public long ParentNodeId { get; set; } + public long ParentNodeId { get; internal set; } + + public ManagedCompanyLicenseAddOn[] AddOns { get; internal set; } + + /// + public long TreeKeyRole { get; internal set; } + + /// + public byte[] TreeKey { get; internal set; } } /// diff --git a/KeeperSdk/enterprise/EnterpriseUtils.cs b/KeeperSdk/enterprise/EnterpriseUtils.cs index d11e9da..29c326b 100644 --- a/KeeperSdk/enterprise/EnterpriseUtils.cs +++ b/KeeperSdk/enterprise/EnterpriseUtils.cs @@ -118,7 +118,7 @@ public static async Task PopulateTeamKeys(this EnterpriseData enterpriseData, ID key = CryptoUtils.DecryptAesV1(tk.key.Base64UrlDecode(), auth.AuthContext.DataKey); break; case 2: - key = CryptoUtils.DecryptRsa(tk.key.Base64UrlDecode(), auth.AuthContext.PrivateKey); + key = CryptoUtils.DecryptRsa(tk.key.Base64UrlDecode(), auth.AuthContext.PrivateRsaKey); break; default: warnings?.Invoke($"Team \'{tk.teamUid}\' unsupported key type: {tk.keyType}"); diff --git a/KeeperSdk/enterprise/ManagedCompanyData.cs b/KeeperSdk/enterprise/ManagedCompanyData.cs index 969d868..28a1e96 100644 --- a/KeeperSdk/enterprise/ManagedCompanyData.cs +++ b/KeeperSdk/enterprise/ManagedCompanyData.cs @@ -1,5 +1,9 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; using System.Threading.Tasks; +using BI; using Enterprise; using KeeperSecurity.Authentication; using KeeperSecurity.Utils; @@ -7,24 +11,47 @@ namespace KeeperSecurity.Enterprise { /// - public interface IManagedCompanyData + public interface IManagedCompanyData { IEnumerable ManagedCompanies { get; } } + /// + public class MspAddon + { + public string AddonCode { get; internal set; } + public string AddonName { get; internal set; } + public bool SeatsRequired { get; internal set; } + } + + /// + public class MspFilePlan + { + public string FilePlanCode { get; internal set; } + public string FilePlanName { get; internal set; } + } + + /// + public class MspProduct + { + public string ProductCode { get; internal set; } + public string ProductName { get; internal set; } + public string FilePlanCode { get; internal set; } + } + /// /// Represends Managed Companies enterprise data. /// - public class ManagedCompanyData : EnterpriseDataPlugin, IManagedCompanyData + public partial class ManagedCompanyData : EnterpriseDataPlugin, IManagedCompanyData { private readonly ManagedCompanyDictionary _managedCompanies; public ManagedCompanyData() { _managedCompanies = new ManagedCompanyDictionary(); - Entities = new IKeeperEnterpriseEntity[] { _managedCompanies }; } + /// public override IEnumerable Entities { get; } @@ -32,10 +59,133 @@ public ManagedCompanyData() /// Get a list of all managed companies in the enterprise. /// public IEnumerable ManagedCompanies => _managedCompanies.Entities; + + } + + /// + public static class ManagedCompanyConstants + { + public static readonly MspProduct[] MspProducts = new[] + { + new MspProduct + { + ProductCode = BusinessLicense, + ProductName = "Business", + FilePlanCode = StoragePlan100GB, + }, + new MspProduct + { + ProductCode = BusinessPlusLicense, + ProductName = "Business Plus", + FilePlanCode = StoragePlan1TB, + }, + new MspProduct + { + ProductCode = EnterpriseLicense, + ProductName = "Enterprise", + FilePlanCode = StoragePlan100GB, + }, + new MspProduct + { + ProductCode = EnterprisePlusLicense, + ProductName = "Enterprise Plus", + FilePlanCode = StoragePlan1TB, + }, + }; + public static readonly MspFilePlan[] MspFilePlans = new[] + { + new MspFilePlan + { + FilePlanCode = StoragePlan100GB, + FilePlanName = "100GB", + }, + new MspFilePlan + { + FilePlanCode = StoragePlan1TB, + FilePlanName = "1TB", + }, + new MspFilePlan + { + FilePlanCode = StoragePlan10TB, + FilePlanName = "10TB", + }, + }; + + public static readonly MspAddon[] MspAddons = new[] + { + new MspAddon + { + AddonCode = AddonBreachWatch, + AddonName = "BreachWatch", + SeatsRequired = false, + }, + new MspAddon + { + AddonCode = AddonComplianceReport, + AddonName = "Compliance Reporting", + SeatsRequired = false, + }, + new MspAddon + { + AddonCode = AddonAuditReport, + AddonName = "Advanced Reporting & Alerts Module", + SeatsRequired = false, + }, + new MspAddon + { + AddonCode = AddonServiceAndSupport, + AddonName = "MSP Dedicated Service & Support", + SeatsRequired = false, + }, + new MspAddon + { + AddonCode = AddonSecretsManager, + AddonName = "Keeper Secrets Manager (KSM)", + SeatsRequired = false, + }, + new MspAddon + { + AddonCode = AddonConnectionManager, + AddonName = "Keeper Connection Manager (KCM)", + SeatsRequired = true, + }, + new MspAddon + { + AddonCode = AddonChat, + AddonName = "KeeperChat", + SeatsRequired = false, + }, + }; + + public const string BusinessLicense = "business"; + public const string BusinessPlusLicense = "businessPlus"; + public const string EnterpriseLicense = "enterprise"; + public const string EnterprisePlusLicense = "enterprisePlus"; + + public const string StoragePlan100GB = "STORAGE_100GB"; + public const string StoragePlan1TB = "STORAGE_1000GB"; + public const string StoragePlan10TB = "STORAGE_10000GB"; + + public const string AddonBreachWatch = "enterprise_breach_watch"; + public const string AddonComplianceReport = "compliance_report"; + public const string AddonAuditReport = "enterprise_audit_and_reporting"; + public const string AddonServiceAndSupport = "msp_service_and_support"; + public const string AddonSecretsManager = "secrets_manager"; + public const string AddonConnectionManager = "connection_manager"; + public const string AddonChat = "chat"; + } + + /// + public class MspPrice + { + public float Amount { get; internal set; } + public Cost.Types.AmountPer Rate { get; internal set; } + public long AmountConsumed { get; internal set; } + public Currency Currency { get; internal set; } } /// - public class ManagedCompanyDictionary : EnterpriseDataDictionary + public class ManagedCompanyDictionary : EnterpriseDataDictionary, IGetEnterprise { public ManagedCompanyDictionary() : base(EnterpriseDataEntity.ManagedCompanies) { @@ -59,11 +209,140 @@ protected override void PopulateSdkFromKeeper(EnterpriseManagedCompany sdk, Mana sdk.NumberOfUsers = keeper.NumberOfUsers; sdk.ParentNodeId = keeper.MspNodeId; sdk.IsExpired = keeper.IsExpired; + sdk.FilePlanType = keeper.FilePlanType; + sdk.TreeKeyRole = keeper.TreeKeyRole; + var treeKeyEncoded = keeper.TreeKey; + if (!string.IsNullOrEmpty(treeKeyEncoded)) + { + try + { + var enterprise = GetEnterprise?.Invoke(); + if (enterprise?.TreeKey != null) + { + sdk.TreeKey = CryptoUtils.DecryptAesV2(treeKeyEncoded.Base64UrlDecode(), enterprise.TreeKey); + } + } + catch { } + } + sdk.AddOns = keeper.AddOns.Select(x => new ManagedCompanyLicenseAddOn + { + Name = x.Name, + Seats = x.Seats, + IsEnabled = x.Enabled, + IsTrial = x.IsTrial, + Expiration = x.Expiration, + Creation = x.Created, + Activation = x.ActivationTime, + }).ToArray(); + } + + internal readonly Dictionary _prices = new Dictionary(); + + protected override void DataStructureChanged() + { + if (_prices.Count > 0) + { + return; + } + lock (this) + { + if (_prices.Count > 0) + { + return; + } + var enterprise = GetEnterprise?.Invoke(); + if (enterprise == null) + { + return; + } + + var names = new Dictionary(); + names[1] = ManagedCompanyConstants.BusinessLicense; + names[2] = ManagedCompanyConstants.BusinessPlusLicense; + names[10] = ManagedCompanyConstants.EnterpriseLicense; + names[11] = ManagedCompanyConstants.EnterprisePlusLicense; + + names[400] = ManagedCompanyConstants.StoragePlan100GB; + names[700] = ManagedCompanyConstants.StoragePlan1TB; + names[800] = ManagedCompanyConstants.StoragePlan10TB; + + Task.Run(async () => + { + try + { + var endpoint = enterprise.Auth.GetBiUrl("mapping/addons"); + var rq = new MappingAddonsRequest(); + var rs = await enterprise.Auth.ExecuteAuthRest(endpoint, rq); + foreach (var fp in rs.FilePlans) + { + names[fp.Id * 100] = fp.Name; + } + foreach (var ap in rs.Addons) + { + names[ap.Id * 10000] = ap.Name; + } + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + } + + try + { + var endpoint = enterprise.Auth.GetBiUrl("subscription/mc_pricing"); + var rq = new SubscriptionMcPricingRequest(); + var rs = await enterprise.Auth.ExecuteAuthRest(endpoint, rq); + foreach (var bp in rs.BasePlans) + { + if (names.TryGetValue(bp.Id, out var name)) + { + _prices[name] = new MspPrice + { + Amount = (float) bp.Cost.Amount, + Currency = bp.Cost.Currency, + Rate = bp.Cost.AmountPer, + }; + } + } + foreach (var fp in rs.FilePlans) + { + if (names.TryGetValue(fp.Id * 100, out var name)) + { + _prices[name] = new MspPrice + { + Amount = (float) fp.Cost.Amount, + Currency = fp.Cost.Currency, + Rate = fp.Cost.AmountPer, + }; + } + } + foreach (var ap in rs.Addons) + { + if (names.TryGetValue(ap.Id * 10000, out var name)) + { + _prices[name] = new MspPrice + { + Amount = (float) ap.Cost.Amount, + Currency = ap.Cost.Currency, + Rate = ap.Cost.AmountPer, + AmountConsumed = ap.AmountConsumed, + }; + } + } + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + } + }); + } } + + public Func GetEnterprise { get; set; } } /// - public class ManagedCompanyAuth: AuthCommon + public class ManagedCompanyAuth : AuthCommon { public byte[] TreeKey { get; private set; } @@ -75,7 +354,7 @@ public async Task LoginToManagedCompany(IEnterpriseLoader enterprise, int mcEnte var mcRq = new LoginToMcRequest { McEnterpriseId = mcEnterpriseId, - + }; var mcRs = await enterprise.Auth.ExecuteAuthRest( "authentication/login_to_mc", mcRq); diff --git a/KeeperSdk/enterprise/MspManagement.cs b/KeeperSdk/enterprise/MspManagement.cs new file mode 100644 index 0000000..468fc0d --- /dev/null +++ b/KeeperSdk/enterprise/MspManagement.cs @@ -0,0 +1,173 @@ +using KeeperSecurity.Commands; +using KeeperSecurity.Utils; +using System.Threading.Tasks; +using KeeperSecurity.Authentication; +using System.Linq; + +namespace KeeperSecurity.Enterprise +{ + /// + public class ManagedCompanyAddonOptions + { + public string Addon { get; set; } + public int? NumberOfSeats { get; set; } + } + + /// + /// Represends Managed Companies create/update options + /// + public class ManagedCompanyOptions + { + /// + /// Managed Company Name + /// + public string Name { get; set; } + + /// + /// Enterprise Node ID + /// + public long? NodeId { get; set; } + + /// + /// Managed Company Product ID + /// + public string ProductId { get; set; } + + /// + /// Maximum Number of Seats. -1 unlimited + /// + public int? NumberOfSeats { get; set; } + + /// + /// File/Storage Plan + /// + public string FilePlanType { get; set; } + + /// + /// Addons + /// + public ManagedCompanyAddonOptions[] Addons { get; set; } + } + + /// + /// Defines Managed Company actions + /// + public interface IMspManagement + { + /// + /// Creates Managed Company + /// + /// Company options + /// Created managed company + Task CreateManagedCompany(ManagedCompanyOptions options); + /// + /// Updates Managed Company + /// + /// Managed Company ID + /// Company options + /// Updated managed company + Task UpdateManagedCompany(int companyId, ManagedCompanyOptions options); + /// + /// Removes Managed Company + /// + /// Managed Company ID + /// + Task RemoveManagedCompany(int companyId); + } + + + public partial class ManagedCompanyData : IMspManagement + { + /// + public async Task CreateManagedCompany(ManagedCompanyOptions options) + { + if (string.IsNullOrEmpty(options.Name)) + { + options.Name = CryptoUtils.GenerateUid(); + } + + var treeKey = CryptoUtils.GenerateEncryptionKey(); + var encryptedTreeKey = CryptoUtils.EncryptAesV2(treeKey, Enterprise.TreeKey); + + var encData = new EncryptedData + { + DisplayName = "Keeper Administrator" + }; + var encryptedRoleData = CryptoUtils.EncryptAesV1(JsonUtils.DumpJson(encData), treeKey); + + encData.DisplayName = "root"; + var encryptedNodeData = CryptoUtils.EncryptAesV1(JsonUtils.DumpJson(encData), treeKey); + + var rq = new EnterpriseRegistrationByMspCommand + { + NodeId = options.NodeId, + Seats = options.NumberOfSeats ?? 0, + ProductId = options.ProductId, + FilePlanType = options.FilePlanType, + EnterpriseName = options.Name, + EncryptedTreeKey = encryptedTreeKey.Base64UrlEncode(), + RoleData = encryptedRoleData.Base64UrlEncode(), + RootNode = encryptedNodeData.Base64UrlEncode(), + }; + if (options.Addons != null) + { + rq.AddOns = options.Addons.Select(x => new Commands.MspAddon + { + AddOn = x.Addon, + Seats = x.NumberOfSeats + }).ToArray(); + } + + var rs = await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + + return ManagedCompanies.FirstOrDefault(x => x.EnterpriseId == rs.EnterpriseId); + } + + /// + public async Task UpdateManagedCompany(int companyId, ManagedCompanyOptions options) + { + if (!_managedCompanies.TryGetEntity(companyId, out var mc)) + { + throw new EnterpriseException($"Managed Company #{companyId} does not exist"); + } + + var rq = new EnterpriseUpdateByMspCommand + { + EnterpriseId = companyId, + NodeId = options.NodeId, + FilePlanType = options.FilePlanType, + EnterpriseName = options.Name ?? mc.EnterpriseName, + Seats = options.NumberOfSeats ?? mc.NumberOfSeats, + ProductId = options.ProductId ?? mc.ProductId, + }; + if (options.Addons != null) + { + rq.AddOns = options.Addons.Select(x => new Commands.MspAddon + { + AddOn = x.Addon, + Seats = x.NumberOfSeats + }).ToArray(); + } + + var rs = await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + + return ManagedCompanies.FirstOrDefault(x => x.EnterpriseId == companyId); + } + + + /// + public async Task RemoveManagedCompany(int companyId) + { + var rq = new EnterpriseRemoveByMspCommand + { + EnterpriseId = companyId, + }; + + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + } + } +} + diff --git a/Commander/enterprise/QueuedTeamData.cs b/KeeperSdk/enterprise/QueuedTeamData.cs similarity index 68% rename from Commander/enterprise/QueuedTeamData.cs rename to KeeperSdk/enterprise/QueuedTeamData.cs index 4543d7c..4cdfe32 100644 --- a/Commander/enterprise/QueuedTeamData.cs +++ b/KeeperSdk/enterprise/QueuedTeamData.cs @@ -1,47 +1,46 @@ using Enterprise; -using KeeperSecurity.Authentication; using KeeperSecurity.Commands; -using KeeperSecurity.Enterprise; using KeeperSecurity.Utils; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Linq; -using System.Threading.Tasks; using KeeperEnterpriseData = Enterprise.EnterpriseData; -namespace Commander.Enterprise +namespace KeeperSecurity.Enterprise { - public class EnterpriseQueuedTeam : IParentNodeEntity - { - public string Uid { get; internal set; } - public string Name { get; set; } - public long ParentNodeId { get; internal set; } - } - - public class EnterpriseQueuedUsers - { - public string TeamUid { get; internal set; } - public ISet UserIDs { get; } = new HashSet(); - } - + /// + /// Defines Queued Team storage + /// public interface IQueuedTeamData { IEnumerable QueuedTeams { get; } IEnumerable GetQueuedUsersForTeam(string teamUid); } - public interface IQueuedTeamDataManagement + /// + /// Represents Queued Team + /// + public class EnterpriseQueuedTeam : IParentNodeEntity, IEncryptedData { - Task QueueUserToTeam(long enterpriseUserId, string teamUid); - } + public string Uid { get; internal set; } + public string Name { get; set; } + public long ParentNodeId { get; internal set; } + public string EncryptedData { get; internal set; } + } + /// + /// Represents Queued Team Enterprise Plugin + /// public class QueuedTeamData : EnterpriseDataPlugin, IQueuedTeamData { private readonly QueuedTeamDictionary _queuedTeams; private readonly QueuedUserDictionary _queuedUsers; + /// + /// Instantiates instance. + /// public QueuedTeamData() : base() { _queuedTeams = new QueuedTeamDictionary(); @@ -50,34 +49,34 @@ public QueuedTeamData() : base() Entities = new IKeeperEnterpriseEntity[] { _queuedTeams, _queuedUsers }; } + /// public override IEnumerable Entities { get; } + /// + /// Gets list of all queued teams + /// public IEnumerable QueuedTeams => _queuedTeams.Entities; + /// + /// Gets the number of all queued teams in the enterprise. + /// + public int QueuedTeamCount => _queuedTeams.Count; + + /// + /// Gets Gets a list of user IDs for specified queued team. + /// + /// Queued Team UID + /// A list of user IDs public IEnumerable GetQueuedUsersForTeam(string teamUid) { - if (_queuedUsers.TryGetEntity(teamUid, out var users)) + if (_queuedUsers.TryGetMembers(teamUid, out var users)) { - return users.UserIDs; + return users; } return Enumerable.Empty(); } } - public class QueuedTeamDataManagement : QueuedTeamData, IQueuedTeamDataManagement - { - public async Task QueueUserToTeam(long enterpriseUserId, string teamUid) - { - var rq = new TeamQueueUserCommand - { - TeamUid = teamUid, - EnterpriseUserId = enterpriseUserId - }; - - await Enterprise.Auth.ExecuteAuthCommand(rq); - await Enterprise.Load(); - } - } - + /// public class QueuedTeamDictionary : EnterpriseDataDictionary, IGetEnterprise { public Func GetEnterprise { get; set; } @@ -100,14 +99,16 @@ protected override void PopulateSdkFromKeeper(EnterpriseQueuedTeam sdk, QueuedTe { sdk.Name = keeper.Name; sdk.ParentNodeId = keeper.NodeId; + sdk.EncryptedData = keeper.EncryptedData; } } + /// public class QueuedUserDictionary : KeeperEnterpriseDataEntity, IGetEnterprise { public Func GetEnterprise { get; set; } - internal readonly ConcurrentDictionary _entities = new ConcurrentDictionary(); + internal readonly ConcurrentDictionary> _entities = new ConcurrentDictionary>(); public QueuedUserDictionary() : base(EnterpriseDataEntity.QueuedTeamUsers) { @@ -121,10 +122,7 @@ public override void ProcessKeeperEnterpriseData(KeeperEnterpriseData entityData var id = keeperEntity.TeamUid.ToByteArray().Base64UrlEncode(); if (!_entities.TryGetValue(id, out var sdkEntity)) { - sdkEntity = new EnterpriseQueuedUsers - { - TeamUid = id - }; + sdkEntity = new HashSet(); _entities.TryAdd(id, sdkEntity); } @@ -132,15 +130,15 @@ public override void ProcessKeeperEnterpriseData(KeeperEnterpriseData entityData { if (entityData.Delete) { - sdkEntity.UserIDs.Remove(userId); + sdkEntity.Remove(userId); } else { - sdkEntity.UserIDs.Add(userId); + sdkEntity.Add(userId); } } - if (sdkEntity.UserIDs.Count == 0) + if (sdkEntity.Count == 0) { _entities.TryRemove(id, out _); } @@ -148,7 +146,7 @@ public override void ProcessKeeperEnterpriseData(KeeperEnterpriseData entityData DataStructureChanged(); } - public bool TryGetEntity(string key, out EnterpriseQueuedUsers entity) + public bool TryGetMembers(string key, out ISet entity) { return _entities.TryGetValue(key, out entity); } diff --git a/KeeperSdk/enterprise/RoleData.cs b/KeeperSdk/enterprise/RoleData.cs index b5898a9..591c4f1 100644 --- a/KeeperSdk/enterprise/RoleData.cs +++ b/KeeperSdk/enterprise/RoleData.cs @@ -3,25 +3,120 @@ using System.Collections.Generic; using KeeperSecurity.Utils; using System.Linq; +using System.Threading.Tasks; +using System.Diagnostics; +using KeeperSecurity.Authentication; namespace KeeperSecurity.Enterprise { - /// + public class RolePermissions + { + const string MANAGE_NODES = "MANAGE_NODES"; + const string MANAGE_USERS = "MANAGE_USER"; + const string MANAGE_ROLES = "MANAGE_ROLES"; + const string MANAGE_TEAMS = "MANAGE_TEAMS"; + const string MANAGE_AUDIT_REPORTS = "RUN_REPORTS"; + const string MANAGE_BRIDGE_SSO = "MANAGE_BRIDGE"; + const string APPROVE_DEVICE = "APPROVE_DEVICE"; + const string MANAGE_RECORD_TYPES = "MANAGE_RECORD_TYPES"; + const string RUN_COMPLIANCE_REPORTS = "RUN_COMPLIANCE_REPORTS"; + const string MANAGE_COMPANIES = "MANAGE_COMPANIES"; + const string TRANSFER_ACCOUNT = "TRANSFER_ACCOUNT"; + const string SHARE_ADMIN = "SHARING_ADMINISTRATOR"; + + internal ISet privileges = new HashSet(StringComparer.InvariantCultureIgnoreCase); + public long RoleId { get; internal set; } + public long NodeId { get; internal set; } + public bool Cascade { get; internal set; } + public bool ManageNodes => privileges.Contains(MANAGE_NODES); + public bool ManageUsers => privileges.Contains(MANAGE_USERS); + public bool ManageRoles => privileges.Contains(MANAGE_ROLES); + public bool ManageTeams => privileges.Contains(MANAGE_TEAMS); + public bool ManageAuditReports => privileges.Contains(MANAGE_AUDIT_REPORTS); + public bool ManageBridgeSso => privileges.Contains(MANAGE_BRIDGE_SSO); + public bool ApproveDevice => privileges.Contains(APPROVE_DEVICE); + public bool ManageRecordTypes => privileges.Contains(MANAGE_RECORD_TYPES); + public bool RunComplianceReports => privileges.Contains(RUN_COMPLIANCE_REPORTS); + public bool ManageCompanies => privileges.Contains(MANAGE_COMPANIES); + public bool TransferAccount => privileges.Contains(TRANSFER_ACCOUNT); + public bool ShareAdmin => privileges.Contains(SHARE_ADMIN); + } + + /// + /// Defines Role enterprise data. + /// public interface IRoleData - { + { + /// + /// Get a list of all roles in the enterprise + /// IEnumerable Roles { get; } + /// + /// Gets the number of all roles in the enterprise. + /// + int RoleCount { get; } + /// + /// Gets the enterprise role assocoated with the specified ID. + /// + /// Enterprise Role ID + /// When this method returns true, contains requested enterprise role; otherwise null. + /// true if the enterprise contains a role with specified ID; otherwise, false bool TryGetRole(long roleId, out EnterpriseRole role); + /// + /// Gets a list of user IDs for specified role. + /// + /// Enterprise Role ID. + /// List of Enterprise User IDs. IEnumerable GetUsersForRole(long roleId); + /// + /// Gets a list of role IDs for specified user. + /// + /// Enterprise User ID. + /// List of Enterprise Role IDs IEnumerable GetRolesForUser(long userId); + /// + /// Gets a list of team UIDs for specified role. + /// + /// Enterprise Role ID. + /// List of Enterprise Team UIDs. IEnumerable GetTeamsForRole(long roleId); + /// + /// Gets a list of role IDs for specified team. + /// + /// Team UID. + /// List of Enterprise Role IDs IEnumerable GetRolesForTeam(string teamUid); + /// + /// Gets a list of role enforcements for specified role. + /// + /// Enterprise Role ID. + /// List of Role Enforcements IEnumerable GetEnforcementsForRole(long roleId); + + /// + /// Gets a list of all administrative permissions + /// + /// + IEnumerable GetAdminPermissions(); + /// + /// Gets a list administrative permissions for a role + /// + /// + /// + IEnumerable GetRolePermissions(long roleId); + + /// + /// Gets role key. + /// + /// Enterprise Role ID. + /// Role Key + Task GetRoleKey(long roleId); } /// /// Represents Role enterprise data. /// - public class RoleData : EnterpriseDataPlugin, IRoleData + public partial class RoleData : EnterpriseDataPlugin, IRoleData { private readonly RoleDictionary _roles = new RoleDictionary(); private readonly RoleUserLink _roleUsers = new RoleUserLink(); @@ -38,72 +133,79 @@ public RoleData() /// public override IEnumerable Entities { get; } - /// - /// Get a list of all roles in the enterprise - /// + /// public IEnumerable Roles => _roles.Entities; - /// - /// Gets the enterprise role assocoated with the specified ID. - /// - /// Enterprise Role ID - /// When this method returns true, contains requested enterprise role; otherwise null. - /// true if the enterprise contains a role with specified ID; otherwise, false + /// + public int RoleCount => _roles.Count; + + + /// public bool TryGetRole(long roleId, out EnterpriseRole role) { return _roles.TryGetEntity(roleId, out role); } - /// - /// Gets a list of user IDs for specified role. - /// - /// Enterprise Role ID. - /// List of Enterprise User IDs. + /// public IEnumerable GetUsersForRole(long roleId) { return _roleUsers.LinksForPrimaryKey(roleId).Select(x => x.EnterpriseUserId); } - /// - /// Gets a list of role IDs for specified user. - /// - /// Enterprise User ID. - /// List of Enterprise Role IDs + /// public IEnumerable GetRolesForUser(long userId) { return _roleUsers.LinksForSecondaryKey(userId).Select(x => x.RoleId); } - /// - /// Gets a list of team UIDs for specified role. - /// - /// Enterprise Role ID. - /// List of Enterprise Team UIDs. + /// public IEnumerable GetTeamsForRole(long roleId) { return _roleTeams.LinksForPrimaryKey(roleId).Select(x => x.TeamUid.ToByteArray().Base64UrlEncode()); } - /// - /// Gets a list of role IDs for specified team. - /// - /// Team UID. - /// List of Enterprise Role IDs + /// public IEnumerable GetRolesForTeam(string teamUid) { return _roleTeams.LinksForSecondaryKey(teamUid).Select(x => x.RoleId); } - /// - /// Gets a list of role enforcements for specified role. - /// - /// Enterprise Role ID. - /// List of Role Enforcements + /// public IEnumerable GetEnforcementsForRole(long roleId) { return _roleEnforcements.LinksForPrimaryKey(roleId); } + internal RolePermissions GetRolePermission(ManagedNode managedNode) + { + var rp = new RolePermissions + { + RoleId = managedNode.RoleId, + NodeId = managedNode.ManagedNodeId, + Cascade = managedNode.CascadeNodeManagement + }; + + foreach (var p in GetPrivilegesForRoleAndNode(rp.RoleId, rp.NodeId)) + { + rp.privileges.Add(p.PrivilegeType); + } + return rp; + } + public IEnumerable GetAdminPermissions() + { + foreach (var p in GetManagedNodes()) { + yield return GetRolePermission(p); + } + } + + public IEnumerable GetRolePermissions(long roleId) + { + foreach (var p in _managedNodes.LinksForPrimaryKey(roleId)) + { + yield return GetRolePermission(p); + } + } + /// /// Gets a list of privileges for specified role and node /// @@ -122,6 +224,94 @@ public IEnumerable GetPrivilegesForRoleAndNode(long roleId, long public IList GetManagedNodes() { return _managedNodes.GetAllLinks(); } + + private Dictionary _adminRoleKeys = new Dictionary(); + + /// + public async Task GetRoleKey(long roleId) + { + lock (_adminRoleKeys) + { + if (_adminRoleKeys.TryGetValue(roleId, out var result)) + { + return result; + } + } + + var krq = new GetEnterpriseDataKeysRequest(); + krq.RoleId.Add(roleId); + var krs = await Enterprise.Auth.ExecuteAuthRest("enterprise/get_enterprise_data_keys", krq); + foreach (var rKey in krs.ReEncryptedRoleKey) + { + if (rKey.RoleId == roleId) + { + try + { + var roleKey = CryptoUtils.DecryptAesV2(rKey.EncryptedRoleKey.ToByteArray(), Enterprise.TreeKey); + lock (_adminRoleKeys) + { + if (!_adminRoleKeys.ContainsKey(roleId)) + { + _adminRoleKeys.Add(roleId, roleKey); + } + return roleKey; + } + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + } + } + } + + foreach (var rKey in krs.RoleKey) + { + if (rKey.RoleId == roleId) + { + byte[] roleKey = null; + try + { + switch (rKey.KeyType) + { + case EncryptedKeyType.KtEncryptedByDataKey: + roleKey = CryptoUtils.DecryptAesV1(rKey.EncryptedKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.DataKey); + break; + case EncryptedKeyType.KtEncryptedByDataKeyGcm: + roleKey = CryptoUtils.DecryptAesV2(rKey.EncryptedKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.DataKey); + break; + case EncryptedKeyType.KtEncryptedByPublicKey: + roleKey = CryptoUtils.DecryptRsa(rKey.EncryptedKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.PrivateRsaKey); + break; + case EncryptedKeyType.KtEncryptedByPublicKeyEcc: + if (Enterprise.Auth.AuthContext.PrivateEcKey != null) + { + roleKey = CryptoUtils.DecryptEc(rKey.EncryptedKey.Base64UrlDecode(), Enterprise.Auth.AuthContext.PrivateEcKey); + } + break; + } + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + } + + if (roleKey != null) + { + lock (_adminRoleKeys) + { + if (!_adminRoleKeys.ContainsKey(roleId)) + { + _adminRoleKeys.Add(roleId, roleKey); + } + return roleKey; + } + } + } + } + + return null; + } + } /// @@ -141,6 +331,7 @@ protected override long GetEntityId(Role keeperData) protected override void PopulateSdkFromKeeper(EnterpriseRole sdk, Role keeper) { sdk.ParentNodeId = keeper.NodeId; + sdk.EncryptedData = keeper.EncryptedData; sdk.KeyType = keeper.KeyType; sdk.NewUserInherit = keeper.NewUserInherit; sdk.VisibleBelow = keeper.VisibleBelow; @@ -150,8 +341,11 @@ protected override void PopulateSdkFromKeeper(EnterpriseRole sdk, Role keeper) { EnterpriseUtils.DecryptEncryptedData(keeper.EncryptedData, enterprise.TreeKey, sdk); } + if (string.Equals(sdk.RoleType, "pool_manager", StringComparison.InvariantCultureIgnoreCase)) + { + sdk.DisplayName = "MSP Subscription Manager"; + } } - protected override void SetEntityId(EnterpriseRole entity, long id) { entity.Id = id; @@ -221,6 +415,8 @@ protected override string GetEntity2Id(RoleEnforcement keeperData) } } + ///////// + /// public class ManagedNodeLink : EnterpriseDataLink { diff --git a/KeeperSdk/enterprise/RoleManagement.cs b/KeeperSdk/enterprise/RoleManagement.cs new file mode 100644 index 0000000..0bca293 --- /dev/null +++ b/KeeperSdk/enterprise/RoleManagement.cs @@ -0,0 +1,177 @@ +using Enterprise; +using Google.Protobuf; +using KeeperSecurity.Authentication; +using KeeperSecurity.Commands; +using KeeperSecurity.Utils; +using System.Linq; +using System.Threading.Tasks; + +namespace KeeperSecurity.Enterprise +{ + /// + /// Defines methods for managing enerprise roles + /// + public interface IRoleDataManagement + { + /// + /// Creates Enterprise Role + /// + /// Role name + /// Role's node ID + /// Set role as default for new users + /// Created role + Task CreateRole(string roleName, long nodeId, bool newUserInherit); + /// + /// Deletes Enterprise Role + /// + /// Enterprise role + /// Task + Task DeleteRole(EnterpriseRole role); + /// + /// Add a user to a role + /// + /// Enterprise roler + /// Enterprise user + /// Task + Task AddUserToRole(EnterpriseRole role, EnterpriseUser user); + /// + /// Adds a user to Admin role + /// + /// Enterprise role + /// Enterprise user + /// Task + Task AddUserToAdminRole(EnterpriseRole role, EnterpriseUser user); + /// + /// Removes a user from a role + /// + /// Enterprise role + /// Enterprise user + /// Task + Task RemoveUserFromRole(EnterpriseRole role, EnterpriseUser user); + /// + /// Adds a team to a role + /// + /// Enterprise role + /// Enterprise team + /// Task + Task AddTeamToRole(EnterpriseRole role, EnterpriseTeam team); + /// + /// Removes a team from a role + /// + /// Enterprise role + /// Enterprise team + /// Task + Task RemoveTeamFromRole(EnterpriseRole role, EnterpriseTeam team); + } + + public partial class RoleData : IRoleDataManagement + { + /// + public async Task CreateRole(string roleName, long nodeId, bool newUserInherit) + { + var encryptedData = new EncryptedData + { + DisplayName = roleName + }; + + var roleId = await Enterprise.GetEnterpriseId(); + var rq = new RoleAddCommand + { + RoleId = roleId, + NodeId = nodeId, + EncryptedData = EnterpriseUtils.EncryptEncryptedData(encryptedData, Enterprise.TreeKey), + NewUserInherit = newUserInherit + }; + + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + return TryGetRole(roleId, out var role) ? role : null; + } + + /// + public async Task DeleteRole(EnterpriseRole role) + { + await Enterprise.Auth.ExecuteAuthCommand(new RoleDeleteCommand { RoleId = role.Id }); ; + await Enterprise.Load(); + } + + /// + public async Task AddUserToRole(EnterpriseRole role, EnterpriseUser user) + { + var rq = new RoleUserAddCommand + { + RoleId = role.Id, + EnterpriseUserId = user.Id, + }; + + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + } + + /// + public async Task AddUserToAdminRole(EnterpriseRole role, EnterpriseUser user) + { + + await Enterprise.Auth.LoadUsersKeys(Enumerable.Repeat(user.Email, 1)); + if (!Enterprise.Auth.TryGetUserKeys(user.Email, out var keys)) + { + throw new System.Exception($"User ${user.Email}: public key is not available"); + } + var publicKey = CryptoUtils.LoadPublicKey(keys.RsaPublicKey); + var rq = new RoleUserAddCommand + { + RoleId = role.Id, + EnterpriseUserId = user.UserId, + TreeKey = CryptoUtils.EncryptRsa(Enterprise.TreeKey, publicKey).Base64UrlEncode(), + }; + var roleKey = await GetRoleKey(role.Id); + if (roleKey != null) + { + rq.RoleAdminKey = CryptoUtils.EncryptRsa(roleKey, publicKey).Base64UrlEncode(); + } + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + } + + /// + public async Task RemoveUserFromRole(EnterpriseRole role, EnterpriseUser user) + { + var rq = new RoleUserRemoveCommand + { + RoleId = role.Id, + EnterpriseUserId = user.Id, + }; + + await Enterprise.Auth.ExecuteAuthCommand(rq); + await Enterprise.Load(); + } + + /// + public async Task AddTeamToRole(EnterpriseRole role, EnterpriseTeam team) + { + var rq = new RoleTeams(); + rq.RoleTeam.Add(new RoleTeam + { + RoleId = role.Id, + TeamUid = ByteString.CopyFrom(team.Uid.Base64UrlDecode()), + }); + + await Enterprise.Auth.ExecuteAuthRest("enterprise/role_team_add", rq); + await Enterprise.Load(); + } + + /// + public async Task RemoveTeamFromRole(EnterpriseRole role, EnterpriseTeam team) + { + var rq = new RoleTeams(); + rq.RoleTeam.Add(new RoleTeam + { + RoleId = role.Id, + TeamUid = ByteString.CopyFrom(team.Uid.Base64UrlDecode()), + }); + + await Enterprise.Auth.ExecuteAuthRest("enterprise/role_team_remove", rq); + await Enterprise.Load(); + } + } +} diff --git a/KeeperSdk/enterprise/UserAliasData.cs b/KeeperSdk/enterprise/UserAliasData.cs new file mode 100644 index 0000000..3e9d42a --- /dev/null +++ b/KeeperSdk/enterprise/UserAliasData.cs @@ -0,0 +1,93 @@ +using Enterprise; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Linq; +using KeeperEnterpriseData = Enterprise.EnterpriseData; + + +namespace KeeperSecurity.Enterprise +{ + /// + public interface IUserAliasData + { + IEnumerable GetAliasesForUser(long userId); + } + + /// + public class UserAliasData : EnterpriseDataPlugin, IUserAliasData + { + private readonly EnterpriseUserAliasDictionary _aliases = new EnterpriseUserAliasDictionary(); + + public UserAliasData() + { + Entities = new[] { _aliases }; + } + public IEnumerable GetAliasesForUser(long userId) + { + if (_aliases.TryGetEntity(userId, out var entity)) + { + return entity; + } + return Enumerable.Empty(); + } + + public override IEnumerable Entities { get; } + } + + /// + public class EnterpriseUserAliasDictionary : KeeperEnterpriseDataEntity, IGetEnterprise + { + public Func GetEnterprise { get; set; } + + internal readonly ConcurrentDictionary> _entities = new ConcurrentDictionary>(); + + public EnterpriseUserAliasDictionary() : base(EnterpriseDataEntity.UserAliases) + { + } + + public override void ProcessKeeperEnterpriseData(KeeperEnterpriseData entityData) + { + foreach (var data in entityData.Data) + { + var keeperEntity = Parse(data); + var id = keeperEntity.EnterpriseUserId; + if (!_entities.TryGetValue(id, out var sdkEntity)) + { + sdkEntity = new HashSet(); + _entities.TryAdd(id, sdkEntity); + } + + if (entityData.Delete) + { + sdkEntity.Remove(keeperEntity.Username); + if (sdkEntity.Count == 0) + { + _entities.TryRemove(id, out _); + } + } + else + { + sdkEntity.Add(keeperEntity.Username); + } + } + DataStructureChanged(); + } + + public bool TryGetEntity(long userId, out ISet entity) + { + return _entities.TryGetValue(userId, out entity); + } + + + public override void Clear() + { + _entities.Clear(); + } + + public IEnumerable UserIDs => _entities.Keys; + + public int Count => _entities.Count; + + } +} diff --git a/KeeperSdk/proto/APIRequest.cs b/KeeperSdk/proto/APIRequest.cs index 9d622bc..56cf2db 100644 --- a/KeeperSdk/proto/APIRequest.cs +++ b/KeeperSdk/proto/APIRequest.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: APIRequest.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -36,43 +36,45 @@ static APIRequestReflection() { "UmVxdWVzdBIVCg1jbGllbnRWZXJzaW9uGAEgASgJEhIKCmRldmljZU5hbWUY", "AiABKAkiVAoLQXV0aFJlcXVlc3QSFQoNY2xpZW50VmVyc2lvbhgBIAEoCRIQ", "Cgh1c2VybmFtZRgCIAEoCRIcChRlbmNyeXB0ZWREZXZpY2VUb2tlbhgDIAEo", - "DCKLAQoUTmV3VXNlck1pbmltdW1QYXJhbXMSGQoRbWluaW11bUl0ZXJhdGlv", + "DCLDAQoUTmV3VXNlck1pbmltdW1QYXJhbXMSGQoRbWluaW11bUl0ZXJhdGlv", "bnMYASABKAUSGgoScGFzc3dvcmRNYXRjaFJlZ2V4GAIgAygJEiAKGHBhc3N3", "b3JkTWF0Y2hEZXNjcmlwdGlvbhgDIAMoCRIaChJpc0VudGVycHJpc2VEb21h", - "aW4YBCABKAgiiQEKD1ByZUxvZ2luUmVxdWVzdBIwCgthdXRoUmVxdWVzdBgB", - "IAEoCzIbLkF1dGhlbnRpY2F0aW9uLkF1dGhSZXF1ZXN0EiwKCWxvZ2luVHlw", - "ZRgCIAEoDjIZLkF1dGhlbnRpY2F0aW9uLkxvZ2luVHlwZRIWCg50d29GYWN0", - "b3JUb2tlbhgDIAEoDCKAAgoMTG9naW5SZXF1ZXN0EjAKC2F1dGhSZXF1ZXN0", - "GAEgASgLMhsuQXV0aGVudGljYXRpb24uQXV0aFJlcXVlc3QSLAoJbG9naW5U", - "eXBlGAIgASgOMhkuQXV0aGVudGljYXRpb24uTG9naW5UeXBlEh8KF2F1dGhl", - "bnRpY2F0aW9uSGFzaFByaW1lGAMgASgMEhsKE2VuY3J5cHRlZExvZ2luVG9r", - "ZW4YBCABKAwSFAoMYXV0aFJlc3BvbnNlGAUgASgMEhYKDm1jRW50ZXJwcmlz", - "ZUlkGAYgASgFEhIKCnB1c2hfdG9rZW4YByABKAkSEAoIcGxhdGZvcm0YCCAB", - "KAkiXAoORGV2aWNlUmVzcG9uc2USHAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4Y", - "ASABKAwSLAoGc3RhdHVzGAIgASgOMhwuQXV0aGVudGljYXRpb24uRGV2aWNl", - "U3RhdHVzIlYKBFNhbHQSEgoKaXRlcmF0aW9ucxgBIAEoBRIMCgRzYWx0GAIg", - "ASgMEhEKCWFsZ29yaXRobRgDIAEoBRILCgN1aWQYBCABKAwSDAoEbmFtZRgF", - "IAEoCSIgChBUd29GYWN0b3JDaGFubmVsEgwKBHR5cGUYASABKAUi4gIKEVN0", - "YXJ0TG9naW5SZXF1ZXN0EhwKFGVuY3J5cHRlZERldmljZVRva2VuGAEgASgM", - "EhAKCHVzZXJuYW1lGAIgASgJEhUKDWNsaWVudFZlcnNpb24YAyABKAkSGQoR", - "bWVzc2FnZVNlc3Npb25VaWQYBCABKAwSGwoTZW5jcnlwdGVkTG9naW5Ub2tl", - "bhgFIAEoDBIsCglsb2dpblR5cGUYBiABKA4yGS5BdXRoZW50aWNhdGlvbi5M", - "b2dpblR5cGUSFgoObWNFbnRlcnByaXNlSWQYByABKAUSMAoLbG9naW5NZXRo", - "b2QYCCABKA4yGy5BdXRoZW50aWNhdGlvbi5Mb2dpbk1ldGhvZBIVCg1mb3Jj", - "ZU5ld0xvZ2luGAkgASgIEhEKCWNsb25lQ29kZRgKIAEoDBIYChB2MlR3b0Zh", - "Y3RvclRva2VuGAsgASgJEhIKCmFjY291bnRVaWQYDCABKAwihQQKDUxvZ2lu", - "UmVzcG9uc2USLgoKbG9naW5TdGF0ZRgBIAEoDjIaLkF1dGhlbnRpY2F0aW9u", - "LkxvZ2luU3RhdGUSEgoKYWNjb3VudFVpZBgCIAEoDBIXCg9wcmltYXJ5VXNl", - "cm5hbWUYAyABKAkSGAoQZW5jcnlwdGVkRGF0YUtleRgEIAEoDBJCChRlbmNy", - "eXB0ZWREYXRhS2V5VHlwZRgFIAEoDjIkLkF1dGhlbnRpY2F0aW9uLkVuY3J5", - "cHRlZERhdGFLZXlUeXBlEhsKE2VuY3J5cHRlZExvZ2luVG9rZW4YBiABKAwS", - "HQoVZW5jcnlwdGVkU2Vzc2lvblRva2VuGAcgASgMEjoKEHNlc3Npb25Ub2tl", - "blR5cGUYCCABKA4yIC5BdXRoZW50aWNhdGlvbi5TZXNzaW9uVG9rZW5UeXBl", - "Eg8KB21lc3NhZ2UYCSABKAkSCwoDdXJsGAogASgJEjYKCGNoYW5uZWxzGAsg", - "AygLMiQuQXV0aGVudGljYXRpb24uVHdvRmFjdG9yQ2hhbm5lbEluZm8SIgoE", - "c2FsdBgMIAMoCzIULkF1dGhlbnRpY2F0aW9uLlNhbHQSEQoJY2xvbmVDb2Rl", - "GA0gASgMEhoKEnN0YXRlU3BlY2lmaWNWYWx1ZRgOIAEoCRIYChBzc29DbGll", - "bnRWZXJzaW9uGA8gASgJIowBCgtTc29Vc2VySW5mbxITCgtjb21wYW55TmFt", + "aW4YBCABKAgSHgoWZW50ZXJwcmlzZUVjY1B1YmxpY0tleRgFIAEoDBIWCg5m", + "b3JiaWRLZXlUeXBlMhgGIAEoCCKJAQoPUHJlTG9naW5SZXF1ZXN0EjAKC2F1", + "dGhSZXF1ZXN0GAEgASgLMhsuQXV0aGVudGljYXRpb24uQXV0aFJlcXVlc3QS", + "LAoJbG9naW5UeXBlGAIgASgOMhkuQXV0aGVudGljYXRpb24uTG9naW5UeXBl", + "EhYKDnR3b0ZhY3RvclRva2VuGAMgASgMIoACCgxMb2dpblJlcXVlc3QSMAoL", + "YXV0aFJlcXVlc3QYASABKAsyGy5BdXRoZW50aWNhdGlvbi5BdXRoUmVxdWVz", + "dBIsCglsb2dpblR5cGUYAiABKA4yGS5BdXRoZW50aWNhdGlvbi5Mb2dpblR5", + "cGUSHwoXYXV0aGVudGljYXRpb25IYXNoUHJpbWUYAyABKAwSGwoTZW5jcnlw", + "dGVkTG9naW5Ub2tlbhgEIAEoDBIUCgxhdXRoUmVzcG9uc2UYBSABKAwSFgoO", + "bWNFbnRlcnByaXNlSWQYBiABKAUSEgoKcHVzaF90b2tlbhgHIAEoCRIQCghw", + "bGF0Zm9ybRgIIAEoCSJcCg5EZXZpY2VSZXNwb25zZRIcChRlbmNyeXB0ZWRE", + "ZXZpY2VUb2tlbhgBIAEoDBIsCgZzdGF0dXMYAiABKA4yHC5BdXRoZW50aWNh", + "dGlvbi5EZXZpY2VTdGF0dXMiVgoEU2FsdBISCgppdGVyYXRpb25zGAEgASgF", + "EgwKBHNhbHQYAiABKAwSEQoJYWxnb3JpdGhtGAMgASgFEgsKA3VpZBgEIAEo", + "DBIMCgRuYW1lGAUgASgJIiAKEFR3b0ZhY3RvckNoYW5uZWwSDAoEdHlwZRgB", + "IAEoBSLiAgoRU3RhcnRMb2dpblJlcXVlc3QSHAoUZW5jcnlwdGVkRGV2aWNl", + "VG9rZW4YASABKAwSEAoIdXNlcm5hbWUYAiABKAkSFQoNY2xpZW50VmVyc2lv", + "bhgDIAEoCRIZChFtZXNzYWdlU2Vzc2lvblVpZBgEIAEoDBIbChNlbmNyeXB0", + "ZWRMb2dpblRva2VuGAUgASgMEiwKCWxvZ2luVHlwZRgGIAEoDjIZLkF1dGhl", + "bnRpY2F0aW9uLkxvZ2luVHlwZRIWCg5tY0VudGVycHJpc2VJZBgHIAEoBRIw", + "Cgtsb2dpbk1ldGhvZBgIIAEoDjIbLkF1dGhlbnRpY2F0aW9uLkxvZ2luTWV0", + "aG9kEhUKDWZvcmNlTmV3TG9naW4YCSABKAgSEQoJY2xvbmVDb2RlGAogASgM", + "EhgKEHYyVHdvRmFjdG9yVG9rZW4YCyABKAkSEgoKYWNjb3VudFVpZBgMIAEo", + "DCKnBAoNTG9naW5SZXNwb25zZRIuCgpsb2dpblN0YXRlGAEgASgOMhouQXV0", + "aGVudGljYXRpb24uTG9naW5TdGF0ZRISCgphY2NvdW50VWlkGAIgASgMEhcK", + "D3ByaW1hcnlVc2VybmFtZRgDIAEoCRIYChBlbmNyeXB0ZWREYXRhS2V5GAQg", + "ASgMEkIKFGVuY3J5cHRlZERhdGFLZXlUeXBlGAUgASgOMiQuQXV0aGVudGlj", + "YXRpb24uRW5jcnlwdGVkRGF0YUtleVR5cGUSGwoTZW5jcnlwdGVkTG9naW5U", + "b2tlbhgGIAEoDBIdChVlbmNyeXB0ZWRTZXNzaW9uVG9rZW4YByABKAwSOgoQ", + "c2Vzc2lvblRva2VuVHlwZRgIIAEoDjIgLkF1dGhlbnRpY2F0aW9uLlNlc3Np", + "b25Ub2tlblR5cGUSDwoHbWVzc2FnZRgJIAEoCRILCgN1cmwYCiABKAkSNgoI", + "Y2hhbm5lbHMYCyADKAsyJC5BdXRoZW50aWNhdGlvbi5Ud29GYWN0b3JDaGFu", + "bmVsSW5mbxIiCgRzYWx0GAwgAygLMhQuQXV0aGVudGljYXRpb24uU2FsdBIR", + "CgljbG9uZUNvZGUYDSABKAwSGgoSc3RhdGVTcGVjaWZpY1ZhbHVlGA4gASgJ", + "EhgKEHNzb0NsaWVudFZlcnNpb24YDyABKAkSIAoYc2Vzc2lvblRva2VuVHlw", + "ZU1vZGlmaWVyGBAgASgJIowBCgtTc29Vc2VySW5mbxITCgtjb21wYW55TmFt", "ZRgBIAEoCRITCgtzYW1sUmVxdWVzdBgCIAEoCRIXCg9zYW1sUmVxdWVzdFR5", "cGUYAyABKAkSFQoNc3NvRG9tYWluTmFtZRgEIAEoCRIQCghsb2dpblVybBgF", "IAEoCRIRCglsb2dvdXRVcmwYBiABKAki1gEKEFByZUxvZ2luUmVzcG9uc2US", @@ -86,305 +88,452 @@ static APIRequestReflection() { "S2V5GAIgASgMIoQBChdWYWxpZGF0ZUF1dGhIYXNoUmVxdWVzdBI2Cg5wYXNz", "d29yZE1ldGhvZBgBIAEoDjIeLkF1dGhlbnRpY2F0aW9uLlBhc3N3b3JkTWV0", "aG9kEhQKDGF1dGhSZXNwb25zZRgCIAEoDBIbChNlbmNyeXB0ZWRMb2dpblRv", - "a2VuGAMgASgMIvUBChRUd29GYWN0b3JDaGFubmVsSW5mbxI5CgtjaGFubmVs", + "a2VuGAMgASgMIsQCChRUd29GYWN0b3JDaGFubmVsSW5mbxI5CgtjaGFubmVs", "VHlwZRgBIAEoDjIkLkF1dGhlbnRpY2F0aW9uLlR3b0ZhY3RvckNoYW5uZWxU", "eXBlEhMKC2NoYW5uZWxfdWlkGAIgASgMEhMKC2NoYW5uZWxOYW1lGAMgASgJ", "EhEKCWNoYWxsZW5nZRgEIAEoCRIUCgxjYXBhYmlsaXRpZXMYBSADKAkSEwoL", "cGhvbmVOdW1iZXIYBiABKAkSOgoNbWF4RXhwaXJhdGlvbhgHIAEoDjIjLkF1", - "dGhlbnRpY2F0aW9uLlR3b0ZhY3RvckV4cGlyYXRpb24iyQEKGFR3b0ZhY3Rv", - "clZhbGlkYXRlUmVxdWVzdBIbChNlbmNyeXB0ZWRMb2dpblRva2VuGAEgASgM", - "EjUKCXZhbHVlVHlwZRgCIAEoDjIiLkF1dGhlbnRpY2F0aW9uLlR3b0ZhY3Rv", - "clZhbHVlVHlwZRINCgV2YWx1ZRgDIAEoCRITCgtjaGFubmVsX3VpZBgEIAEo", - "DBI1CghleHBpcmVJbhgFIAEoDjIjLkF1dGhlbnRpY2F0aW9uLlR3b0ZhY3Rv", - "ckV4cGlyYXRpb24iOAoZVHdvRmFjdG9yVmFsaWRhdGVSZXNwb25zZRIbChNl", - "bmNyeXB0ZWRMb2dpblRva2VuGAEgASgMIrgBChhUd29GYWN0b3JTZW5kUHVz", - "aFJlcXVlc3QSGwoTZW5jcnlwdGVkTG9naW5Ub2tlbhgBIAEoDBIzCghwdXNo", - "VHlwZRgCIAEoDjIhLkF1dGhlbnRpY2F0aW9uLlR3b0ZhY3RvclB1c2hUeXBl", - "EhMKC2NoYW5uZWxfdWlkGAMgASgMEjUKCGV4cGlyZUluGAQgASgOMiMuQXV0", - "aGVudGljYXRpb24uVHdvRmFjdG9yRXhwaXJhdGlvbiKDAQoHTGljZW5zZRIP", - "CgdjcmVhdGVkGAEgASgDEhIKCmV4cGlyYXRpb24YAiABKAMSNAoNbGljZW5z", - "ZVN0YXR1cxgDIAEoDjIdLkF1dGhlbnRpY2F0aW9uLkxpY2Vuc2VTdGF0dXMS", - "DAoEcGFpZBgEIAEoCBIPCgdtZXNzYWdlGAUgASgJIkcKD093bmVybGVzc1Jl", - "Y29yZBIRCglyZWNvcmRVaWQYASABKAwSEQoJcmVjb3JkS2V5GAIgASgMEg4K", - "BnN0YXR1cxgDIAEoBSJMChBPd25lcmxlc3NSZWNvcmRzEjgKD293bmVybGVz", - "c1JlY29yZBgBIAMoCzIfLkF1dGhlbnRpY2F0aW9uLk93bmVybGVzc1JlY29y", - "ZCLXAQoPVXNlckF1dGhSZXF1ZXN0EgsKA3VpZBgBIAEoDBIMCgRzYWx0GAIg", - "ASgMEhIKCml0ZXJhdGlvbnMYAyABKAUSGgoSZW5jcnlwdGVkQ2xpZW50S2V5", - "GAQgASgMEhAKCGF1dGhIYXNoGAUgASgMEhgKEGVuY3J5cHRlZERhdGFLZXkY", - "BiABKAwSLAoJbG9naW5UeXBlGAcgASgOMhkuQXV0aGVudGljYXRpb24uTG9n", - "aW5UeXBlEgwKBG5hbWUYCCABKAkSEQoJYWxnb3JpdGhtGAkgASgFIhkKClVp", - "ZFJlcXVlc3QSCwoDdWlkGAEgAygMIqsBChNEZXZpY2VVcGRhdGVSZXF1ZXN0", - "EhwKFGVuY3J5cHRlZERldmljZVRva2VuGAEgASgMEhUKDWNsaWVudFZlcnNp", - "b24YAiABKAkSEgoKZGV2aWNlTmFtZRgDIAEoCRIXCg9kZXZpY2VQdWJsaWNL", - "ZXkYBCABKAwSMgoMZGV2aWNlU3RhdHVzGAUgASgOMhwuQXV0aGVudGljYXRp", - "b24uRGV2aWNlU3RhdHVzIoEBCh1SZWdpc3RlckRldmljZUluUmVnaW9uUmVx", - "dWVzdBIcChRlbmNyeXB0ZWREZXZpY2VUb2tlbhgBIAEoDBIVCg1jbGllbnRW", - "ZXJzaW9uGAIgASgJEhIKCmRldmljZU5hbWUYAyABKAkSFwoPZGV2aWNlUHVi", - "bGljS2V5GAQgASgMIvgCChNSZWdpc3RyYXRpb25SZXF1ZXN0EjAKC2F1dGhS", - "ZXF1ZXN0GAEgASgLMhsuQXV0aGVudGljYXRpb24uQXV0aFJlcXVlc3QSOAoP", - "dXNlckF1dGhSZXF1ZXN0GAIgASgLMh8uQXV0aGVudGljYXRpb24uVXNlckF1", - "dGhSZXF1ZXN0EhoKEmVuY3J5cHRlZENsaWVudEtleRgDIAEoDBIbChNlbmNy", - "eXB0ZWRQcml2YXRlS2V5GAQgASgMEhEKCXB1YmxpY0tleRgFIAEoDBIYChB2", - "ZXJpZmljYXRpb25Db2RlGAYgASgJEh4KFmRlcHJlY2F0ZWRBdXRoSGFzaEhh", - "c2gYByABKAwSJAocZGVwcmVjYXRlZEVuY3J5cHRlZENsaWVudEtleRgIIAEo", - "DBIlCh1kZXByZWNhdGVkRW5jcnlwdGVkUHJpdmF0ZUtleRgJIAEoDBIiChpk", - "ZXByZWNhdGVkRW5jcnlwdGlvblBhcmFtcxgKIAEoDCLQAQoWQ29udmVydFVz", - "ZXJUb1YzUmVxdWVzdBIwCgthdXRoUmVxdWVzdBgBIAEoCzIbLkF1dGhlbnRp", - "Y2F0aW9uLkF1dGhSZXF1ZXN0EjgKD3VzZXJBdXRoUmVxdWVzdBgCIAEoCzIf", - "LkF1dGhlbnRpY2F0aW9uLlVzZXJBdXRoUmVxdWVzdBIaChJlbmNyeXB0ZWRD", - "bGllbnRLZXkYAyABKAwSGwoTZW5jcnlwdGVkUHJpdmF0ZUtleRgEIAEoDBIR", - "CglwdWJsaWNLZXkYBSABKAwiJAoQUmV2aXNpb25SZXNwb25zZRIQCghyZXZp", - "c2lvbhgBIAEoAyImChJDaGFuZ2VFbWFpbFJlcXVlc3QSEAoIbmV3RW1haWwY", - "ASABKAkiOAoTQ2hhbmdlRW1haWxSZXNwb25zZRIhChllbmNyeXB0ZWRDaGFu", - "Z2VFbWFpbFRva2VuGAEgASgMIjYKHUVtYWlsVmVyaWZpY2F0aW9uTGlua1Jl", - "c3BvbnNlEhUKDWVtYWlsVmVyaWZpZWQYASABKAgiKQoMU2VjdXJpdHlEYXRh", - "EgsKA3VpZBgBIAEoDBIMCgRkYXRhGAIgASgMIpEBChNTZWN1cml0eURhdGFS", - "ZXF1ZXN0EjgKEnJlY29yZFNlY3VyaXR5RGF0YRgBIAMoCzIcLkF1dGhlbnRp", - "Y2F0aW9uLlNlY3VyaXR5RGF0YRJAChptYXN0ZXJQYXNzd29yZFNlY3VyaXR5", - "RGF0YRgCIAMoCzIcLkF1dGhlbnRpY2F0aW9uLlNlY3VyaXR5RGF0YSK1AQod", - "U2VjdXJpdHlSZXBvcnRJbmNyZW1lbnRhbERhdGESGAoQZW50ZXJwcmlzZVVz", - "ZXJJZBgBIAEoAxIbChNjdXJyZW50U2VjdXJpdHlEYXRhGAIgASgMEiMKG2N1", - "cnJlbnRTZWN1cml0eURhdGFSZXZpc2lvbhgDIAEoAxIXCg9vbGRTZWN1cml0", - "eURhdGEYBCABKAwSHwoXb2xkU2VjdXJpdHlEYXRhUmV2aXNpb24YBSABKAMi", - "9QEKDlNlY3VyaXR5UmVwb3J0EhgKEGVudGVycHJpc2VVc2VySWQYASABKAMS", - "GwoTZW5jcnlwdGVkUmVwb3J0RGF0YRgCIAEoDBIQCghyZXZpc2lvbhgDIAEo", - "AxIRCgl0d29GYWN0b3IYBCABKAkSEQoJbGFzdExvZ2luGAUgASgDEh4KFm51", - "bWJlck9mUmV1c2VkUGFzc3dvcmQYBiABKAUSVAodc2VjdXJpdHlSZXBvcnRJ", - "bmNyZW1lbnRhbERhdGEYByADKAsyLS5BdXRoZW50aWNhdGlvbi5TZWN1cml0", - "eVJlcG9ydEluY3JlbWVudGFsRGF0YSJTChlTZWN1cml0eVJlcG9ydFNhdmVS", - "ZXF1ZXN0EjYKDnNlY3VyaXR5UmVwb3J0GAEgAygLMh4uQXV0aGVudGljYXRp", - "b24uU2VjdXJpdHlSZXBvcnQiKQoVU2VjdXJpdHlSZXBvcnRSZXF1ZXN0EhAK", - "CGZyb21QYWdlGAEgASgDIrgBChZTZWN1cml0eVJlcG9ydFJlc3BvbnNlEhwK", - "FGVudGVycHJpc2VQcml2YXRlS2V5GAEgASgMEjYKDnNlY3VyaXR5UmVwb3J0", - "GAIgAygLMh4uQXV0aGVudGljYXRpb24uU2VjdXJpdHlSZXBvcnQSFAoMYXNP", - "ZlJldmlzaW9uGAMgASgDEhAKCGZyb21QYWdlGAQgASgDEg4KBnRvUGFnZRgF", - "IAEoAxIQCghjb21wbGV0ZRgGIAEoCCInChZSZXVzZWRQYXNzd29yZHNSZXF1", - "ZXN0Eg0KBWNvdW50GAEgASgFIj4KFFN1bW1hcnlDb25zb2xlUmVwb3J0EhIK", - "CnJlcG9ydFR5cGUYASABKAUSEgoKcmVwb3J0RGF0YRgCIAEoDCJ8ChJDaGFu", - "Z2VUb0tleVR5cGVPbmUSLwoKb2JqZWN0VHlwZRgBIAEoDjIbLkF1dGhlbnRp", - "Y2F0aW9uLk9iamVjdFR5cGVzEhIKCnByaW1hcnlVaWQYAiABKAwSFAoMc2Vj", - "b25kYXJ5VWlkGAMgASgMEgsKA2tleRgEIAEoDCJbChlDaGFuZ2VUb0tleVR5", - "cGVPbmVSZXF1ZXN0Ej4KEmNoYW5nZVRvS2V5VHlwZU9uZRgBIAMoCzIiLkF1", - "dGhlbnRpY2F0aW9uLkNoYW5nZVRvS2V5VHlwZU9uZSJVChhDaGFuZ2VUb0tl", - "eVR5cGVPbmVTdGF0dXMSCwoDdWlkGAEgASgMEgwKBHR5cGUYAiABKAkSDgoG", - "c3RhdHVzGAMgASgJEg4KBnJlYXNvbhgEIAEoCSJoChpDaGFuZ2VUb0tleVR5", - "cGVPbmVSZXNwb25zZRJKChhjaGFuZ2VUb0tleVR5cGVPbmVTdGF0dXMYASAD", - "KAsyKC5BdXRoZW50aWNhdGlvbi5DaGFuZ2VUb0tleVR5cGVPbmVTdGF0dXMi", - "IQoGU2V0S2V5EgoKAmlkGAEgASgDEgsKA2tleRgCIAEoDCI1Cg1TZXRLZXlS", - "ZXF1ZXN0EiQKBGtleXMYASADKAsyFi5BdXRoZW50aWNhdGlvbi5TZXRLZXki", - "8gQKEUNyZWF0ZVVzZXJSZXF1ZXN0EhAKCHVzZXJuYW1lGAEgASgJEhQKDGF1", - "dGhWZXJpZmllchgCIAEoDBIYChBlbmNyeXB0aW9uUGFyYW1zGAMgASgMEhQK", - "DHJzYVB1YmxpY0tleRgEIAEoDBIeChZyc2FFbmNyeXB0ZWRQcml2YXRlS2V5", - "GAUgASgMEhQKDGVjY1B1YmxpY0tleRgGIAEoDBIeChZlY2NFbmNyeXB0ZWRQ", - "cml2YXRlS2V5GAcgASgMEhwKFGVuY3J5cHRlZERldmljZVRva2VuGAggASgM", - "EhoKEmVuY3J5cHRlZENsaWVudEtleRgJIAEoDBIVCg1jbGllbnRWZXJzaW9u", - "GAogASgJEh4KFmVuY3J5cHRlZERldmljZURhdGFLZXkYCyABKAwSGwoTZW5j", - "cnlwdGVkTG9naW5Ub2tlbhgMIAEoDBIZChFtZXNzYWdlU2Vzc2lvblVpZBgN", - "IAEoDBIXCg9pbnN0YWxsUmVmZXJyZXIYDiABKAkSDgoGbWNjTU5DGA8gASgF", - "EgsKA21mZxgQIAEoCRINCgVtb2RlbBgRIAEoCRINCgVicmFuZBgSIAEoCRIP", - "Cgdwcm9kdWN0GBMgASgJEg4KBmRldmljZRgUIAEoCRIPCgdjYXJyaWVyGBUg", - "ASgJEhgKEHZlcmlmaWNhdGlvbkNvZGUYFiABKAkSQgoWZW50ZXJwcmlzZVJl", - "Z2lzdHJhdGlvbhgXIAEoCzIiLkVudGVycHJpc2UuRW50ZXJwcmlzZVJlZ2lz", - "dHJhdGlvbhIiChplbmNyeXB0ZWRWZXJpZmljYXRpb25Ub2tlbhgYIAEoDCJX", - "CiFOb2RlRW5mb3JjZW1lbnRBZGRPclVwZGF0ZVJlcXVlc3QSDgoGbm9kZUlk", - "GAEgASgDEhMKC2VuZm9yY2VtZW50GAIgASgJEg0KBXZhbHVlGAMgASgJIkMK", - "HE5vZGVFbmZvcmNlbWVudFJlbW92ZVJlcXVlc3QSDgoGbm9kZUlkGAEgASgD", - "EhMKC2VuZm9yY2VtZW50GAIgASgJIiIKDFVzZXJBY2NvdW50cxISCgphY2Nv", - "dW50VWlkGAEgAygMIp8BCg9BcGlSZXF1ZXN0QnlLZXkSDQoFa2V5SWQYASAB", - "KAUSDwoHcGF5bG9hZBgCIAEoDBIQCgh1c2VybmFtZRgDIAEoCRIOCgZsb2Nh", - "bGUYBCABKAkSPAoRc3VwcG9ydGVkTGFuZ3VhZ2UYBSABKA4yIS5BdXRoZW50", - "aWNhdGlvbi5TdXBwb3J0ZWRMYW5ndWFnZRIMCgR0eXBlGAYgASgFIi4KD01l", - "bWNhY2hlUmVxdWVzdBILCgNrZXkYASABKAkSDgoGdXNlcklkGAIgASgFIi4K", - "EE1lbWNhY2hlUmVzcG9uc2USCwoDa2V5GAEgASgJEg0KBXZhbHVlGAIgASgJ", - "IncKHE1hc3RlclBhc3N3b3JkUmVlbnRyeVJlcXVlc3QSFgoOcGJrZGYyUGFz", - "c3dvcmQYASABKAkSPwoGYWN0aW9uGAIgASgOMi8uQXV0aGVudGljYXRpb24u", - "TWFzdGVyUGFzc3dvcmRSZWVudHJ5QWN0aW9uVHlwZSJfChlEZXZpY2VSZWdp", - "c3RyYXRpb25SZXF1ZXN0EhUKDWNsaWVudFZlcnNpb24YASABKAkSEgoKZGV2", - "aWNlTmFtZRgCIAEoCRIXCg9kZXZpY2VQdWJsaWNLZXkYAyABKAwimgEKGURl", - "dmljZVZlcmlmaWNhdGlvblJlcXVlc3QSHAoUZW5jcnlwdGVkRGV2aWNlVG9r", - "ZW4YASABKAwSEAoIdXNlcm5hbWUYAiABKAkSGwoTdmVyaWZpY2F0aW9uQ2hh", - "bm5lbBgDIAEoCRIZChFtZXNzYWdlU2Vzc2lvblVpZBgEIAEoDBIVCg1jbGll", - "bnRWZXJzaW9uGAUgASgJIrIBChpEZXZpY2VWZXJpZmljYXRpb25SZXNwb25z", - "ZRIcChRlbmNyeXB0ZWREZXZpY2VUb2tlbhgBIAEoDBIQCgh1c2VybmFtZRgC", - "IAEoCRIZChFtZXNzYWdlU2Vzc2lvblVpZBgDIAEoDBIVCg1jbGllbnRWZXJz", - "aW9uGAQgASgJEjIKDGRldmljZVN0YXR1cxgFIAEoDjIcLkF1dGhlbnRpY2F0", - "aW9uLkRldmljZVN0YXR1cyLIAQoVRGV2aWNlQXBwcm92YWxSZXF1ZXN0Eg0K", - "BWVtYWlsGAEgASgJEhgKEHR3b0ZhY3RvckNoYW5uZWwYAiABKAkSFQoNY2xp", - "ZW50VmVyc2lvbhgDIAEoCRIOCgZsb2NhbGUYBCABKAkSHAoUZW5jcnlwdGVk", - "RGV2aWNlVG9rZW4YBSABKAwSEAoIdG90cENvZGUYBiABKAkSEAoIZGV2aWNl", - "SXAYByABKAkSHQoVZGV2aWNlVG9rZW5FeHBpcmVEYXlzGAggASgJIjkKFkRl", - "dmljZUFwcHJvdmFsUmVzcG9uc2USHwoXZW5jcnlwdGVkVHdvRmFjdG9yVG9r", - "ZW4YASABKAwifgoUQXBwcm92ZURldmljZVJlcXVlc3QSHAoUZW5jcnlwdGVk", - "RGV2aWNlVG9rZW4YASABKAwSHgoWZW5jcnlwdGVkRGV2aWNlRGF0YUtleRgC", - "IAEoDBIUCgxkZW55QXBwcm92YWwYAyABKAgSEgoKbGlua0RldmljZRgEIAEo", - "CCJFChpFbnRlcnByaXNlVXNlckFsaWFzUmVxdWVzdBIYChBlbnRlcnByaXNl", - "VXNlcklkGAEgASgDEg0KBWFsaWFzGAIgASgJIiYKBkRldmljZRIcChRlbmNy", - "eXB0ZWREZXZpY2VUb2tlbhgBIAEoDCJcChxSZWdpc3RlckRldmljZURhdGFL", - "ZXlSZXF1ZXN0EhwKFGVuY3J5cHRlZERldmljZVRva2VuGAEgASgMEh4KFmVu", - "Y3J5cHRlZERldmljZURhdGFLZXkYAiABKAwibgopVmFsaWRhdGVDcmVhdGVV", - "c2VyVmVyaWZpY2F0aW9uQ29kZVJlcXVlc3QSEAoIdXNlcm5hbWUYASABKAkS", - "FQoNY2xpZW50VmVyc2lvbhgCIAEoCRIYChB2ZXJpZmljYXRpb25Db2RlGAMg", - "ASgJIqMBCiVWYWxpZGF0ZURldmljZVZlcmlmaWNhdGlvbkNvZGVSZXF1ZXN0", - "EhAKCHVzZXJuYW1lGAEgASgJEhUKDWNsaWVudFZlcnNpb24YAiABKAkSGAoQ", - "dmVyaWZpY2F0aW9uQ29kZRgDIAEoCRIZChFtZXNzYWdlU2Vzc2lvblVpZBgE", - "IAEoDBIcChRlbmNyeXB0ZWREZXZpY2VUb2tlbhgFIAEoDCJZChlTZW5kU2Vz", - "c2lvbk1lc3NhZ2VSZXF1ZXN0EhkKEW1lc3NhZ2VTZXNzaW9uVWlkGAEgASgM", - "Eg8KB2NvbW1hbmQYAiABKAkSEAoIdXNlcm5hbWUYAyABKAkiTQoRR2xvYmFs", - "VXNlckFjY291bnQSEAoIdXNlcm5hbWUYASABKAkSEgoKYWNjb3VudFVpZBgC", - "IAEoDBISCgpyZWdpb25OYW1lGAMgASgJIjcKD0FjY291bnRVc2VybmFtZRIQ", - "Cgh1c2VybmFtZRgBIAEoCRISCgpkYXRlQWN0aXZlGAIgASgJIlAKGVNzb1Nl", - "cnZpY2VQcm92aWRlclJlcXVlc3QSDAoEbmFtZRgBIAEoCRIVCg1jbGllbnRW", - "ZXJzaW9uGAIgASgJEg4KBmxvY2FsZRgDIAEoCSJhChpTc29TZXJ2aWNlUHJv", - "dmlkZXJSZXNwb25zZRIMCgRuYW1lGAEgASgJEg0KBXNwVXJsGAIgASgJEg8K", - "B2lzQ2xvdWQYAyABKAgSFQoNY2xpZW50VmVyc2lvbhgEIAEoCSI0ChJVc2Vy", - "U2V0dGluZ1JlcXVlc3QSDwoHc2V0dGluZxgBIAEoCRINCgV2YWx1ZRgCIAEo", - "CSJmCg1UaHJvdHRsZVN0YXRlEioKBHR5cGUYASABKA4yHC5BdXRoZW50aWNh", - "dGlvbi5UaHJvdHRsZVR5cGUSCwoDa2V5GAIgASgJEg0KBXZhbHVlGAMgASgJ", - "Eg0KBXN0YXRlGAQgASgIIrUBCg5UaHJvdHRsZVN0YXRlMhILCgNrZXkYASAB", - "KAkSFgoOa2V5RGVzY3JpcHRpb24YAiABKAkSDQoFdmFsdWUYAyABKAkSGAoQ", - "dmFsdWVEZXNjcmlwdGlvbhgEIAEoCRISCgppZGVudGlmaWVyGAUgASgJEg4K", - "BmxvY2tlZBgGIAEoCBIaChJpbmNsdWRlZEluQWxsQ2xlYXIYByABKAgSFQoN", - "ZXhwaXJlU2Vjb25kcxgIIAEoBSKXAQoRRGV2aWNlSW5mb3JtYXRpb24SEAoI", - "ZGV2aWNlSWQYASABKAMSEgoKZGV2aWNlTmFtZRgCIAEoCRIVCg1jbGllbnRW", - "ZXJzaW9uGAMgASgJEhEKCWxhc3RMb2dpbhgEIAEoAxIyCgxkZXZpY2VTdGF0", - "dXMYBSABKA4yHC5BdXRoZW50aWNhdGlvbi5EZXZpY2VTdGF0dXMiKgoLVXNl", - "clNldHRpbmcSDAoEbmFtZRgBIAEoCRINCgV2YWx1ZRgCIAEoCCIuChJVc2Vy", - "RGF0YUtleVJlcXVlc3QSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAMoAyJRChtF", - "bnRlcnByaXNlVXNlcklkRGF0YUtleVBhaXISGAoQZW50ZXJwcmlzZVVzZXJJ", - "ZBgBIAEoAxIYChBlbmNyeXB0ZWREYXRhS2V5GAIgASgMIpUBCgtVc2VyRGF0", - "YUtleRIOCgZyb2xlSWQYASABKAMSDwoHcm9sZUtleRgCIAEoDBISCgpwcml2", - "YXRlS2V5GAMgASgJElEKHGVudGVycHJpc2VVc2VySWREYXRhS2V5UGFpcnMY", - "BCADKAsyKy5BdXRoZW50aWNhdGlvbi5FbnRlcnByaXNlVXNlcklkRGF0YUtl", - "eVBhaXIiegoTVXNlckRhdGFLZXlSZXNwb25zZRIxCgx1c2VyRGF0YUtleXMY", - "ASADKAsyGy5BdXRoZW50aWNhdGlvbi5Vc2VyRGF0YUtleRIUCgxhY2Nlc3NE", - "ZW5pZWQYAiADKAMSGgoSbm9FbmNyeXB0ZWREYXRhS2V5GAMgAygDIkgKKU1h", - "c3RlclBhc3N3b3JkUmVjb3ZlcnlWZXJpZmljYXRpb25SZXF1ZXN0EhsKE2Vu", - "Y3J5cHRlZExvZ2luVG9rZW4YASABKAwiVQocR2V0U2VjdXJpdHlRdWVzdGlv", - "blYzUmVxdWVzdBIbChNlbmNyeXB0ZWRMb2dpblRva2VuGAEgASgMEhgKEHZl", - "cmlmaWNhdGlvbkNvZGUYAiABKAkicgodR2V0U2VjdXJpdHlRdWVzdGlvblYz", - "UmVzcG9uc2USGAoQc2VjdXJpdHlRdWVzdGlvbhgBIAEoCRIVCg1iYWNrdXBL", - "ZXlEYXRlGAIgASgDEgwKBHNhbHQYAyABKAwSEgoKaXRlcmF0aW9ucxgEIAEo", - "BSJuChlHZXREYXRhS2V5QmFja3VwVjNSZXF1ZXN0EhsKE2VuY3J5cHRlZExv", - "Z2luVG9rZW4YASABKAwSGAoQdmVyaWZpY2F0aW9uQ29kZRgCIAEoCRIaChJz", - "ZWN1cml0eUFuc3dlckhhc2gYAyABKAwidgoNUGFzc3dvcmRSdWxlcxIQCghy", - "dWxlVHlwZRgBIAEoCRINCgVtYXRjaBgCIAEoCBIPCgdwYXR0ZXJuGAMgASgJ", - "EhMKC2Rlc2NyaXB0aW9uGAQgASgJEg8KB21pbmltdW0YBSABKAUSDQoFdmFs", - "dWUYBiABKAkiowIKGkdldERhdGFLZXlCYWNrdXBWM1Jlc3BvbnNlEhUKDWRh", - "dGFLZXlCYWNrdXAYASABKAwSGQoRZGF0YUtleUJhY2t1cERhdGUYAiABKAMS", - "EQoJcHVibGljS2V5GAMgASgMEhsKE2VuY3J5cHRlZFByaXZhdGVLZXkYBCAB", - "KAwSEQoJY2xpZW50S2V5GAUgASgMEh0KFWVuY3J5cHRlZFNlc3Npb25Ub2tl", - "bhgGIAEoDBI0Cg1wYXNzd29yZFJ1bGVzGAcgAygLMh0uQXV0aGVudGljYXRp", - "b24uUGFzc3dvcmRSdWxlcxIaChJwYXNzd29yZFJ1bGVzSW50cm8YCCABKAkS", - "HwoXbWluaW11bVBia2RmMkl0ZXJhdGlvbnMYCSABKAUiKQoUR2V0UHVibGlj", - "S2V5c1JlcXVlc3QSEQoJdXNlcm5hbWVzGAEgAygJInIKEVB1YmxpY0tleVJl", - "c3BvbnNlEhAKCHVzZXJuYW1lGAEgASgJEhEKCXB1YmxpY0tleRgCIAEoDBIU", - "CgxwdWJsaWNFY2NLZXkYAyABKAwSDwoHbWVzc2FnZRgEIAEoCRIRCgllcnJv", - "ckNvZGUYBSABKAkiUAoVR2V0UHVibGljS2V5c1Jlc3BvbnNlEjcKDGtleVJl", - "c3BvbnNlcxgBIAMoCzIhLkF1dGhlbnRpY2F0aW9uLlB1YmxpY0tleVJlc3Bv", - "bnNlIkYKFFNldEVjY0tleVBhaXJSZXF1ZXN0EhEKCXB1YmxpY0tleRgBIAEo", - "DBIbChNlbmNyeXB0ZWRQcml2YXRlS2V5GAIgASgMIpIBChJBZGRBcHBTaGFy", - "ZVJlcXVlc3QSFAoMYXBwUmVjb3JkVWlkGAEgASgMEhEKCXNlY3JldFVpZBgC", - "IAEoDBI3CglzaGFyZVR5cGUYAyABKA4yJC5BdXRoZW50aWNhdGlvbi5BcHBs", - "aWNhdGlvblNoYXJlVHlwZRIaChJlbmNyeXB0ZWRTZWNyZXRLZXkYBCABKAwi", - "WQoTQWRkQXBwQ2xpZW50UmVxdWVzdBIUCgxhcHBSZWNvcmRVaWQYASABKAwS", - "GgoSZW5jcnlwdGVkTWFzdGVyS2V5GAIgASgMEhAKCGNsaWVudElkGAMgASgM", - "Ii8KG0dldFZlcmlmaWNhdGlvblRva2VuUmVxdWVzdBIQCgh1c2VybmFtZRgB", - "IAEoCSJCChxHZXRWZXJpZmljYXRpb25Ub2tlblJlc3BvbnNlEiIKGmVuY3J5", - "cHRlZFZlcmlmaWNhdGlvblRva2VuGAEgASgMIicKFlNlbmRTaGFyZUludml0", - "ZVJlcXVlc3QSDQoFZW1haWwYASABKAkquQIKEVN1cHBvcnRlZExhbmd1YWdl", - "EgsKB0VOR0xJU0gQABIKCgZBUkFCSUMQARILCgdCUklUSVNIEAISCwoHQ0hJ", - "TkVTRRADEhUKEUNISU5FU0VfSE9OR19LT05HEAQSEgoOQ0hJTkVTRV9UQUlX", - "QU4QBRIJCgVEVVRDSBAGEgoKBkZSRU5DSBAHEgoKBkdFUk1BThAIEgkKBUdS", - "RUVLEAkSCgoGSEVCUkVXEAoSCwoHSVRBTElBThALEgwKCEpBUEFORVNFEAwS", - "CgoGS09SRUFOEA0SCgoGUE9MSVNIEA4SDgoKUE9SVFVHVUVTRRAPEhUKEVBP", - "UlRVR1VFU0VfQlJBWklMEBASDAoIUk9NQU5JQU4QERILCgdSVVNTSUFOEBIS", - "CgoGU0xPVkFLEBMSCwoHU1BBTklTSBAUKkUKCUxvZ2luVHlwZRIKCgZOT1JN", - "QUwQABIHCgNTU08QARIHCgNCSU8QAhINCglBTFRFUk5BVEUQAxILCgdPRkZM", - "SU5FEAQqcQoMRGV2aWNlU3RhdHVzEhkKFURFVklDRV9ORUVEU19BUFBST1ZB", - "TBAAEg0KCURFVklDRV9PSxABEhsKF0RFVklDRV9ESVNBQkxFRF9CWV9VU0VS", - "EAISGgoWREVWSUNFX0xPQ0tFRF9CWV9BRE1JThADKkEKDUxpY2Vuc2VTdGF0", - "dXMSCQoFT1RIRVIQABIKCgZBQ1RJVkUQARILCgdFWFBJUkVEEAISDAoIRElT", - "QUJMRUQQAyo3CgtBY2NvdW50VHlwZRIMCghDT05TVU1FUhAAEgoKBkZBTUlM", - "WRABEg4KCkVOVEVSUFJJU0UQAirMAQoQU2Vzc2lvblRva2VuVHlwZRISCg5O", - "T19SRVNUUklDVElPThAAEhQKEEFDQ09VTlRfUkVDT1ZFUlkQARIRCg1TSEFS", - "RV9BQ0NPVU5UEAISDAoIUFVSQ0hBU0UQAxIMCghSRVNUUklDVBAEEhEKDUFD", - "Q0VQVF9JTlZJVEUQBRISCg5TVVBQT1JUX1NFUlZFUhAGEhcKE0VOVEVSUFJJ", - "U0VfQ1JFQVRJT04QBxIfChtFWFBJUkVEX0JVVF9BTExPV0VEX1RPX1NZTkMQ", - "CCpHCgdWZXJzaW9uEhMKD2ludmFsaWRfdmVyc2lvbhAAEhMKD2RlZmF1bHRf", - "dmVyc2lvbhABEhIKDnNlY29uZF92ZXJzaW9uEAIqNwofTWFzdGVyUGFzc3dv", - "cmRSZWVudHJ5QWN0aW9uVHlwZRIKCgZVTk1BU0sQABIICgRDT1BZEAEqbAoL", - "TG9naW5NZXRob2QSFwoTSU5WQUxJRF9MT0dJTk1FVEhPRBAAEhQKEEVYSVNU", - "SU5HX0FDQ09VTlQQARIOCgpTU09fRE9NQUlOEAISDQoJQUZURVJfU1NPEAMS", - "DwoLTkVXX0FDQ09VTlQQBCrHAwoKTG9naW5TdGF0ZRIWChJJTlZBTElEX0xP", - "R0lOU1RBVEUQABIOCgpMT0dHRURfT1VUEAESHAoYREVWSUNFX0FQUFJPVkFM", - "X1JFUVVJUkVEEAISEQoNREVWSUNFX0xPQ0tFRBADEhIKDkFDQ09VTlRfTE9D", - "S0VEEAQSGQoVREVWSUNFX0FDQ09VTlRfTE9DS0VEEAUSCwoHVVBHUkFERRAG", - "EhMKD0xJQ0VOU0VfRVhQSVJFRBAHEhMKD1JFR0lPTl9SRURJUkVDVBAIEhYK", - "ElJFRElSRUNUX0NMT1VEX1NTTxAJEhcKE1JFRElSRUNUX09OU0lURV9TU08Q", - "ChIQCgxSRVFVSVJFU18yRkEQDBIWChJSRVFVSVJFU19BVVRIX0hBU0gQDRIV", - "ChFSRVFVSVJFU19VU0VSTkFNRRAOEhkKFUFGVEVSX0NMT1VEX1NTT19MT0dJ", - "ThAPEh0KGVJFUVVJUkVTX0FDQ09VTlRfQ1JFQVRJT04QEBImCiJSRVFVSVJF", - "U19ERVZJQ0VfRU5DUllQVEVEX0RBVEFfS0VZEBESFwoTTE9HSU5fVE9LRU5f", - "RVhQSVJFRBASEg0KCUxPR0dFRF9JThBjKmsKFEVuY3J5cHRlZERhdGFLZXlU", - "eXBlEgoKBk5PX0tFWRAAEhgKFEJZX0RFVklDRV9QVUJMSUNfS0VZEAESDwoL", - "QllfUEFTU1dPUkQQAhIQCgxCWV9BTFRFUk5BVEUQAxIKCgZCWV9CSU8QBCot", - "Cg5QYXNzd29yZE1ldGhvZBILCgdFTlRFUkVEEAASDgoKQklPTUVUUklDUxAB", - "KrkBChFUd29GYWN0b3JQdXNoVHlwZRIUChBUV09fRkFfUFVTSF9OT05FEAAS", - "EwoPVFdPX0ZBX1BVU0hfU01TEAESFgoSVFdPX0ZBX1BVU0hfS0VFUEVSEAIS", - "GAoUVFdPX0ZBX1BVU0hfRFVPX1BVU0gQAxIYChRUV09fRkFfUFVTSF9EVU9f", - "VEVYVBAEEhgKFFRXT19GQV9QVVNIX0RVT19DQUxMEAUSEwoPVFdPX0ZBX1BV", - "U0hfRE5BEAYqwwEKElR3b0ZhY3RvclZhbHVlVHlwZRIUChBUV09fRkFfQ09E", - "RV9OT05FEAASFAoQVFdPX0ZBX0NPREVfVE9UUBABEhMKD1RXT19GQV9DT0RF", - "X1NNUxACEhMKD1RXT19GQV9DT0RFX0RVTxADEhMKD1RXT19GQV9DT0RFX1JT", - "QRAEEhMKD1RXT19GQV9SRVNQX1UyRhAFEhgKFFRXT19GQV9SRVNQX1dFQkFV", - "VEhOEAYSEwoPVFdPX0ZBX0NPREVfRE5BEAcq4QEKFFR3b0ZhY3RvckNoYW5u", - "ZWxUeXBlEhIKDlRXT19GQV9DVF9OT05FEAASEgoOVFdPX0ZBX0NUX1RPVFAQ", - "ARIRCg1UV09fRkFfQ1RfU01TEAISEQoNVFdPX0ZBX0NUX0RVTxADEhEKDVRX", - "T19GQV9DVF9SU0EQBBIUChBUV09fRkFfQ1RfQkFDS1VQEAUSEQoNVFdPX0ZB", - "X0NUX1UyRhAGEhYKElRXT19GQV9DVF9XRUJBVVRIThAHEhQKEFRXT19GQV9D", - "VF9LRUVQRVIQCBIRCg1UV09fRkFfQ1RfRE5BEAkqqwEKE1R3b0ZhY3RvckV4", - "cGlyYXRpb24SGgoWVFdPX0ZBX0VYUF9JTU1FRElBVEVMWRAAEhgKFFRXT19G", - "QV9FWFBfNV9NSU5VVEVTEAESFwoTVFdPX0ZBX0VYUF8xMl9IT1VSUxACEhcK", - "E1RXT19GQV9FWFBfMjRfSE9VUlMQAxIWChJUV09fRkFfRVhQXzMwX0RBWVMQ", - "BBIUChBUV09fRkFfRVhQX05FVkVSEAUqQAoLTGljZW5zZVR5cGUSCQoFVkFV", - "TFQQABIICgRDSEFUEAESCwoHU1RPUkFHRRACEg8KC0JSRUFDSFdBVENIEAMq", - "aQoLT2JqZWN0VHlwZXMSCgoGUkVDT1JEEAASFgoSU0hBUkVEX0ZPTERFUl9V", - "U0VSEAESFgoSU0hBUkVEX0ZPTERFUl9URUFNEAISDwoLVVNFUl9GT0xERVIQ", - "AxINCglURUFNX1VTRVIQBCpgChtBbHRlcm5hdGVBdXRoZW50aWNhdGlvblR5", - "cGUSHQoZQUxURVJOQVRFX01BU1RFUl9QQVNTV09SRBAAEg0KCUJJT01FVFJJ", - "QxABEhMKD0FDQ09VTlRfUkVDT1ZFUhACKpoCCgxUaHJvdHRsZVR5cGUSGwoX", - "UEFTU1dPUkRfUkVUUllfVEhST1RUTEUQABIiCh5QQVNTV09SRF9SRVRSWV9M", - "RUdBQ1lfVEhST1RUTEUQARITCg9UV09fRkFfVEhST1RUTEUQAhIaChZUV09f", - "RkFfTEVHQUNZX1RIUk9UVExFEAMSFQoRUUFfUkVUUllfVEhST1RUTEUQBBIc", - "ChhBQ0NPVU5UX1JFQ09WRVJfVEhST1RUTEUQBRIuCipWQUxJREFURV9ERVZJ", - "Q0VfVkVSSUZJQ0FUSU9OX0NPREVfVEhST1RUTEUQBhIzCi9WQUxJREFURV9D", - "UkVBVEVfVVNFUl9WRVJJRklDQVRJT05fQ09ERV9USFJPVFRMRRAHKjgKBlJl", - "Z2lvbhILCgdVTktOT1dOEAASBgoCZXUQARIGCgJ1cxACEgkKBXVzZ292EAMS", - "BgoCYXUQBCo2ChRBcHBsaWNhdGlvblNoYXJlVHlwZRIOCgpTSFRfUkVDT1JE", - "EAASDgoKU0hUX0ZPTERFUhABQioKGGNvbS5rZWVwZXJzZWN1cml0eS5wcm90", - "b0IOQXV0aGVudGljYXRpb25iBnByb3RvMw==")); + "dGhlbnRpY2F0aW9uLlR3b0ZhY3RvckV4cGlyYXRpb24SEQoJY3JlYXRlZE9u", + "GAggASgDEjoKDWxhc3RGcmVxdWVuY3kYCSABKA4yIy5BdXRoZW50aWNhdGlv", + "bi5Ud29GYWN0b3JFeHBpcmF0aW9uImQKElR3b0ZhY3RvckR1b1N0YXR1cxIU", + "CgxjYXBhYmlsaXRpZXMYASADKAkSEwoLcGhvbmVOdW1iZXIYAiABKAkSEgoK", + "ZW5yb2xsX3VybBgDIAEoCRIPCgdtZXNzYWdlGAQgASgJIscBChNUd29GYWN0", + "b3JBZGRSZXF1ZXN0EjkKC2NoYW5uZWxUeXBlGAEgASgOMiQuQXV0aGVudGlj", + "YXRpb24uVHdvRmFjdG9yQ2hhbm5lbFR5cGUSEwoLY2hhbm5lbF91aWQYAiAB", + "KAwSEwoLY2hhbm5lbE5hbWUYAyABKAkSEwoLcGhvbmVOdW1iZXIYBCABKAkS", + "NgoLZHVvUHVzaFR5cGUYBSABKA4yIS5BdXRoZW50aWNhdGlvbi5Ud29GYWN0", + "b3JQdXNoVHlwZSJCChZUd29GYWN0b3JSZW5hbWVSZXF1ZXN0EhMKC2NoYW5u", + "ZWxfdWlkGAEgASgMEhMKC2NoYW5uZWxOYW1lGAIgASgJIj0KFFR3b0ZhY3Rv", + "ckFkZFJlc3BvbnNlEhEKCWNoYWxsZW5nZRgBIAEoCRISCgpiYWNrdXBLZXlz", + "GAIgAygJIi0KFlR3b0ZhY3RvckRlbGV0ZVJlcXVlc3QSEwoLY2hhbm5lbF91", + "aWQYASABKAwiYQoVVHdvRmFjdG9yTGlzdFJlc3BvbnNlEjYKCGNoYW5uZWxz", + "GAEgAygLMiQuQXV0aGVudGljYXRpb24uVHdvRmFjdG9yQ2hhbm5lbEluZm8S", + "EAoIZXhwaXJlT24YAiABKAMiWQogVHdvRmFjdG9yVXBkYXRlRXhwaXJhdGlv", + "blJlcXVlc3QSNQoIZXhwaXJlSW4YASABKA4yIy5BdXRoZW50aWNhdGlvbi5U", + "d29GYWN0b3JFeHBpcmF0aW9uIskBChhUd29GYWN0b3JWYWxpZGF0ZVJlcXVl", + "c3QSGwoTZW5jcnlwdGVkTG9naW5Ub2tlbhgBIAEoDBI1Cgl2YWx1ZVR5cGUY", + "AiABKA4yIi5BdXRoZW50aWNhdGlvbi5Ud29GYWN0b3JWYWx1ZVR5cGUSDQoF", + "dmFsdWUYAyABKAkSEwoLY2hhbm5lbF91aWQYBCABKAwSNQoIZXhwaXJlSW4Y", + "BSABKA4yIy5BdXRoZW50aWNhdGlvbi5Ud29GYWN0b3JFeHBpcmF0aW9uIjgK", + "GVR3b0ZhY3RvclZhbGlkYXRlUmVzcG9uc2USGwoTZW5jcnlwdGVkTG9naW5U", + "b2tlbhgBIAEoDCK4AQoYVHdvRmFjdG9yU2VuZFB1c2hSZXF1ZXN0EhsKE2Vu", + "Y3J5cHRlZExvZ2luVG9rZW4YASABKAwSMwoIcHVzaFR5cGUYAiABKA4yIS5B", + "dXRoZW50aWNhdGlvbi5Ud29GYWN0b3JQdXNoVHlwZRITCgtjaGFubmVsX3Vp", + "ZBgDIAEoDBI1CghleHBpcmVJbhgEIAEoDjIjLkF1dGhlbnRpY2F0aW9uLlR3", + "b0ZhY3RvckV4cGlyYXRpb24igwEKB0xpY2Vuc2USDwoHY3JlYXRlZBgBIAEo", + "AxISCgpleHBpcmF0aW9uGAIgASgDEjQKDWxpY2Vuc2VTdGF0dXMYAyABKA4y", + "HS5BdXRoZW50aWNhdGlvbi5MaWNlbnNlU3RhdHVzEgwKBHBhaWQYBCABKAgS", + "DwoHbWVzc2FnZRgFIAEoCSJHCg9Pd25lcmxlc3NSZWNvcmQSEQoJcmVjb3Jk", + "VWlkGAEgASgMEhEKCXJlY29yZEtleRgCIAEoDBIOCgZzdGF0dXMYAyABKAUi", + "TAoQT3duZXJsZXNzUmVjb3JkcxI4Cg9vd25lcmxlc3NSZWNvcmQYASADKAsy", + "Hy5BdXRoZW50aWNhdGlvbi5Pd25lcmxlc3NSZWNvcmQi1wEKD1VzZXJBdXRo", + "UmVxdWVzdBILCgN1aWQYASABKAwSDAoEc2FsdBgCIAEoDBISCgppdGVyYXRp", + "b25zGAMgASgFEhoKEmVuY3J5cHRlZENsaWVudEtleRgEIAEoDBIQCghhdXRo", + "SGFzaBgFIAEoDBIYChBlbmNyeXB0ZWREYXRhS2V5GAYgASgMEiwKCWxvZ2lu", + "VHlwZRgHIAEoDjIZLkF1dGhlbnRpY2F0aW9uLkxvZ2luVHlwZRIMCgRuYW1l", + "GAggASgJEhEKCWFsZ29yaXRobRgJIAEoBSIZCgpVaWRSZXF1ZXN0EgsKA3Vp", + "ZBgBIAMoDCKrAQoTRGV2aWNlVXBkYXRlUmVxdWVzdBIcChRlbmNyeXB0ZWRE", + "ZXZpY2VUb2tlbhgBIAEoDBIVCg1jbGllbnRWZXJzaW9uGAIgASgJEhIKCmRl", + "dmljZU5hbWUYAyABKAkSFwoPZGV2aWNlUHVibGljS2V5GAQgASgMEjIKDGRl", + "dmljZVN0YXR1cxgFIAEoDjIcLkF1dGhlbnRpY2F0aW9uLkRldmljZVN0YXR1", + "cyKBAQodUmVnaXN0ZXJEZXZpY2VJblJlZ2lvblJlcXVlc3QSHAoUZW5jcnlw", + "dGVkRGV2aWNlVG9rZW4YASABKAwSFQoNY2xpZW50VmVyc2lvbhgCIAEoCRIS", + "CgpkZXZpY2VOYW1lGAMgASgJEhcKD2RldmljZVB1YmxpY0tleRgEIAEoDCL4", + "AgoTUmVnaXN0cmF0aW9uUmVxdWVzdBIwCgthdXRoUmVxdWVzdBgBIAEoCzIb", + "LkF1dGhlbnRpY2F0aW9uLkF1dGhSZXF1ZXN0EjgKD3VzZXJBdXRoUmVxdWVz", + "dBgCIAEoCzIfLkF1dGhlbnRpY2F0aW9uLlVzZXJBdXRoUmVxdWVzdBIaChJl", + "bmNyeXB0ZWRDbGllbnRLZXkYAyABKAwSGwoTZW5jcnlwdGVkUHJpdmF0ZUtl", + "eRgEIAEoDBIRCglwdWJsaWNLZXkYBSABKAwSGAoQdmVyaWZpY2F0aW9uQ29k", + "ZRgGIAEoCRIeChZkZXByZWNhdGVkQXV0aEhhc2hIYXNoGAcgASgMEiQKHGRl", + "cHJlY2F0ZWRFbmNyeXB0ZWRDbGllbnRLZXkYCCABKAwSJQodZGVwcmVjYXRl", + "ZEVuY3J5cHRlZFByaXZhdGVLZXkYCSABKAwSIgoaZGVwcmVjYXRlZEVuY3J5", + "cHRpb25QYXJhbXMYCiABKAwi0AEKFkNvbnZlcnRVc2VyVG9WM1JlcXVlc3QS", + "MAoLYXV0aFJlcXVlc3QYASABKAsyGy5BdXRoZW50aWNhdGlvbi5BdXRoUmVx", + "dWVzdBI4Cg91c2VyQXV0aFJlcXVlc3QYAiABKAsyHy5BdXRoZW50aWNhdGlv", + "bi5Vc2VyQXV0aFJlcXVlc3QSGgoSZW5jcnlwdGVkQ2xpZW50S2V5GAMgASgM", + "EhsKE2VuY3J5cHRlZFByaXZhdGVLZXkYBCABKAwSEQoJcHVibGljS2V5GAUg", + "ASgMIiQKEFJldmlzaW9uUmVzcG9uc2USEAoIcmV2aXNpb24YASABKAMiJgoS", + "Q2hhbmdlRW1haWxSZXF1ZXN0EhAKCG5ld0VtYWlsGAEgASgJIjgKE0NoYW5n", + "ZUVtYWlsUmVzcG9uc2USIQoZZW5jcnlwdGVkQ2hhbmdlRW1haWxUb2tlbhgB", + "IAEoDCI2Ch1FbWFpbFZlcmlmaWNhdGlvbkxpbmtSZXNwb25zZRIVCg1lbWFp", + "bFZlcmlmaWVkGAEgASgIIikKDFNlY3VyaXR5RGF0YRILCgN1aWQYASABKAwS", + "DAoEZGF0YRgCIAEoDCLHAQoTU2VjdXJpdHlEYXRhUmVxdWVzdBI4ChJyZWNv", + "cmRTZWN1cml0eURhdGEYASADKAsyHC5BdXRoZW50aWNhdGlvbi5TZWN1cml0", + "eURhdGESQAoabWFzdGVyUGFzc3dvcmRTZWN1cml0eURhdGEYAiADKAsyHC5B", + "dXRoZW50aWNhdGlvbi5TZWN1cml0eURhdGESNAoOZW5jcnlwdGlvblR5cGUY", + "AyABKA4yHC5FbnRlcnByaXNlLkVuY3J5cHRlZEtleVR5cGUiswIKHVNlY3Vy", + "aXR5UmVwb3J0SW5jcmVtZW50YWxEYXRhEhgKEGVudGVycHJpc2VVc2VySWQY", + "ASABKAMSGwoTY3VycmVudFNlY3VyaXR5RGF0YRgCIAEoDBIjChtjdXJyZW50", + "U2VjdXJpdHlEYXRhUmV2aXNpb24YAyABKAMSFwoPb2xkU2VjdXJpdHlEYXRh", + "GAQgASgMEh8KF29sZFNlY3VyaXR5RGF0YVJldmlzaW9uGAUgASgDEj8KGWN1", + "cnJlbnREYXRhRW5jcnlwdGlvblR5cGUYBiABKA4yHC5FbnRlcnByaXNlLkVu", + "Y3J5cHRlZEtleVR5cGUSOwoVb2xkRGF0YUVuY3J5cHRpb25UeXBlGAcgASgO", + "MhwuRW50ZXJwcmlzZS5FbmNyeXB0ZWRLZXlUeXBlIp8CCg5TZWN1cml0eVJl", + "cG9ydBIYChBlbnRlcnByaXNlVXNlcklkGAEgASgDEhsKE2VuY3J5cHRlZFJl", + "cG9ydERhdGEYAiABKAwSEAoIcmV2aXNpb24YAyABKAMSEQoJdHdvRmFjdG9y", + "GAQgASgJEhEKCWxhc3RMb2dpbhgFIAEoAxIeChZudW1iZXJPZlJldXNlZFBh", + "c3N3b3JkGAYgASgFElQKHXNlY3VyaXR5UmVwb3J0SW5jcmVtZW50YWxEYXRh", + "GAcgAygLMi0uQXV0aGVudGljYXRpb24uU2VjdXJpdHlSZXBvcnRJbmNyZW1l", + "bnRhbERhdGESDgoGdXNlcklkGAggASgFEhgKEGhhc09sZEVuY3J5cHRpb24Y", + "CSABKAgiUwoZU2VjdXJpdHlSZXBvcnRTYXZlUmVxdWVzdBI2Cg5zZWN1cml0", + "eVJlcG9ydBgBIAMoCzIeLkF1dGhlbnRpY2F0aW9uLlNlY3VyaXR5UmVwb3J0", + "IikKFVNlY3VyaXR5UmVwb3J0UmVxdWVzdBIQCghmcm9tUGFnZRgBIAEoAyLZ", + "AQoWU2VjdXJpdHlSZXBvcnRSZXNwb25zZRIcChRlbnRlcnByaXNlUHJpdmF0", + "ZUtleRgBIAEoDBI2Cg5zZWN1cml0eVJlcG9ydBgCIAMoCzIeLkF1dGhlbnRp", + "Y2F0aW9uLlNlY3VyaXR5UmVwb3J0EhQKDGFzT2ZSZXZpc2lvbhgDIAEoAxIQ", + "Cghmcm9tUGFnZRgEIAEoAxIOCgZ0b1BhZ2UYBSABKAMSEAoIY29tcGxldGUY", + "BiABKAgSHwoXZW50ZXJwcmlzZUVjY1ByaXZhdGVLZXkYByABKAwiJwoWUmV1", + "c2VkUGFzc3dvcmRzUmVxdWVzdBINCgVjb3VudBgBIAEoBSI+ChRTdW1tYXJ5", + "Q29uc29sZVJlcG9ydBISCgpyZXBvcnRUeXBlGAEgASgFEhIKCnJlcG9ydERh", + "dGEYAiABKAwifAoSQ2hhbmdlVG9LZXlUeXBlT25lEi8KCm9iamVjdFR5cGUY", + "ASABKA4yGy5BdXRoZW50aWNhdGlvbi5PYmplY3RUeXBlcxISCgpwcmltYXJ5", + "VWlkGAIgASgMEhQKDHNlY29uZGFyeVVpZBgDIAEoDBILCgNrZXkYBCABKAwi", + "WwoZQ2hhbmdlVG9LZXlUeXBlT25lUmVxdWVzdBI+ChJjaGFuZ2VUb0tleVR5", + "cGVPbmUYASADKAsyIi5BdXRoZW50aWNhdGlvbi5DaGFuZ2VUb0tleVR5cGVP", + "bmUiVQoYQ2hhbmdlVG9LZXlUeXBlT25lU3RhdHVzEgsKA3VpZBgBIAEoDBIM", + "CgR0eXBlGAIgASgJEg4KBnN0YXR1cxgDIAEoCRIOCgZyZWFzb24YBCABKAki", + "aAoaQ2hhbmdlVG9LZXlUeXBlT25lUmVzcG9uc2USSgoYY2hhbmdlVG9LZXlU", + "eXBlT25lU3RhdHVzGAEgAygLMiguQXV0aGVudGljYXRpb24uQ2hhbmdlVG9L", + "ZXlUeXBlT25lU3RhdHVzIrkBChhHZXRDaGFuZ2VLZXlUeXBlc1JlcXVlc3QS", + "PQoQb25seVRoZXNlT2JqZWN0cxgBIAMoDjIjLkF1dGhlbnRpY2F0aW9uLkVu", + "Y3J5cHRlZE9iamVjdFR5cGUSDQoFbGltaXQYAiABKAUSGgoSaW5jbHVkZVJl", + "Y29tbWVuZGVkGAMgASgIEhMKC2luY2x1ZGVLZXlzGAQgASgIEh4KFmluY2x1", + "ZGVBbGxvd2VkS2V5VHlwZXMYBSABKAgiggEKGUdldENoYW5nZUtleVR5cGVz", + "UmVzcG9uc2USKwoEa2V5cxgBIAMoCzIdLkF1dGhlbnRpY2F0aW9uLkNoYW5n", + "ZUtleVR5cGUSOAoPYWxsb3dlZEtleVR5cGVzGAIgAygLMh8uQXV0aGVudGlj", + "YXRpb24uQWxsb3dlZEtleVR5cGVzIoEBCg9BbGxvd2VkS2V5VHlwZXMSNwoK", + "b2JqZWN0VHlwZRgBIAEoDjIjLkF1dGhlbnRpY2F0aW9uLkVuY3J5cHRlZE9i", + "amVjdFR5cGUSNQoPYWxsb3dlZEtleVR5cGVzGAIgAygOMhwuRW50ZXJwcmlz", + "ZS5FbmNyeXB0ZWRLZXlUeXBlIj0KDkNoYW5nZUtleVR5cGVzEisKBGtleXMY", + "ASADKAsyHS5BdXRoZW50aWNhdGlvbi5DaGFuZ2VLZXlUeXBlItYBCg1DaGFu", + "Z2VLZXlUeXBlEjcKCm9iamVjdFR5cGUYASABKA4yIy5BdXRoZW50aWNhdGlv", + "bi5FbmNyeXB0ZWRPYmplY3RUeXBlEgsKA3VpZBgCIAEoDBIUCgxzZWNvbmRh", + "cnlVaWQYAyABKAwSCwoDa2V5GAQgASgMEi0KB2tleVR5cGUYBSABKA4yHC5F", + "bnRlcnByaXNlLkVuY3J5cHRlZEtleVR5cGUSLQoGc3RhdHVzGAYgASgOMh0u", + "QXV0aGVudGljYXRpb24uR2VuZXJpY1N0YXR1cyIhCgZTZXRLZXkSCgoCaWQY", + "ASABKAMSCwoDa2V5GAIgASgMIjUKDVNldEtleVJlcXVlc3QSJAoEa2V5cxgB", + "IAMoCzIWLkF1dGhlbnRpY2F0aW9uLlNldEtleSKSBQoRQ3JlYXRlVXNlclJl", + "cXVlc3QSEAoIdXNlcm5hbWUYASABKAkSFAoMYXV0aFZlcmlmaWVyGAIgASgM", + "EhgKEGVuY3J5cHRpb25QYXJhbXMYAyABKAwSFAoMcnNhUHVibGljS2V5GAQg", + "ASgMEh4KFnJzYUVuY3J5cHRlZFByaXZhdGVLZXkYBSABKAwSFAoMZWNjUHVi", + "bGljS2V5GAYgASgMEh4KFmVjY0VuY3J5cHRlZFByaXZhdGVLZXkYByABKAwS", + "HAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4YCCABKAwSGgoSZW5jcnlwdGVkQ2xp", + "ZW50S2V5GAkgASgMEhUKDWNsaWVudFZlcnNpb24YCiABKAkSHgoWZW5jcnlw", + "dGVkRGV2aWNlRGF0YUtleRgLIAEoDBIbChNlbmNyeXB0ZWRMb2dpblRva2Vu", + "GAwgASgMEhkKEW1lc3NhZ2VTZXNzaW9uVWlkGA0gASgMEhcKD2luc3RhbGxS", + "ZWZlcnJlchgOIAEoCRIOCgZtY2NNTkMYDyABKAUSCwoDbWZnGBAgASgJEg0K", + "BW1vZGVsGBEgASgJEg0KBWJyYW5kGBIgASgJEg8KB3Byb2R1Y3QYEyABKAkS", + "DgoGZGV2aWNlGBQgASgJEg8KB2NhcnJpZXIYFSABKAkSGAoQdmVyaWZpY2F0", + "aW9uQ29kZRgWIAEoCRJCChZlbnRlcnByaXNlUmVnaXN0cmF0aW9uGBcgASgL", + "MiIuRW50ZXJwcmlzZS5FbnRlcnByaXNlUmVnaXN0cmF0aW9uEiIKGmVuY3J5", + "cHRlZFZlcmlmaWNhdGlvblRva2VuGBggASgMEh4KFmVudGVycHJpc2VVc2Vy", + "c0RhdGFLZXkYGSABKAwiVwohTm9kZUVuZm9yY2VtZW50QWRkT3JVcGRhdGVS", + "ZXF1ZXN0Eg4KBm5vZGVJZBgBIAEoAxITCgtlbmZvcmNlbWVudBgCIAEoCRIN", + "CgV2YWx1ZRgDIAEoCSJDChxOb2RlRW5mb3JjZW1lbnRSZW1vdmVSZXF1ZXN0", + "Eg4KBm5vZGVJZBgBIAEoAxITCgtlbmZvcmNlbWVudBgCIAEoCSKfAQoPQXBp", + "UmVxdWVzdEJ5S2V5Eg0KBWtleUlkGAEgASgFEg8KB3BheWxvYWQYAiABKAwS", + "EAoIdXNlcm5hbWUYAyABKAkSDgoGbG9jYWxlGAQgASgJEjwKEXN1cHBvcnRl", + "ZExhbmd1YWdlGAUgASgOMiEuQXV0aGVudGljYXRpb24uU3VwcG9ydGVkTGFu", + "Z3VhZ2USDAoEdHlwZRgGIAEoBSLHAQoVQXBpUmVxdWVzdEJ5S0F0b0tBS2V5", + "EiwKDHNvdXJjZVJlZ2lvbhgBIAEoDjIWLkF1dGhlbnRpY2F0aW9uLlJlZ2lv", + "bhIPCgdwYXlsb2FkGAIgASgMEjwKEXN1cHBvcnRlZExhbmd1YWdlGAMgASgO", + "MiEuQXV0aGVudGljYXRpb24uU3VwcG9ydGVkTGFuZ3VhZ2USMQoRZGVzdGlu", + "YXRpb25SZWdpb24YBCABKA4yFi5BdXRoZW50aWNhdGlvbi5SZWdpb24iLgoP", + "TWVtY2FjaGVSZXF1ZXN0EgsKA2tleRgBIAEoCRIOCgZ1c2VySWQYAiABKAUi", + "LgoQTWVtY2FjaGVSZXNwb25zZRILCgNrZXkYASABKAkSDQoFdmFsdWUYAiAB", + "KAkidwocTWFzdGVyUGFzc3dvcmRSZWVudHJ5UmVxdWVzdBIWCg5wYmtkZjJQ", + "YXNzd29yZBgBIAEoCRI/CgZhY3Rpb24YAiABKA4yLy5BdXRoZW50aWNhdGlv", + "bi5NYXN0ZXJQYXNzd29yZFJlZW50cnlBY3Rpb25UeXBlIlwKHU1hc3RlclBh", + "c3N3b3JkUmVlbnRyeVJlc3BvbnNlEjsKBnN0YXR1cxgBIAEoDjIrLkF1dGhl", + "bnRpY2F0aW9uLk1hc3RlclBhc3N3b3JkUmVlbnRyeVN0YXR1cyJfChlEZXZp", + "Y2VSZWdpc3RyYXRpb25SZXF1ZXN0EhUKDWNsaWVudFZlcnNpb24YASABKAkS", + "EgoKZGV2aWNlTmFtZRgCIAEoCRIXCg9kZXZpY2VQdWJsaWNLZXkYAyABKAwi", + "mgEKGURldmljZVZlcmlmaWNhdGlvblJlcXVlc3QSHAoUZW5jcnlwdGVkRGV2", + "aWNlVG9rZW4YASABKAwSEAoIdXNlcm5hbWUYAiABKAkSGwoTdmVyaWZpY2F0", + "aW9uQ2hhbm5lbBgDIAEoCRIZChFtZXNzYWdlU2Vzc2lvblVpZBgEIAEoDBIV", + "Cg1jbGllbnRWZXJzaW9uGAUgASgJIrIBChpEZXZpY2VWZXJpZmljYXRpb25S", + "ZXNwb25zZRIcChRlbmNyeXB0ZWREZXZpY2VUb2tlbhgBIAEoDBIQCgh1c2Vy", + "bmFtZRgCIAEoCRIZChFtZXNzYWdlU2Vzc2lvblVpZBgDIAEoDBIVCg1jbGll", + "bnRWZXJzaW9uGAQgASgJEjIKDGRldmljZVN0YXR1cxgFIAEoDjIcLkF1dGhl", + "bnRpY2F0aW9uLkRldmljZVN0YXR1cyLIAQoVRGV2aWNlQXBwcm92YWxSZXF1", + "ZXN0Eg0KBWVtYWlsGAEgASgJEhgKEHR3b0ZhY3RvckNoYW5uZWwYAiABKAkS", + "FQoNY2xpZW50VmVyc2lvbhgDIAEoCRIOCgZsb2NhbGUYBCABKAkSHAoUZW5j", + "cnlwdGVkRGV2aWNlVG9rZW4YBSABKAwSEAoIdG90cENvZGUYBiABKAkSEAoI", + "ZGV2aWNlSXAYByABKAkSHQoVZGV2aWNlVG9rZW5FeHBpcmVEYXlzGAggASgJ", + "IjkKFkRldmljZUFwcHJvdmFsUmVzcG9uc2USHwoXZW5jcnlwdGVkVHdvRmFj", + "dG9yVG9rZW4YASABKAwifgoUQXBwcm92ZURldmljZVJlcXVlc3QSHAoUZW5j", + "cnlwdGVkRGV2aWNlVG9rZW4YASABKAwSHgoWZW5jcnlwdGVkRGV2aWNlRGF0", + "YUtleRgCIAEoDBIUCgxkZW55QXBwcm92YWwYAyABKAgSEgoKbGlua0Rldmlj", + "ZRgEIAEoCCJFChpFbnRlcnByaXNlVXNlckFsaWFzUmVxdWVzdBIYChBlbnRl", + "cnByaXNlVXNlcklkGAEgASgDEg0KBWFsaWFzGAIgASgJIlkKHUVudGVycHJp", + "c2VVc2VyQWRkQWxpYXNSZXF1ZXN0EhgKEGVudGVycHJpc2VVc2VySWQYASAB", + "KAMSDQoFYWxpYXMYAiABKAkSDwoHcHJpbWFyeRgDIAEoCCJ3Ch9FbnRlcnBy", + "aXNlVXNlckFkZEFsaWFzUmVxdWVzdFYyElQKHWVudGVycHJpc2VVc2VyQWRk", + "QWxpYXNSZXF1ZXN0GAEgAygLMi0uQXV0aGVudGljYXRpb24uRW50ZXJwcmlz", + "ZVVzZXJBZGRBbGlhc1JlcXVlc3QiSAocRW50ZXJwcmlzZVVzZXJBZGRBbGlh", + "c1N0YXR1cxIYChBlbnRlcnByaXNlVXNlcklkGAEgASgDEg4KBnN0YXR1cxgC", + "IAEoCSJeCh5FbnRlcnByaXNlVXNlckFkZEFsaWFzUmVzcG9uc2USPAoGc3Rh", + "dHVzGAEgAygLMiwuQXV0aGVudGljYXRpb24uRW50ZXJwcmlzZVVzZXJBZGRB", + "bGlhc1N0YXR1cyImCgZEZXZpY2USHAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4Y", + "ASABKAwiXAocUmVnaXN0ZXJEZXZpY2VEYXRhS2V5UmVxdWVzdBIcChRlbmNy", + "eXB0ZWREZXZpY2VUb2tlbhgBIAEoDBIeChZlbmNyeXB0ZWREZXZpY2VEYXRh", + "S2V5GAIgASgMIm4KKVZhbGlkYXRlQ3JlYXRlVXNlclZlcmlmaWNhdGlvbkNv", + "ZGVSZXF1ZXN0EhAKCHVzZXJuYW1lGAEgASgJEhUKDWNsaWVudFZlcnNpb24Y", + "AiABKAkSGAoQdmVyaWZpY2F0aW9uQ29kZRgDIAEoCSKjAQolVmFsaWRhdGVE", + "ZXZpY2VWZXJpZmljYXRpb25Db2RlUmVxdWVzdBIQCgh1c2VybmFtZRgBIAEo", + "CRIVCg1jbGllbnRWZXJzaW9uGAIgASgJEhgKEHZlcmlmaWNhdGlvbkNvZGUY", + "AyABKAkSGQoRbWVzc2FnZVNlc3Npb25VaWQYBCABKAwSHAoUZW5jcnlwdGVk", + "RGV2aWNlVG9rZW4YBSABKAwiWQoZU2VuZFNlc3Npb25NZXNzYWdlUmVxdWVz", + "dBIZChFtZXNzYWdlU2Vzc2lvblVpZBgBIAEoDBIPCgdjb21tYW5kGAIgASgJ", + "EhAKCHVzZXJuYW1lGAMgASgJIk0KEUdsb2JhbFVzZXJBY2NvdW50EhAKCHVz", + "ZXJuYW1lGAEgASgJEhIKCmFjY291bnRVaWQYAiABKAwSEgoKcmVnaW9uTmFt", + "ZRgDIAEoCSI3Cg9BY2NvdW50VXNlcm5hbWUSEAoIdXNlcm5hbWUYASABKAkS", + "EgoKZGF0ZUFjdGl2ZRgCIAEoCSJQChlTc29TZXJ2aWNlUHJvdmlkZXJSZXF1", + "ZXN0EgwKBG5hbWUYASABKAkSFQoNY2xpZW50VmVyc2lvbhgCIAEoCRIOCgZs", + "b2NhbGUYAyABKAkiYQoaU3NvU2VydmljZVByb3ZpZGVyUmVzcG9uc2USDAoE", + "bmFtZRgBIAEoCRINCgVzcFVybBgCIAEoCRIPCgdpc0Nsb3VkGAMgASgIEhUK", + "DWNsaWVudFZlcnNpb24YBCABKAkiNAoSVXNlclNldHRpbmdSZXF1ZXN0Eg8K", + "B3NldHRpbmcYASABKAkSDQoFdmFsdWUYAiABKAkiZgoNVGhyb3R0bGVTdGF0", + "ZRIqCgR0eXBlGAEgASgOMhwuQXV0aGVudGljYXRpb24uVGhyb3R0bGVUeXBl", + "EgsKA2tleRgCIAEoCRINCgV2YWx1ZRgDIAEoCRINCgVzdGF0ZRgEIAEoCCK1", + "AQoOVGhyb3R0bGVTdGF0ZTISCwoDa2V5GAEgASgJEhYKDmtleURlc2NyaXB0", + "aW9uGAIgASgJEg0KBXZhbHVlGAMgASgJEhgKEHZhbHVlRGVzY3JpcHRpb24Y", + "BCABKAkSEgoKaWRlbnRpZmllchgFIAEoCRIOCgZsb2NrZWQYBiABKAgSGgoS", + "aW5jbHVkZWRJbkFsbENsZWFyGAcgASgIEhUKDWV4cGlyZVNlY29uZHMYCCAB", + "KAUilwEKEURldmljZUluZm9ybWF0aW9uEhAKCGRldmljZUlkGAEgASgDEhIK", + "CmRldmljZU5hbWUYAiABKAkSFQoNY2xpZW50VmVyc2lvbhgDIAEoCRIRCgls", + "YXN0TG9naW4YBCABKAMSMgoMZGV2aWNlU3RhdHVzGAUgASgOMhwuQXV0aGVu", + "dGljYXRpb24uRGV2aWNlU3RhdHVzIioKC1VzZXJTZXR0aW5nEgwKBG5hbWUY", + "ASABKAkSDQoFdmFsdWUYAiABKAgiLgoSVXNlckRhdGFLZXlSZXF1ZXN0EhgK", + "EGVudGVycHJpc2VVc2VySWQYASADKAMigAEKG0VudGVycHJpc2VVc2VySWRE", + "YXRhS2V5UGFpchIYChBlbnRlcnByaXNlVXNlcklkGAEgASgDEhgKEGVuY3J5", + "cHRlZERhdGFLZXkYAiABKAwSLQoHa2V5VHlwZRgDIAEoDjIcLkVudGVycHJp", + "c2UuRW5jcnlwdGVkS2V5VHlwZSKVAQoLVXNlckRhdGFLZXkSDgoGcm9sZUlk", + "GAEgASgDEg8KB3JvbGVLZXkYAiABKAwSEgoKcHJpdmF0ZUtleRgDIAEoCRJR", + "ChxlbnRlcnByaXNlVXNlcklkRGF0YUtleVBhaXJzGAQgAygLMisuQXV0aGVu", + "dGljYXRpb24uRW50ZXJwcmlzZVVzZXJJZERhdGFLZXlQYWlyInoKE1VzZXJE", + "YXRhS2V5UmVzcG9uc2USMQoMdXNlckRhdGFLZXlzGAEgAygLMhsuQXV0aGVu", + "dGljYXRpb24uVXNlckRhdGFLZXkSFAoMYWNjZXNzRGVuaWVkGAIgAygDEhoK", + "Em5vRW5jcnlwdGVkRGF0YUtleRgDIAMoAyJICilNYXN0ZXJQYXNzd29yZFJl", + "Y292ZXJ5VmVyaWZpY2F0aW9uUmVxdWVzdBIbChNlbmNyeXB0ZWRMb2dpblRv", + "a2VuGAEgASgMIlUKHEdldFNlY3VyaXR5UXVlc3Rpb25WM1JlcXVlc3QSGwoT", + "ZW5jcnlwdGVkTG9naW5Ub2tlbhgBIAEoDBIYChB2ZXJpZmljYXRpb25Db2Rl", + "GAIgASgJInIKHUdldFNlY3VyaXR5UXVlc3Rpb25WM1Jlc3BvbnNlEhgKEHNl", + "Y3VyaXR5UXVlc3Rpb24YASABKAkSFQoNYmFja3VwS2V5RGF0ZRgCIAEoAxIM", + "CgRzYWx0GAMgASgMEhIKCml0ZXJhdGlvbnMYBCABKAUibgoZR2V0RGF0YUtl", + "eUJhY2t1cFYzUmVxdWVzdBIbChNlbmNyeXB0ZWRMb2dpblRva2VuGAEgASgM", + "EhgKEHZlcmlmaWNhdGlvbkNvZGUYAiABKAkSGgoSc2VjdXJpdHlBbnN3ZXJI", + "YXNoGAMgASgMInYKDVBhc3N3b3JkUnVsZXMSEAoIcnVsZVR5cGUYASABKAkS", + "DQoFbWF0Y2gYAiABKAgSDwoHcGF0dGVybhgDIAEoCRITCgtkZXNjcmlwdGlv", + "bhgEIAEoCRIPCgdtaW5pbXVtGAUgASgFEg0KBXZhbHVlGAYgASgJIskCChpH", + "ZXREYXRhS2V5QmFja3VwVjNSZXNwb25zZRIVCg1kYXRhS2V5QmFja3VwGAEg", + "ASgMEhkKEWRhdGFLZXlCYWNrdXBEYXRlGAIgASgDEhEKCXB1YmxpY0tleRgD", + "IAEoDBIbChNlbmNyeXB0ZWRQcml2YXRlS2V5GAQgASgMEhEKCWNsaWVudEtl", + "eRgFIAEoDBIdChVlbmNyeXB0ZWRTZXNzaW9uVG9rZW4YBiABKAwSNAoNcGFz", + "c3dvcmRSdWxlcxgHIAMoCzIdLkF1dGhlbnRpY2F0aW9uLlBhc3N3b3JkUnVs", + "ZXMSGgoScGFzc3dvcmRSdWxlc0ludHJvGAggASgJEh8KF21pbmltdW1QYmtk", + "ZjJJdGVyYXRpb25zGAkgASgFEiQKB2tleVR5cGUYCiABKA4yEy5FbnRlcnBy", + "aXNlLktleVR5cGUiKQoUR2V0UHVibGljS2V5c1JlcXVlc3QSEQoJdXNlcm5h", + "bWVzGAEgAygJInIKEVB1YmxpY0tleVJlc3BvbnNlEhAKCHVzZXJuYW1lGAEg", + "ASgJEhEKCXB1YmxpY0tleRgCIAEoDBIUCgxwdWJsaWNFY2NLZXkYAyABKAwS", + "DwoHbWVzc2FnZRgEIAEoCRIRCgllcnJvckNvZGUYBSABKAkiUAoVR2V0UHVi", + "bGljS2V5c1Jlc3BvbnNlEjcKDGtleVJlc3BvbnNlcxgBIAMoCzIhLkF1dGhl", + "bnRpY2F0aW9uLlB1YmxpY0tleVJlc3BvbnNlIkYKFFNldEVjY0tleVBhaXJS", + "ZXF1ZXN0EhEKCXB1YmxpY0tleRgBIAEoDBIbChNlbmNyeXB0ZWRQcml2YXRl", + "S2V5GAIgASgMIkkKFVNldEVjY0tleVBhaXJzUmVxdWVzdBIwCgh0ZWFtS2V5", + "cxgBIAMoCzIeLkF1dGhlbnRpY2F0aW9uLlRlYW1FY2NLZXlQYWlyIlIKFlNl", + "dEVjY0tleVBhaXJzUmVzcG9uc2USOAoIdGVhbUtleXMYASADKAsyJi5BdXRo", + "ZW50aWNhdGlvbi5UZWFtRWNjS2V5UGFpclJlc3BvbnNlIlEKDlRlYW1FY2NL", + "ZXlQYWlyEg8KB3RlYW1VaWQYASABKAwSEQoJcHVibGljS2V5GAIgASgMEhsK", + "E2VuY3J5cHRlZFByaXZhdGVLZXkYAyABKAwiWAoWVGVhbUVjY0tleVBhaXJS", + "ZXNwb25zZRIPCgd0ZWFtVWlkGAEgASgMEi0KBnN0YXR1cxgCIAEoDjIdLkF1", + "dGhlbnRpY2F0aW9uLkdlbmVyaWNTdGF0dXMiRAoXR2V0S3NtUHVibGljS2V5", + "c1JlcXVlc3QSEQoJY2xpZW50SWRzGAEgAygMEhYKDmNvbnRyb2xsZXJVaWRz", + "GAIgAygMIlUKF0RldmljZVB1YmxpY0tleVJlc3BvbnNlEhAKCGNsaWVudElk", + "GAEgASgMEhEKCXB1YmxpY0tleRgCIAEoDBIVCg1jb250cm9sbGVyVWlkGAMg", + "ASgMIlkKGEdldEtzbVB1YmxpY0tleXNSZXNwb25zZRI9CgxrZXlSZXNwb25z", + "ZXMYASADKAsyJy5BdXRoZW50aWNhdGlvbi5EZXZpY2VQdWJsaWNLZXlSZXNw", + "b25zZSJYChNBZGRBcHBTaGFyZXNSZXF1ZXN0EhQKDGFwcFJlY29yZFVpZBgB", + "IAEoDBIrCgZzaGFyZXMYAiADKAsyGy5BdXRoZW50aWNhdGlvbi5BcHBTaGFy", + "ZUFkZCI+ChZSZW1vdmVBcHBTaGFyZXNSZXF1ZXN0EhQKDGFwcFJlY29yZFVp", + "ZBgBIAEoDBIOCgZzaGFyZXMYAiADKAwihwEKC0FwcFNoYXJlQWRkEhEKCXNl", + "Y3JldFVpZBgCIAEoDBI3CglzaGFyZVR5cGUYAyABKA4yJC5BdXRoZW50aWNh", + "dGlvbi5BcHBsaWNhdGlvblNoYXJlVHlwZRIaChJlbmNyeXB0ZWRTZWNyZXRL", + "ZXkYBCABKAwSEAoIZWRpdGFibGUYBSABKAgiewoIQXBwU2hhcmUSEQoJc2Vj", + "cmV0VWlkGAEgASgMEjcKCXNoYXJlVHlwZRgCIAEoDjIkLkF1dGhlbnRpY2F0", + "aW9uLkFwcGxpY2F0aW9uU2hhcmVUeXBlEhAKCGVkaXRhYmxlGAMgASgIEhEK", + "CWNyZWF0ZWRPbhgEIAEoAyLZAQoTQWRkQXBwQ2xpZW50UmVxdWVzdBIUCgxh", + "cHBSZWNvcmRVaWQYASABKAwSFwoPZW5jcnlwdGVkQXBwS2V5GAIgASgMEhAK", + "CGNsaWVudElkGAMgASgMEg4KBmxvY2tJcBgEIAEoCBIbChNmaXJzdEFjY2Vz", + "c0V4cGlyZU9uGAUgASgDEhYKDmFjY2Vzc0V4cGlyZU9uGAYgASgDEgoKAmlk", + "GAcgASgJEjAKDWFwcENsaWVudFR5cGUYCCABKA4yGS5FbnRlcnByaXNlLkFw", + "cENsaWVudFR5cGUiQAoXUmVtb3ZlQXBwQ2xpZW50c1JlcXVlc3QSFAoMYXBw", + "UmVjb3JkVWlkGAEgASgMEg8KB2NsaWVudHMYAiADKAwilgEKF0FkZEV4dGVy", + "bmFsU2hhcmVSZXF1ZXN0EhEKCXJlY29yZFVpZBgBIAEoDBIaChJlbmNyeXB0", + "ZWRSZWNvcmRLZXkYAiABKAwSEAoIY2xpZW50SWQYAyABKAwSFgoOYWNjZXNz", + "RXhwaXJlT24YBCABKAMSCgoCaWQYBSABKAkSFgoOaXNTZWxmRGVzdHJ1Y3QY", + "BiABKAgiggIKCUFwcENsaWVudBIKCgJpZBgBIAEoCRIQCghjbGllbnRJZBgC", + "IAEoDBIRCgljcmVhdGVkT24YAyABKAMSEwoLZmlyc3RBY2Nlc3MYBCABKAMS", + "EgoKbGFzdEFjY2VzcxgFIAEoAxIRCglwdWJsaWNLZXkYBiABKAwSDgoGbG9j", + "a0lwGAcgASgIEhEKCWlwQWRkcmVzcxgIIAEoCRIbChNmaXJzdEFjY2Vzc0V4", + "cGlyZU9uGAkgASgDEhYKDmFjY2Vzc0V4cGlyZU9uGAogASgDEjAKDWFwcENs", + "aWVudFR5cGUYCyABKA4yGS5FbnRlcnByaXNlLkFwcENsaWVudFR5cGUiKQoR", + "R2V0QXBwSW5mb1JlcXVlc3QSFAoMYXBwUmVjb3JkVWlkGAEgAygMIo4BCgdB", + "cHBJbmZvEhQKDGFwcFJlY29yZFVpZBgBIAEoDBIoCgZzaGFyZXMYAiADKAsy", + "GC5BdXRoZW50aWNhdGlvbi5BcHBTaGFyZRIqCgdjbGllbnRzGAMgAygLMhku", + "QXV0aGVudGljYXRpb24uQXBwQ2xpZW50EhcKD2lzRXh0ZXJuYWxTaGFyZRgE", + "IAEoCCI+ChJHZXRBcHBJbmZvUmVzcG9uc2USKAoHYXBwSW5mbxgBIAMoCzIX", + "LkF1dGhlbnRpY2F0aW9uLkFwcEluZm8isgEKEkFwcGxpY2F0aW9uU3VtbWFy", + "eRIUCgxhcHBSZWNvcmRVaWQYASABKAwSEgoKbGFzdEFjY2VzcxgCIAEoAxIU", + "CgxyZWNvcmRTaGFyZXMYAyABKAUSFAoMZm9sZGVyU2hhcmVzGAQgASgFEhUK", + "DWZvbGRlclJlY29yZHMYBSABKAUSEwoLY2xpZW50Q291bnQYBiABKAUSGgoS", + "ZXhwaXJlZENsaWVudENvdW50GAcgASgFImAKHkdldEFwcGxpY2F0aW9uc1N1", + "bW1hcnlSZXNwb25zZRI+ChJhcHBsaWNhdGlvblN1bW1hcnkYASADKAsyIi5B", + "dXRoZW50aWNhdGlvbi5BcHBsaWNhdGlvblN1bW1hcnkiLwobR2V0VmVyaWZp", + "Y2F0aW9uVG9rZW5SZXF1ZXN0EhAKCHVzZXJuYW1lGAEgASgJIkIKHEdldFZl", + "cmlmaWNhdGlvblRva2VuUmVzcG9uc2USIgoaZW5jcnlwdGVkVmVyaWZpY2F0", + "aW9uVG9rZW4YASABKAwiJwoWU2VuZFNoYXJlSW52aXRlUmVxdWVzdBINCgVl", + "bWFpbBgBIAEoCSIrChZSZXF1ZXN0RG93bmxvYWRSZXF1ZXN0EhEKCWZpbGVO", + "YW1lcxgBIAMoCSJnChdSZXF1ZXN0RG93bmxvYWRSZXNwb25zZRIOCgZyZXN1", + "bHQYASABKAkSDwoHbWVzc2FnZRgCIAEoCRIrCglkb3dubG9hZHMYAyADKAsy", + "GC5BdXRoZW50aWNhdGlvbi5Eb3dubG9hZCJECghEb3dubG9hZBIQCghmaWxl", + "TmFtZRgBIAEoCRILCgN1cmwYAiABKAkSGQoRc3VjY2Vzc1N0YXR1c0NvZGUY", + "AyABKAUiIwoRRGVsZXRlVXNlclJlcXVlc3QSDgoGcmVhc29uGAEgASgJIoQB", + "ChtDaGFuZ2VNYXN0ZXJQYXNzd29yZFJlcXVlc3QSFAoMYXV0aFZlcmlmaWVy", + "GAEgASgMEhgKEGVuY3J5cHRpb25QYXJhbXMYAiABKAwSGwoTZnJvbVNlcnZp", + "Y2VQcm92aWRlchgDIAEoCBIYChBpdGVyYXRpb25zQ2hhbmdlGAQgASgIIj0K", + "HENoYW5nZU1hc3RlclBhc3N3b3JkUmVzcG9uc2USHQoVZW5jcnlwdGVkU2Vz", + "c2lvblRva2VuGAEgASgMIlkKG0FjY291bnRSZWNvdmVyeVNldHVwUmVxdWVz", + "dBIgChhyZWNvdmVyeUVuY3J5cHRlZERhdGFLZXkYASABKAwSGAoQcmVjb3Zl", + "cnlBdXRoSGFzaBgCIAEoDCKsAQohQWNjb3VudFJlY292ZXJ5VmVyaWZ5Q29k", + "ZVJlc3BvbnNlEjQKDWJhY2t1cEtleVR5cGUYASABKA4yHS5BdXRoZW50aWNh", + "dGlvbi5CYWNrdXBLZXlUeXBlEhUKDWJhY2t1cEtleURhdGUYAiABKAMSGAoQ", + "c2VjdXJpdHlRdWVzdGlvbhgDIAEoCRIMCgRzYWx0GAQgASgMEhIKCml0ZXJh", + "dGlvbnMYBSABKAUiLAobRW1lcmdlbmN5QWNjZXNzTG9naW5SZXF1ZXN0Eg0K", + "BW93bmVyGAEgASgJIrUBChxFbWVyZ2VuY3lBY2Nlc3NMb2dpblJlc3BvbnNl", + "EhQKDHNlc3Npb25Ub2tlbhgBIAEoDBIlCgdkYXRhS2V5GAIgASgLMhQuRW50", + "ZXJwcmlzZS5UeXBlZEtleRIrCg1yc2FQcml2YXRlS2V5GAMgASgLMhQuRW50", + "ZXJwcmlzZS5UeXBlZEtleRIrCg1lY2NQcml2YXRlS2V5GAQgASgLMhQuRW50", + "ZXJwcmlzZS5UeXBlZEtleSKyAQoLVXNlclRlYW1LZXkSDwoHdGVhbVVpZBgB", + "IAEoDBIQCgh1c2VybmFtZRgCIAEoCRIYChBlbnRlcnByaXNlVXNlcklkGAMg", + "ASgDEhsKE2VuY3J5cHRlZFRlYW1LZXlSU0EYBCABKAwSGgoSZW5jcnlwdGVk", + "VGVhbUtleUVDGAUgASgMEi0KBnN0YXR1cxgGIAEoDjIdLkF1dGhlbnRpY2F0", + "aW9uLkdlbmVyaWNTdGF0dXMiKQoWR2VuZXJpY1JlcXVlc3RSZXNwb25zZRIP", + "CgdyZXF1ZXN0GAEgAygMKrkCChFTdXBwb3J0ZWRMYW5ndWFnZRILCgdFTkdM", + "SVNIEAASCgoGQVJBQklDEAESCwoHQlJJVElTSBACEgsKB0NISU5FU0UQAxIV", + "ChFDSElORVNFX0hPTkdfS09ORxAEEhIKDkNISU5FU0VfVEFJV0FOEAUSCQoF", + "RFVUQ0gQBhIKCgZGUkVOQ0gQBxIKCgZHRVJNQU4QCBIJCgVHUkVFSxAJEgoK", + "BkhFQlJFVxAKEgsKB0lUQUxJQU4QCxIMCghKQVBBTkVTRRAMEgoKBktPUkVB", + "ThANEgoKBlBPTElTSBAOEg4KClBPUlRVR1VFU0UQDxIVChFQT1JUVUdVRVNF", + "X0JSQVpJTBAQEgwKCFJPTUFOSUFOEBESCwoHUlVTU0lBThASEgoKBlNMT1ZB", + "SxATEgsKB1NQQU5JU0gQFCpaCglMb2dpblR5cGUSCgoGTk9STUFMEAASBwoD", + "U1NPEAESBwoDQklPEAISDQoJQUxURVJOQVRFEAMSCwoHT0ZGTElORRAEEhMK", + "D0ZPUkdPVF9QQVNTV09SRBAFKnEKDERldmljZVN0YXR1cxIZChVERVZJQ0Vf", + "TkVFRFNfQVBQUk9WQUwQABINCglERVZJQ0VfT0sQARIbChdERVZJQ0VfRElT", + "QUJMRURfQllfVVNFUhACEhoKFkRFVklDRV9MT0NLRURfQllfQURNSU4QAypB", + "Cg1MaWNlbnNlU3RhdHVzEgkKBU9USEVSEAASCgoGQUNUSVZFEAESCwoHRVhQ", + "SVJFRBACEgwKCERJU0FCTEVEEAMqNwoLQWNjb3VudFR5cGUSDAoIQ09OU1VN", + "RVIQABIKCgZGQU1JTFkQARIOCgpFTlRFUlBSSVNFEAIqnwIKEFNlc3Npb25U", + "b2tlblR5cGUSEgoOTk9fUkVTVFJJQ1RJT04QABIUChBBQ0NPVU5UX1JFQ09W", + "RVJZEAESEQoNU0hBUkVfQUNDT1VOVBACEgwKCFBVUkNIQVNFEAMSDAoIUkVT", + "VFJJQ1QQBBIRCg1BQ0NFUFRfSU5WSVRFEAUSEgoOU1VQUE9SVF9TRVJWRVIQ", + "BhIXChNFTlRFUlBSSVNFX0NSRUFUSU9OEAcSHwobRVhQSVJFRF9CVVRfQUxM", + "T1dFRF9UT19TWU5DEAgSGAoUQUNDRVBUX0ZBTUlMWV9JTlZJVEUQCRIhCh1F", + "TlRFUlBSSVNFX0NSRUFUSU9OX1BVUkNIQVNFRBAKEhQKEEVNRVJHRU5DWV9B", + "Q0NFU1MQCypHCgdWZXJzaW9uEhMKD2ludmFsaWRfdmVyc2lvbhAAEhMKD2Rl", + "ZmF1bHRfdmVyc2lvbhABEhIKDnNlY29uZF92ZXJzaW9uEAIqNwofTWFzdGVy", + "UGFzc3dvcmRSZWVudHJ5QWN0aW9uVHlwZRIKCgZVTk1BU0sQABIICgRDT1BZ", + "EAEqbAoLTG9naW5NZXRob2QSFwoTSU5WQUxJRF9MT0dJTk1FVEhPRBAAEhQK", + "EEVYSVNUSU5HX0FDQ09VTlQQARIOCgpTU09fRE9NQUlOEAISDQoJQUZURVJf", + "U1NPEAMSDwoLTkVXX0FDQ09VTlQQBCrHAwoKTG9naW5TdGF0ZRIWChJJTlZB", + "TElEX0xPR0lOU1RBVEUQABIOCgpMT0dHRURfT1VUEAESHAoYREVWSUNFX0FQ", + "UFJPVkFMX1JFUVVJUkVEEAISEQoNREVWSUNFX0xPQ0tFRBADEhIKDkFDQ09V", + "TlRfTE9DS0VEEAQSGQoVREVWSUNFX0FDQ09VTlRfTE9DS0VEEAUSCwoHVVBH", + "UkFERRAGEhMKD0xJQ0VOU0VfRVhQSVJFRBAHEhMKD1JFR0lPTl9SRURJUkVD", + "VBAIEhYKElJFRElSRUNUX0NMT1VEX1NTTxAJEhcKE1JFRElSRUNUX09OU0lU", + "RV9TU08QChIQCgxSRVFVSVJFU18yRkEQDBIWChJSRVFVSVJFU19BVVRIX0hB", + "U0gQDRIVChFSRVFVSVJFU19VU0VSTkFNRRAOEhkKFUFGVEVSX0NMT1VEX1NT", + "T19MT0dJThAPEh0KGVJFUVVJUkVTX0FDQ09VTlRfQ1JFQVRJT04QEBImCiJS", + "RVFVSVJFU19ERVZJQ0VfRU5DUllQVEVEX0RBVEFfS0VZEBESFwoTTE9HSU5f", + "VE9LRU5fRVhQSVJFRBASEg0KCUxPR0dFRF9JThBjKmsKFEVuY3J5cHRlZERh", + "dGFLZXlUeXBlEgoKBk5PX0tFWRAAEhgKFEJZX0RFVklDRV9QVUJMSUNfS0VZ", + "EAESDwoLQllfUEFTU1dPUkQQAhIQCgxCWV9BTFRFUk5BVEUQAxIKCgZCWV9C", + "SU8QBCotCg5QYXNzd29yZE1ldGhvZBILCgdFTlRFUkVEEAASDgoKQklPTUVU", + "UklDUxABKrkBChFUd29GYWN0b3JQdXNoVHlwZRIUChBUV09fRkFfUFVTSF9O", + "T05FEAASEwoPVFdPX0ZBX1BVU0hfU01TEAESFgoSVFdPX0ZBX1BVU0hfS0VF", + "UEVSEAISGAoUVFdPX0ZBX1BVU0hfRFVPX1BVU0gQAxIYChRUV09fRkFfUFVT", + "SF9EVU9fVEVYVBAEEhgKFFRXT19GQV9QVVNIX0RVT19DQUxMEAUSEwoPVFdP", + "X0ZBX1BVU0hfRE5BEAYqwwEKElR3b0ZhY3RvclZhbHVlVHlwZRIUChBUV09f", + "RkFfQ09ERV9OT05FEAASFAoQVFdPX0ZBX0NPREVfVE9UUBABEhMKD1RXT19G", + "QV9DT0RFX1NNUxACEhMKD1RXT19GQV9DT0RFX0RVTxADEhMKD1RXT19GQV9D", + "T0RFX1JTQRAEEhMKD1RXT19GQV9SRVNQX1UyRhAFEhgKFFRXT19GQV9SRVNQ", + "X1dFQkFVVEhOEAYSEwoPVFdPX0ZBX0NPREVfRE5BEAcq4QEKFFR3b0ZhY3Rv", + "ckNoYW5uZWxUeXBlEhIKDlRXT19GQV9DVF9OT05FEAASEgoOVFdPX0ZBX0NU", + "X1RPVFAQARIRCg1UV09fRkFfQ1RfU01TEAISEQoNVFdPX0ZBX0NUX0RVTxAD", + "EhEKDVRXT19GQV9DVF9SU0EQBBIUChBUV09fRkFfQ1RfQkFDS1VQEAUSEQoN", + "VFdPX0ZBX0NUX1UyRhAGEhYKElRXT19GQV9DVF9XRUJBVVRIThAHEhQKEFRX", + "T19GQV9DVF9LRUVQRVIQCBIRCg1UV09fRkFfQ1RfRE5BEAkqqwEKE1R3b0Zh", + "Y3RvckV4cGlyYXRpb24SGgoWVFdPX0ZBX0VYUF9JTU1FRElBVEVMWRAAEhgK", + "FFRXT19GQV9FWFBfNV9NSU5VVEVTEAESFwoTVFdPX0ZBX0VYUF8xMl9IT1VS", + "UxACEhcKE1RXT19GQV9FWFBfMjRfSE9VUlMQAxIWChJUV09fRkFfRVhQXzMw", + "X0RBWVMQBBIUChBUV09fRkFfRVhQX05FVkVSEAUqQAoLTGljZW5zZVR5cGUS", + "CQoFVkFVTFQQABIICgRDSEFUEAESCwoHU1RPUkFHRRACEg8KC0JSRUFDSFdB", + "VENIEAMqaQoLT2JqZWN0VHlwZXMSCgoGUkVDT1JEEAASFgoSU0hBUkVEX0ZP", + "TERFUl9VU0VSEAESFgoSU0hBUkVEX0ZPTERFUl9URUFNEAISDwoLVVNFUl9G", + "T0xERVIQAxINCglURUFNX1VTRVIQBCqhAgoTRW5jcnlwdGVkT2JqZWN0VHlw", + "ZRITCg9FT1RfVU5TUEVDSUZJRUQQABISCg5FT1RfUkVDT1JEX0tFWRABEh4K", + "GkVPVF9TSEFSRURfRk9MREVSX1VTRVJfS0VZEAISHgoaRU9UX1NIQVJFRF9G", + "T0xERVJfVEVBTV9LRVkQAxIVChFFT1RfVEVBTV9VU0VSX0tFWRAEEhcKE0VP", + "VF9VU0VSX0ZPTERFUl9LRVkQBRIVChFFT1RfU0VDVVJJVFlfREFUQRAGEiUK", + "IUVPVF9TRUNVUklUWV9EQVRBX01BU1RFUl9QQVNTV09SRBAHEhwKGEVPVF9F", + "TUVSR0VOQ1lfQUNDRVNTX0tFWRAIEhUKEUVPVF9WMl9SRUNPUkRfS0VZEAkq", + "TQobTWFzdGVyUGFzc3dvcmRSZWVudHJ5U3RhdHVzEg4KCk1QX1VOS05PV04Q", + "ABIOCgpNUF9TVUNDRVNTEAESDgoKTVBfRkFJTFVSRRACKmAKG0FsdGVybmF0", + "ZUF1dGhlbnRpY2F0aW9uVHlwZRIdChlBTFRFUk5BVEVfTUFTVEVSX1BBU1NX", + "T1JEEAASDQoJQklPTUVUUklDEAESEwoPQUNDT1VOVF9SRUNPVkVSEAIqmgIK", + "DFRocm90dGxlVHlwZRIbChdQQVNTV09SRF9SRVRSWV9USFJPVFRMRRAAEiIK", + "HlBBU1NXT1JEX1JFVFJZX0xFR0FDWV9USFJPVFRMRRABEhMKD1RXT19GQV9U", + "SFJPVFRMRRACEhoKFlRXT19GQV9MRUdBQ1lfVEhST1RUTEUQAxIVChFRQV9S", + "RVRSWV9USFJPVFRMRRAEEhwKGEFDQ09VTlRfUkVDT1ZFUl9USFJPVFRMRRAF", + "Ei4KKlZBTElEQVRFX0RFVklDRV9WRVJJRklDQVRJT05fQ09ERV9USFJPVFRM", + "RRAGEjMKL1ZBTElEQVRFX0NSRUFURV9VU0VSX1ZFUklGSUNBVElPTl9DT0RF", + "X1RIUk9UVExFEAcqSAoGUmVnaW9uEgsKB1VOS05PV04QABIGCgJldRABEgYK", + "AnVzEAISCQoFdXNnb3YQAxIGCgJhdRAEEgYKAmpwEAUSBgoCY2EQBipEChRB", + "cHBsaWNhdGlvblNoYXJlVHlwZRIVChFTSEFSRV9UWVBFX1JFQ09SRBAAEhUK", + "EVNIQVJFX1RZUEVfRk9MREVSEAEqPAoNQmFja3VwS2V5VHlwZRISCg5CS1Rf", + "U0VDX0FOU1dFUhAAEhcKE0JLVF9QQVNTUEhSQVNFX0hBU0gQASpXCg1HZW5l", + "cmljU3RhdHVzEgsKB1NVQ0NFU1MQABISCg5JTlZBTElEX09CSkVDVBABEhIK", + "DkFMUkVBRFlfRVhJU1RTEAISEQoNQUNDRVNTX0RFTklFRBADQioKGGNvbS5r", + "ZWVwZXJzZWN1cml0eS5wcm90b0IOQXV0aGVudGljYXRpb25iBnByb3RvMw==")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Enterprise.EnterpriseReflection.Descriptor, }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Authentication.SupportedLanguage), typeof(global::Authentication.LoginType), typeof(global::Authentication.DeviceStatus), typeof(global::Authentication.LicenseStatus), typeof(global::Authentication.AccountType), typeof(global::Authentication.SessionTokenType), typeof(global::Authentication.Version), typeof(global::Authentication.MasterPasswordReentryActionType), typeof(global::Authentication.LoginMethod), typeof(global::Authentication.LoginState), typeof(global::Authentication.EncryptedDataKeyType), typeof(global::Authentication.PasswordMethod), typeof(global::Authentication.TwoFactorPushType), typeof(global::Authentication.TwoFactorValueType), typeof(global::Authentication.TwoFactorChannelType), typeof(global::Authentication.TwoFactorExpiration), typeof(global::Authentication.LicenseType), typeof(global::Authentication.ObjectTypes), typeof(global::Authentication.AlternateAuthenticationType), typeof(global::Authentication.ThrottleType), typeof(global::Authentication.Region), typeof(global::Authentication.ApplicationShareType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Authentication.SupportedLanguage), typeof(global::Authentication.LoginType), typeof(global::Authentication.DeviceStatus), typeof(global::Authentication.LicenseStatus), typeof(global::Authentication.AccountType), typeof(global::Authentication.SessionTokenType), typeof(global::Authentication.Version), typeof(global::Authentication.MasterPasswordReentryActionType), typeof(global::Authentication.LoginMethod), typeof(global::Authentication.LoginState), typeof(global::Authentication.EncryptedDataKeyType), typeof(global::Authentication.PasswordMethod), typeof(global::Authentication.TwoFactorPushType), typeof(global::Authentication.TwoFactorValueType), typeof(global::Authentication.TwoFactorChannelType), typeof(global::Authentication.TwoFactorExpiration), typeof(global::Authentication.LicenseType), typeof(global::Authentication.ObjectTypes), typeof(global::Authentication.EncryptedObjectType), typeof(global::Authentication.MasterPasswordReentryStatus), typeof(global::Authentication.AlternateAuthenticationType), typeof(global::Authentication.ThrottleType), typeof(global::Authentication.Region), typeof(global::Authentication.ApplicationShareType), typeof(global::Authentication.BackupKeyType), typeof(global::Authentication.GenericStatus), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ApiRequest), global::Authentication.ApiRequest.Parser, new[]{ "EncryptedTransmissionKey", "PublicKeyId", "Locale", "EncryptedPayload", "EncryptionType", "Recaptcha", "SubEnvironment" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ApiRequestPayload), global::Authentication.ApiRequestPayload.Parser, new[]{ "Payload", "EncryptedSessionToken", "TimeToken", "ApiVersion" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.Transform), global::Authentication.Transform.Parser, new[]{ "Key", "EncryptedDeviceToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceRequest), global::Authentication.DeviceRequest.Parser, new[]{ "ClientVersion", "DeviceName" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AuthRequest), global::Authentication.AuthRequest.Parser, new[]{ "ClientVersion", "Username", "EncryptedDeviceToken" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.NewUserMinimumParams), global::Authentication.NewUserMinimumParams.Parser, new[]{ "MinimumIterations", "PasswordMatchRegex", "PasswordMatchDescription", "IsEnterpriseDomain" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.NewUserMinimumParams), global::Authentication.NewUserMinimumParams.Parser, new[]{ "MinimumIterations", "PasswordMatchRegex", "PasswordMatchDescription", "IsEnterpriseDomain", "EnterpriseEccPublicKey", "ForbidKeyType2" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.PreLoginRequest), global::Authentication.PreLoginRequest.Parser, new[]{ "AuthRequest", "LoginType", "TwoFactorToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.LoginRequest), global::Authentication.LoginRequest.Parser, new[]{ "AuthRequest", "LoginType", "AuthenticationHashPrime", "EncryptedLoginToken", "AuthResponse", "McEnterpriseId", "PushToken", "Platform" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceResponse), global::Authentication.DeviceResponse.Parser, new[]{ "EncryptedDeviceToken", "Status" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.Salt), global::Authentication.Salt.Parser, new[]{ "Iterations", "Salt_", "Algorithm", "Uid", "Name" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorChannel), global::Authentication.TwoFactorChannel.Parser, new[]{ "Type" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.StartLoginRequest), global::Authentication.StartLoginRequest.Parser, new[]{ "EncryptedDeviceToken", "Username", "ClientVersion", "MessageSessionUid", "EncryptedLoginToken", "LoginType", "McEnterpriseId", "LoginMethod", "ForceNewLogin", "CloneCode", "V2TwoFactorToken", "AccountUid" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.LoginResponse), global::Authentication.LoginResponse.Parser, new[]{ "LoginState", "AccountUid", "PrimaryUsername", "EncryptedDataKey", "EncryptedDataKeyType", "EncryptedLoginToken", "EncryptedSessionToken", "SessionTokenType", "Message", "Url", "Channels", "Salt", "CloneCode", "StateSpecificValue", "SsoClientVersion" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.LoginResponse), global::Authentication.LoginResponse.Parser, new[]{ "LoginState", "AccountUid", "PrimaryUsername", "EncryptedDataKey", "EncryptedDataKeyType", "EncryptedLoginToken", "EncryptedSessionToken", "SessionTokenType", "Message", "Url", "Channels", "Salt", "CloneCode", "StateSpecificValue", "SsoClientVersion", "SessionTokenTypeModifier" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SsoUserInfo), global::Authentication.SsoUserInfo.Parser, new[]{ "CompanyName", "SamlRequest", "SamlRequestType", "SsoDomainName", "LoginUrl", "LogoutUrl" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.PreLoginResponse), global::Authentication.PreLoginResponse.Parser, new[]{ "DeviceStatus", "Salt", "OBSOLETEFIELD", "SsoUserInfo" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.LoginAsUserRequest), global::Authentication.LoginAsUserRequest.Parser, new[]{ "Username" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.LoginAsUserResponse), global::Authentication.LoginAsUserResponse.Parser, new[]{ "EncryptedSessionToken", "EncryptedSharedAccountKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ValidateAuthHashRequest), global::Authentication.ValidateAuthHashRequest.Parser, new[]{ "PasswordMethod", "AuthResponse", "EncryptedLoginToken" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorChannelInfo), global::Authentication.TwoFactorChannelInfo.Parser, new[]{ "ChannelType", "ChannelUid", "ChannelName", "Challenge", "Capabilities", "PhoneNumber", "MaxExpiration" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorChannelInfo), global::Authentication.TwoFactorChannelInfo.Parser, new[]{ "ChannelType", "ChannelUid", "ChannelName", "Challenge", "Capabilities", "PhoneNumber", "MaxExpiration", "CreatedOn", "LastFrequency" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorDuoStatus), global::Authentication.TwoFactorDuoStatus.Parser, new[]{ "Capabilities", "PhoneNumber", "EnrollUrl", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorAddRequest), global::Authentication.TwoFactorAddRequest.Parser, new[]{ "ChannelType", "ChannelUid", "ChannelName", "PhoneNumber", "DuoPushType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorRenameRequest), global::Authentication.TwoFactorRenameRequest.Parser, new[]{ "ChannelUid", "ChannelName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorAddResponse), global::Authentication.TwoFactorAddResponse.Parser, new[]{ "Challenge", "BackupKeys" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorDeleteRequest), global::Authentication.TwoFactorDeleteRequest.Parser, new[]{ "ChannelUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorListResponse), global::Authentication.TwoFactorListResponse.Parser, new[]{ "Channels", "ExpireOn" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorUpdateExpirationRequest), global::Authentication.TwoFactorUpdateExpirationRequest.Parser, new[]{ "ExpireIn" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorValidateRequest), global::Authentication.TwoFactorValidateRequest.Parser, new[]{ "EncryptedLoginToken", "ValueType", "Value", "ChannelUid", "ExpireIn" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorValidateResponse), global::Authentication.TwoFactorValidateResponse.Parser, new[]{ "EncryptedLoginToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TwoFactorSendPushRequest), global::Authentication.TwoFactorSendPushRequest.Parser, new[]{ "EncryptedLoginToken", "PushType", "ChannelUid", "ExpireIn" }, null, null, null, null), @@ -402,28 +551,34 @@ static APIRequestReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeEmailResponse), global::Authentication.ChangeEmailResponse.Parser, new[]{ "EncryptedChangeEmailToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EmailVerificationLinkResponse), global::Authentication.EmailVerificationLinkResponse.Parser, new[]{ "EmailVerified" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityData), global::Authentication.SecurityData.Parser, new[]{ "Uid", "Data" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityDataRequest), global::Authentication.SecurityDataRequest.Parser, new[]{ "RecordSecurityData", "MasterPasswordSecurityData" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReportIncrementalData), global::Authentication.SecurityReportIncrementalData.Parser, new[]{ "EnterpriseUserId", "CurrentSecurityData", "CurrentSecurityDataRevision", "OldSecurityData", "OldSecurityDataRevision" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReport), global::Authentication.SecurityReport.Parser, new[]{ "EnterpriseUserId", "EncryptedReportData", "Revision", "TwoFactor", "LastLogin", "NumberOfReusedPassword", "SecurityReportIncrementalData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityDataRequest), global::Authentication.SecurityDataRequest.Parser, new[]{ "RecordSecurityData", "MasterPasswordSecurityData", "EncryptionType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReportIncrementalData), global::Authentication.SecurityReportIncrementalData.Parser, new[]{ "EnterpriseUserId", "CurrentSecurityData", "CurrentSecurityDataRevision", "OldSecurityData", "OldSecurityDataRevision", "CurrentDataEncryptionType", "OldDataEncryptionType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReport), global::Authentication.SecurityReport.Parser, new[]{ "EnterpriseUserId", "EncryptedReportData", "Revision", "TwoFactor", "LastLogin", "NumberOfReusedPassword", "SecurityReportIncrementalData", "UserId", "HasOldEncryption" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReportSaveRequest), global::Authentication.SecurityReportSaveRequest.Parser, new[]{ "SecurityReport" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReportRequest), global::Authentication.SecurityReportRequest.Parser, new[]{ "FromPage" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReportResponse), global::Authentication.SecurityReportResponse.Parser, new[]{ "EnterprisePrivateKey", "SecurityReport", "AsOfRevision", "FromPage", "ToPage", "Complete" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SecurityReportResponse), global::Authentication.SecurityReportResponse.Parser, new[]{ "EnterprisePrivateKey", "SecurityReport", "AsOfRevision", "FromPage", "ToPage", "Complete", "EnterpriseEccPrivateKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ReusedPasswordsRequest), global::Authentication.ReusedPasswordsRequest.Parser, new[]{ "Count" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SummaryConsoleReport), global::Authentication.SummaryConsoleReport.Parser, new[]{ "ReportType", "ReportData" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeToKeyTypeOne), global::Authentication.ChangeToKeyTypeOne.Parser, new[]{ "ObjectType", "PrimaryUid", "SecondaryUid", "Key" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeToKeyTypeOneRequest), global::Authentication.ChangeToKeyTypeOneRequest.Parser, new[]{ "ChangeToKeyTypeOne" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeToKeyTypeOneStatus), global::Authentication.ChangeToKeyTypeOneStatus.Parser, new[]{ "Uid", "Type", "Status", "Reason" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeToKeyTypeOneResponse), global::Authentication.ChangeToKeyTypeOneResponse.Parser, new[]{ "ChangeToKeyTypeOneStatus" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetChangeKeyTypesRequest), global::Authentication.GetChangeKeyTypesRequest.Parser, new[]{ "OnlyTheseObjects", "Limit", "IncludeRecommended", "IncludeKeys", "IncludeAllowedKeyTypes" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetChangeKeyTypesResponse), global::Authentication.GetChangeKeyTypesResponse.Parser, new[]{ "Keys", "AllowedKeyTypes" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AllowedKeyTypes), global::Authentication.AllowedKeyTypes.Parser, new[]{ "ObjectType", "AllowedKeyTypes_" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeKeyTypes), global::Authentication.ChangeKeyTypes.Parser, new[]{ "Keys" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeKeyType), global::Authentication.ChangeKeyType.Parser, new[]{ "ObjectType", "Uid", "SecondaryUid", "Key", "KeyType", "Status" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SetKey), global::Authentication.SetKey.Parser, new[]{ "Id", "Key" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SetKeyRequest), global::Authentication.SetKeyRequest.Parser, new[]{ "Keys" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.CreateUserRequest), global::Authentication.CreateUserRequest.Parser, new[]{ "Username", "AuthVerifier", "EncryptionParams", "RsaPublicKey", "RsaEncryptedPrivateKey", "EccPublicKey", "EccEncryptedPrivateKey", "EncryptedDeviceToken", "EncryptedClientKey", "ClientVersion", "EncryptedDeviceDataKey", "EncryptedLoginToken", "MessageSessionUid", "InstallReferrer", "MccMNC", "Mfg", "Model", "Brand", "Product", "Device", "Carrier", "VerificationCode", "EnterpriseRegistration", "EncryptedVerificationToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.CreateUserRequest), global::Authentication.CreateUserRequest.Parser, new[]{ "Username", "AuthVerifier", "EncryptionParams", "RsaPublicKey", "RsaEncryptedPrivateKey", "EccPublicKey", "EccEncryptedPrivateKey", "EncryptedDeviceToken", "EncryptedClientKey", "ClientVersion", "EncryptedDeviceDataKey", "EncryptedLoginToken", "MessageSessionUid", "InstallReferrer", "MccMNC", "Mfg", "Model", "Brand", "Product", "Device", "Carrier", "VerificationCode", "EnterpriseRegistration", "EncryptedVerificationToken", "EnterpriseUsersDataKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.NodeEnforcementAddOrUpdateRequest), global::Authentication.NodeEnforcementAddOrUpdateRequest.Parser, new[]{ "NodeId", "Enforcement", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.NodeEnforcementRemoveRequest), global::Authentication.NodeEnforcementRemoveRequest.Parser, new[]{ "NodeId", "Enforcement" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.UserAccounts), global::Authentication.UserAccounts.Parser, new[]{ "AccountUid" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ApiRequestByKey), global::Authentication.ApiRequestByKey.Parser, new[]{ "KeyId", "Payload", "Username", "Locale", "SupportedLanguage", "Type" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ApiRequestByKAtoKAKey), global::Authentication.ApiRequestByKAtoKAKey.Parser, new[]{ "SourceRegion", "Payload", "SupportedLanguage", "DestinationRegion" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.MemcacheRequest), global::Authentication.MemcacheRequest.Parser, new[]{ "Key", "UserId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.MemcacheResponse), global::Authentication.MemcacheResponse.Parser, new[]{ "Key", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.MasterPasswordReentryRequest), global::Authentication.MasterPasswordReentryRequest.Parser, new[]{ "Pbkdf2Password", "Action" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.MasterPasswordReentryResponse), global::Authentication.MasterPasswordReentryResponse.Parser, new[]{ "Status" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceRegistrationRequest), global::Authentication.DeviceRegistrationRequest.Parser, new[]{ "ClientVersion", "DeviceName", "DevicePublicKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceVerificationRequest), global::Authentication.DeviceVerificationRequest.Parser, new[]{ "EncryptedDeviceToken", "Username", "VerificationChannel", "MessageSessionUid", "ClientVersion" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceVerificationResponse), global::Authentication.DeviceVerificationResponse.Parser, new[]{ "EncryptedDeviceToken", "Username", "MessageSessionUid", "ClientVersion", "DeviceStatus" }, null, null, null, null), @@ -431,6 +586,10 @@ static APIRequestReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceApprovalResponse), global::Authentication.DeviceApprovalResponse.Parser, new[]{ "EncryptedTwoFactorToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ApproveDeviceRequest), global::Authentication.ApproveDeviceRequest.Parser, new[]{ "EncryptedDeviceToken", "EncryptedDeviceDataKey", "DenyApproval", "LinkDevice" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserAliasRequest), global::Authentication.EnterpriseUserAliasRequest.Parser, new[]{ "EnterpriseUserId", "Alias" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserAddAliasRequest), global::Authentication.EnterpriseUserAddAliasRequest.Parser, new[]{ "EnterpriseUserId", "Alias", "Primary" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserAddAliasRequestV2), global::Authentication.EnterpriseUserAddAliasRequestV2.Parser, new[]{ "EnterpriseUserAddAliasRequest" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserAddAliasStatus), global::Authentication.EnterpriseUserAddAliasStatus.Parser, new[]{ "EnterpriseUserId", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserAddAliasResponse), global::Authentication.EnterpriseUserAddAliasResponse.Parser, new[]{ "Status" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.Device), global::Authentication.Device.Parser, new[]{ "EncryptedDeviceToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.RegisterDeviceDataKeyRequest), global::Authentication.RegisterDeviceDataKeyRequest.Parser, new[]{ "EncryptedDeviceToken", "EncryptedDeviceDataKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ValidateCreateUserVerificationCodeRequest), global::Authentication.ValidateCreateUserVerificationCodeRequest.Parser, new[]{ "Username", "ClientVersion", "VerificationCode" }, null, null, null, null), @@ -446,7 +605,7 @@ static APIRequestReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeviceInformation), global::Authentication.DeviceInformation.Parser, new[]{ "DeviceId", "DeviceName", "ClientVersion", "LastLogin", "DeviceStatus" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.UserSetting), global::Authentication.UserSetting.Parser, new[]{ "Name", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.UserDataKeyRequest), global::Authentication.UserDataKeyRequest.Parser, new[]{ "EnterpriseUserId" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserIdDataKeyPair), global::Authentication.EnterpriseUserIdDataKeyPair.Parser, new[]{ "EnterpriseUserId", "EncryptedDataKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EnterpriseUserIdDataKeyPair), global::Authentication.EnterpriseUserIdDataKeyPair.Parser, new[]{ "EnterpriseUserId", "EncryptedDataKey", "KeyType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.UserDataKey), global::Authentication.UserDataKey.Parser, new[]{ "RoleId", "RoleKey", "PrivateKey", "EnterpriseUserIdDataKeyPairs" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.UserDataKeyResponse), global::Authentication.UserDataKeyResponse.Parser, new[]{ "UserDataKeys", "AccessDenied", "NoEncryptedDataKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.MasterPasswordRecoveryVerificationRequest), global::Authentication.MasterPasswordRecoveryVerificationRequest.Parser, new[]{ "EncryptedLoginToken" }, null, null, null, null), @@ -454,16 +613,46 @@ static APIRequestReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetSecurityQuestionV3Response), global::Authentication.GetSecurityQuestionV3Response.Parser, new[]{ "SecurityQuestion", "BackupKeyDate", "Salt", "Iterations" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetDataKeyBackupV3Request), global::Authentication.GetDataKeyBackupV3Request.Parser, new[]{ "EncryptedLoginToken", "VerificationCode", "SecurityAnswerHash" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.PasswordRules), global::Authentication.PasswordRules.Parser, new[]{ "RuleType", "Match", "Pattern", "Description", "Minimum", "Value" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetDataKeyBackupV3Response), global::Authentication.GetDataKeyBackupV3Response.Parser, new[]{ "DataKeyBackup", "DataKeyBackupDate", "PublicKey", "EncryptedPrivateKey", "ClientKey", "EncryptedSessionToken", "PasswordRules", "PasswordRulesIntro", "MinimumPbkdf2Iterations" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetDataKeyBackupV3Response), global::Authentication.GetDataKeyBackupV3Response.Parser, new[]{ "DataKeyBackup", "DataKeyBackupDate", "PublicKey", "EncryptedPrivateKey", "ClientKey", "EncryptedSessionToken", "PasswordRules", "PasswordRulesIntro", "MinimumPbkdf2Iterations", "KeyType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetPublicKeysRequest), global::Authentication.GetPublicKeysRequest.Parser, new[]{ "Usernames" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.PublicKeyResponse), global::Authentication.PublicKeyResponse.Parser, new[]{ "Username", "PublicKey", "PublicEccKey", "Message", "ErrorCode" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetPublicKeysResponse), global::Authentication.GetPublicKeysResponse.Parser, new[]{ "KeyResponses" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SetEccKeyPairRequest), global::Authentication.SetEccKeyPairRequest.Parser, new[]{ "PublicKey", "EncryptedPrivateKey" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AddAppShareRequest), global::Authentication.AddAppShareRequest.Parser, new[]{ "AppRecordUid", "SecretUid", "ShareType", "EncryptedSecretKey" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AddAppClientRequest), global::Authentication.AddAppClientRequest.Parser, new[]{ "AppRecordUid", "EncryptedMasterKey", "ClientId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SetEccKeyPairsRequest), global::Authentication.SetEccKeyPairsRequest.Parser, new[]{ "TeamKeys" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SetEccKeyPairsResponse), global::Authentication.SetEccKeyPairsResponse.Parser, new[]{ "TeamKeys" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TeamEccKeyPair), global::Authentication.TeamEccKeyPair.Parser, new[]{ "TeamUid", "PublicKey", "EncryptedPrivateKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.TeamEccKeyPairResponse), global::Authentication.TeamEccKeyPairResponse.Parser, new[]{ "TeamUid", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetKsmPublicKeysRequest), global::Authentication.GetKsmPublicKeysRequest.Parser, new[]{ "ClientIds", "ControllerUids" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DevicePublicKeyResponse), global::Authentication.DevicePublicKeyResponse.Parser, new[]{ "ClientId", "PublicKey", "ControllerUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetKsmPublicKeysResponse), global::Authentication.GetKsmPublicKeysResponse.Parser, new[]{ "KeyResponses" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AddAppSharesRequest), global::Authentication.AddAppSharesRequest.Parser, new[]{ "AppRecordUid", "Shares" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.RemoveAppSharesRequest), global::Authentication.RemoveAppSharesRequest.Parser, new[]{ "AppRecordUid", "Shares" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AppShareAdd), global::Authentication.AppShareAdd.Parser, new[]{ "SecretUid", "ShareType", "EncryptedSecretKey", "Editable" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AppShare), global::Authentication.AppShare.Parser, new[]{ "SecretUid", "ShareType", "Editable", "CreatedOn" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AddAppClientRequest), global::Authentication.AddAppClientRequest.Parser, new[]{ "AppRecordUid", "EncryptedAppKey", "ClientId", "LockIp", "FirstAccessExpireOn", "AccessExpireOn", "Id", "AppClientType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.RemoveAppClientsRequest), global::Authentication.RemoveAppClientsRequest.Parser, new[]{ "AppRecordUid", "Clients" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AddExternalShareRequest), global::Authentication.AddExternalShareRequest.Parser, new[]{ "RecordUid", "EncryptedRecordKey", "ClientId", "AccessExpireOn", "Id", "IsSelfDestruct" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AppClient), global::Authentication.AppClient.Parser, new[]{ "Id", "ClientId", "CreatedOn", "FirstAccess", "LastAccess", "PublicKey", "LockIp", "IpAddress", "FirstAccessExpireOn", "AccessExpireOn", "AppClientType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetAppInfoRequest), global::Authentication.GetAppInfoRequest.Parser, new[]{ "AppRecordUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AppInfo), global::Authentication.AppInfo.Parser, new[]{ "AppRecordUid", "Shares", "Clients", "IsExternalShare" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetAppInfoResponse), global::Authentication.GetAppInfoResponse.Parser, new[]{ "AppInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ApplicationSummary), global::Authentication.ApplicationSummary.Parser, new[]{ "AppRecordUid", "LastAccess", "RecordShares", "FolderShares", "FolderRecords", "ClientCount", "ExpiredClientCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetApplicationsSummaryResponse), global::Authentication.GetApplicationsSummaryResponse.Parser, new[]{ "ApplicationSummary" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetVerificationTokenRequest), global::Authentication.GetVerificationTokenRequest.Parser, new[]{ "Username" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GetVerificationTokenResponse), global::Authentication.GetVerificationTokenResponse.Parser, new[]{ "EncryptedVerificationToken" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SendShareInviteRequest), global::Authentication.SendShareInviteRequest.Parser, new[]{ "Email" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.SendShareInviteRequest), global::Authentication.SendShareInviteRequest.Parser, new[]{ "Email" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.RequestDownloadRequest), global::Authentication.RequestDownloadRequest.Parser, new[]{ "FileNames" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.RequestDownloadResponse), global::Authentication.RequestDownloadResponse.Parser, new[]{ "Result", "Message", "Downloads" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.Download), global::Authentication.Download.Parser, new[]{ "FileName", "Url", "SuccessStatusCode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.DeleteUserRequest), global::Authentication.DeleteUserRequest.Parser, new[]{ "Reason" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeMasterPasswordRequest), global::Authentication.ChangeMasterPasswordRequest.Parser, new[]{ "AuthVerifier", "EncryptionParams", "FromServiceProvider", "IterationsChange" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.ChangeMasterPasswordResponse), global::Authentication.ChangeMasterPasswordResponse.Parser, new[]{ "EncryptedSessionToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AccountRecoverySetupRequest), global::Authentication.AccountRecoverySetupRequest.Parser, new[]{ "RecoveryEncryptedDataKey", "RecoveryAuthHash" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.AccountRecoveryVerifyCodeResponse), global::Authentication.AccountRecoveryVerifyCodeResponse.Parser, new[]{ "BackupKeyType", "BackupKeyDate", "SecurityQuestion", "Salt", "Iterations" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EmergencyAccessLoginRequest), global::Authentication.EmergencyAccessLoginRequest.Parser, new[]{ "Owner" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.EmergencyAccessLoginResponse), global::Authentication.EmergencyAccessLoginResponse.Parser, new[]{ "SessionToken", "DataKey", "RsaPrivateKey", "EccPrivateKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.UserTeamKey), global::Authentication.UserTeamKey.Parser, new[]{ "TeamUid", "Username", "EnterpriseUserId", "EncryptedTeamKeyRSA", "EncryptedTeamKeyEC", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Authentication.GenericRequestResponse), global::Authentication.GenericRequestResponse.Parser, new[]{ "Request" }, null, null, null, null) })); } #endregion @@ -500,6 +689,7 @@ public enum LoginType { [pbr::OriginalName("BIO")] Bio = 2, [pbr::OriginalName("ALTERNATE")] Alternate = 3, [pbr::OriginalName("OFFLINE")] Offline = 4, + [pbr::OriginalName("FORGOT_PASSWORD")] ForgotPassword = 5, } public enum DeviceStatus { @@ -562,6 +752,15 @@ public enum SessionTokenType { /// for webapp /// [pbr::OriginalName("EXPIRED_BUT_ALLOWED_TO_SYNC")] ExpiredButAllowedToSync = 8, + /// + /// can only accept the family invite + /// + [pbr::OriginalName("ACCEPT_FAMILY_INVITE")] AcceptFamilyInvite = 9, + /// + /// user has purchased enterprise license but no enterprise created yet + /// + [pbr::OriginalName("ENTERPRISE_CREATION_PURCHASED")] EnterpriseCreationPurchased = 10, + [pbr::OriginalName("EMERGENCY_ACCESS")] EmergencyAccess = 11, } public enum Version { @@ -736,6 +935,54 @@ public enum ObjectTypes { [pbr::OriginalName("TEAM_USER")] TeamUser = 4, } + /// + /// See get_change_key_types and change_key_types. Replaces ObjectType. + /// + public enum EncryptedObjectType { + [pbr::OriginalName("EOT_UNSPECIFIED")] EotUnspecified = 0, + /// + /// Keys in record_ref and record_owner_key_history. uid is record UID. + /// + [pbr::OriginalName("EOT_RECORD_KEY")] EotRecordKey = 1, + /// + /// Keys in shared_folder_user. uid is shared folder UID. + /// + [pbr::OriginalName("EOT_SHARED_FOLDER_USER_KEY")] EotSharedFolderUserKey = 2, + /// + /// Keys in shared_folder_team. uid is shared folder UID; secondaryUid is + /// team UID. + /// + [pbr::OriginalName("EOT_SHARED_FOLDER_TEAM_KEY")] EotSharedFolderTeamKey = 3, + /// + /// Keys in team_user. uid is team UID. + /// + [pbr::OriginalName("EOT_TEAM_USER_KEY")] EotTeamUserKey = 4, + /// + /// Keys in user_folder. uid is the folder UID. + /// + [pbr::OriginalName("EOT_USER_FOLDER_KEY")] EotUserFolderKey = 5, + /// + /// Data in security_data. uid is the record UID. + /// + [pbr::OriginalName("EOT_SECURITY_DATA")] EotSecurityData = 6, + /// + /// Ignored/broken. + /// + [pbr::OriginalName("EOT_SECURITY_DATA_MASTER_PASSWORD")] EotSecurityDataMasterPassword = 7, + [pbr::OriginalName("EOT_EMERGENCY_ACCESS_KEY")] EotEmergencyAccessKey = 8, + /// + /// Keys in record_ref and record_owner_key_history for v2 records. uid is + /// record UID. + /// + [pbr::OriginalName("EOT_V2_RECORD_KEY")] EotV2RecordKey = 9, + } + + public enum MasterPasswordReentryStatus { + [pbr::OriginalName("MP_UNKNOWN")] MpUnknown = 0, + [pbr::OriginalName("MP_SUCCESS")] MpSuccess = 1, + [pbr::OriginalName("MP_FAILURE")] MpFailure = 2, + } + public enum AlternateAuthenticationType { [pbr::OriginalName("ALTERNATE_MASTER_PASSWORD")] AlternateMasterPassword = 0, [pbr::OriginalName("BIOMETRIC")] Biometric = 1, @@ -778,33 +1025,62 @@ public enum Region { /// Australia /// [pbr::OriginalName("au")] Au = 4, + /// + ///Japan + /// + [pbr::OriginalName("jp")] Jp = 5, + /// + ///Canada + /// + [pbr::OriginalName("ca")] Ca = 6, } public enum ApplicationShareType { - [pbr::OriginalName("SHT_RECORD")] ShtRecord = 0, - [pbr::OriginalName("SHT_FOLDER")] ShtFolder = 1, + [pbr::OriginalName("SHARE_TYPE_RECORD")] ShareTypeRecord = 0, + [pbr::OriginalName("SHARE_TYPE_FOLDER")] ShareTypeFolder = 1, + } + + public enum BackupKeyType { + [pbr::OriginalName("BKT_SEC_ANSWER")] BktSecAnswer = 0, + [pbr::OriginalName("BKT_PASSPHRASE_HASH")] BktPassphraseHash = 1, + } + + public enum GenericStatus { + [pbr::OriginalName("SUCCESS")] Success = 0, + [pbr::OriginalName("INVALID_OBJECT")] InvalidObject = 1, + [pbr::OriginalName("ALREADY_EXISTS")] AlreadyExists = 2, + [pbr::OriginalName("ACCESS_DENIED")] AccessDenied = 3, } #endregion #region Messages - public sealed partial class ApiRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApiRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApiRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ApiRequest() { OnConstruction(); } @@ -812,6 +1088,7 @@ public ApiRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ApiRequest(ApiRequest other) : this() { encryptedTransmissionKey_ = other.encryptedTransmissionKey_; publicKeyId_ = other.publicKeyId_; @@ -824,6 +1101,7 @@ public ApiRequest(ApiRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ApiRequest Clone() { return new ApiRequest(this); } @@ -832,6 +1110,7 @@ public ApiRequest Clone() { public const int EncryptedTransmissionKeyFieldNumber = 1; private pb::ByteString encryptedTransmissionKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedTransmissionKey { get { return encryptedTransmissionKey_; } set { @@ -843,6 +1122,7 @@ public ApiRequest Clone() { public const int PublicKeyIdFieldNumber = 2; private int publicKeyId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int PublicKeyId { get { return publicKeyId_; } set { @@ -854,6 +1134,7 @@ public int PublicKeyId { public const int LocaleFieldNumber = 3; private string locale_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Locale { get { return locale_; } set { @@ -865,6 +1146,7 @@ public string Locale { public const int EncryptedPayloadFieldNumber = 4; private pb::ByteString encryptedPayload_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedPayload { get { return encryptedPayload_; } set { @@ -876,6 +1158,7 @@ public string Locale { public const int EncryptionTypeFieldNumber = 5; private int encryptionType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int EncryptionType { get { return encryptionType_; } set { @@ -887,6 +1170,7 @@ public int EncryptionType { public const int RecaptchaFieldNumber = 6; private string recaptcha_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Recaptcha { get { return recaptcha_; } set { @@ -901,6 +1185,7 @@ public string Recaptcha { ///possible values are 'beta', 'v2', etc. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SubEnvironment { get { return subEnvironment_; } set { @@ -909,11 +1194,13 @@ public string SubEnvironment { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ApiRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ApiRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -932,6 +1219,7 @@ public bool Equals(ApiRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedTransmissionKey.Length != 0) hash ^= EncryptedTransmissionKey.GetHashCode(); @@ -948,12 +1236,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedTransmissionKey.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedTransmissionKey); @@ -985,9 +1278,49 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedTransmissionKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedTransmissionKey); + } + if (PublicKeyId != 0) { + output.WriteRawTag(16); + output.WriteInt32(PublicKeyId); + } + if (Locale.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Locale); + } + if (EncryptedPayload.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedPayload); + } + if (EncryptionType != 0) { + output.WriteRawTag(40); + output.WriteInt32(EncryptionType); + } + if (Recaptcha.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Recaptcha); + } + if (SubEnvironment.Length != 0) { + output.WriteRawTag(58); + output.WriteString(SubEnvironment); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedTransmissionKey.Length != 0) { @@ -1018,6 +1351,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ApiRequest other) { if (other == null) { return; @@ -1047,10 +1381,18 @@ public void MergeFrom(ApiRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1084,27 +1426,84 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedTransmissionKey = input.ReadBytes(); + break; + } + case 16: { + PublicKeyId = input.ReadInt32(); + break; + } + case 26: { + Locale = input.ReadString(); + break; + } + case 34: { + EncryptedPayload = input.ReadBytes(); + break; + } + case 40: { + EncryptionType = input.ReadInt32(); + break; + } + case 50: { + Recaptcha = input.ReadString(); + break; + } + case 58: { + SubEnvironment = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class ApiRequestPayload : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApiRequestPayload : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApiRequestPayload()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ApiRequestPayload() { OnConstruction(); } @@ -1112,6 +1511,7 @@ public ApiRequestPayload() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ApiRequestPayload(ApiRequestPayload other) : this() { payload_ = other.payload_; encryptedSessionToken_ = other.encryptedSessionToken_; @@ -1121,6 +1521,7 @@ public ApiRequestPayload(ApiRequestPayload other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ApiRequestPayload Clone() { return new ApiRequestPayload(this); } @@ -1129,6 +1530,7 @@ public ApiRequestPayload Clone() { public const int PayloadFieldNumber = 1; private pb::ByteString payload_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Payload { get { return payload_; } set { @@ -1140,6 +1542,7 @@ public ApiRequestPayload Clone() { public const int EncryptedSessionTokenFieldNumber = 2; private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedSessionToken { get { return encryptedSessionToken_; } set { @@ -1151,6 +1554,7 @@ public ApiRequestPayload Clone() { public const int TimeTokenFieldNumber = 3; private pb::ByteString timeToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString TimeToken { get { return timeToken_; } set { @@ -1162,6 +1566,7 @@ public ApiRequestPayload Clone() { public const int ApiVersionFieldNumber = 4; private int apiVersion_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int ApiVersion { get { return apiVersion_; } set { @@ -1170,11 +1575,13 @@ public int ApiVersion { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ApiRequestPayload); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ApiRequestPayload other) { if (ReferenceEquals(other, null)) { return false; @@ -1190,6 +1597,7 @@ public bool Equals(ApiRequestPayload other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Payload.Length != 0) hash ^= Payload.GetHashCode(); @@ -1203,12 +1611,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Payload.Length != 0) { output.WriteRawTag(10); output.WriteBytes(Payload); @@ -1228,9 +1641,37 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Payload.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Payload); + } + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedSessionToken); + } + if (TimeToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TimeToken); + } + if (ApiVersion != 0) { + output.WriteRawTag(32); + output.WriteInt32(ApiVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Payload.Length != 0) { @@ -1252,6 +1693,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ApiRequestPayload other) { if (other == null) { return; @@ -1272,10 +1714,18 @@ public void MergeFrom(ApiRequestPayload other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1297,27 +1747,72 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Payload = input.ReadBytes(); + break; + } + case 18: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 26: { + TimeToken = input.ReadBytes(); + break; + } + case 32: { + ApiVersion = input.ReadInt32(); + break; + } + } + } } + #endif } - public sealed partial class Transform : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Transform : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Transform()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Transform() { OnConstruction(); } @@ -1325,6 +1820,7 @@ public Transform() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Transform(Transform other) : this() { key_ = other.key_; encryptedDeviceToken_ = other.encryptedDeviceToken_; @@ -1332,6 +1828,7 @@ public Transform(Transform other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Transform Clone() { return new Transform(this); } @@ -1340,6 +1837,7 @@ public Transform Clone() { public const int KeyFieldNumber = 1; private pb::ByteString key_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Key { get { return key_; } set { @@ -1351,6 +1849,7 @@ public Transform Clone() { public const int EncryptedDeviceTokenFieldNumber = 2; private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -1359,11 +1858,13 @@ public Transform Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Transform); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Transform other) { if (ReferenceEquals(other, null)) { return false; @@ -1377,6 +1878,7 @@ public bool Equals(Transform other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Key.Length != 0) hash ^= Key.GetHashCode(); @@ -1388,12 +1890,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Key.Length != 0) { output.WriteRawTag(10); output.WriteBytes(Key); @@ -1405,9 +1912,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Key); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Key.Length != 0) { @@ -1423,6 +1950,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Transform other) { if (other == null) { return; @@ -1437,10 +1965,18 @@ public void MergeFrom(Transform other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1454,27 +1990,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadBytes(); + break; + } + case 18: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class DeviceRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceRequest() { OnConstruction(); } @@ -1482,6 +2055,7 @@ public DeviceRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceRequest(DeviceRequest other) : this() { clientVersion_ = other.clientVersion_; deviceName_ = other.deviceName_; @@ -1489,6 +2063,7 @@ public DeviceRequest(DeviceRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceRequest Clone() { return new DeviceRequest(this); } @@ -1497,6 +2072,7 @@ public DeviceRequest Clone() { public const int ClientVersionFieldNumber = 1; private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ClientVersion { get { return clientVersion_; } set { @@ -1508,6 +2084,7 @@ public string ClientVersion { public const int DeviceNameFieldNumber = 2; private string deviceName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DeviceName { get { return deviceName_; } set { @@ -1516,11 +2093,13 @@ public string DeviceName { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as DeviceRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(DeviceRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1534,6 +2113,7 @@ public bool Equals(DeviceRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); @@ -1545,12 +2125,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (ClientVersion.Length != 0) { output.WriteRawTag(10); output.WriteString(ClientVersion); @@ -1562,9 +2147,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ClientVersion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ClientVersion.Length != 0) { @@ -1580,6 +2185,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(DeviceRequest other) { if (other == null) { return; @@ -1594,10 +2200,18 @@ public void MergeFrom(DeviceRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1611,27 +2225,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ClientVersion = input.ReadString(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class AuthRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuthRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuthRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AuthRequest() { OnConstruction(); } @@ -1639,6 +2290,7 @@ public AuthRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AuthRequest(AuthRequest other) : this() { clientVersion_ = other.clientVersion_; username_ = other.username_; @@ -1647,6 +2299,7 @@ public AuthRequest(AuthRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AuthRequest Clone() { return new AuthRequest(this); } @@ -1655,6 +2308,7 @@ public AuthRequest Clone() { public const int ClientVersionFieldNumber = 1; private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ClientVersion { get { return clientVersion_; } set { @@ -1666,6 +2320,7 @@ public string ClientVersion { public const int UsernameFieldNumber = 2; private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Username { get { return username_; } set { @@ -1677,6 +2332,7 @@ public string Username { public const int EncryptedDeviceTokenFieldNumber = 3; private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -1685,11 +2341,13 @@ public string Username { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AuthRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AuthRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1704,6 +2362,7 @@ public bool Equals(AuthRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); @@ -1716,12 +2375,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (ClientVersion.Length != 0) { output.WriteRawTag(10); output.WriteString(ClientVersion); @@ -1737,9 +2401,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ClientVersion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ClientVersion); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedDeviceToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ClientVersion.Length != 0) { @@ -1758,6 +2446,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AuthRequest other) { if (other == null) { return; @@ -1775,10 +2464,18 @@ public void MergeFrom(AuthRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1796,27 +2493,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - } - - public sealed partial class NewUserMinimumParams : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NewUserMinimumParams()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[5]; } - } - + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ClientVersion = input.ReadString(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 26: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NewUserMinimumParams : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NewUserMinimumParams()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[5]; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NewUserMinimumParams() { OnConstruction(); } @@ -1824,15 +2562,19 @@ public NewUserMinimumParams() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NewUserMinimumParams(NewUserMinimumParams other) : this() { minimumIterations_ = other.minimumIterations_; passwordMatchRegex_ = other.passwordMatchRegex_.Clone(); passwordMatchDescription_ = other.passwordMatchDescription_.Clone(); isEnterpriseDomain_ = other.isEnterpriseDomain_; + enterpriseEccPublicKey_ = other.enterpriseEccPublicKey_; + forbidKeyType2_ = other.forbidKeyType2_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NewUserMinimumParams Clone() { return new NewUserMinimumParams(this); } @@ -1841,6 +2583,7 @@ public NewUserMinimumParams Clone() { public const int MinimumIterationsFieldNumber = 1; private int minimumIterations_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int MinimumIterations { get { return minimumIterations_; } set { @@ -1854,6 +2597,7 @@ public int MinimumIterations { = pb::FieldCodec.ForString(18); private readonly pbc::RepeatedField passwordMatchRegex_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField PasswordMatchRegex { get { return passwordMatchRegex_; } } @@ -1864,6 +2608,7 @@ public int MinimumIterations { = pb::FieldCodec.ForString(26); private readonly pbc::RepeatedField passwordMatchDescription_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField PasswordMatchDescription { get { return passwordMatchDescription_; } } @@ -1872,6 +2617,7 @@ public int MinimumIterations { public const int IsEnterpriseDomainFieldNumber = 4; private bool isEnterpriseDomain_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsEnterpriseDomain { get { return isEnterpriseDomain_; } set { @@ -1879,12 +2625,38 @@ public bool IsEnterpriseDomain { } } + /// Field number for the "enterpriseEccPublicKey" field. + public const int EnterpriseEccPublicKeyFieldNumber = 5; + private pb::ByteString enterpriseEccPublicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EnterpriseEccPublicKey { + get { return enterpriseEccPublicKey_; } + set { + enterpriseEccPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "forbidKeyType2" field. + public const int ForbidKeyType2FieldNumber = 6; + private bool forbidKeyType2_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ForbidKeyType2 { + get { return forbidKeyType2_; } + set { + forbidKeyType2_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as NewUserMinimumParams); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(NewUserMinimumParams other) { if (ReferenceEquals(other, null)) { return false; @@ -1896,16 +2668,21 @@ public bool Equals(NewUserMinimumParams other) { if(!passwordMatchRegex_.Equals(other.passwordMatchRegex_)) return false; if(!passwordMatchDescription_.Equals(other.passwordMatchDescription_)) return false; if (IsEnterpriseDomain != other.IsEnterpriseDomain) return false; + if (EnterpriseEccPublicKey != other.EnterpriseEccPublicKey) return false; + if (ForbidKeyType2 != other.ForbidKeyType2) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MinimumIterations != 0) hash ^= MinimumIterations.GetHashCode(); hash ^= passwordMatchRegex_.GetHashCode(); hash ^= passwordMatchDescription_.GetHashCode(); if (IsEnterpriseDomain != false) hash ^= IsEnterpriseDomain.GetHashCode(); + if (EnterpriseEccPublicKey.Length != 0) hash ^= EnterpriseEccPublicKey.GetHashCode(); + if (ForbidKeyType2 != false) hash ^= ForbidKeyType2.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1913,12 +2690,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MinimumIterations != 0) { output.WriteRawTag(8); output.WriteInt32(MinimumIterations); @@ -1929,12 +2711,50 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(32); output.WriteBool(IsEnterpriseDomain); } + if (EnterpriseEccPublicKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EnterpriseEccPublicKey); + } + if (ForbidKeyType2 != false) { + output.WriteRawTag(48); + output.WriteBool(ForbidKeyType2); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MinimumIterations != 0) { + output.WriteRawTag(8); + output.WriteInt32(MinimumIterations); + } + passwordMatchRegex_.WriteTo(ref output, _repeated_passwordMatchRegex_codec); + passwordMatchDescription_.WriteTo(ref output, _repeated_passwordMatchDescription_codec); + if (IsEnterpriseDomain != false) { + output.WriteRawTag(32); + output.WriteBool(IsEnterpriseDomain); + } + if (EnterpriseEccPublicKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EnterpriseEccPublicKey); + } + if (ForbidKeyType2 != false) { + output.WriteRawTag(48); + output.WriteBool(ForbidKeyType2); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MinimumIterations != 0) { @@ -1945,6 +2765,12 @@ public int CalculateSize() { if (IsEnterpriseDomain != false) { size += 1 + 1; } + if (EnterpriseEccPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterpriseEccPublicKey); + } + if (ForbidKeyType2 != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1952,6 +2778,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(NewUserMinimumParams other) { if (other == null) { return; @@ -1964,14 +2791,28 @@ public void MergeFrom(NewUserMinimumParams other) { if (other.IsEnterpriseDomain != false) { IsEnterpriseDomain = other.IsEnterpriseDomain; } + if (other.EnterpriseEccPublicKey.Length != 0) { + EnterpriseEccPublicKey = other.EnterpriseEccPublicKey; + } + if (other.ForbidKeyType2 != false) { + ForbidKeyType2 = other.ForbidKeyType2; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1991,29 +2832,90 @@ public void MergeFrom(pb::CodedInputStream input) { IsEnterpriseDomain = input.ReadBool(); break; } + case 42: { + EnterpriseEccPublicKey = input.ReadBytes(); + break; + } + case 48: { + ForbidKeyType2 = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MinimumIterations = input.ReadInt32(); + break; + } + case 18: { + passwordMatchRegex_.AddEntriesFrom(ref input, _repeated_passwordMatchRegex_codec); + break; + } + case 26: { + passwordMatchDescription_.AddEntriesFrom(ref input, _repeated_passwordMatchDescription_codec); + break; + } + case 32: { + IsEnterpriseDomain = input.ReadBool(); + break; + } + case 42: { + EnterpriseEccPublicKey = input.ReadBytes(); + break; + } + case 48: { + ForbidKeyType2 = input.ReadBool(); + break; + } } } } + #endif } - public sealed partial class PreLoginRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PreLoginRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PreLoginRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PreLoginRequest() { OnConstruction(); } @@ -2021,6 +2923,7 @@ public PreLoginRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PreLoginRequest(PreLoginRequest other) : this() { authRequest_ = other.authRequest_ != null ? other.authRequest_.Clone() : null; loginType_ = other.loginType_; @@ -2029,6 +2932,7 @@ public PreLoginRequest(PreLoginRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PreLoginRequest Clone() { return new PreLoginRequest(this); } @@ -2037,6 +2941,7 @@ public PreLoginRequest Clone() { public const int AuthRequestFieldNumber = 1; private global::Authentication.AuthRequest authRequest_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.AuthRequest AuthRequest { get { return authRequest_; } set { @@ -2048,6 +2953,7 @@ public PreLoginRequest Clone() { public const int LoginTypeFieldNumber = 2; private global::Authentication.LoginType loginType_ = global::Authentication.LoginType.Normal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.LoginType LoginType { get { return loginType_; } set { @@ -2062,6 +2968,7 @@ public PreLoginRequest Clone() { /// optional - if supplied, it will be validated if it needs refreshing /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString TwoFactorToken { get { return twoFactorToken_; } set { @@ -2070,11 +2977,13 @@ public PreLoginRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as PreLoginRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(PreLoginRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2089,6 +2998,7 @@ public bool Equals(PreLoginRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (authRequest_ != null) hash ^= AuthRequest.GetHashCode(); @@ -2101,12 +3011,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (authRequest_ != null) { output.WriteRawTag(10); output.WriteMessage(AuthRequest); @@ -2122,9 +3037,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (authRequest_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AuthRequest); + } + if (LoginType != global::Authentication.LoginType.Normal) { + output.WriteRawTag(16); + output.WriteEnum((int) LoginType); + } + if (TwoFactorToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TwoFactorToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (authRequest_ != null) { @@ -2143,6 +3082,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(PreLoginRequest other) { if (other == null) { return; @@ -2163,10 +3103,18 @@ public void MergeFrom(PreLoginRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2187,27 +3135,71 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + input.ReadMessage(AuthRequest); + break; + } + case 16: { + LoginType = (global::Authentication.LoginType) input.ReadEnum(); + break; + } + case 26: { + TwoFactorToken = input.ReadBytes(); + break; + } + } + } + } + #endif + } - public sealed partial class LoginRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LoginRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginRequest() { OnConstruction(); } @@ -2215,6 +3207,7 @@ public LoginRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginRequest(LoginRequest other) : this() { authRequest_ = other.authRequest_ != null ? other.authRequest_.Clone() : null; loginType_ = other.loginType_; @@ -2228,6 +3221,7 @@ public LoginRequest(LoginRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginRequest Clone() { return new LoginRequest(this); } @@ -2236,6 +3230,7 @@ public LoginRequest Clone() { public const int AuthRequestFieldNumber = 1; private global::Authentication.AuthRequest authRequest_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.AuthRequest AuthRequest { get { return authRequest_; } set { @@ -2247,6 +3242,7 @@ public LoginRequest Clone() { public const int LoginTypeFieldNumber = 2; private global::Authentication.LoginType loginType_ = global::Authentication.LoginType.Normal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.LoginType LoginType { get { return loginType_; } set { @@ -2258,6 +3254,7 @@ public LoginRequest Clone() { public const int AuthenticationHashPrimeFieldNumber = 3; private pb::ByteString authenticationHashPrime_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AuthenticationHashPrime { get { return authenticationHashPrime_; } set { @@ -2269,6 +3266,7 @@ public LoginRequest Clone() { public const int EncryptedLoginTokenFieldNumber = 4; private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedLoginToken { get { return encryptedLoginToken_; } set { @@ -2280,6 +3278,7 @@ public LoginRequest Clone() { public const int AuthResponseFieldNumber = 5; private pb::ByteString authResponse_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AuthResponse { get { return authResponse_; } set { @@ -2294,6 +3293,7 @@ public LoginRequest Clone() { ///input.getInt("enterprise_id") /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int McEnterpriseId { get { return mcEnterpriseId_; } set { @@ -2308,6 +3308,7 @@ public int McEnterpriseId { ///needed to receive DNA notifications per login Command wiki page /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string PushToken { get { return pushToken_; } set { @@ -2322,6 +3323,7 @@ public string PushToken { ///needed to receive DNA notifications per login Command wiki page /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Platform { get { return platform_; } set { @@ -2330,11 +3332,13 @@ public string Platform { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as LoginRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(LoginRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2354,6 +3358,7 @@ public bool Equals(LoginRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (authRequest_ != null) hash ^= AuthRequest.GetHashCode(); @@ -2371,12 +3376,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (authRequest_ != null) { output.WriteRawTag(10); output.WriteMessage(AuthRequest); @@ -2412,9 +3422,53 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (authRequest_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AuthRequest); + } + if (LoginType != global::Authentication.LoginType.Normal) { + output.WriteRawTag(16); + output.WriteEnum((int) LoginType); + } + if (AuthenticationHashPrime.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(AuthenticationHashPrime); + } + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedLoginToken); + } + if (AuthResponse.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(AuthResponse); + } + if (McEnterpriseId != 0) { + output.WriteRawTag(48); + output.WriteInt32(McEnterpriseId); + } + if (PushToken.Length != 0) { + output.WriteRawTag(58); + output.WriteString(PushToken); + } + if (Platform.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Platform); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (authRequest_ != null) { @@ -2448,6 +3502,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(LoginRequest other) { if (other == null) { return; @@ -2483,10 +3538,18 @@ public void MergeFrom(LoginRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2527,27 +3590,91 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + input.ReadMessage(AuthRequest); + break; + } + case 16: { + LoginType = (global::Authentication.LoginType) input.ReadEnum(); + break; + } + case 26: { + AuthenticationHashPrime = input.ReadBytes(); + break; + } + case 34: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 42: { + AuthResponse = input.ReadBytes(); + break; + } + case 48: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 58: { + PushToken = input.ReadString(); + break; + } + case 66: { + Platform = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class DeviceResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceResponse() { OnConstruction(); } @@ -2555,6 +3682,7 @@ public DeviceResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceResponse(DeviceResponse other) : this() { encryptedDeviceToken_ = other.encryptedDeviceToken_; status_ = other.status_; @@ -2562,6 +3690,7 @@ public DeviceResponse(DeviceResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceResponse Clone() { return new DeviceResponse(this); } @@ -2570,6 +3699,7 @@ public DeviceResponse Clone() { public const int EncryptedDeviceTokenFieldNumber = 1; private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -2581,6 +3711,7 @@ public DeviceResponse Clone() { public const int StatusFieldNumber = 2; private global::Authentication.DeviceStatus status_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.DeviceStatus Status { get { return status_; } set { @@ -2589,11 +3720,13 @@ public DeviceResponse Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as DeviceResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(DeviceResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -2607,6 +3740,7 @@ public bool Equals(DeviceResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); @@ -2618,12 +3752,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedDeviceToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedDeviceToken); @@ -2635,9 +3774,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (Status != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedDeviceToken.Length != 0) { @@ -2653,6 +3812,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(DeviceResponse other) { if (other == null) { return; @@ -2667,10 +3827,18 @@ public void MergeFrom(DeviceResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2684,27 +3852,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - } - - public sealed partial class Salt : pb::IMessage { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Salt : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Salt()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Salt() { OnConstruction(); } @@ -2712,6 +3917,7 @@ public Salt() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Salt(Salt other) : this() { iterations_ = other.iterations_; salt_ = other.salt_; @@ -2722,6 +3928,7 @@ public Salt(Salt other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Salt Clone() { return new Salt(this); } @@ -2730,6 +3937,7 @@ public Salt Clone() { public const int IterationsFieldNumber = 1; private int iterations_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int Iterations { get { return iterations_; } set { @@ -2741,6 +3949,7 @@ public int Iterations { public const int Salt_FieldNumber = 2; private pb::ByteString salt_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Salt_ { get { return salt_; } set { @@ -2752,6 +3961,7 @@ public int Iterations { public const int AlgorithmFieldNumber = 3; private int algorithm_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int Algorithm { get { return algorithm_; } set { @@ -2763,6 +3973,7 @@ public int Algorithm { public const int UidFieldNumber = 4; private pb::ByteString uid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Uid { get { return uid_; } set { @@ -2774,6 +3985,7 @@ public int Algorithm { public const int NameFieldNumber = 5; private string name_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -2782,11 +3994,13 @@ public string Name { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Salt); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Salt other) { if (ReferenceEquals(other, null)) { return false; @@ -2803,6 +4017,7 @@ public bool Equals(Salt other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Iterations != 0) hash ^= Iterations.GetHashCode(); @@ -2817,12 +4032,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Iterations != 0) { output.WriteRawTag(8); output.WriteInt32(Iterations); @@ -2846,9 +4066,41 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Iterations != 0) { + output.WriteRawTag(8); + output.WriteInt32(Iterations); + } + if (Salt_.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Salt_); + } + if (Algorithm != 0) { + output.WriteRawTag(24); + output.WriteInt32(Algorithm); + } + if (Uid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Uid); + } + if (Name.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Iterations != 0) { @@ -2873,6 +4125,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Salt other) { if (other == null) { return; @@ -2896,10 +4149,18 @@ public void MergeFrom(Salt other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2925,27 +4186,76 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Iterations = input.ReadInt32(); + break; + } + case 18: { + Salt_ = input.ReadBytes(); + break; + } + case 24: { + Algorithm = input.ReadInt32(); + break; + } + case 34: { + Uid = input.ReadBytes(); + break; + } + case 42: { + Name = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class TwoFactorChannel : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorChannel : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorChannel()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TwoFactorChannel() { OnConstruction(); } @@ -2953,12 +4263,14 @@ public TwoFactorChannel() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TwoFactorChannel(TwoFactorChannel other) : this() { type_ = other.type_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TwoFactorChannel Clone() { return new TwoFactorChannel(this); } @@ -2967,6 +4279,7 @@ public TwoFactorChannel Clone() { public const int TypeFieldNumber = 1; private int type_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int Type { get { return type_; } set { @@ -2975,11 +4288,13 @@ public int Type { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TwoFactorChannel); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TwoFactorChannel other) { if (ReferenceEquals(other, null)) { return false; @@ -2992,6 +4307,7 @@ public bool Equals(TwoFactorChannel other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Type != 0) hash ^= Type.GetHashCode(); @@ -3002,12 +4318,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Type != 0) { output.WriteRawTag(8); output.WriteInt32(Type); @@ -3015,9 +4336,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type != 0) { + output.WriteRawTag(8); + output.WriteInt32(Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Type != 0) { @@ -3030,6 +4367,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TwoFactorChannel other) { if (other == null) { return; @@ -3041,10 +4379,18 @@ public void MergeFrom(TwoFactorChannel other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3054,27 +4400,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Type = input.ReadInt32(); + break; + } + } + } } + #endif } - public sealed partial class StartLoginRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class StartLoginRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new StartLoginRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StartLoginRequest() { OnConstruction(); } @@ -3082,6 +4461,7 @@ public StartLoginRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StartLoginRequest(StartLoginRequest other) : this() { encryptedDeviceToken_ = other.encryptedDeviceToken_; username_ = other.username_; @@ -3099,6 +4479,7 @@ public StartLoginRequest(StartLoginRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public StartLoginRequest Clone() { return new StartLoginRequest(this); } @@ -3107,6 +4488,7 @@ public StartLoginRequest Clone() { public const int EncryptedDeviceTokenFieldNumber = 1; private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -3118,6 +4500,7 @@ public StartLoginRequest Clone() { public const int UsernameFieldNumber = 2; private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Username { get { return username_; } set { @@ -3129,6 +4512,7 @@ public string Username { public const int ClientVersionFieldNumber = 3; private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ClientVersion { get { return clientVersion_; } set { @@ -3140,6 +4524,7 @@ public string ClientVersion { public const int MessageSessionUidFieldNumber = 4; private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString MessageSessionUid { get { return messageSessionUid_; } set { @@ -3151,6 +4536,7 @@ public string ClientVersion { public const int EncryptedLoginTokenFieldNumber = 5; private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedLoginToken { get { return encryptedLoginToken_; } set { @@ -3162,6 +4548,7 @@ public string ClientVersion { public const int LoginTypeFieldNumber = 6; private global::Authentication.LoginType loginType_ = global::Authentication.LoginType.Normal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.LoginType LoginType { get { return loginType_; } set { @@ -3173,6 +4560,7 @@ public string ClientVersion { public const int McEnterpriseIdFieldNumber = 7; private int mcEnterpriseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int McEnterpriseId { get { return mcEnterpriseId_; } set { @@ -3184,6 +4572,7 @@ public int McEnterpriseId { public const int LoginMethodFieldNumber = 8; private global::Authentication.LoginMethod loginMethod_ = global::Authentication.LoginMethod.InvalidLoginmethod; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.LoginMethod LoginMethod { get { return loginMethod_; } set { @@ -3195,6 +4584,7 @@ public int McEnterpriseId { public const int ForceNewLoginFieldNumber = 9; private bool forceNewLogin_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ForceNewLogin { get { return forceNewLogin_; } set { @@ -3206,6 +4596,7 @@ public bool ForceNewLogin { public const int CloneCodeFieldNumber = 10; private pb::ByteString cloneCode_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString CloneCode { get { return cloneCode_; } set { @@ -3217,6 +4608,7 @@ public bool ForceNewLogin { public const int V2TwoFactorTokenFieldNumber = 11; private string v2TwoFactorToken_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string V2TwoFactorToken { get { return v2TwoFactorToken_; } set { @@ -3231,6 +4623,7 @@ public string V2TwoFactorToken { ///for think clients, if supplied and accountUid != user's accountUid return error reset_cache_invalid_account_uid /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AccountUid { get { return accountUid_; } set { @@ -3239,11 +4632,13 @@ public string V2TwoFactorToken { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as StartLoginRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(StartLoginRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -3267,6 +4662,7 @@ public bool Equals(StartLoginRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); @@ -3288,12 +4684,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedDeviceToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedDeviceToken); @@ -3345,9 +4746,69 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ClientVersion); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(MessageSessionUid); + } + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedLoginToken); + } + if (LoginType != global::Authentication.LoginType.Normal) { + output.WriteRawTag(48); + output.WriteEnum((int) LoginType); + } + if (McEnterpriseId != 0) { + output.WriteRawTag(56); + output.WriteInt32(McEnterpriseId); + } + if (LoginMethod != global::Authentication.LoginMethod.InvalidLoginmethod) { + output.WriteRawTag(64); + output.WriteEnum((int) LoginMethod); + } + if (ForceNewLogin != false) { + output.WriteRawTag(72); + output.WriteBool(ForceNewLogin); + } + if (CloneCode.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(CloneCode); + } + if (V2TwoFactorToken.Length != 0) { + output.WriteRawTag(90); + output.WriteString(V2TwoFactorToken); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedDeviceToken.Length != 0) { @@ -3393,6 +4854,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(StartLoginRequest other) { if (other == null) { return; @@ -3437,10 +4899,18 @@ public void MergeFrom(StartLoginRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3494,27 +4964,104 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 26: { + ClientVersion = input.ReadString(); + break; + } + case 34: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 42: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 48: { + LoginType = (global::Authentication.LoginType) input.ReadEnum(); + break; + } + case 56: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 64: { + LoginMethod = (global::Authentication.LoginMethod) input.ReadEnum(); + break; + } + case 72: { + ForceNewLogin = input.ReadBool(); + break; + } + case 82: { + CloneCode = input.ReadBytes(); + break; + } + case 90: { + V2TwoFactorToken = input.ReadString(); + break; + } + case 98: { + AccountUid = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class LoginResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LoginResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginResponse() { OnConstruction(); } @@ -3522,6 +5069,7 @@ public LoginResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginResponse(LoginResponse other) : this() { loginState_ = other.loginState_; accountUid_ = other.accountUid_; @@ -3538,10 +5086,12 @@ public LoginResponse(LoginResponse other) : this() { cloneCode_ = other.cloneCode_; stateSpecificValue_ = other.stateSpecificValue_; ssoClientVersion_ = other.ssoClientVersion_; + sessionTokenTypeModifier_ = other.sessionTokenTypeModifier_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginResponse Clone() { return new LoginResponse(this); } @@ -3550,6 +5100,7 @@ public LoginResponse Clone() { public const int LoginStateFieldNumber = 1; private global::Authentication.LoginState loginState_ = global::Authentication.LoginState.InvalidLoginstate; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.LoginState LoginState { get { return loginState_; } set { @@ -3561,6 +5112,7 @@ public LoginResponse Clone() { public const int AccountUidFieldNumber = 2; private pb::ByteString accountUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AccountUid { get { return accountUid_; } set { @@ -3572,6 +5124,7 @@ public LoginResponse Clone() { public const int PrimaryUsernameFieldNumber = 3; private string primaryUsername_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string PrimaryUsername { get { return primaryUsername_; } set { @@ -3583,6 +5136,7 @@ public string PrimaryUsername { public const int EncryptedDataKeyFieldNumber = 4; private pb::ByteString encryptedDataKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDataKey { get { return encryptedDataKey_; } set { @@ -3594,6 +5148,7 @@ public string PrimaryUsername { public const int EncryptedDataKeyTypeFieldNumber = 5; private global::Authentication.EncryptedDataKeyType encryptedDataKeyType_ = global::Authentication.EncryptedDataKeyType.NoKey; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.EncryptedDataKeyType EncryptedDataKeyType { get { return encryptedDataKeyType_; } set { @@ -3605,6 +5160,7 @@ public string PrimaryUsername { public const int EncryptedLoginTokenFieldNumber = 6; private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedLoginToken { get { return encryptedLoginToken_; } set { @@ -3616,6 +5172,7 @@ public string PrimaryUsername { public const int EncryptedSessionTokenFieldNumber = 7; private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedSessionToken { get { return encryptedSessionToken_; } set { @@ -3627,6 +5184,7 @@ public string PrimaryUsername { public const int SessionTokenTypeFieldNumber = 8; private global::Authentication.SessionTokenType sessionTokenType_ = global::Authentication.SessionTokenType.NoRestriction; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.SessionTokenType SessionTokenType { get { return sessionTokenType_; } set { @@ -3638,6 +5196,7 @@ public string PrimaryUsername { public const int MessageFieldNumber = 9; private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Message { get { return message_; } set { @@ -3649,6 +5208,7 @@ public string Message { public const int UrlFieldNumber = 10; private string url_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Url { get { return url_; } set { @@ -3662,6 +5222,7 @@ public string Url { = pb::FieldCodec.ForMessage(90, global::Authentication.TwoFactorChannelInfo.Parser); private readonly pbc::RepeatedField channels_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Channels { get { return channels_; } } @@ -3672,6 +5233,7 @@ public string Url { = pb::FieldCodec.ForMessage(98, global::Authentication.Salt.Parser); private readonly pbc::RepeatedField salt_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Salt { get { return salt_; } } @@ -3680,6 +5242,7 @@ public string Url { public const int CloneCodeFieldNumber = 13; private pb::ByteString cloneCode_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString CloneCode { get { return cloneCode_; } set { @@ -3691,6 +5254,7 @@ public string Url { public const int StateSpecificValueFieldNumber = 14; private string stateSpecificValue_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string StateSpecificValue { get { return stateSpecificValue_; } set { @@ -3702,6 +5266,7 @@ public string StateSpecificValue { public const int SsoClientVersionFieldNumber = 15; private string ssoClientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SsoClientVersion { get { return ssoClientVersion_; } set { @@ -3709,12 +5274,26 @@ public string SsoClientVersion { } } + /// Field number for the "sessionTokenTypeModifier" field. + public const int SessionTokenTypeModifierFieldNumber = 16; + private string sessionTokenTypeModifier_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SessionTokenTypeModifier { + get { return sessionTokenTypeModifier_; } + set { + sessionTokenTypeModifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as LoginResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(LoginResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -3737,10 +5316,12 @@ public bool Equals(LoginResponse other) { if (CloneCode != other.CloneCode) return false; if (StateSpecificValue != other.StateSpecificValue) return false; if (SsoClientVersion != other.SsoClientVersion) return false; + if (SessionTokenTypeModifier != other.SessionTokenTypeModifier) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (LoginState != global::Authentication.LoginState.InvalidLoginstate) hash ^= LoginState.GetHashCode(); @@ -3758,6 +5339,7 @@ public override int GetHashCode() { if (CloneCode.Length != 0) hash ^= CloneCode.GetHashCode(); if (StateSpecificValue.Length != 0) hash ^= StateSpecificValue.GetHashCode(); if (SsoClientVersion.Length != 0) hash ^= SsoClientVersion.GetHashCode(); + if (SessionTokenTypeModifier.Length != 0) hash ^= SessionTokenTypeModifier.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3765,12 +5347,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (LoginState != global::Authentication.LoginState.InvalidLoginstate) { output.WriteRawTag(8); output.WriteEnum((int) LoginState); @@ -3825,43 +5412,117 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(122); output.WriteString(SsoClientVersion); } + if (SessionTokenTypeModifier.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(SessionTokenTypeModifier); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (LoginState != global::Authentication.LoginState.InvalidLoginstate) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoginState); + output.WriteRawTag(8); + output.WriteEnum((int) LoginState); } if (AccountUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + output.WriteRawTag(18); + output.WriteBytes(AccountUid); } if (PrimaryUsername.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PrimaryUsername); + output.WriteRawTag(26); + output.WriteString(PrimaryUsername); } if (EncryptedDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDataKey); + output.WriteRawTag(34); + output.WriteBytes(EncryptedDataKey); } if (EncryptedDataKeyType != global::Authentication.EncryptedDataKeyType.NoKey) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EncryptedDataKeyType); + output.WriteRawTag(40); + output.WriteEnum((int) EncryptedDataKeyType); } if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + output.WriteRawTag(50); + output.WriteBytes(EncryptedLoginToken); } if (EncryptedSessionToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + output.WriteRawTag(58); + output.WriteBytes(EncryptedSessionToken); } if (SessionTokenType != global::Authentication.SessionTokenType.NoRestriction) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SessionTokenType); + output.WriteRawTag(64); + output.WriteEnum((int) SessionTokenType); } if (Message.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + output.WriteRawTag(74); + output.WriteString(Message); } if (Url.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); + output.WriteRawTag(82); + output.WriteString(Url); + } + channels_.WriteTo(ref output, _repeated_channels_codec); + salt_.WriteTo(ref output, _repeated_salt_codec); + if (CloneCode.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(CloneCode); + } + if (StateSpecificValue.Length != 0) { + output.WriteRawTag(114); + output.WriteString(StateSpecificValue); + } + if (SsoClientVersion.Length != 0) { + output.WriteRawTag(122); + output.WriteString(SsoClientVersion); + } + if (SessionTokenTypeModifier.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(SessionTokenTypeModifier); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (LoginState != global::Authentication.LoginState.InvalidLoginstate) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoginState); + } + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (PrimaryUsername.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PrimaryUsername); + } + if (EncryptedDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDataKey); + } + if (EncryptedDataKeyType != global::Authentication.EncryptedDataKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EncryptedDataKeyType); + } + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + } + if (EncryptedSessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + } + if (SessionTokenType != global::Authentication.SessionTokenType.NoRestriction) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SessionTokenType); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (Url.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); } size += channels_.CalculateSize(_repeated_channels_codec); size += salt_.CalculateSize(_repeated_salt_codec); @@ -3874,6 +5535,9 @@ public int CalculateSize() { if (SsoClientVersion.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(SsoClientVersion); } + if (SessionTokenTypeModifier.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(SessionTokenTypeModifier); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3881,6 +5545,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(LoginResponse other) { if (other == null) { return; @@ -3926,14 +5591,25 @@ public void MergeFrom(LoginResponse other) { if (other.SsoClientVersion.Length != 0) { SsoClientVersion = other.SsoClientVersion; } + if (other.SessionTokenTypeModifier.Length != 0) { + SessionTokenTypeModifier = other.SessionTokenTypeModifier; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3997,29 +5673,126 @@ public void MergeFrom(pb::CodedInputStream input) { SsoClientVersion = input.ReadString(); break; } + case 130: { + SessionTokenTypeModifier = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + LoginState = (global::Authentication.LoginState) input.ReadEnum(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + case 26: { + PrimaryUsername = input.ReadString(); + break; + } + case 34: { + EncryptedDataKey = input.ReadBytes(); + break; + } + case 40: { + EncryptedDataKeyType = (global::Authentication.EncryptedDataKeyType) input.ReadEnum(); + break; + } + case 50: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 58: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 64: { + SessionTokenType = (global::Authentication.SessionTokenType) input.ReadEnum(); + break; + } + case 74: { + Message = input.ReadString(); + break; + } + case 82: { + Url = input.ReadString(); + break; + } + case 90: { + channels_.AddEntriesFrom(ref input, _repeated_channels_codec); + break; + } + case 98: { + salt_.AddEntriesFrom(ref input, _repeated_salt_codec); + break; + } + case 106: { + CloneCode = input.ReadBytes(); + break; + } + case 114: { + StateSpecificValue = input.ReadString(); + break; + } + case 122: { + SsoClientVersion = input.ReadString(); + break; + } + case 130: { + SessionTokenTypeModifier = input.ReadString(); + break; + } } } } + #endif } - public sealed partial class SsoUserInfo : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoUserInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoUserInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[13]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoUserInfo() { OnConstruction(); } @@ -4027,6 +5800,7 @@ public SsoUserInfo() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoUserInfo(SsoUserInfo other) : this() { companyName_ = other.companyName_; samlRequest_ = other.samlRequest_; @@ -4038,6 +5812,7 @@ public SsoUserInfo(SsoUserInfo other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoUserInfo Clone() { return new SsoUserInfo(this); } @@ -4046,6 +5821,7 @@ public SsoUserInfo Clone() { public const int CompanyNameFieldNumber = 1; private string companyName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string CompanyName { get { return companyName_; } set { @@ -4057,6 +5833,7 @@ public string CompanyName { public const int SamlRequestFieldNumber = 2; private string samlRequest_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SamlRequest { get { return samlRequest_; } set { @@ -4068,6 +5845,7 @@ public string SamlRequest { public const int SamlRequestTypeFieldNumber = 3; private string samlRequestType_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SamlRequestType { get { return samlRequestType_; } set { @@ -4079,6 +5857,7 @@ public string SamlRequestType { public const int SsoDomainNameFieldNumber = 4; private string ssoDomainName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SsoDomainName { get { return ssoDomainName_; } set { @@ -4090,6 +5869,7 @@ public string SsoDomainName { public const int LoginUrlFieldNumber = 5; private string loginUrl_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string LoginUrl { get { return loginUrl_; } set { @@ -4101,6 +5881,7 @@ public string LoginUrl { public const int LogoutUrlFieldNumber = 6; private string logoutUrl_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string LogoutUrl { get { return logoutUrl_; } set { @@ -4109,11 +5890,13 @@ public string LogoutUrl { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoUserInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoUserInfo other) { if (ReferenceEquals(other, null)) { return false; @@ -4131,6 +5914,7 @@ public bool Equals(SsoUserInfo other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (CompanyName.Length != 0) hash ^= CompanyName.GetHashCode(); @@ -4146,12 +5930,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (CompanyName.Length != 0) { output.WriteRawTag(10); output.WriteString(CompanyName); @@ -4179,9 +5968,45 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CompanyName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(CompanyName); + } + if (SamlRequest.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SamlRequest); + } + if (SamlRequestType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(SamlRequestType); + } + if (SsoDomainName.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SsoDomainName); + } + if (LoginUrl.Length != 0) { + output.WriteRawTag(42); + output.WriteString(LoginUrl); + } + if (LogoutUrl.Length != 0) { + output.WriteRawTag(50); + output.WriteString(LogoutUrl); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (CompanyName.Length != 0) { @@ -4209,6 +6034,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoUserInfo other) { if (other == null) { return; @@ -4235,10 +6061,18 @@ public void MergeFrom(SsoUserInfo other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4268,27 +6102,80 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + CompanyName = input.ReadString(); + break; + } + case 18: { + SamlRequest = input.ReadString(); + break; + } + case 26: { + SamlRequestType = input.ReadString(); + break; + } + case 34: { + SsoDomainName = input.ReadString(); + break; + } + case 42: { + LoginUrl = input.ReadString(); + break; + } + case 50: { + LogoutUrl = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class PreLoginResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PreLoginResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PreLoginResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[14]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PreLoginResponse() { OnConstruction(); } @@ -4296,6 +6183,7 @@ public PreLoginResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PreLoginResponse(PreLoginResponse other) : this() { deviceStatus_ = other.deviceStatus_; salt_ = other.salt_.Clone(); @@ -4305,6 +6193,7 @@ public PreLoginResponse(PreLoginResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PreLoginResponse Clone() { return new PreLoginResponse(this); } @@ -4313,6 +6202,7 @@ public PreLoginResponse Clone() { public const int DeviceStatusFieldNumber = 1; private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.DeviceStatus DeviceStatus { get { return deviceStatus_; } set { @@ -4326,6 +6216,7 @@ public PreLoginResponse Clone() { = pb::FieldCodec.ForMessage(18, global::Authentication.Salt.Parser); private readonly pbc::RepeatedField salt_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Salt { get { return salt_; } } @@ -4339,6 +6230,7 @@ public PreLoginResponse Clone() { ///DO NOT RE-USE. placeholder for backwards compatability /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField OBSOLETEFIELD { get { return oBSOLETEFIELD_; } } @@ -4347,6 +6239,7 @@ public PreLoginResponse Clone() { public const int SsoUserInfoFieldNumber = 4; private global::Authentication.SsoUserInfo ssoUserInfo_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.SsoUserInfo SsoUserInfo { get { return ssoUserInfo_; } set { @@ -4355,11 +6248,13 @@ public PreLoginResponse Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as PreLoginResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(PreLoginResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -4375,6 +6270,7 @@ public bool Equals(PreLoginResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); @@ -4388,12 +6284,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { output.WriteRawTag(8); output.WriteEnum((int) DeviceStatus); @@ -4407,9 +6308,31 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(8); + output.WriteEnum((int) DeviceStatus); + } + salt_.WriteTo(ref output, _repeated_salt_codec); + oBSOLETEFIELD_.WriteTo(ref output, _repeated_oBSOLETEFIELD_codec); + if (ssoUserInfo_ != null) { + output.WriteRawTag(34); + output.WriteMessage(SsoUserInfo); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { @@ -4427,6 +6350,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(PreLoginResponse other) { if (other == null) { return; @@ -4446,10 +6370,18 @@ public void MergeFrom(PreLoginResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4474,27 +6406,75 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + case 18: { + salt_.AddEntriesFrom(ref input, _repeated_salt_codec); + break; + } + case 26: { + oBSOLETEFIELD_.AddEntriesFrom(ref input, _repeated_oBSOLETEFIELD_codec); + break; + } + case 34: { + if (ssoUserInfo_ == null) { + SsoUserInfo = new global::Authentication.SsoUserInfo(); + } + input.ReadMessage(SsoUserInfo); + break; + } + } + } } + #endif } - public sealed partial class LoginAsUserRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LoginAsUserRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginAsUserRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[15]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginAsUserRequest() { OnConstruction(); } @@ -4502,12 +6482,14 @@ public LoginAsUserRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginAsUserRequest(LoginAsUserRequest other) : this() { username_ = other.username_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginAsUserRequest Clone() { return new LoginAsUserRequest(this); } @@ -4516,6 +6498,7 @@ public LoginAsUserRequest Clone() { public const int UsernameFieldNumber = 1; private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Username { get { return username_; } set { @@ -4524,11 +6507,13 @@ public string Username { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as LoginAsUserRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(LoginAsUserRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -4541,6 +6526,7 @@ public bool Equals(LoginAsUserRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Username.Length != 0) hash ^= Username.GetHashCode(); @@ -4551,12 +6537,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Username.Length != 0) { output.WriteRawTag(10); output.WriteString(Username); @@ -4564,9 +6555,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Username.Length != 0) { @@ -4579,6 +6586,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(LoginAsUserRequest other) { if (other == null) { return; @@ -4590,10 +6598,18 @@ public void MergeFrom(LoginAsUserRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4603,27 +6619,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - } - - public sealed partial class LoginAsUserResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginAsUserResponse()); - private pb::UnknownFieldSet _unknownFields; + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LoginAsUserResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginAsUserResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[16]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginAsUserResponse() { OnConstruction(); } @@ -4631,6 +6680,7 @@ public LoginAsUserResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginAsUserResponse(LoginAsUserResponse other) : this() { encryptedSessionToken_ = other.encryptedSessionToken_; encryptedSharedAccountKey_ = other.encryptedSharedAccountKey_; @@ -4638,6 +6688,7 @@ public LoginAsUserResponse(LoginAsUserResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public LoginAsUserResponse Clone() { return new LoginAsUserResponse(this); } @@ -4646,6 +6697,7 @@ public LoginAsUserResponse Clone() { public const int EncryptedSessionTokenFieldNumber = 1; private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedSessionToken { get { return encryptedSessionToken_; } set { @@ -4657,6 +6709,7 @@ public LoginAsUserResponse Clone() { public const int EncryptedSharedAccountKeyFieldNumber = 2; private pb::ByteString encryptedSharedAccountKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedSharedAccountKey { get { return encryptedSharedAccountKey_; } set { @@ -4665,11 +6718,13 @@ public LoginAsUserResponse Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as LoginAsUserResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(LoginAsUserResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -4683,6 +6738,7 @@ public bool Equals(LoginAsUserResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); @@ -4694,12 +6750,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedSessionToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedSessionToken); @@ -4711,9 +6772,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } + if (EncryptedSharedAccountKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedSharedAccountKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedSessionToken.Length != 0) { @@ -4729,6 +6810,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(LoginAsUserResponse other) { if (other == null) { return; @@ -4743,10 +6825,18 @@ public void MergeFrom(LoginAsUserResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4760,27 +6850,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedSharedAccountKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class ValidateAuthHashRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ValidateAuthHashRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateAuthHashRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[17]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValidateAuthHashRequest() { OnConstruction(); } @@ -4788,6 +6915,7 @@ public ValidateAuthHashRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValidateAuthHashRequest(ValidateAuthHashRequest other) : this() { passwordMethod_ = other.passwordMethod_; authResponse_ = other.authResponse_; @@ -4796,6 +6924,7 @@ public ValidateAuthHashRequest(ValidateAuthHashRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ValidateAuthHashRequest Clone() { return new ValidateAuthHashRequest(this); } @@ -4804,6 +6933,7 @@ public ValidateAuthHashRequest Clone() { public const int PasswordMethodFieldNumber = 1; private global::Authentication.PasswordMethod passwordMethod_ = global::Authentication.PasswordMethod.Entered; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.PasswordMethod PasswordMethod { get { return passwordMethod_; } set { @@ -4815,6 +6945,7 @@ public ValidateAuthHashRequest Clone() { public const int AuthResponseFieldNumber = 2; private pb::ByteString authResponse_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AuthResponse { get { return authResponse_; } set { @@ -4826,6 +6957,7 @@ public ValidateAuthHashRequest Clone() { public const int EncryptedLoginTokenFieldNumber = 3; private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedLoginToken { get { return encryptedLoginToken_; } set { @@ -4834,11 +6966,13 @@ public ValidateAuthHashRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ValidateAuthHashRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ValidateAuthHashRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -4853,6 +6987,7 @@ public bool Equals(ValidateAuthHashRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (PasswordMethod != global::Authentication.PasswordMethod.Entered) hash ^= PasswordMethod.GetHashCode(); @@ -4865,12 +7000,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (PasswordMethod != global::Authentication.PasswordMethod.Entered) { output.WriteRawTag(8); output.WriteEnum((int) PasswordMethod); @@ -4886,9 +7026,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PasswordMethod != global::Authentication.PasswordMethod.Entered) { + output.WriteRawTag(8); + output.WriteEnum((int) PasswordMethod); + } + if (AuthResponse.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AuthResponse); + } + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedLoginToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (PasswordMethod != global::Authentication.PasswordMethod.Entered) { @@ -4907,6 +7071,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ValidateAuthHashRequest other) { if (other == null) { return; @@ -4924,10 +7089,18 @@ public void MergeFrom(ValidateAuthHashRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4945,27 +7118,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + PasswordMethod = (global::Authentication.PasswordMethod) input.ReadEnum(); + break; + } + case 18: { + AuthResponse = input.ReadBytes(); + break; + } + case 26: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class TwoFactorChannelInfo : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorChannelInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorChannelInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[18]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TwoFactorChannelInfo() { OnConstruction(); } @@ -4973,6 +7187,7 @@ public TwoFactorChannelInfo() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TwoFactorChannelInfo(TwoFactorChannelInfo other) : this() { channelType_ = other.channelType_; channelUid_ = other.channelUid_; @@ -4981,10 +7196,13 @@ public TwoFactorChannelInfo(TwoFactorChannelInfo other) : this() { capabilities_ = other.capabilities_.Clone(); phoneNumber_ = other.phoneNumber_; maxExpiration_ = other.maxExpiration_; + createdOn_ = other.createdOn_; + lastFrequency_ = other.lastFrequency_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public TwoFactorChannelInfo Clone() { return new TwoFactorChannelInfo(this); } @@ -4993,6 +7211,7 @@ public TwoFactorChannelInfo Clone() { public const int ChannelTypeFieldNumber = 1; private global::Authentication.TwoFactorChannelType channelType_ = global::Authentication.TwoFactorChannelType.TwoFaCtNone; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.TwoFactorChannelType ChannelType { get { return channelType_; } set { @@ -5004,6 +7223,7 @@ public TwoFactorChannelInfo Clone() { public const int ChannelUidFieldNumber = 2; private pb::ByteString channelUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString ChannelUid { get { return channelUid_; } set { @@ -5015,6 +7235,7 @@ public TwoFactorChannelInfo Clone() { public const int ChannelNameFieldNumber = 3; private string channelName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ChannelName { get { return channelName_; } set { @@ -5029,6 +7250,7 @@ public string ChannelName { /// for security keys /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Challenge { get { return challenge_; } set { @@ -5045,6 +7267,7 @@ public string Challenge { /// for DUO /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Capabilities { get { return capabilities_; } } @@ -5056,6 +7279,7 @@ public string Challenge { /// for SMS and DUO /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string PhoneNumber { get { return phoneNumber_; } set { @@ -5070,6 +7294,7 @@ public string PhoneNumber { /// maximum allowed expiration /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.TwoFactorExpiration MaxExpiration { get { return maxExpiration_; } set { @@ -5077,12 +7302,41 @@ public string PhoneNumber { } } + /// Field number for the "createdOn" field. + public const int CreatedOnFieldNumber = 8; + private long createdOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long CreatedOn { + get { return createdOn_; } + set { + createdOn_ = value; + } + } + + /// Field number for the "lastFrequency" field. + public const int LastFrequencyFieldNumber = 9; + private global::Authentication.TwoFactorExpiration lastFrequency_ = global::Authentication.TwoFactorExpiration.TwoFaExpImmediately; + /// + /// for login and 2fa list response + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorExpiration LastFrequency { + get { return lastFrequency_; } + set { + lastFrequency_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as TwoFactorChannelInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(TwoFactorChannelInfo other) { if (ReferenceEquals(other, null)) { return false; @@ -5097,10 +7351,13 @@ public bool Equals(TwoFactorChannelInfo other) { if(!capabilities_.Equals(other.capabilities_)) return false; if (PhoneNumber != other.PhoneNumber) return false; if (MaxExpiration != other.MaxExpiration) return false; + if (CreatedOn != other.CreatedOn) return false; + if (LastFrequency != other.LastFrequency) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) hash ^= ChannelType.GetHashCode(); @@ -5110,6 +7367,8 @@ public override int GetHashCode() { hash ^= capabilities_.GetHashCode(); if (PhoneNumber.Length != 0) hash ^= PhoneNumber.GetHashCode(); if (MaxExpiration != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= MaxExpiration.GetHashCode(); + if (CreatedOn != 0L) hash ^= CreatedOn.GetHashCode(); + if (LastFrequency != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= LastFrequency.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5117,12 +7376,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { output.WriteRawTag(8); output.WriteEnum((int) ChannelType); @@ -5148,12 +7412,65 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(56); output.WriteEnum((int) MaxExpiration); } + if (CreatedOn != 0L) { + output.WriteRawTag(64); + output.WriteInt64(CreatedOn); + } + if (LastFrequency != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(72); + output.WriteEnum((int) LastFrequency); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { + output.WriteRawTag(8); + output.WriteEnum((int) ChannelType); + } + if (ChannelUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ChannelUid); + } + if (ChannelName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ChannelName); + } + if (Challenge.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Challenge); + } + capabilities_.WriteTo(ref output, _repeated_capabilities_codec); + if (PhoneNumber.Length != 0) { + output.WriteRawTag(50); + output.WriteString(PhoneNumber); + } + if (MaxExpiration != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(56); + output.WriteEnum((int) MaxExpiration); + } + if (CreatedOn != 0L) { + output.WriteRawTag(64); + output.WriteInt64(CreatedOn); + } + if (LastFrequency != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(72); + output.WriteEnum((int) LastFrequency); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { @@ -5175,6 +7492,12 @@ public int CalculateSize() { if (MaxExpiration != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) MaxExpiration); } + if (CreatedOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CreatedOn); + } + if (LastFrequency != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LastFrequency); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -5182,6 +7505,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(TwoFactorChannelInfo other) { if (other == null) { return; @@ -5205,14 +7529,28 @@ public void MergeFrom(TwoFactorChannelInfo other) { if (other.MaxExpiration != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { MaxExpiration = other.MaxExpiration; } + if (other.CreatedOn != 0L) { + CreatedOn = other.CreatedOn; + } + if (other.LastFrequency != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + LastFrequency = other.LastFrequency; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5244,134 +7582,201 @@ public void MergeFrom(pb::CodedInputStream input) { MaxExpiration = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); break; } + case 64: { + CreatedOn = input.ReadInt64(); + break; + } + case 72: { + LastFrequency = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ChannelType = (global::Authentication.TwoFactorChannelType) input.ReadEnum(); + break; + } + case 18: { + ChannelUid = input.ReadBytes(); + break; + } + case 26: { + ChannelName = input.ReadString(); + break; + } + case 34: { + Challenge = input.ReadString(); + break; + } + case 42: { + capabilities_.AddEntriesFrom(ref input, _repeated_capabilities_codec); + break; + } + case 50: { + PhoneNumber = input.ReadString(); + break; + } + case 56: { + MaxExpiration = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + break; + } + case 64: { + CreatedOn = input.ReadInt64(); + break; + } + case 72: { + LastFrequency = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + break; + } } } } + #endif } - public sealed partial class TwoFactorValidateRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorValidateRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorDuoStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorDuoStatus()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[19]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorValidateRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorDuoStatus() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorValidateRequest(TwoFactorValidateRequest other) : this() { - encryptedLoginToken_ = other.encryptedLoginToken_; - valueType_ = other.valueType_; - value_ = other.value_; - channelUid_ = other.channelUid_; - expireIn_ = other.expireIn_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorDuoStatus(TwoFactorDuoStatus other) : this() { + capabilities_ = other.capabilities_.Clone(); + phoneNumber_ = other.phoneNumber_; + enrollUrl_ = other.enrollUrl_; + message_ = other.message_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorValidateRequest Clone() { - return new TwoFactorValidateRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorDuoStatus Clone() { + return new TwoFactorDuoStatus(this); } - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 1; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; + /// Field number for the "capabilities" field. + public const int CapabilitiesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_capabilities_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField capabilities_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Capabilities { + get { return capabilities_; } + } + + /// Field number for the "phoneNumber" field. + public const int PhoneNumberFieldNumber = 2; + private string phoneNumber_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PhoneNumber { + get { return phoneNumber_; } set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + phoneNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "valueType" field. - public const int ValueTypeFieldNumber = 2; - private global::Authentication.TwoFactorValueType valueType_ = global::Authentication.TwoFactorValueType.TwoFaCodeNone; + /// Field number for the "enroll_url" field. + public const int EnrollUrlFieldNumber = 3; + private string enrollUrl_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.TwoFactorValueType ValueType { - get { return valueType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnrollUrl { + get { return enrollUrl_; } set { - valueType_ = value; + enrollUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 3; - private string value_ = ""; + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "channel_uid" field. - public const int ChannelUidFieldNumber = 4; - private pb::ByteString channelUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ChannelUid { - get { return channelUid_; } - set { - channelUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "expireIn" field. - public const int ExpireInFieldNumber = 5; - private global::Authentication.TwoFactorExpiration expireIn_ = global::Authentication.TwoFactorExpiration.TwoFaExpImmediately; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.TwoFactorExpiration ExpireIn { - get { return expireIn_; } - set { - expireIn_ = value; + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as TwoFactorValidateRequest); + return Equals(other as TwoFactorDuoStatus); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(TwoFactorValidateRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorDuoStatus other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; - if (ValueType != other.ValueType) return false; - if (Value != other.Value) return false; - if (ChannelUid != other.ChannelUid) return false; - if (ExpireIn != other.ExpireIn) return false; + if(!capabilities_.Equals(other.capabilities_)) return false; + if (PhoneNumber != other.PhoneNumber) return false; + if (EnrollUrl != other.EnrollUrl) return false; + if (Message != other.Message) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); - if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) hash ^= ValueType.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); - if (ChannelUid.Length != 0) hash ^= ChannelUid.GetHashCode(); - if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= ExpireIn.GetHashCode(); + hash ^= capabilities_.GetHashCode(); + if (PhoneNumber.Length != 0) hash ^= PhoneNumber.GetHashCode(); + if (EnrollUrl.Length != 0) hash ^= EnrollUrl.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5379,54 +7784,72 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedLoginToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedLoginToken); - } - if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { - output.WriteRawTag(16); - output.WriteEnum((int) ValueType); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + capabilities_.WriteTo(output, _repeated_capabilities_codec); + if (PhoneNumber.Length != 0) { + output.WriteRawTag(18); + output.WriteString(PhoneNumber); } - if (Value.Length != 0) { + if (EnrollUrl.Length != 0) { output.WriteRawTag(26); - output.WriteString(Value); + output.WriteString(EnrollUrl); } - if (ChannelUid.Length != 0) { + if (Message.Length != 0) { output.WriteRawTag(34); - output.WriteBytes(ChannelUid); - } - if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { - output.WriteRawTag(40); - output.WriteEnum((int) ExpireIn); + output.WriteString(Message); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + capabilities_.WriteTo(ref output, _repeated_capabilities_codec); + if (PhoneNumber.Length != 0) { + output.WriteRawTag(18); + output.WriteString(PhoneNumber); } - if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ValueType); + if (EnrollUrl.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EnrollUrl); } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); } - if (ChannelUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ChannelUid); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } - if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ExpireIn); + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += capabilities_.CalculateSize(_repeated_capabilities_codec); + if (PhoneNumber.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PhoneNumber); + } + if (EnrollUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnrollUrl); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -5435,128 +7858,239 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(TwoFactorValidateRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorDuoStatus other) { if (other == null) { return; } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; - } - if (other.ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { - ValueType = other.ValueType; - } - if (other.Value.Length != 0) { - Value = other.Value; + capabilities_.Add(other.capabilities_); + if (other.PhoneNumber.Length != 0) { + PhoneNumber = other.PhoneNumber; } - if (other.ChannelUid.Length != 0) { - ChannelUid = other.ChannelUid; + if (other.EnrollUrl.Length != 0) { + EnrollUrl = other.EnrollUrl; } - if (other.ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { - ExpireIn = other.ExpireIn; + if (other.Message.Length != 0) { + Message = other.Message; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedLoginToken = input.ReadBytes(); + capabilities_.AddEntriesFrom(input, _repeated_capabilities_codec); break; } - case 16: { - ValueType = (global::Authentication.TwoFactorValueType) input.ReadEnum(); + case 18: { + PhoneNumber = input.ReadString(); break; } case 26: { - Value = input.ReadString(); + EnrollUrl = input.ReadString(); break; } case 34: { - ChannelUid = input.ReadBytes(); + Message = input.ReadString(); break; } - case 40: { - ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + capabilities_.AddEntriesFrom(ref input, _repeated_capabilities_codec); + break; + } + case 18: { + PhoneNumber = input.ReadString(); + break; + } + case 26: { + EnrollUrl = input.ReadString(); + break; + } + case 34: { + Message = input.ReadString(); break; } } } } + #endif } - public sealed partial class TwoFactorValidateResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorValidateResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorAddRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[20]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorValidateResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorAddRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorValidateResponse(TwoFactorValidateResponse other) : this() { - encryptedLoginToken_ = other.encryptedLoginToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorAddRequest(TwoFactorAddRequest other) : this() { + channelType_ = other.channelType_; + channelUid_ = other.channelUid_; + channelName_ = other.channelName_; + phoneNumber_ = other.phoneNumber_; + duoPushType_ = other.duoPushType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorValidateResponse Clone() { - return new TwoFactorValidateResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorAddRequest Clone() { + return new TwoFactorAddRequest(this); } - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 1; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; + /// Field number for the "channelType" field. + public const int ChannelTypeFieldNumber = 1; + private global::Authentication.TwoFactorChannelType channelType_ = global::Authentication.TwoFactorChannelType.TwoFaCtNone; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorChannelType ChannelType { + get { return channelType_; } set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + channelType_ = value; + } + } + + /// Field number for the "channel_uid" field. + public const int ChannelUidFieldNumber = 2; + private pb::ByteString channelUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ChannelUid { + get { return channelUid_; } + set { + channelUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "channelName" field. + public const int ChannelNameFieldNumber = 3; + private string channelName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ChannelName { + get { return channelName_; } + set { + channelName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "phoneNumber" field. + public const int PhoneNumberFieldNumber = 4; + private string phoneNumber_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PhoneNumber { + get { return phoneNumber_; } + set { + phoneNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "duoPushType" field. + public const int DuoPushTypeFieldNumber = 5; + private global::Authentication.TwoFactorPushType duoPushType_ = global::Authentication.TwoFactorPushType.TwoFaPushNone; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorPushType DuoPushType { + get { return duoPushType_; } + set { + duoPushType_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as TwoFactorValidateResponse); + return Equals(other as TwoFactorAddRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(TwoFactorValidateResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorAddRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (ChannelType != other.ChannelType) return false; + if (ChannelUid != other.ChannelUid) return false; + if (ChannelName != other.ChannelName) return false; + if (PhoneNumber != other.PhoneNumber) return false; + if (DuoPushType != other.DuoPushType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) hash ^= ChannelType.GetHashCode(); + if (ChannelUid.Length != 0) hash ^= ChannelUid.GetHashCode(); + if (ChannelName.Length != 0) hash ^= ChannelName.GetHashCode(); + if (PhoneNumber.Length != 0) hash ^= PhoneNumber.GetHashCode(); + if (DuoPushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) hash ^= DuoPushType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5564,125 +8098,255 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedLoginToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedLoginToken); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { + output.WriteRawTag(8); + output.WriteEnum((int) ChannelType); } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); + if (ChannelUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ChannelUid); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + if (ChannelName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ChannelName); + } + if (PhoneNumber.Length != 0) { + output.WriteRawTag(34); + output.WriteString(PhoneNumber); + } + if (DuoPushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + output.WriteRawTag(40); + output.WriteEnum((int) DuoPushType); } if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + _unknownFields.WriteTo(output); } - return size; + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(TwoFactorValidateResponse other) { - if (other == null) { - return; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { + output.WriteRawTag(8); + output.WriteEnum((int) ChannelType); } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; + if (ChannelUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ChannelUid); + } + if (ChannelName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ChannelName); + } + if (PhoneNumber.Length != 0) { + output.WriteRawTag(34); + output.WriteString(PhoneNumber); + } + if (DuoPushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + output.WriteRawTag(40); + output.WriteEnum((int) DuoPushType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ChannelType); + } + if (ChannelUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ChannelUid); + } + if (ChannelName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ChannelName); + } + if (PhoneNumber.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PhoneNumber); + } + if (DuoPushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DuoPushType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorAddRequest other) { + if (other == null) { + return; + } + if (other.ChannelType != global::Authentication.TwoFactorChannelType.TwoFaCtNone) { + ChannelType = other.ChannelType; + } + if (other.ChannelUid.Length != 0) { + ChannelUid = other.ChannelUid; + } + if (other.ChannelName.Length != 0) { + ChannelName = other.ChannelName; + } + if (other.PhoneNumber.Length != 0) { + PhoneNumber = other.PhoneNumber; + } + if (other.DuoPushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + DuoPushType = other.DuoPushType; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - EncryptedLoginToken = input.ReadBytes(); + case 8: { + ChannelType = (global::Authentication.TwoFactorChannelType) input.ReadEnum(); + break; + } + case 18: { + ChannelUid = input.ReadBytes(); + break; + } + case 26: { + ChannelName = input.ReadString(); + break; + } + case 34: { + PhoneNumber = input.ReadString(); + break; + } + case 40: { + DuoPushType = (global::Authentication.TwoFactorPushType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ChannelType = (global::Authentication.TwoFactorChannelType) input.ReadEnum(); + break; + } + case 18: { + ChannelUid = input.ReadBytes(); + break; + } + case 26: { + ChannelName = input.ReadString(); + break; + } + case 34: { + PhoneNumber = input.ReadString(); + break; + } + case 40: { + DuoPushType = (global::Authentication.TwoFactorPushType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class TwoFactorSendPushRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorSendPushRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorRenameRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorRenameRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[21]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorSendPushRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorRenameRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorSendPushRequest(TwoFactorSendPushRequest other) : this() { - encryptedLoginToken_ = other.encryptedLoginToken_; - pushType_ = other.pushType_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorRenameRequest(TwoFactorRenameRequest other) : this() { channelUid_ = other.channelUid_; - expireIn_ = other.expireIn_; + channelName_ = other.channelName_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TwoFactorSendPushRequest Clone() { - return new TwoFactorSendPushRequest(this); - } - - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 1; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } - set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "pushType" field. - public const int PushTypeFieldNumber = 2; - private global::Authentication.TwoFactorPushType pushType_ = global::Authentication.TwoFactorPushType.TwoFaPushNone; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.TwoFactorPushType PushType { - get { return pushType_; } - set { - pushType_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorRenameRequest Clone() { + return new TwoFactorRenameRequest(this); } /// Field number for the "channel_uid" field. - public const int ChannelUidFieldNumber = 3; + public const int ChannelUidFieldNumber = 1; private pb::ByteString channelUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString ChannelUid { get { return channelUid_; } set { @@ -5690,47 +8354,44 @@ public TwoFactorSendPushRequest Clone() { } } - /// Field number for the "expireIn" field. - public const int ExpireInFieldNumber = 4; - private global::Authentication.TwoFactorExpiration expireIn_ = global::Authentication.TwoFactorExpiration.TwoFaExpImmediately; - /// - /// for TWO_FA_PUSH_KEEPER and TWO_FA_PUSH_DUO_PUSH - /// + /// Field number for the "channelName" field. + public const int ChannelNameFieldNumber = 2; + private string channelName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.TwoFactorExpiration ExpireIn { - get { return expireIn_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ChannelName { + get { return channelName_; } set { - expireIn_ = value; + channelName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as TwoFactorSendPushRequest); + return Equals(other as TwoFactorRenameRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(TwoFactorSendPushRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorRenameRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; - if (PushType != other.PushType) return false; if (ChannelUid != other.ChannelUid) return false; - if (ExpireIn != other.ExpireIn) return false; + if (ChannelName != other.ChannelName) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); - if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) hash ^= PushType.GetHashCode(); if (ChannelUid.Length != 0) hash ^= ChannelUid.GetHashCode(); - if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= ExpireIn.GetHashCode(); + if (ChannelName.Length != 0) hash ^= ChannelName.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5738,47 +8399,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedLoginToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ChannelUid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedLoginToken); + output.WriteBytes(ChannelUid); } - if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { - output.WriteRawTag(16); - output.WriteEnum((int) PushType); + if (ChannelName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ChannelName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (ChannelUid.Length != 0) { - output.WriteRawTag(26); + output.WriteRawTag(10); output.WriteBytes(ChannelUid); } - if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { - output.WriteRawTag(32); - output.WriteEnum((int) ExpireIn); + if (ChannelName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ChannelName); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); - } - if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PushType); - } if (ChannelUid.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(ChannelUid); } - if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ExpireIn); + if (ChannelName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ChannelName); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -5787,177 +8459,179 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(TwoFactorSendPushRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorRenameRequest other) { if (other == null) { return; } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; - } - if (other.PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { - PushType = other.PushType; - } if (other.ChannelUid.Length != 0) { ChannelUid = other.ChannelUid; } - if (other.ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { - ExpireIn = other.ExpireIn; + if (other.ChannelName.Length != 0) { + ChannelName = other.ChannelName; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedLoginToken = input.ReadBytes(); + ChannelUid = input.ReadBytes(); break; } - case 16: { - PushType = (global::Authentication.TwoFactorPushType) input.ReadEnum(); + case 18: { + ChannelName = input.ReadString(); break; } - case 26: { + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { ChannelUid = input.ReadBytes(); break; } - case 32: { - ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + case 18: { + ChannelName = input.ReadString(); break; } } } } + #endif } - public sealed partial class License : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new License()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorAddResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorAddResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[22]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public License() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorAddResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public License(License other) : this() { - created_ = other.created_; - expiration_ = other.expiration_; - licenseStatus_ = other.licenseStatus_; - paid_ = other.paid_; - message_ = other.message_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorAddResponse(TwoFactorAddResponse other) : this() { + challenge_ = other.challenge_; + backupKeys_ = other.backupKeys_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public License Clone() { - return new License(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorAddResponse Clone() { + return new TwoFactorAddResponse(this); } - /// Field number for the "created" field. - public const int CreatedFieldNumber = 1; - private long created_; + /// Field number for the "challenge" field. + public const int ChallengeFieldNumber = 1; + private string challenge_ = ""; + /// + /// for totp and security keys + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Created { - get { return created_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Challenge { + get { return challenge_; } set { - created_ = value; - } - } - - /// Field number for the "expiration" field. - public const int ExpirationFieldNumber = 2; - private long expiration_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Expiration { - get { return expiration_; } - set { - expiration_ = value; - } - } - - /// Field number for the "licenseStatus" field. - public const int LicenseStatusFieldNumber = 3; - private global::Authentication.LicenseStatus licenseStatus_ = global::Authentication.LicenseStatus.Other; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.LicenseStatus LicenseStatus { - get { return licenseStatus_; } - set { - licenseStatus_ = value; - } - } - - /// Field number for the "paid" field. - public const int PaidFieldNumber = 4; - private bool paid_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Paid { - get { return paid_; } - set { - paid_ = value; + challenge_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "message" field. - public const int MessageFieldNumber = 5; - private string message_ = ""; + /// Field number for the "backupKeys" field. + public const int BackupKeysFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_backupKeys_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField backupKeys_ = new pbc::RepeatedField(); + /// + /// for backup keys + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Message { - get { return message_; } - set { - message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField BackupKeys { + get { return backupKeys_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as License); + return Equals(other as TwoFactorAddResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(License other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorAddResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Created != other.Created) return false; - if (Expiration != other.Expiration) return false; - if (LicenseStatus != other.LicenseStatus) return false; - if (Paid != other.Paid) return false; - if (Message != other.Message) return false; + if (Challenge != other.Challenge) return false; + if(!backupKeys_.Equals(other.backupKeys_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Created != 0L) hash ^= Created.GetHashCode(); - if (Expiration != 0L) hash ^= Expiration.GetHashCode(); - if (LicenseStatus != global::Authentication.LicenseStatus.Other) hash ^= LicenseStatus.GetHashCode(); - if (Paid != false) hash ^= Paid.GetHashCode(); - if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (Challenge.Length != 0) hash ^= Challenge.GetHashCode(); + hash ^= backupKeys_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5965,55 +8639,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Created != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Created); - } - if (Expiration != 0L) { - output.WriteRawTag(16); - output.WriteInt64(Expiration); - } - if (LicenseStatus != global::Authentication.LicenseStatus.Other) { - output.WriteRawTag(24); - output.WriteEnum((int) LicenseStatus); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Challenge.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Challenge); } - if (Paid != false) { - output.WriteRawTag(32); - output.WriteBool(Paid); + backupKeys_.WriteTo(output, _repeated_backupKeys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Message.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Message); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Challenge.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Challenge); } + backupKeys_.WriteTo(ref output, _repeated_backupKeys_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Created != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Created); - } - if (Expiration != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); - } - if (LicenseStatus != global::Authentication.LicenseStatus.Other) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LicenseStatus); - } - if (Paid != false) { - size += 1 + 1; - } - if (Message.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + if (Challenge.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Challenge); } + size += backupKeys_.CalculateSize(_repeated_backupKeys_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6021,165 +8691,157 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(License other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorAddResponse other) { if (other == null) { return; } - if (other.Created != 0L) { - Created = other.Created; - } - if (other.Expiration != 0L) { - Expiration = other.Expiration; - } - if (other.LicenseStatus != global::Authentication.LicenseStatus.Other) { - LicenseStatus = other.LicenseStatus; - } - if (other.Paid != false) { - Paid = other.Paid; - } - if (other.Message.Length != 0) { - Message = other.Message; + if (other.Challenge.Length != 0) { + Challenge = other.Challenge; } + backupKeys_.Add(other.backupKeys_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Created = input.ReadInt64(); + case 10: { + Challenge = input.ReadString(); break; } - case 16: { - Expiration = input.ReadInt64(); + case 18: { + backupKeys_.AddEntriesFrom(input, _repeated_backupKeys_codec); break; } - case 24: { - LicenseStatus = (global::Authentication.LicenseStatus) input.ReadEnum(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 32: { - Paid = input.ReadBool(); + case 10: { + Challenge = input.ReadString(); break; } - case 42: { - Message = input.ReadString(); + case 18: { + backupKeys_.AddEntriesFrom(ref input, _repeated_backupKeys_codec); break; } } } } + #endif } - public sealed partial class OwnerlessRecord : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OwnerlessRecord()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorDeleteRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorDeleteRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[23]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OwnerlessRecord() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorDeleteRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OwnerlessRecord(OwnerlessRecord other) : this() { - recordUid_ = other.recordUid_; - recordKey_ = other.recordKey_; - status_ = other.status_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorDeleteRequest(TwoFactorDeleteRequest other) : this() { + channelUid_ = other.channelUid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OwnerlessRecord Clone() { - return new OwnerlessRecord(this); - } - - /// Field number for the "recordUid" field. - public const int RecordUidFieldNumber = 1; - private pb::ByteString recordUid_ = pb::ByteString.Empty; - /// - /// used in get request, set request, set response - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RecordUid { - get { return recordUid_; } - set { - recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "recordKey" field. - public const int RecordKeyFieldNumber = 2; - private pb::ByteString recordKey_ = pb::ByteString.Empty; - /// - /// used in set request - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RecordKey { - get { return recordKey_; } - set { - recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorDeleteRequest Clone() { + return new TwoFactorDeleteRequest(this); } - /// Field number for the "status" field. - public const int StatusFieldNumber = 3; - private int status_; - /// - /// used in set response - /// + /// Field number for the "channel_uid" field. + public const int ChannelUidFieldNumber = 1; + private pb::ByteString channelUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Status { - get { return status_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ChannelUid { + get { return channelUid_; } set { - status_ = value; + channelUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as OwnerlessRecord); + return Equals(other as TwoFactorDeleteRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(OwnerlessRecord other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorDeleteRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RecordUid != other.RecordUid) return false; - if (RecordKey != other.RecordKey) return false; - if (Status != other.Status) return false; + if (ChannelUid != other.ChannelUid) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); - if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); - if (Status != 0) hash ^= Status.GetHashCode(); + if (ChannelUid.Length != 0) hash ^= ChannelUid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6187,40 +8849,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RecordUid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ChannelUid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(RecordUid); + output.WriteBytes(ChannelUid); } - if (RecordKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(RecordKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Status != 0) { - output.WriteRawTag(24); - output.WriteInt32(Status); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ChannelUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ChannelUid); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RecordUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); - } - if (RecordKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); - } - if (Status != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); + if (ChannelUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ChannelUid); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -6229,113 +8898,162 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(OwnerlessRecord other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorDeleteRequest other) { if (other == null) { return; } - if (other.RecordUid.Length != 0) { - RecordUid = other.RecordUid; - } - if (other.RecordKey.Length != 0) { - RecordKey = other.RecordKey; - } - if (other.Status != 0) { - Status = other.Status; + if (other.ChannelUid.Length != 0) { + ChannelUid = other.ChannelUid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - RecordUid = input.ReadBytes(); + ChannelUid = input.ReadBytes(); break; } - case 18: { - RecordKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 24: { - Status = input.ReadInt32(); + case 10: { + ChannelUid = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class OwnerlessRecords : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OwnerlessRecords()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorListResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorListResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[24]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OwnerlessRecords() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorListResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OwnerlessRecords(OwnerlessRecords other) : this() { - ownerlessRecord_ = other.ownerlessRecord_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorListResponse(TwoFactorListResponse other) : this() { + channels_ = other.channels_.Clone(); + expireOn_ = other.expireOn_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public OwnerlessRecords Clone() { - return new OwnerlessRecords(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorListResponse Clone() { + return new TwoFactorListResponse(this); } - /// Field number for the "ownerlessRecord" field. - public const int OwnerlessRecordFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_ownerlessRecord_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.OwnerlessRecord.Parser); - private readonly pbc::RepeatedField ownerlessRecord_ = new pbc::RepeatedField(); + /// Field number for the "channels" field. + public const int ChannelsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_channels_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.TwoFactorChannelInfo.Parser); + private readonly pbc::RepeatedField channels_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField OwnerlessRecord { - get { return ownerlessRecord_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Channels { + get { return channels_; } + } + + /// Field number for the "expireOn" field. + public const int ExpireOnFieldNumber = 2; + private long expireOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ExpireOn { + get { return expireOn_; } + set { + expireOn_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as OwnerlessRecords); + return Equals(other as TwoFactorListResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(OwnerlessRecords other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorListResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!ownerlessRecord_.Equals(other.ownerlessRecord_)) return false; + if(!channels_.Equals(other.channels_)) return false; + if (ExpireOn != other.ExpireOn) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= ownerlessRecord_.GetHashCode(); + hash ^= channels_.GetHashCode(); + if (ExpireOn != 0L) hash ^= ExpireOn.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6343,22 +9061,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - ownerlessRecord_.WriteTo(output, _repeated_ownerlessRecord_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + channels_.WriteTo(output, _repeated_channels_codec); + if (ExpireOn != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ExpireOn); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + channels_.WriteTo(ref output, _repeated_channels_codec); + if (ExpireOn != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ExpireOn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += ownerlessRecord_.CalculateSize(_repeated_ownerlessRecord_codec); + size += channels_.CalculateSize(_repeated_channels_codec); + if (ExpireOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ExpireOn); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6366,473 +9113,508 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(OwnerlessRecords other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorListResponse other) { if (other == null) { return; } - ownerlessRecord_.Add(other.ownerlessRecord_); + channels_.Add(other.channels_); + if (other.ExpireOn != 0L) { + ExpireOn = other.ExpireOn; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - ownerlessRecord_.AddEntriesFrom(input, _repeated_ownerlessRecord_codec); + channels_.AddEntriesFrom(input, _repeated_channels_codec); + break; + } + case 16: { + ExpireOn = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + channels_.AddEntriesFrom(ref input, _repeated_channels_codec); + break; + } + case 16: { + ExpireOn = input.ReadInt64(); break; } } } } + #endif } - public sealed partial class UserAuthRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAuthRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorUpdateExpirationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorUpdateExpirationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[25]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAuthRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorUpdateExpirationRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAuthRequest(UserAuthRequest other) : this() { - uid_ = other.uid_; - salt_ = other.salt_; - iterations_ = other.iterations_; - encryptedClientKey_ = other.encryptedClientKey_; - authHash_ = other.authHash_; - encryptedDataKey_ = other.encryptedDataKey_; - loginType_ = other.loginType_; - name_ = other.name_; - algorithm_ = other.algorithm_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorUpdateExpirationRequest(TwoFactorUpdateExpirationRequest other) : this() { + expireIn_ = other.expireIn_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAuthRequest Clone() { - return new UserAuthRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorUpdateExpirationRequest Clone() { + return new TwoFactorUpdateExpirationRequest(this); } - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private pb::ByteString uid_ = pb::ByteString.Empty; + /// Field number for the "expireIn" field. + public const int ExpireInFieldNumber = 1; + private global::Authentication.TwoFactorExpiration expireIn_ = global::Authentication.TwoFactorExpiration.TwoFaExpImmediately; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Uid { - get { return uid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorExpiration ExpireIn { + get { return expireIn_; } set { - uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + expireIn_ = value; } } - /// Field number for the "salt" field. - public const int SaltFieldNumber = 2; - private pb::ByteString salt_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Salt { - get { return salt_; } - set { - salt_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TwoFactorUpdateExpirationRequest); } - /// Field number for the "iterations" field. - public const int IterationsFieldNumber = 3; - private int iterations_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Iterations { - get { return iterations_; } - set { - iterations_ = value; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorUpdateExpirationRequest other) { + if (ReferenceEquals(other, null)) { + return false; } - } - - /// Field number for the "encryptedClientKey" field. - public const int EncryptedClientKeyFieldNumber = 4; - private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedClientKey { - get { return encryptedClientKey_; } - set { - encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + if (ReferenceEquals(other, this)) { + return true; } + if (ExpireIn != other.ExpireIn) return false; + return Equals(_unknownFields, other._unknownFields); } - /// Field number for the "authHash" field. - public const int AuthHashFieldNumber = 5; - private pb::ByteString authHash_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AuthHash { - get { return authHash_; } - set { - authHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= ExpireIn.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } + return hash; } - /// Field number for the "encryptedDataKey" field. - public const int EncryptedDataKeyFieldNumber = 6; - private pb::ByteString encryptedDataKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDataKey { - get { return encryptedDataKey_; } - set { - encryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); } - /// Field number for the "loginType" field. - public const int LoginTypeFieldNumber = 7; - private global::Authentication.LoginType loginType_ = global::Authentication.LoginType.Normal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.LoginType LoginType { - get { return loginType_; } - set { - loginType_ = value; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(8); + output.WriteEnum((int) ExpireIn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } + #endif } - /// Field number for the "name" field. - public const int NameFieldNumber = 8; - private string name_ = ""; + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(8); + output.WriteEnum((int) ExpireIn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } } + #endif - /// Field number for the "algorithm" field. - public const int AlgorithmFieldNumber = 9; - private int algorithm_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Algorithm { - get { return algorithm_; } - set { - algorithm_ = value; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ExpireIn); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); } + return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as UserAuthRequest); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorUpdateExpirationRequest other) { + if (other == null) { + return; + } + if (other.ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + ExpireIn = other.ExpireIn; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserAuthRequest other) { - if (ReferenceEquals(other, null)) { - return false; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - if (ReferenceEquals(other, this)) { - return true; + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + break; + } + } } - if (Uid != other.Uid) return false; - if (Salt != other.Salt) return false; - if (Iterations != other.Iterations) return false; - if (EncryptedClientKey != other.EncryptedClientKey) return false; - if (AuthHash != other.AuthHash) return false; - if (EncryptedDataKey != other.EncryptedDataKey) return false; - if (LoginType != other.LoginType) return false; - if (Name != other.Name) return false; - if (Algorithm != other.Algorithm) return false; - return Equals(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Uid.Length != 0) hash ^= Uid.GetHashCode(); - if (Salt.Length != 0) hash ^= Salt.GetHashCode(); - if (Iterations != 0) hash ^= Iterations.GetHashCode(); - if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); - if (AuthHash.Length != 0) hash ^= AuthHash.GetHashCode(); - if (EncryptedDataKey.Length != 0) hash ^= EncryptedDataKey.GetHashCode(); - if (LoginType != global::Authentication.LoginType.Normal) hash ^= LoginType.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (Algorithm != 0) hash ^= Algorithm.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Uid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(Uid); - } - if (Salt.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(Salt); - } - if (Iterations != 0) { - output.WriteRawTag(24); - output.WriteInt32(Iterations); - } - if (EncryptedClientKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(EncryptedClientKey); - } - if (AuthHash.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(AuthHash); - } - if (EncryptedDataKey.Length != 0) { - output.WriteRawTag(50); - output.WriteBytes(EncryptedDataKey); - } - if (LoginType != global::Authentication.LoginType.Normal) { - output.WriteRawTag(56); - output.WriteEnum((int) LoginType); - } - if (Name.Length != 0) { - output.WriteRawTag(66); - output.WriteString(Name); - } - if (Algorithm != 0) { - output.WriteRawTag(72); - output.WriteInt32(Algorithm); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (Uid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); - } - if (Salt.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Salt); - } - if (Iterations != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Iterations); - } - if (EncryptedClientKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); - } - if (AuthHash.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuthHash); - } - if (EncryptedDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDataKey); - } - if (LoginType != global::Authentication.LoginType.Normal) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoginType); - } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (Algorithm != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Algorithm); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserAuthRequest other) { - if (other == null) { - return; - } - if (other.Uid.Length != 0) { - Uid = other.Uid; - } - if (other.Salt.Length != 0) { - Salt = other.Salt; - } - if (other.Iterations != 0) { - Iterations = other.Iterations; - } - if (other.EncryptedClientKey.Length != 0) { - EncryptedClientKey = other.EncryptedClientKey; - } - if (other.AuthHash.Length != 0) { - AuthHash = other.AuthHash; - } - if (other.EncryptedDataKey.Length != 0) { - EncryptedDataKey = other.EncryptedDataKey; - } - if (other.LoginType != global::Authentication.LoginType.Normal) { - LoginType = other.LoginType; - } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.Algorithm != 0) { - Algorithm = other.Algorithm; - } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - Uid = input.ReadBytes(); - break; - } - case 18: { - Salt = input.ReadBytes(); - break; - } - case 24: { - Iterations = input.ReadInt32(); - break; - } - case 34: { - EncryptedClientKey = input.ReadBytes(); - break; - } - case 42: { - AuthHash = input.ReadBytes(); - break; - } - case 50: { - EncryptedDataKey = input.ReadBytes(); - break; - } - case 56: { - LoginType = (global::Authentication.LoginType) input.ReadEnum(); - break; - } - case 66: { - Name = input.ReadString(); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 72: { - Algorithm = input.ReadInt32(); + case 8: { + ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class UidRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UidRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorValidateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorValidateRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[26]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UidRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorValidateRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UidRequest(UidRequest other) : this() { - uid_ = other.uid_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorValidateRequest(TwoFactorValidateRequest other) : this() { + encryptedLoginToken_ = other.encryptedLoginToken_; + valueType_ = other.valueType_; + value_ = other.value_; + channelUid_ = other.channelUid_; + expireIn_ = other.expireIn_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UidRequest Clone() { - return new UidRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorValidateRequest Clone() { + return new TwoFactorValidateRequest(this); } - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_uid_codec - = pb::FieldCodec.ForBytes(10); - private readonly pbc::RepeatedField uid_ = new pbc::RepeatedField(); + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 1; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Uid { - get { return uid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } + set { + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "valueType" field. + public const int ValueTypeFieldNumber = 2; + private global::Authentication.TwoFactorValueType valueType_ = global::Authentication.TwoFactorValueType.TwoFaCodeNone; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as UidRequest); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorValueType ValueType { + get { return valueType_; } + set { + valueType_ = value; + } } + /// Field number for the "value" field. + public const int ValueFieldNumber = 3; + private string value_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UidRequest other) { - if (ReferenceEquals(other, null)) { - return false; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - if (ReferenceEquals(other, this)) { - return true; + } + + /// Field number for the "channel_uid" field. + public const int ChannelUidFieldNumber = 4; + private pb::ByteString channelUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ChannelUid { + get { return channelUid_; } + set { + channelUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - if(!uid_.Equals(other.uid_)) return false; - return Equals(_unknownFields, other._unknownFields); } + /// Field number for the "expireIn" field. + public const int ExpireInFieldNumber = 5; + private global::Authentication.TwoFactorExpiration expireIn_ = global::Authentication.TwoFactorExpiration.TwoFaExpImmediately; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - hash ^= uid_.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorExpiration ExpireIn { + get { return expireIn_; } + set { + expireIn_ = value; } - return hash; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TwoFactorValidateRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - uid_.WriteTo(output, _repeated_uid_codec); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorValidateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (ValueType != other.ValueType) return false; + if (Value != other.Value) return false; + if (ChannelUid != other.ChannelUid) return false; + if (ExpireIn != other.ExpireIn) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) hash ^= ValueType.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (ChannelUid.Length != 0) hash ^= ChannelUid.GetHashCode(); + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= ExpireIn.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); + } + if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { + output.WriteRawTag(16); + output.WriteEnum((int) ValueType); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (ChannelUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ChannelUid); + } + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(40); + output.WriteEnum((int) ExpireIn); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); + } + if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { + output.WriteRawTag(16); + output.WriteEnum((int) ValueType); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (ChannelUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ChannelUid); + } + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(40); + output.WriteEnum((int) ExpireIn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += uid_.CalculateSize(_repeated_uid_codec); + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + } + if (ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ValueType); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (ChannelUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ChannelUid); + } + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ExpireIn); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6840,154 +9622,192 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UidRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorValidateRequest other) { if (other == null) { return; } - uid_.Add(other.uid_); + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; + } + if (other.ValueType != global::Authentication.TwoFactorValueType.TwoFaCodeNone) { + ValueType = other.ValueType; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + if (other.ChannelUid.Length != 0) { + ChannelUid = other.ChannelUid; + } + if (other.ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + ExpireIn = other.ExpireIn; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - uid_.AddEntriesFrom(input, _repeated_uid_codec); + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 16: { + ValueType = (global::Authentication.TwoFactorValueType) input.ReadEnum(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + case 34: { + ChannelUid = input.ReadBytes(); + break; + } + case 40: { + ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 16: { + ValueType = (global::Authentication.TwoFactorValueType) input.ReadEnum(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + case 34: { + ChannelUid = input.ReadBytes(); + break; + } + case 40: { + ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class DeviceUpdateRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceUpdateRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorValidateResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorValidateResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[27]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceUpdateRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorValidateResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceUpdateRequest(DeviceUpdateRequest other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; - clientVersion_ = other.clientVersion_; - deviceName_ = other.deviceName_; - devicePublicKey_ = other.devicePublicKey_; - deviceStatus_ = other.deviceStatus_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorValidateResponse(TwoFactorValidateResponse other) : this() { + encryptedLoginToken_ = other.encryptedLoginToken_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceUpdateRequest Clone() { - return new DeviceUpdateRequest(this); - } - - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 2; - private string clientVersion_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "deviceName" field. - public const int DeviceNameFieldNumber = 3; - private string deviceName_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceName { - get { return deviceName_; } - set { - deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "devicePublicKey" field. - public const int DevicePublicKeyFieldNumber = 4; - private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DevicePublicKey { - get { return devicePublicKey_; } - set { - devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorValidateResponse Clone() { + return new TwoFactorValidateResponse(this); } - /// Field number for the "deviceStatus" field. - public const int DeviceStatusFieldNumber = 5; - private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 1; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.DeviceStatus DeviceStatus { - get { return deviceStatus_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } set { - deviceStatus_ = value; + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceUpdateRequest); + return Equals(other as TwoFactorValidateResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceUpdateRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorValidateResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (ClientVersion != other.ClientVersion) return false; - if (DeviceName != other.DeviceName) return false; - if (DevicePublicKey != other.DevicePublicKey) return false; - if (DeviceStatus != other.DeviceStatus) return false; + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); - if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6995,54 +9815,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedLoginToken.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); - } - if (ClientVersion.Length != 0) { - output.WriteRawTag(18); - output.WriteString(ClientVersion); - } - if (DeviceName.Length != 0) { - output.WriteRawTag(26); - output.WriteString(DeviceName); + output.WriteBytes(EncryptedLoginToken); } - if (DevicePublicKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(DevicePublicKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - output.WriteRawTag(40); - output.WriteEnum((int) DeviceStatus); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } - if (DeviceName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); - } - if (DevicePublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); - } - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceStatus); + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -7051,170 +9864,196 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceUpdateRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorValidateResponse other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; - } - if (other.DeviceName.Length != 0) { - DeviceName = other.DeviceName; - } - if (other.DevicePublicKey.Length != 0) { - DevicePublicKey = other.DevicePublicKey; - } - if (other.DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - DeviceStatus = other.DeviceStatus; + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); - break; - } - case 18: { - ClientVersion = input.ReadString(); - break; - } - case 26: { - DeviceName = input.ReadString(); + EncryptedLoginToken = input.ReadBytes(); break; } - case 34: { - DevicePublicKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 40: { - DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + case 10: { + EncryptedLoginToken = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class RegisterDeviceInRegionRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegisterDeviceInRegionRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TwoFactorSendPushRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TwoFactorSendPushRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[28]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegisterDeviceInRegionRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorSendPushRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegisterDeviceInRegionRequest(RegisterDeviceInRegionRequest other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; - clientVersion_ = other.clientVersion_; - deviceName_ = other.deviceName_; - devicePublicKey_ = other.devicePublicKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorSendPushRequest(TwoFactorSendPushRequest other) : this() { + encryptedLoginToken_ = other.encryptedLoginToken_; + pushType_ = other.pushType_; + channelUid_ = other.channelUid_; + expireIn_ = other.expireIn_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegisterDeviceInRegionRequest Clone() { - return new RegisterDeviceInRegionRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TwoFactorSendPushRequest Clone() { + return new TwoFactorSendPushRequest(this); } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 1; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 2; - private string clientVersion_ = ""; + /// Field number for the "pushType" field. + public const int PushTypeFieldNumber = 2; + private global::Authentication.TwoFactorPushType pushType_ = global::Authentication.TwoFactorPushType.TwoFaPushNone; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorPushType PushType { + get { return pushType_; } set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + pushType_ = value; } } - /// Field number for the "deviceName" field. - public const int DeviceNameFieldNumber = 3; - private string deviceName_ = ""; + /// Field number for the "channel_uid" field. + public const int ChannelUidFieldNumber = 3; + private pb::ByteString channelUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceName { - get { return deviceName_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ChannelUid { + get { return channelUid_; } set { - deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + channelUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "devicePublicKey" field. - public const int DevicePublicKeyFieldNumber = 4; - private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; + /// Field number for the "expireIn" field. + public const int ExpireInFieldNumber = 4; + private global::Authentication.TwoFactorExpiration expireIn_ = global::Authentication.TwoFactorExpiration.TwoFaExpImmediately; + /// + /// for TWO_FA_PUSH_KEEPER and TWO_FA_PUSH_DUO_PUSH + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DevicePublicKey { - get { return devicePublicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.TwoFactorExpiration ExpireIn { + get { return expireIn_; } set { - devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + expireIn_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RegisterDeviceInRegionRequest); + return Equals(other as TwoFactorSendPushRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RegisterDeviceInRegionRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TwoFactorSendPushRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (ClientVersion != other.ClientVersion) return false; - if (DeviceName != other.DeviceName) return false; - if (DevicePublicKey != other.DevicePublicKey) return false; + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (PushType != other.PushType) return false; + if (ChannelUid != other.ChannelUid) return false; + if (ExpireIn != other.ExpireIn) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); - if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) hash ^= PushType.GetHashCode(); + if (ChannelUid.Length != 0) hash ^= ChannelUid.GetHashCode(); + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) hash ^= ExpireIn.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7222,47 +10061,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedLoginToken.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); + output.WriteBytes(EncryptedLoginToken); } - if (ClientVersion.Length != 0) { - output.WriteRawTag(18); - output.WriteString(ClientVersion); + if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + output.WriteRawTag(16); + output.WriteEnum((int) PushType); } - if (DeviceName.Length != 0) { + if (ChannelUid.Length != 0) { output.WriteRawTag(26); - output.WriteString(DeviceName); + output.WriteBytes(ChannelUid); } - if (DevicePublicKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(DevicePublicKey); + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(32); + output.WriteEnum((int) ExpireIn); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); + } + if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + output.WriteRawTag(16); + output.WriteEnum((int) PushType); + } + if (ChannelUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ChannelUid); + } + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + output.WriteRawTag(32); + output.WriteEnum((int) ExpireIn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + if (PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) PushType); } - if (DeviceName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + if (ChannelUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ChannelUid); } - if (DevicePublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); + if (ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ExpireIn); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -7271,256 +10143,241 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RegisterDeviceInRegionRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TwoFactorSendPushRequest other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (other.PushType != global::Authentication.TwoFactorPushType.TwoFaPushNone) { + PushType = other.PushType; } - if (other.DeviceName.Length != 0) { - DeviceName = other.DeviceName; + if (other.ChannelUid.Length != 0) { + ChannelUid = other.ChannelUid; } - if (other.DevicePublicKey.Length != 0) { - DevicePublicKey = other.DevicePublicKey; + if (other.ExpireIn != global::Authentication.TwoFactorExpiration.TwoFaExpImmediately) { + ExpireIn = other.ExpireIn; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); + EncryptedLoginToken = input.ReadBytes(); break; } - case 18: { - ClientVersion = input.ReadString(); + case 16: { + PushType = (global::Authentication.TwoFactorPushType) input.ReadEnum(); break; } case 26: { - DeviceName = input.ReadString(); + ChannelUid = input.ReadBytes(); break; } - case 34: { - DevicePublicKey = input.ReadBytes(); + case 32: { + ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 16: { + PushType = (global::Authentication.TwoFactorPushType) input.ReadEnum(); + break; + } + case 26: { + ChannelUid = input.ReadBytes(); + break; + } + case 32: { + ExpireIn = (global::Authentication.TwoFactorExpiration) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class RegistrationRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegistrationRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class License : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new License()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[29]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegistrationRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public License() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegistrationRequest(RegistrationRequest other) : this() { - authRequest_ = other.authRequest_ != null ? other.authRequest_.Clone() : null; - userAuthRequest_ = other.userAuthRequest_ != null ? other.userAuthRequest_.Clone() : null; - encryptedClientKey_ = other.encryptedClientKey_; - encryptedPrivateKey_ = other.encryptedPrivateKey_; - publicKey_ = other.publicKey_; - verificationCode_ = other.verificationCode_; - deprecatedAuthHashHash_ = other.deprecatedAuthHashHash_; - deprecatedEncryptedClientKey_ = other.deprecatedEncryptedClientKey_; - deprecatedEncryptedPrivateKey_ = other.deprecatedEncryptedPrivateKey_; - deprecatedEncryptionParams_ = other.deprecatedEncryptionParams_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public License(License other) : this() { + created_ = other.created_; + expiration_ = other.expiration_; + licenseStatus_ = other.licenseStatus_; + paid_ = other.paid_; + message_ = other.message_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegistrationRequest Clone() { - return new RegistrationRequest(this); - } - - /// Field number for the "authRequest" field. - public const int AuthRequestFieldNumber = 1; - private global::Authentication.AuthRequest authRequest_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.AuthRequest AuthRequest { - get { return authRequest_; } - set { - authRequest_ = value; - } - } - - /// Field number for the "userAuthRequest" field. - public const int UserAuthRequestFieldNumber = 2; - private global::Authentication.UserAuthRequest userAuthRequest_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.UserAuthRequest UserAuthRequest { - get { return userAuthRequest_; } - set { - userAuthRequest_ = value; - } - } - - /// Field number for the "encryptedClientKey" field. - public const int EncryptedClientKeyFieldNumber = 3; - private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; - /// - /// encrypted with the data key - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedClientKey { - get { return encryptedClientKey_; } - set { - encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "encryptedPrivateKey" field. - public const int EncryptedPrivateKeyFieldNumber = 4; - private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; - /// - /// encrypted with the data key - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedPrivateKey { - get { return encryptedPrivateKey_; } - set { - encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "publicKey" field. - public const int PublicKeyFieldNumber = 5; - private pb::ByteString publicKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PublicKey { - get { return publicKey_; } - set { - publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public License Clone() { + return new License(this); } - /// Field number for the "verificationCode" field. - public const int VerificationCodeFieldNumber = 6; - private string verificationCode_ = ""; + /// Field number for the "created" field. + public const int CreatedFieldNumber = 1; + private long created_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationCode { - get { return verificationCode_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Created { + get { return created_; } set { - verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + created_ = value; } } - /// Field number for the "deprecatedAuthHashHash" field. - public const int DeprecatedAuthHashHashFieldNumber = 7; - private pb::ByteString deprecatedAuthHashHash_ = pb::ByteString.Empty; - /// - /// these will be ignored once the v2 clients are obsolete - /// + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 2; + private long expiration_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DeprecatedAuthHashHash { - get { return deprecatedAuthHashHash_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } set { - deprecatedAuthHashHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + expiration_ = value; } } - /// Field number for the "deprecatedEncryptedClientKey" field. - public const int DeprecatedEncryptedClientKeyFieldNumber = 8; - private pb::ByteString deprecatedEncryptedClientKey_ = pb::ByteString.Empty; + /// Field number for the "licenseStatus" field. + public const int LicenseStatusFieldNumber = 3; + private global::Authentication.LicenseStatus licenseStatus_ = global::Authentication.LicenseStatus.Other; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DeprecatedEncryptedClientKey { - get { return deprecatedEncryptedClientKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.LicenseStatus LicenseStatus { + get { return licenseStatus_; } set { - deprecatedEncryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + licenseStatus_ = value; } } - /// Field number for the "deprecatedEncryptedPrivateKey" field. - public const int DeprecatedEncryptedPrivateKeyFieldNumber = 9; - private pb::ByteString deprecatedEncryptedPrivateKey_ = pb::ByteString.Empty; + /// Field number for the "paid" field. + public const int PaidFieldNumber = 4; + private bool paid_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DeprecatedEncryptedPrivateKey { - get { return deprecatedEncryptedPrivateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Paid { + get { return paid_; } set { - deprecatedEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + paid_ = value; } } - /// Field number for the "deprecatedEncryptionParams" field. - public const int DeprecatedEncryptionParamsFieldNumber = 10; - private pb::ByteString deprecatedEncryptionParams_ = pb::ByteString.Empty; + /// Field number for the "message" field. + public const int MessageFieldNumber = 5; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DeprecatedEncryptionParams { - get { return deprecatedEncryptionParams_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - deprecatedEncryptionParams_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RegistrationRequest); + return Equals(other as License); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RegistrationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(License other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(AuthRequest, other.AuthRequest)) return false; - if (!object.Equals(UserAuthRequest, other.UserAuthRequest)) return false; - if (EncryptedClientKey != other.EncryptedClientKey) return false; - if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; - if (PublicKey != other.PublicKey) return false; - if (VerificationCode != other.VerificationCode) return false; - if (DeprecatedAuthHashHash != other.DeprecatedAuthHashHash) return false; - if (DeprecatedEncryptedClientKey != other.DeprecatedEncryptedClientKey) return false; - if (DeprecatedEncryptedPrivateKey != other.DeprecatedEncryptedPrivateKey) return false; - if (DeprecatedEncryptionParams != other.DeprecatedEncryptionParams) return false; + if (Created != other.Created) return false; + if (Expiration != other.Expiration) return false; + if (LicenseStatus != other.LicenseStatus) return false; + if (Paid != other.Paid) return false; + if (Message != other.Message) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (authRequest_ != null) hash ^= AuthRequest.GetHashCode(); - if (userAuthRequest_ != null) hash ^= UserAuthRequest.GetHashCode(); - if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); - if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); - if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); - if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); - if (DeprecatedAuthHashHash.Length != 0) hash ^= DeprecatedAuthHashHash.GetHashCode(); - if (DeprecatedEncryptedClientKey.Length != 0) hash ^= DeprecatedEncryptedClientKey.GetHashCode(); - if (DeprecatedEncryptedPrivateKey.Length != 0) hash ^= DeprecatedEncryptedPrivateKey.GetHashCode(); - if (DeprecatedEncryptionParams.Length != 0) hash ^= DeprecatedEncryptionParams.GetHashCode(); + if (Created != 0L) hash ^= Created.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (LicenseStatus != global::Authentication.LicenseStatus.Other) hash ^= LicenseStatus.GetHashCode(); + if (Paid != false) hash ^= Paid.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7528,89 +10385,91 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (authRequest_ != null) { - output.WriteRawTag(10); - output.WriteMessage(AuthRequest); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Created != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Created); } - if (userAuthRequest_ != null) { - output.WriteRawTag(18); - output.WriteMessage(UserAuthRequest); + if (Expiration != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Expiration); } - if (EncryptedClientKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(EncryptedClientKey); + if (LicenseStatus != global::Authentication.LicenseStatus.Other) { + output.WriteRawTag(24); + output.WriteEnum((int) LicenseStatus); } - if (EncryptedPrivateKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(EncryptedPrivateKey); + if (Paid != false) { + output.WriteRawTag(32); + output.WriteBool(Paid); } - if (PublicKey.Length != 0) { + if (Message.Length != 0) { output.WriteRawTag(42); - output.WriteBytes(PublicKey); + output.WriteString(Message); } - if (VerificationCode.Length != 0) { - output.WriteRawTag(50); - output.WriteString(VerificationCode); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (DeprecatedAuthHashHash.Length != 0) { - output.WriteRawTag(58); - output.WriteBytes(DeprecatedAuthHashHash); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Created != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Created); } - if (DeprecatedEncryptedClientKey.Length != 0) { - output.WriteRawTag(66); - output.WriteBytes(DeprecatedEncryptedClientKey); + if (Expiration != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Expiration); } - if (DeprecatedEncryptedPrivateKey.Length != 0) { - output.WriteRawTag(74); - output.WriteBytes(DeprecatedEncryptedPrivateKey); + if (LicenseStatus != global::Authentication.LicenseStatus.Other) { + output.WriteRawTag(24); + output.WriteEnum((int) LicenseStatus); } - if (DeprecatedEncryptionParams.Length != 0) { - output.WriteRawTag(82); - output.WriteBytes(DeprecatedEncryptionParams); + if (Paid != false) { + output.WriteRawTag(32); + output.WriteBool(Paid); + } + if (Message.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Message); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (authRequest_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(AuthRequest); - } - if (userAuthRequest_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserAuthRequest); - } - if (EncryptedClientKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); - } - if (EncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); - } - if (PublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); - } - if (VerificationCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + if (Created != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Created); } - if (DeprecatedAuthHashHash.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedAuthHashHash); + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); } - if (DeprecatedEncryptedClientKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedEncryptedClientKey); + if (LicenseStatus != global::Authentication.LicenseStatus.Other) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LicenseStatus); } - if (DeprecatedEncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedEncryptedPrivateKey); + if (Paid != false) { + size += 1 + 1; } - if (DeprecatedEncryptionParams.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedEncryptionParams); + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -7619,240 +10478,231 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RegistrationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(License other) { if (other == null) { return; } - if (other.authRequest_ != null) { - if (authRequest_ == null) { - AuthRequest = new global::Authentication.AuthRequest(); - } - AuthRequest.MergeFrom(other.AuthRequest); - } - if (other.userAuthRequest_ != null) { - if (userAuthRequest_ == null) { - UserAuthRequest = new global::Authentication.UserAuthRequest(); - } - UserAuthRequest.MergeFrom(other.UserAuthRequest); - } - if (other.EncryptedClientKey.Length != 0) { - EncryptedClientKey = other.EncryptedClientKey; - } - if (other.EncryptedPrivateKey.Length != 0) { - EncryptedPrivateKey = other.EncryptedPrivateKey; - } - if (other.PublicKey.Length != 0) { - PublicKey = other.PublicKey; - } - if (other.VerificationCode.Length != 0) { - VerificationCode = other.VerificationCode; + if (other.Created != 0L) { + Created = other.Created; } - if (other.DeprecatedAuthHashHash.Length != 0) { - DeprecatedAuthHashHash = other.DeprecatedAuthHashHash; + if (other.Expiration != 0L) { + Expiration = other.Expiration; } - if (other.DeprecatedEncryptedClientKey.Length != 0) { - DeprecatedEncryptedClientKey = other.DeprecatedEncryptedClientKey; + if (other.LicenseStatus != global::Authentication.LicenseStatus.Other) { + LicenseStatus = other.LicenseStatus; } - if (other.DeprecatedEncryptedPrivateKey.Length != 0) { - DeprecatedEncryptedPrivateKey = other.DeprecatedEncryptedPrivateKey; + if (other.Paid != false) { + Paid = other.Paid; } - if (other.DeprecatedEncryptionParams.Length != 0) { - DeprecatedEncryptionParams = other.DeprecatedEncryptionParams; + if (other.Message.Length != 0) { + Message = other.Message; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - if (authRequest_ == null) { - AuthRequest = new global::Authentication.AuthRequest(); - } - input.ReadMessage(AuthRequest); + case 8: { + Created = input.ReadInt64(); break; } - case 18: { - if (userAuthRequest_ == null) { - UserAuthRequest = new global::Authentication.UserAuthRequest(); - } - input.ReadMessage(UserAuthRequest); + case 16: { + Expiration = input.ReadInt64(); break; } - case 26: { - EncryptedClientKey = input.ReadBytes(); + case 24: { + LicenseStatus = (global::Authentication.LicenseStatus) input.ReadEnum(); break; } - case 34: { - EncryptedPrivateKey = input.ReadBytes(); + case 32: { + Paid = input.ReadBool(); break; } case 42: { - PublicKey = input.ReadBytes(); + Message = input.ReadString(); break; } - case 50: { - VerificationCode = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Created = input.ReadInt64(); break; } - case 58: { - DeprecatedAuthHashHash = input.ReadBytes(); + case 16: { + Expiration = input.ReadInt64(); break; } - case 66: { - DeprecatedEncryptedClientKey = input.ReadBytes(); + case 24: { + LicenseStatus = (global::Authentication.LicenseStatus) input.ReadEnum(); break; } - case 74: { - DeprecatedEncryptedPrivateKey = input.ReadBytes(); + case 32: { + Paid = input.ReadBool(); break; } - case 82: { - DeprecatedEncryptionParams = input.ReadBytes(); + case 42: { + Message = input.ReadString(); break; } } } } + #endif } - public sealed partial class ConvertUserToV3Request : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConvertUserToV3Request()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OwnerlessRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OwnerlessRecord()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[30]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ConvertUserToV3Request() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OwnerlessRecord() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ConvertUserToV3Request(ConvertUserToV3Request other) : this() { - authRequest_ = other.authRequest_ != null ? other.authRequest_.Clone() : null; - userAuthRequest_ = other.userAuthRequest_ != null ? other.userAuthRequest_.Clone() : null; - encryptedClientKey_ = other.encryptedClientKey_; - encryptedPrivateKey_ = other.encryptedPrivateKey_; - publicKey_ = other.publicKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OwnerlessRecord(OwnerlessRecord other) : this() { + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + status_ = other.status_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ConvertUserToV3Request Clone() { - return new ConvertUserToV3Request(this); - } - - /// Field number for the "authRequest" field. - public const int AuthRequestFieldNumber = 1; - private global::Authentication.AuthRequest authRequest_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.AuthRequest AuthRequest { - get { return authRequest_; } - set { - authRequest_ = value; - } - } - - /// Field number for the "userAuthRequest" field. - public const int UserAuthRequestFieldNumber = 2; - private global::Authentication.UserAuthRequest userAuthRequest_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.UserAuthRequest UserAuthRequest { - get { return userAuthRequest_; } - set { - userAuthRequest_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OwnerlessRecord Clone() { + return new OwnerlessRecord(this); } - /// Field number for the "encryptedClientKey" field. - public const int EncryptedClientKeyFieldNumber = 3; - private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; /// - /// gcm encrypted with the data key + /// used in get request, set request, set response /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedClientKey { - get { return encryptedClientKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } set { - encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedPrivateKey" field. - public const int EncryptedPrivateKeyFieldNumber = 4; - private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + /// Field number for the "recordKey" field. + public const int RecordKeyFieldNumber = 2; + private pb::ByteString recordKey_ = pb::ByteString.Empty; /// - /// gcm encrypted with the data key + /// used in set request /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedPrivateKey { - get { return encryptedPrivateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } set { - encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "publicKey" field. - public const int PublicKeyFieldNumber = 5; - private pb::ByteString publicKey_ = pb::ByteString.Empty; + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private int status_; /// - /// TODO add alternate passwords + /// used in set response /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PublicKey { - get { return publicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Status { + get { return status_; } set { - publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + status_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ConvertUserToV3Request); + return Equals(other as OwnerlessRecord); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ConvertUserToV3Request other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OwnerlessRecord other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (!object.Equals(AuthRequest, other.AuthRequest)) return false; - if (!object.Equals(UserAuthRequest, other.UserAuthRequest)) return false; - if (EncryptedClientKey != other.EncryptedClientKey) return false; - if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; - if (PublicKey != other.PublicKey) return false; + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + if (Status != other.Status) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (authRequest_ != null) hash ^= AuthRequest.GetHashCode(); - if (userAuthRequest_ != null) hash ^= UserAuthRequest.GetHashCode(); - if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); - if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); - if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7860,54 +10710,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (authRequest_ != null) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { output.WriteRawTag(10); - output.WriteMessage(AuthRequest); + output.WriteBytes(RecordUid); } - if (userAuthRequest_ != null) { + if (RecordKey.Length != 0) { output.WriteRawTag(18); - output.WriteMessage(UserAuthRequest); + output.WriteBytes(RecordKey); } - if (EncryptedClientKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(EncryptedClientKey); + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); } - if (EncryptedPrivateKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(EncryptedPrivateKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (PublicKey.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(PublicKey); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (authRequest_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(AuthRequest); - } - if (userAuthRequest_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserAuthRequest); - } - if (EncryptedClientKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); } - if (EncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); } - if (PublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -7916,140 +10781,169 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ConvertUserToV3Request other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OwnerlessRecord other) { if (other == null) { return; } - if (other.authRequest_ != null) { - if (authRequest_ == null) { - AuthRequest = new global::Authentication.AuthRequest(); - } - AuthRequest.MergeFrom(other.AuthRequest); - } - if (other.userAuthRequest_ != null) { - if (userAuthRequest_ == null) { - UserAuthRequest = new global::Authentication.UserAuthRequest(); - } - UserAuthRequest.MergeFrom(other.UserAuthRequest); - } - if (other.EncryptedClientKey.Length != 0) { - EncryptedClientKey = other.EncryptedClientKey; + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; } - if (other.EncryptedPrivateKey.Length != 0) { - EncryptedPrivateKey = other.EncryptedPrivateKey; + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; } - if (other.PublicKey.Length != 0) { - PublicKey = other.PublicKey; + if (other.Status != 0) { + Status = other.Status; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - if (authRequest_ == null) { - AuthRequest = new global::Authentication.AuthRequest(); - } - input.ReadMessage(AuthRequest); + RecordUid = input.ReadBytes(); break; } case 18: { - if (userAuthRequest_ == null) { - UserAuthRequest = new global::Authentication.UserAuthRequest(); - } - input.ReadMessage(UserAuthRequest); + RecordKey = input.ReadBytes(); break; } - case 26: { - EncryptedClientKey = input.ReadBytes(); + case 24: { + Status = input.ReadInt32(); break; } - case 34: { - EncryptedPrivateKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); break; } - case 42: { - PublicKey = input.ReadBytes(); + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + Status = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class RevisionResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RevisionResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OwnerlessRecords : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OwnerlessRecords()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[31]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RevisionResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OwnerlessRecords() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RevisionResponse(RevisionResponse other) : this() { - revision_ = other.revision_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OwnerlessRecords(OwnerlessRecords other) : this() { + ownerlessRecord_ = other.ownerlessRecord_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RevisionResponse Clone() { - return new RevisionResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public OwnerlessRecords Clone() { + return new OwnerlessRecords(this); } - /// Field number for the "revision" field. - public const int RevisionFieldNumber = 1; - private long revision_; + /// Field number for the "ownerlessRecord" field. + public const int OwnerlessRecordFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_ownerlessRecord_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.OwnerlessRecord.Parser); + private readonly pbc::RepeatedField ownerlessRecord_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Revision { - get { return revision_; } - set { - revision_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField OwnerlessRecord { + get { return ownerlessRecord_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RevisionResponse); + return Equals(other as OwnerlessRecords); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RevisionResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(OwnerlessRecords other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Revision != other.Revision) return false; + if(!ownerlessRecord_.Equals(other.ownerlessRecord_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Revision != 0L) hash ^= Revision.GetHashCode(); + hash ^= ownerlessRecord_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8057,27 +10951,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Revision != 0L) { - output.WriteRawTag(8); - output.WriteInt64(Revision); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + ownerlessRecord_.WriteTo(output, _repeated_ownerlessRecord_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + ownerlessRecord_.WriteTo(ref output, _repeated_ownerlessRecord_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Revision != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); - } + size += ownerlessRecord_.CalculateSize(_repeated_ownerlessRecord_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -8085,229 +10992,266 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RevisionResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(OwnerlessRecords other) { if (other == null) { return; } - if (other.Revision != 0L) { - Revision = other.Revision; - } + ownerlessRecord_.Add(other.ownerlessRecord_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Revision = input.ReadInt64(); + case 10: { + ownerlessRecord_.AddEntriesFrom(input, _repeated_ownerlessRecord_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ownerlessRecord_.AddEntriesFrom(ref input, _repeated_ownerlessRecord_codec); break; } } } } + #endif } - public sealed partial class ChangeEmailRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeEmailRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserAuthRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAuthRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[32]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeEmailRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAuthRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeEmailRequest(ChangeEmailRequest other) : this() { - newEmail_ = other.newEmail_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAuthRequest(UserAuthRequest other) : this() { + uid_ = other.uid_; + salt_ = other.salt_; + iterations_ = other.iterations_; + encryptedClientKey_ = other.encryptedClientKey_; + authHash_ = other.authHash_; + encryptedDataKey_ = other.encryptedDataKey_; + loginType_ = other.loginType_; + name_ = other.name_; + algorithm_ = other.algorithm_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeEmailRequest Clone() { - return new ChangeEmailRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAuthRequest Clone() { + return new UserAuthRequest(this); } - /// Field number for the "newEmail" field. - public const int NewEmailFieldNumber = 1; - private string newEmail_ = ""; + /// Field number for the "uid" field. + public const int UidFieldNumber = 1; + private pb::ByteString uid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string NewEmail { - get { return newEmail_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Uid { + get { return uid_; } set { - newEmail_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "salt" field. + public const int SaltFieldNumber = 2; + private pb::ByteString salt_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as ChangeEmailRequest); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ChangeEmailRequest other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Salt { + get { return salt_; } + set { + salt_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - if (NewEmail != other.NewEmail) return false; - return Equals(_unknownFields, other._unknownFields); } + /// Field number for the "iterations" field. + public const int IterationsFieldNumber = 3; + private int iterations_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (NewEmail.Length != 0) hash ^= NewEmail.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Iterations { + get { return iterations_; } + set { + iterations_ = value; } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); } + /// Field number for the "encryptedClientKey" field. + public const int EncryptedClientKeyFieldNumber = 4; + private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (NewEmail.Length != 0) { - output.WriteRawTag(10); - output.WriteString(NewEmail); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedClientKey { + get { return encryptedClientKey_; } + set { + encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "authHash" field. + public const int AuthHashFieldNumber = 5; + private pb::ByteString authHash_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (NewEmail.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(NewEmail); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AuthHash { + get { return authHash_; } + set { + authHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - return size; } + /// Field number for the "encryptedDataKey" field. + public const int EncryptedDataKeyFieldNumber = 6; + private pb::ByteString encryptedDataKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ChangeEmailRequest other) { - if (other == null) { - return; - } - if (other.NewEmail.Length != 0) { - NewEmail = other.NewEmail; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDataKey { + get { return encryptedDataKey_; } + set { + encryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } + /// Field number for the "loginType" field. + public const int LoginTypeFieldNumber = 7; + private global::Authentication.LoginType loginType_ = global::Authentication.LoginType.Normal; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - NewEmail = input.ReadString(); - break; - } - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.LoginType LoginType { + get { return loginType_; } + set { + loginType_ = value; } } - } - - public sealed partial class ChangeEmailResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeEmailResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[33]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeEmailResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeEmailResponse(ChangeEmailResponse other) : this() { - encryptedChangeEmailToken_ = other.encryptedChangeEmailToken_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - + /// Field number for the "name" field. + public const int NameFieldNumber = 8; + private string name_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeEmailResponse Clone() { - return new ChangeEmailResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "encryptedChangeEmailToken" field. - public const int EncryptedChangeEmailTokenFieldNumber = 1; - private pb::ByteString encryptedChangeEmailToken_ = pb::ByteString.Empty; + /// Field number for the "algorithm" field. + public const int AlgorithmFieldNumber = 9; + private int algorithm_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedChangeEmailToken { - get { return encryptedChangeEmailToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Algorithm { + get { return algorithm_; } set { - encryptedChangeEmailToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + algorithm_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeEmailResponse); + return Equals(other as UserAuthRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ChangeEmailResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserAuthRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedChangeEmailToken != other.EncryptedChangeEmailToken) return false; + if (Uid != other.Uid) return false; + if (Salt != other.Salt) return false; + if (Iterations != other.Iterations) return false; + if (EncryptedClientKey != other.EncryptedClientKey) return false; + if (AuthHash != other.AuthHash) return false; + if (EncryptedDataKey != other.EncryptedDataKey) return false; + if (LoginType != other.LoginType) return false; + if (Name != other.Name) return false; + if (Algorithm != other.Algorithm) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedChangeEmailToken.Length != 0) hash ^= EncryptedChangeEmailToken.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (Salt.Length != 0) hash ^= Salt.GetHashCode(); + if (Iterations != 0) hash ^= Iterations.GetHashCode(); + if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); + if (AuthHash.Length != 0) hash ^= AuthHash.GetHashCode(); + if (EncryptedDataKey.Length != 0) hash ^= EncryptedDataKey.GetHashCode(); + if (LoginType != global::Authentication.LoginType.Normal) hash ^= LoginType.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Algorithm != 0) hash ^= Algorithm.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8315,128 +11259,372 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedChangeEmailToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Uid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedChangeEmailToken); + output.WriteBytes(Uid); + } + if (Salt.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Salt); + } + if (Iterations != 0) { + output.WriteRawTag(24); + output.WriteInt32(Iterations); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedClientKey); + } + if (AuthHash.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(AuthHash); + } + if (EncryptedDataKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedDataKey); + } + if (LoginType != global::Authentication.LoginType.Normal) { + output.WriteRawTag(56); + output.WriteEnum((int) LoginType); + } + if (Name.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Name); + } + if (Algorithm != 0) { + output.WriteRawTag(72); + output.WriteInt32(Algorithm); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EncryptedChangeEmailToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedChangeEmailToken); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (Salt.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Salt); + } + if (Iterations != 0) { + output.WriteRawTag(24); + output.WriteInt32(Iterations); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedClientKey); + } + if (AuthHash.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(AuthHash); + } + if (EncryptedDataKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedDataKey); + } + if (LoginType != global::Authentication.LoginType.Normal) { + output.WriteRawTag(56); + output.WriteEnum((int) LoginType); + } + if (Name.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Name); + } + if (Algorithm != 0) { + output.WriteRawTag(72); + output.WriteInt32(Algorithm); } if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + _unknownFields.WriteTo(ref output); } - return size; } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ChangeEmailResponse other) { - if (other == null) { - return; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); } - if (other.EncryptedChangeEmailToken.Length != 0) { - EncryptedChangeEmailToken = other.EncryptedChangeEmailToken; + if (Salt.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Salt); + } + if (Iterations != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Iterations); + } + if (EncryptedClientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); + } + if (AuthHash.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuthHash); + } + if (EncryptedDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDataKey); + } + if (LoginType != global::Authentication.LoginType.Normal) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) LoginType); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Algorithm != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Algorithm); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserAuthRequest other) { + if (other == null) { + return; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.Salt.Length != 0) { + Salt = other.Salt; + } + if (other.Iterations != 0) { + Iterations = other.Iterations; + } + if (other.EncryptedClientKey.Length != 0) { + EncryptedClientKey = other.EncryptedClientKey; + } + if (other.AuthHash.Length != 0) { + AuthHash = other.AuthHash; + } + if (other.EncryptedDataKey.Length != 0) { + EncryptedDataKey = other.EncryptedDataKey; + } + if (other.LoginType != global::Authentication.LoginType.Normal) { + LoginType = other.LoginType; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Algorithm != 0) { + Algorithm = other.Algorithm; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedChangeEmailToken = input.ReadBytes(); + Uid = input.ReadBytes(); + break; + } + case 18: { + Salt = input.ReadBytes(); + break; + } + case 24: { + Iterations = input.ReadInt32(); + break; + } + case 34: { + EncryptedClientKey = input.ReadBytes(); + break; + } + case 42: { + AuthHash = input.ReadBytes(); + break; + } + case 50: { + EncryptedDataKey = input.ReadBytes(); + break; + } + case 56: { + LoginType = (global::Authentication.LoginType) input.ReadEnum(); + break; + } + case 66: { + Name = input.ReadString(); + break; + } + case 72: { + Algorithm = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 18: { + Salt = input.ReadBytes(); + break; + } + case 24: { + Iterations = input.ReadInt32(); + break; + } + case 34: { + EncryptedClientKey = input.ReadBytes(); + break; + } + case 42: { + AuthHash = input.ReadBytes(); + break; + } + case 50: { + EncryptedDataKey = input.ReadBytes(); + break; + } + case 56: { + LoginType = (global::Authentication.LoginType) input.ReadEnum(); + break; + } + case 66: { + Name = input.ReadString(); + break; + } + case 72: { + Algorithm = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class EmailVerificationLinkResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmailVerificationLinkResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UidRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UidRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[34]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[33]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EmailVerificationLinkResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UidRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EmailVerificationLinkResponse(EmailVerificationLinkResponse other) : this() { - emailVerified_ = other.emailVerified_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UidRequest(UidRequest other) : this() { + uid_ = other.uid_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EmailVerificationLinkResponse Clone() { - return new EmailVerificationLinkResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UidRequest Clone() { + return new UidRequest(this); } - /// Field number for the "emailVerified" field. - public const int EmailVerifiedFieldNumber = 1; - private bool emailVerified_; + /// Field number for the "uid" field. + public const int UidFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_uid_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField uid_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool EmailVerified { - get { return emailVerified_; } - set { - emailVerified_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Uid { + get { return uid_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EmailVerificationLinkResponse); + return Equals(other as UidRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EmailVerificationLinkResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UidRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EmailVerified != other.EmailVerified) return false; + if(!uid_.Equals(other.uid_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EmailVerified != false) hash ^= EmailVerified.GetHashCode(); + hash ^= uid_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8444,27 +11632,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EmailVerified != false) { - output.WriteRawTag(8); - output.WriteBool(EmailVerified); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + uid_.WriteTo(output, _repeated_uid_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + uid_.WriteTo(ref output, _repeated_uid_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EmailVerified != false) { - size += 1 + 1; - } + size += uid_.CalculateSize(_repeated_uid_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -8472,117 +11673,206 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EmailVerificationLinkResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UidRequest other) { if (other == null) { return; } - if (other.EmailVerified != false) { - EmailVerified = other.EmailVerified; - } + uid_.Add(other.uid_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EmailVerified = input.ReadBool(); + case 10: { + uid_.AddEntriesFrom(input, _repeated_uid_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + uid_.AddEntriesFrom(ref input, _repeated_uid_codec); break; } } } } + #endif } - /// - /// used in SecurityDataReqeust - /// - public sealed partial class SecurityData : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityData()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceUpdateRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[35]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[34]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityData() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceUpdateRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityData(SecurityData other) : this() { - uid_ = other.uid_; - data_ = other.data_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceUpdateRequest(DeviceUpdateRequest other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + clientVersion_ = other.clientVersion_; + deviceName_ = other.deviceName_; + devicePublicKey_ = other.devicePublicKey_; + deviceStatus_ = other.deviceStatus_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityData Clone() { - return new SecurityData(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceUpdateRequest Clone() { + return new DeviceUpdateRequest(this); } - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private pb::ByteString uid_ = pb::ByteString.Empty; + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Uid { - get { return uid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } set { - uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "data" field. - public const int DataFieldNumber = 2; - private pb::ByteString data_ = pb::ByteString.Empty; + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Data { - get { return data_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } set { - data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceName" field. + public const int DeviceNameFieldNumber = 3; + private string deviceName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceName { + get { return deviceName_; } + set { + deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "devicePublicKey" field. + public const int DevicePublicKeyFieldNumber = 4; + private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DevicePublicKey { + get { return devicePublicKey_; } + set { + devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceStatus" field. + public const int DeviceStatusFieldNumber = 5; + private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.DeviceStatus DeviceStatus { + get { return deviceStatus_; } + set { + deviceStatus_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SecurityData); + return Equals(other as DeviceUpdateRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityData other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceUpdateRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Uid != other.Uid) return false; - if (Data != other.Data) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (ClientVersion != other.ClientVersion) return false; + if (DeviceName != other.DeviceName) return false; + if (DevicePublicKey != other.DevicePublicKey) return false; + if (DeviceStatus != other.DeviceStatus) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Uid.Length != 0) hash ^= Uid.GetHashCode(); - if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); + if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8590,33 +11880,91 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Uid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(Uid); + output.WriteBytes(EncryptedDeviceToken); } - if (Data.Length != 0) { + if (ClientVersion.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(Data); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(40); + output.WriteEnum((int) DeviceStatus); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(40); + output.WriteEnum((int) DeviceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Uid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); } - if (Data.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (DeviceName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + } + if (DevicePublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceStatus); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -8625,122 +11973,237 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityData other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceUpdateRequest other) { if (other == null) { return; } - if (other.Uid.Length != 0) { - Uid = other.Uid; + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; } - if (other.Data.Length != 0) { - Data = other.Data; + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.DeviceName.Length != 0) { + DeviceName = other.DeviceName; + } + if (other.DevicePublicKey.Length != 0) { + DevicePublicKey = other.DevicePublicKey; + } + if (other.DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + DeviceStatus = other.DeviceStatus; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Uid = input.ReadBytes(); + EncryptedDeviceToken = input.ReadBytes(); break; } case 18: { - Data = input.ReadBytes(); + ClientVersion = input.ReadString(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); + break; + } + case 40: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); + break; + } + case 40: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); break; } } } } + #endif } - /// - /// to update a records security data - /// - public sealed partial class SecurityDataRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityDataRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RegisterDeviceInRegionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegisterDeviceInRegionRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[36]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[35]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityDataRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegisterDeviceInRegionRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityDataRequest(SecurityDataRequest other) : this() { - recordSecurityData_ = other.recordSecurityData_.Clone(); - masterPasswordSecurityData_ = other.masterPasswordSecurityData_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegisterDeviceInRegionRequest(RegisterDeviceInRegionRequest other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + clientVersion_ = other.clientVersion_; + deviceName_ = other.deviceName_; + devicePublicKey_ = other.devicePublicKey_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityDataRequest Clone() { - return new SecurityDataRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegisterDeviceInRegionRequest Clone() { + return new RegisterDeviceInRegionRequest(this); } - /// Field number for the "recordSecurityData" field. - public const int RecordSecurityDataFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_recordSecurityData_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.SecurityData.Parser); - private readonly pbc::RepeatedField recordSecurityData_ = new pbc::RepeatedField(); + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField RecordSecurityData { - get { return recordSecurityData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "masterPasswordSecurityData" field. - public const int MasterPasswordSecurityDataFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_masterPasswordSecurityData_codec - = pb::FieldCodec.ForMessage(18, global::Authentication.SecurityData.Parser); - private readonly pbc::RepeatedField masterPasswordSecurityData_ = new pbc::RepeatedField(); + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField MasterPasswordSecurityData { - get { return masterPasswordSecurityData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "deviceName" field. + public const int DeviceNameFieldNumber = 3; + private string deviceName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as SecurityDataRequest); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceName { + get { return deviceName_; } + set { + deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "devicePublicKey" field. + public const int DevicePublicKeyFieldNumber = 4; + private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityDataRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DevicePublicKey { + get { return devicePublicKey_; } + set { + devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RegisterDeviceInRegionRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RegisterDeviceInRegionRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!recordSecurityData_.Equals(other.recordSecurityData_)) return false; - if(!masterPasswordSecurityData_.Equals(other.masterPasswordSecurityData_)) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (ClientVersion != other.ClientVersion) return false; + if (DeviceName != other.DeviceName) return false; + if (DevicePublicKey != other.DevicePublicKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= recordSecurityData_.GetHashCode(); - hash ^= masterPasswordSecurityData_.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); + if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8748,24 +12211,81 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - recordSecurityData_.WriteTo(output, _repeated_recordSecurityData_codec); - masterPasswordSecurityData_.WriteTo(output, _repeated_masterPasswordSecurityData_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += recordSecurityData_.CalculateSize(_repeated_recordSecurityData_codec); - size += masterPasswordSecurityData_.CalculateSize(_repeated_masterPasswordSecurityData_codec); + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (DeviceName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + } + if (DevicePublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -8773,162 +12293,325 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityDataRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RegisterDeviceInRegionRequest other) { if (other == null) { return; } - recordSecurityData_.Add(other.recordSecurityData_); - masterPasswordSecurityData_.Add(other.masterPasswordSecurityData_); + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.DeviceName.Length != 0) { + DeviceName = other.DeviceName; + } + if (other.DevicePublicKey.Length != 0) { + DevicePublicKey = other.DevicePublicKey; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - recordSecurityData_.AddEntriesFrom(input, _repeated_recordSecurityData_codec); + EncryptedDeviceToken = input.ReadBytes(); break; } case 18: { - masterPasswordSecurityData_.AddEntriesFrom(input, _repeated_masterPasswordSecurityData_codec); + ClientVersion = input.ReadString(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); break; } } } } + #endif } - /// - /// if mp or not, by user, include reused passwords - /// - public sealed partial class SecurityReportIncrementalData : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportIncrementalData()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RegistrationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegistrationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[37]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[36]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportIncrementalData() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegistrationRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportIncrementalData(SecurityReportIncrementalData other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - currentSecurityData_ = other.currentSecurityData_; - currentSecurityDataRevision_ = other.currentSecurityDataRevision_; - oldSecurityData_ = other.oldSecurityData_; - oldSecurityDataRevision_ = other.oldSecurityDataRevision_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegistrationRequest(RegistrationRequest other) : this() { + authRequest_ = other.authRequest_ != null ? other.authRequest_.Clone() : null; + userAuthRequest_ = other.userAuthRequest_ != null ? other.userAuthRequest_.Clone() : null; + encryptedClientKey_ = other.encryptedClientKey_; + encryptedPrivateKey_ = other.encryptedPrivateKey_; + publicKey_ = other.publicKey_; + verificationCode_ = other.verificationCode_; + deprecatedAuthHashHash_ = other.deprecatedAuthHashHash_; + deprecatedEncryptedClientKey_ = other.deprecatedEncryptedClientKey_; + deprecatedEncryptedPrivateKey_ = other.deprecatedEncryptedPrivateKey_; + deprecatedEncryptionParams_ = other.deprecatedEncryptionParams_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportIncrementalData Clone() { - return new SecurityReportIncrementalData(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegistrationRequest Clone() { + return new RegistrationRequest(this); } - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; + /// Field number for the "authRequest" field. + public const int AuthRequestFieldNumber = 1; + private global::Authentication.AuthRequest authRequest_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.AuthRequest AuthRequest { + get { return authRequest_; } set { - enterpriseUserId_ = value; + authRequest_ = value; } } - /// Field number for the "currentSecurityData" field. - public const int CurrentSecurityDataFieldNumber = 2; - private pb::ByteString currentSecurityData_ = pb::ByteString.Empty; + /// Field number for the "userAuthRequest" field. + public const int UserAuthRequestFieldNumber = 2; + private global::Authentication.UserAuthRequest userAuthRequest_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString CurrentSecurityData { - get { return currentSecurityData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.UserAuthRequest UserAuthRequest { + get { return userAuthRequest_; } set { - currentSecurityData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + userAuthRequest_ = value; } } - /// Field number for the "currentSecurityDataRevision" field. - public const int CurrentSecurityDataRevisionFieldNumber = 3; - private long currentSecurityDataRevision_; + /// Field number for the "encryptedClientKey" field. + public const int EncryptedClientKeyFieldNumber = 3; + private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; + /// + /// encrypted with the data key + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long CurrentSecurityDataRevision { - get { return currentSecurityDataRevision_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedClientKey { + get { return encryptedClientKey_; } set { - currentSecurityDataRevision_ = value; + encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "oldSecurityData" field. - public const int OldSecurityDataFieldNumber = 4; - private pb::ByteString oldSecurityData_ = pb::ByteString.Empty; + /// Field number for the "encryptedPrivateKey" field. + public const int EncryptedPrivateKeyFieldNumber = 4; + private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + /// + /// encrypted with the data key + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString OldSecurityData { - get { return oldSecurityData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedPrivateKey { + get { return encryptedPrivateKey_; } set { - oldSecurityData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "oldSecurityDataRevision" field. - public const int OldSecurityDataRevisionFieldNumber = 5; - private long oldSecurityDataRevision_; + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 5; + private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long OldSecurityDataRevision { - get { return oldSecurityDataRevision_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } set { - oldSecurityDataRevision_ = value; + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 6; + private string verificationCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as SecurityReportIncrementalData); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "deprecatedAuthHashHash" field. + public const int DeprecatedAuthHashHashFieldNumber = 7; + private pb::ByteString deprecatedAuthHashHash_ = pb::ByteString.Empty; + /// + /// these will be ignored once the v2 clients are obsolete + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityReportIncrementalData other) { - if (ReferenceEquals(other, null)) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DeprecatedAuthHashHash { + get { return deprecatedAuthHashHash_; } + set { + deprecatedAuthHashHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deprecatedEncryptedClientKey" field. + public const int DeprecatedEncryptedClientKeyFieldNumber = 8; + private pb::ByteString deprecatedEncryptedClientKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DeprecatedEncryptedClientKey { + get { return deprecatedEncryptedClientKey_; } + set { + deprecatedEncryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deprecatedEncryptedPrivateKey" field. + public const int DeprecatedEncryptedPrivateKeyFieldNumber = 9; + private pb::ByteString deprecatedEncryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DeprecatedEncryptedPrivateKey { + get { return deprecatedEncryptedPrivateKey_; } + set { + deprecatedEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deprecatedEncryptionParams" field. + public const int DeprecatedEncryptionParamsFieldNumber = 10; + private pb::ByteString deprecatedEncryptionParams_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DeprecatedEncryptionParams { + get { return deprecatedEncryptionParams_; } + set { + deprecatedEncryptionParams_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RegistrationRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RegistrationRequest other) { + if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (CurrentSecurityData != other.CurrentSecurityData) return false; - if (CurrentSecurityDataRevision != other.CurrentSecurityDataRevision) return false; - if (OldSecurityData != other.OldSecurityData) return false; - if (OldSecurityDataRevision != other.OldSecurityDataRevision) return false; + if (!object.Equals(AuthRequest, other.AuthRequest)) return false; + if (!object.Equals(UserAuthRequest, other.UserAuthRequest)) return false; + if (EncryptedClientKey != other.EncryptedClientKey) return false; + if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; + if (PublicKey != other.PublicKey) return false; + if (VerificationCode != other.VerificationCode) return false; + if (DeprecatedAuthHashHash != other.DeprecatedAuthHashHash) return false; + if (DeprecatedEncryptedClientKey != other.DeprecatedEncryptedClientKey) return false; + if (DeprecatedEncryptedPrivateKey != other.DeprecatedEncryptedPrivateKey) return false; + if (DeprecatedEncryptionParams != other.DeprecatedEncryptionParams) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (CurrentSecurityData.Length != 0) hash ^= CurrentSecurityData.GetHashCode(); - if (CurrentSecurityDataRevision != 0L) hash ^= CurrentSecurityDataRevision.GetHashCode(); - if (OldSecurityData.Length != 0) hash ^= OldSecurityData.GetHashCode(); - if (OldSecurityDataRevision != 0L) hash ^= OldSecurityDataRevision.GetHashCode(); + if (authRequest_ != null) hash ^= AuthRequest.GetHashCode(); + if (userAuthRequest_ != null) hash ^= UserAuthRequest.GetHashCode(); + if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); + if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (DeprecatedAuthHashHash.Length != 0) hash ^= DeprecatedAuthHashHash.GetHashCode(); + if (DeprecatedEncryptedClientKey.Length != 0) hash ^= DeprecatedEncryptedClientKey.GetHashCode(); + if (DeprecatedEncryptedPrivateKey.Length != 0) hash ^= DeprecatedEncryptedPrivateKey.GetHashCode(); + if (DeprecatedEncryptionParams.Length != 0) hash ^= DeprecatedEncryptionParams.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8936,54 +12619,146 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (authRequest_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AuthRequest); } - if (CurrentSecurityData.Length != 0) { + if (userAuthRequest_ != null) { output.WriteRawTag(18); - output.WriteBytes(CurrentSecurityData); + output.WriteMessage(UserAuthRequest); } - if (CurrentSecurityDataRevision != 0L) { - output.WriteRawTag(24); - output.WriteInt64(CurrentSecurityDataRevision); + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedClientKey); } - if (OldSecurityData.Length != 0) { + if (EncryptedPrivateKey.Length != 0) { output.WriteRawTag(34); - output.WriteBytes(OldSecurityData); + output.WriteBytes(EncryptedPrivateKey); } - if (OldSecurityDataRevision != 0L) { - output.WriteRawTag(40); - output.WriteInt64(OldSecurityDataRevision); + if (PublicKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PublicKey); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(50); + output.WriteString(VerificationCode); + } + if (DeprecatedAuthHashHash.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(DeprecatedAuthHashHash); + } + if (DeprecatedEncryptedClientKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(DeprecatedEncryptedClientKey); + } + if (DeprecatedEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(DeprecatedEncryptedPrivateKey); + } + if (DeprecatedEncryptionParams.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(DeprecatedEncryptionParams); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (authRequest_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AuthRequest); + } + if (userAuthRequest_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UserAuthRequest); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedClientKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedPrivateKey); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PublicKey); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(50); + output.WriteString(VerificationCode); + } + if (DeprecatedAuthHashHash.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(DeprecatedAuthHashHash); + } + if (DeprecatedEncryptedClientKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(DeprecatedEncryptedClientKey); + } + if (DeprecatedEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(DeprecatedEncryptedPrivateKey); + } + if (DeprecatedEncryptionParams.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(DeprecatedEncryptionParams); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + if (authRequest_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AuthRequest); } - if (CurrentSecurityData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(CurrentSecurityData); + if (userAuthRequest_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserAuthRequest); } - if (CurrentSecurityDataRevision != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(CurrentSecurityDataRevision); + if (EncryptedClientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); } - if (OldSecurityData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(OldSecurityData); + if (EncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); } - if (OldSecurityDataRevision != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(OldSecurityDataRevision); + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + } + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (DeprecatedAuthHashHash.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedAuthHashHash); + } + if (DeprecatedEncryptedClientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedEncryptedClientKey); + } + if (DeprecatedEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedEncryptedPrivateKey); + } + if (DeprecatedEncryptionParams.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DeprecatedEncryptionParams); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -8992,223 +12767,334 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityReportIncrementalData other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RegistrationRequest other) { if (other == null) { return; } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; + if (other.authRequest_ != null) { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + AuthRequest.MergeFrom(other.AuthRequest); } - if (other.CurrentSecurityData.Length != 0) { - CurrentSecurityData = other.CurrentSecurityData; + if (other.userAuthRequest_ != null) { + if (userAuthRequest_ == null) { + UserAuthRequest = new global::Authentication.UserAuthRequest(); + } + UserAuthRequest.MergeFrom(other.UserAuthRequest); } - if (other.CurrentSecurityDataRevision != 0L) { - CurrentSecurityDataRevision = other.CurrentSecurityDataRevision; + if (other.EncryptedClientKey.Length != 0) { + EncryptedClientKey = other.EncryptedClientKey; } - if (other.OldSecurityData.Length != 0) { - OldSecurityData = other.OldSecurityData; + if (other.EncryptedPrivateKey.Length != 0) { + EncryptedPrivateKey = other.EncryptedPrivateKey; } - if (other.OldSecurityDataRevision != 0L) { - OldSecurityDataRevision = other.OldSecurityDataRevision; + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; + } + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + if (other.DeprecatedAuthHashHash.Length != 0) { + DeprecatedAuthHashHash = other.DeprecatedAuthHashHash; + } + if (other.DeprecatedEncryptedClientKey.Length != 0) { + DeprecatedEncryptedClientKey = other.DeprecatedEncryptedClientKey; + } + if (other.DeprecatedEncryptedPrivateKey.Length != 0) { + DeprecatedEncryptedPrivateKey = other.DeprecatedEncryptedPrivateKey; + } + if (other.DeprecatedEncryptionParams.Length != 0) { + DeprecatedEncryptionParams = other.DeprecatedEncryptionParams; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseUserId = input.ReadInt64(); + case 10: { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + input.ReadMessage(AuthRequest); break; } case 18: { - CurrentSecurityData = input.ReadBytes(); + if (userAuthRequest_ == null) { + UserAuthRequest = new global::Authentication.UserAuthRequest(); + } + input.ReadMessage(UserAuthRequest); break; } - case 24: { - CurrentSecurityDataRevision = input.ReadInt64(); + case 26: { + EncryptedClientKey = input.ReadBytes(); break; } case 34: { - OldSecurityData = input.ReadBytes(); + EncryptedPrivateKey = input.ReadBytes(); break; } - case 40: { - OldSecurityDataRevision = input.ReadInt64(); + case 42: { + PublicKey = input.ReadBytes(); + break; + } + case 50: { + VerificationCode = input.ReadString(); + break; + } + case 58: { + DeprecatedAuthHashHash = input.ReadBytes(); + break; + } + case 66: { + DeprecatedEncryptedClientKey = input.ReadBytes(); + break; + } + case 74: { + DeprecatedEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 82: { + DeprecatedEncryptionParams = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + input.ReadMessage(AuthRequest); + break; + } + case 18: { + if (userAuthRequest_ == null) { + UserAuthRequest = new global::Authentication.UserAuthRequest(); + } + input.ReadMessage(UserAuthRequest); + break; + } + case 26: { + EncryptedClientKey = input.ReadBytes(); + break; + } + case 34: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + case 42: { + PublicKey = input.ReadBytes(); + break; + } + case 50: { + VerificationCode = input.ReadString(); + break; + } + case 58: { + DeprecatedAuthHashHash = input.ReadBytes(); + break; + } + case 66: { + DeprecatedEncryptedClientKey = input.ReadBytes(); + break; + } + case 74: { + DeprecatedEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 82: { + DeprecatedEncryptionParams = input.ReadBytes(); break; } } } } + #endif } - /// - /// used for both get and save - /// - public sealed partial class SecurityReport : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReport()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConvertUserToV3Request : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConvertUserToV3Request()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[38]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[37]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReport() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConvertUserToV3Request() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReport(SecurityReport other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - encryptedReportData_ = other.encryptedReportData_; - revision_ = other.revision_; - twoFactor_ = other.twoFactor_; - lastLogin_ = other.lastLogin_; - numberOfReusedPassword_ = other.numberOfReusedPassword_; - securityReportIncrementalData_ = other.securityReportIncrementalData_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConvertUserToV3Request(ConvertUserToV3Request other) : this() { + authRequest_ = other.authRequest_ != null ? other.authRequest_.Clone() : null; + userAuthRequest_ = other.userAuthRequest_ != null ? other.userAuthRequest_.Clone() : null; + encryptedClientKey_ = other.encryptedClientKey_; + encryptedPrivateKey_ = other.encryptedPrivateKey_; + publicKey_ = other.publicKey_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReport Clone() { - return new SecurityReport(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ConvertUserToV3Request Clone() { + return new ConvertUserToV3Request(this); } - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; + /// Field number for the "authRequest" field. + public const int AuthRequestFieldNumber = 1; + private global::Authentication.AuthRequest authRequest_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.AuthRequest AuthRequest { + get { return authRequest_; } set { - enterpriseUserId_ = value; + authRequest_ = value; } } - /// Field number for the "encryptedReportData" field. - public const int EncryptedReportDataFieldNumber = 2; - private pb::ByteString encryptedReportData_ = pb::ByteString.Empty; + /// Field number for the "userAuthRequest" field. + public const int UserAuthRequestFieldNumber = 2; + private global::Authentication.UserAuthRequest userAuthRequest_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedReportData { - get { return encryptedReportData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.UserAuthRequest UserAuthRequest { + get { return userAuthRequest_; } set { - encryptedReportData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + userAuthRequest_ = value; } } - /// Field number for the "revision" field. - public const int RevisionFieldNumber = 3; - private long revision_; + /// Field number for the "encryptedClientKey" field. + public const int EncryptedClientKeyFieldNumber = 3; + private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; /// - /// for save this was returned in get, for get this is the saved revision + /// gcm encrypted with the data key /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Revision { - get { return revision_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedClientKey { + get { return encryptedClientKey_; } set { - revision_ = value; + encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "twoFactor" field. - public const int TwoFactorFieldNumber = 4; - private string twoFactor_ = ""; + /// Field number for the "encryptedPrivateKey" field. + public const int EncryptedPrivateKeyFieldNumber = 4; + private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; /// - /// for get not save + /// gcm encrypted with the data key /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string TwoFactor { - get { return twoFactor_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedPrivateKey { + get { return encryptedPrivateKey_; } set { - twoFactor_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "lastLogin" field. - public const int LastLoginFieldNumber = 5; - private long lastLogin_; + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 5; + private pb::ByteString publicKey_ = pb::ByteString.Empty; /// - /// for get not save + /// TODO add alternate passwords /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long LastLogin { - get { return lastLogin_; } - set { - lastLogin_ = value; - } - } - - /// Field number for the "numberOfReusedPassword" field. - public const int NumberOfReusedPasswordFieldNumber = 6; - private int numberOfReusedPassword_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int NumberOfReusedPassword { - get { return numberOfReusedPassword_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } set { - numberOfReusedPassword_ = value; + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "securityReportIncrementalData" field. - public const int SecurityReportIncrementalDataFieldNumber = 7; - private static readonly pb::FieldCodec _repeated_securityReportIncrementalData_codec - = pb::FieldCodec.ForMessage(58, global::Authentication.SecurityReportIncrementalData.Parser); - private readonly pbc::RepeatedField securityReportIncrementalData_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField SecurityReportIncrementalData { - get { return securityReportIncrementalData_; } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SecurityReport); + return Equals(other as ConvertUserToV3Request); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityReport other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ConvertUserToV3Request other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (EncryptedReportData != other.EncryptedReportData) return false; - if (Revision != other.Revision) return false; - if (TwoFactor != other.TwoFactor) return false; - if (LastLogin != other.LastLogin) return false; - if (NumberOfReusedPassword != other.NumberOfReusedPassword) return false; - if(!securityReportIncrementalData_.Equals(other.securityReportIncrementalData_)) return false; + if (!object.Equals(AuthRequest, other.AuthRequest)) return false; + if (!object.Equals(UserAuthRequest, other.UserAuthRequest)) return false; + if (EncryptedClientKey != other.EncryptedClientKey) return false; + if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; + if (PublicKey != other.PublicKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (EncryptedReportData.Length != 0) hash ^= EncryptedReportData.GetHashCode(); - if (Revision != 0L) hash ^= Revision.GetHashCode(); - if (TwoFactor.Length != 0) hash ^= TwoFactor.GetHashCode(); - if (LastLogin != 0L) hash ^= LastLogin.GetHashCode(); - if (NumberOfReusedPassword != 0) hash ^= NumberOfReusedPassword.GetHashCode(); - hash ^= securityReportIncrementalData_.GetHashCode(); + if (authRequest_ != null) hash ^= AuthRequest.GetHashCode(); + if (userAuthRequest_ != null) hash ^= UserAuthRequest.GetHashCode(); + if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); + if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9216,64 +13102,92 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (authRequest_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AuthRequest); } - if (EncryptedReportData.Length != 0) { + if (userAuthRequest_ != null) { output.WriteRawTag(18); - output.WriteBytes(EncryptedReportData); + output.WriteMessage(UserAuthRequest); } - if (Revision != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Revision); + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedClientKey); } - if (TwoFactor.Length != 0) { + if (EncryptedPrivateKey.Length != 0) { output.WriteRawTag(34); - output.WriteString(TwoFactor); + output.WriteBytes(EncryptedPrivateKey); } - if (LastLogin != 0L) { - output.WriteRawTag(40); - output.WriteInt64(LastLogin); - } - if (NumberOfReusedPassword != 0) { - output.WriteRawTag(48); - output.WriteInt32(NumberOfReusedPassword); + if (PublicKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PublicKey); } - securityReportIncrementalData_.WriteTo(output, _repeated_securityReportIncrementalData_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (authRequest_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AuthRequest); + } + if (userAuthRequest_ != null) { + output.WriteRawTag(18); + output.WriteMessage(UserAuthRequest); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedClientKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedPrivateKey); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (EncryptedReportData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedReportData); + if (authRequest_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AuthRequest); } - if (Revision != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + if (userAuthRequest_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserAuthRequest); } - if (TwoFactor.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(TwoFactor); + if (EncryptedClientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); } - if (LastLogin != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastLogin); + if (EncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); } - if (NumberOfReusedPassword != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfReusedPassword); + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); } - size += securityReportIncrementalData_.CalculateSize(_repeated_securityReportIncrementalData_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9281,139 +13195,210 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityReport other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ConvertUserToV3Request other) { if (other == null) { return; } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.EncryptedReportData.Length != 0) { - EncryptedReportData = other.EncryptedReportData; + if (other.authRequest_ != null) { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + AuthRequest.MergeFrom(other.AuthRequest); } - if (other.Revision != 0L) { - Revision = other.Revision; + if (other.userAuthRequest_ != null) { + if (userAuthRequest_ == null) { + UserAuthRequest = new global::Authentication.UserAuthRequest(); + } + UserAuthRequest.MergeFrom(other.UserAuthRequest); } - if (other.TwoFactor.Length != 0) { - TwoFactor = other.TwoFactor; + if (other.EncryptedClientKey.Length != 0) { + EncryptedClientKey = other.EncryptedClientKey; } - if (other.LastLogin != 0L) { - LastLogin = other.LastLogin; + if (other.EncryptedPrivateKey.Length != 0) { + EncryptedPrivateKey = other.EncryptedPrivateKey; } - if (other.NumberOfReusedPassword != 0) { - NumberOfReusedPassword = other.NumberOfReusedPassword; + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; } - securityReportIncrementalData_.Add(other.securityReportIncrementalData_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseUserId = input.ReadInt64(); + case 10: { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + input.ReadMessage(AuthRequest); break; } case 18: { - EncryptedReportData = input.ReadBytes(); + if (userAuthRequest_ == null) { + UserAuthRequest = new global::Authentication.UserAuthRequest(); + } + input.ReadMessage(UserAuthRequest); break; } - case 24: { - Revision = input.ReadInt64(); + case 26: { + EncryptedClientKey = input.ReadBytes(); break; } case 34: { - TwoFactor = input.ReadString(); + EncryptedPrivateKey = input.ReadBytes(); break; } - case 40: { - LastLogin = input.ReadInt64(); + case 42: { + PublicKey = input.ReadBytes(); break; } - case 48: { - NumberOfReusedPassword = input.ReadInt32(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (authRequest_ == null) { + AuthRequest = new global::Authentication.AuthRequest(); + } + input.ReadMessage(AuthRequest); break; } - case 58: { - securityReportIncrementalData_.AddEntriesFrom(input, _repeated_securityReportIncrementalData_codec); + case 18: { + if (userAuthRequest_ == null) { + UserAuthRequest = new global::Authentication.UserAuthRequest(); + } + input.ReadMessage(UserAuthRequest); + break; + } + case 26: { + EncryptedClientKey = input.ReadBytes(); + break; + } + case 34: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + case 42: { + PublicKey = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class SecurityReportSaveRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportSaveRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RevisionResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RevisionResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[39]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[38]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportSaveRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RevisionResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportSaveRequest(SecurityReportSaveRequest other) : this() { - securityReport_ = other.securityReport_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RevisionResponse(RevisionResponse other) : this() { + revision_ = other.revision_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportSaveRequest Clone() { - return new SecurityReportSaveRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RevisionResponse Clone() { + return new RevisionResponse(this); } - /// Field number for the "securityReport" field. - public const int SecurityReportFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_securityReport_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.SecurityReport.Parser); - private readonly pbc::RepeatedField securityReport_ = new pbc::RepeatedField(); + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 1; + private long revision_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField SecurityReport { - get { return securityReport_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SecurityReportSaveRequest); + return Equals(other as RevisionResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityReportSaveRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RevisionResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!securityReport_.Equals(other.securityReport_)) return false; + if (Revision != other.Revision) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= securityReport_.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9421,22 +13406,48 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - securityReport_.WriteTo(output, _repeated_securityReport_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += securityReport_.CalculateSize(_repeated_securityReport_codec); + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9444,98 +13455,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityReportSaveRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RevisionResponse other) { if (other == null) { return; } - securityReport_.Add(other.securityReport_); + if (other.Revision != 0L) { + Revision = other.Revision; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - securityReport_.AddEntriesFrom(input, _repeated_securityReport_codec); + case 8: { + Revision = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Revision = input.ReadInt64(); break; } } } } + #endif } - public sealed partial class SecurityReportRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeEmailRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeEmailRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[40]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[39]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeEmailRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportRequest(SecurityReportRequest other) : this() { - fromPage_ = other.fromPage_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeEmailRequest(ChangeEmailRequest other) : this() { + newEmail_ = other.newEmail_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportRequest Clone() { - return new SecurityReportRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeEmailRequest Clone() { + return new ChangeEmailRequest(this); } - /// Field number for the "fromPage" field. - public const int FromPageFieldNumber = 1; - private long fromPage_; + /// Field number for the "newEmail" field. + public const int NewEmailFieldNumber = 1; + private string newEmail_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long FromPage { - get { return fromPage_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NewEmail { + get { return newEmail_; } set { - fromPage_ = value; + newEmail_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SecurityReportRequest); + return Equals(other as ChangeEmailRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityReportRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeEmailRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (FromPage != other.FromPage) return false; + if (NewEmail != other.NewEmail) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (FromPage != 0L) hash ^= FromPage.GetHashCode(); + if (NewEmail.Length != 0) hash ^= NewEmail.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9543,26 +13604,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (FromPage != 0L) { - output.WriteRawTag(8); - output.WriteInt64(FromPage); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NewEmail.Length != 0) { + output.WriteRawTag(10); + output.WriteString(NewEmail); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NewEmail.Length != 0) { + output.WriteRawTag(10); + output.WriteString(NewEmail); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (FromPage != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(FromPage); + if (NewEmail.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NewEmail); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -9571,172 +13653,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityReportRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeEmailRequest other) { if (other == null) { return; } - if (other.FromPage != 0L) { - FromPage = other.FromPage; + if (other.NewEmail.Length != 0) { + NewEmail = other.NewEmail; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - FromPage = input.ReadInt64(); + case 10: { + NewEmail = input.ReadString(); break; } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + NewEmail = input.ReadString(); + break; + } + } + } + } + #endif + } - public sealed partial class SecurityReportResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeEmailResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeEmailResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[41]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[40]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeEmailResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportResponse(SecurityReportResponse other) : this() { - enterprisePrivateKey_ = other.enterprisePrivateKey_; - securityReport_ = other.securityReport_.Clone(); - asOfRevision_ = other.asOfRevision_; - fromPage_ = other.fromPage_; - toPage_ = other.toPage_; - complete_ = other.complete_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeEmailResponse(ChangeEmailResponse other) : this() { + encryptedChangeEmailToken_ = other.encryptedChangeEmailToken_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SecurityReportResponse Clone() { - return new SecurityReportResponse(this); - } - - /// Field number for the "enterprisePrivateKey" field. - public const int EnterprisePrivateKeyFieldNumber = 1; - private pb::ByteString enterprisePrivateKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EnterprisePrivateKey { - get { return enterprisePrivateKey_; } - set { - enterprisePrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "securityReport" field. - public const int SecurityReportFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_securityReport_codec - = pb::FieldCodec.ForMessage(18, global::Authentication.SecurityReport.Parser); - private readonly pbc::RepeatedField securityReport_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField SecurityReport { - get { return securityReport_; } - } - - /// Field number for the "asOfRevision" field. - public const int AsOfRevisionFieldNumber = 3; - private long asOfRevision_; - /// - /// the revision the data was retrieved for - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long AsOfRevision { - get { return asOfRevision_; } - set { - asOfRevision_ = value; - } - } - - /// Field number for the "fromPage" field. - public const int FromPageFieldNumber = 4; - private long fromPage_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long FromPage { - get { return fromPage_; } - set { - fromPage_ = value; - } - } - - /// Field number for the "toPage" field. - public const int ToPageFieldNumber = 5; - private long toPage_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long ToPage { - get { return toPage_; } - set { - toPage_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeEmailResponse Clone() { + return new ChangeEmailResponse(this); } - /// Field number for the "complete" field. - public const int CompleteFieldNumber = 6; - private bool complete_; + /// Field number for the "encryptedChangeEmailToken" field. + public const int EncryptedChangeEmailTokenFieldNumber = 1; + private pb::ByteString encryptedChangeEmailToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Complete { - get { return complete_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedChangeEmailToken { + get { return encryptedChangeEmailToken_; } set { - complete_ = value; + encryptedChangeEmailToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SecurityReportResponse); + return Equals(other as ChangeEmailResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SecurityReportResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeEmailResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterprisePrivateKey != other.EnterprisePrivateKey) return false; - if(!securityReport_.Equals(other.securityReport_)) return false; - if (AsOfRevision != other.AsOfRevision) return false; - if (FromPage != other.FromPage) return false; - if (ToPage != other.ToPage) return false; - if (Complete != other.Complete) return false; + if (EncryptedChangeEmailToken != other.EncryptedChangeEmailToken) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterprisePrivateKey.Length != 0) hash ^= EnterprisePrivateKey.GetHashCode(); - hash ^= securityReport_.GetHashCode(); - if (AsOfRevision != 0L) hash ^= AsOfRevision.GetHashCode(); - if (FromPage != 0L) hash ^= FromPage.GetHashCode(); - if (ToPage != 0L) hash ^= ToPage.GetHashCode(); - if (Complete != false) hash ^= Complete.GetHashCode(); + if (EncryptedChangeEmailToken.Length != 0) hash ^= EncryptedChangeEmailToken.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9744,56 +13802,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterprisePrivateKey.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedChangeEmailToken.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EnterprisePrivateKey); - } - securityReport_.WriteTo(output, _repeated_securityReport_codec); - if (AsOfRevision != 0L) { - output.WriteRawTag(24); - output.WriteInt64(AsOfRevision); - } - if (FromPage != 0L) { - output.WriteRawTag(32); - output.WriteInt64(FromPage); + output.WriteBytes(EncryptedChangeEmailToken); } - if (ToPage != 0L) { - output.WriteRawTag(40); - output.WriteInt64(ToPage); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Complete != false) { - output.WriteRawTag(48); - output.WriteBool(Complete); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedChangeEmailToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedChangeEmailToken); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterprisePrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterprisePrivateKey); - } - size += securityReport_.CalculateSize(_repeated_securityReport_codec); - if (AsOfRevision != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(AsOfRevision); - } - if (FromPage != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(FromPage); - } - if (ToPage != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ToPage); - } - if (Complete != false) { - size += 1 + 1; + if (EncryptedChangeEmailToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedChangeEmailToken); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -9802,133 +13851,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SecurityReportResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeEmailResponse other) { if (other == null) { return; } - if (other.EnterprisePrivateKey.Length != 0) { - EnterprisePrivateKey = other.EnterprisePrivateKey; - } - securityReport_.Add(other.securityReport_); - if (other.AsOfRevision != 0L) { - AsOfRevision = other.AsOfRevision; - } - if (other.FromPage != 0L) { - FromPage = other.FromPage; - } - if (other.ToPage != 0L) { - ToPage = other.ToPage; - } - if (other.Complete != false) { - Complete = other.Complete; + if (other.EncryptedChangeEmailToken.Length != 0) { + EncryptedChangeEmailToken = other.EncryptedChangeEmailToken; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EnterprisePrivateKey = input.ReadBytes(); + EncryptedChangeEmailToken = input.ReadBytes(); break; } - case 18: { - securityReport_.AddEntriesFrom(input, _repeated_securityReport_codec); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 24: { - AsOfRevision = input.ReadInt64(); - break; - } - case 32: { - FromPage = input.ReadInt64(); - break; - } - case 40: { - ToPage = input.ReadInt64(); - break; - } - case 48: { - Complete = input.ReadBool(); + case 10: { + EncryptedChangeEmailToken = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class ReusedPasswordsRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReusedPasswordsRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EmailVerificationLinkResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmailVerificationLinkResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[42]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[41]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ReusedPasswordsRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmailVerificationLinkResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ReusedPasswordsRequest(ReusedPasswordsRequest other) : this() { - count_ = other.count_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmailVerificationLinkResponse(EmailVerificationLinkResponse other) : this() { + emailVerified_ = other.emailVerified_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ReusedPasswordsRequest Clone() { - return new ReusedPasswordsRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmailVerificationLinkResponse Clone() { + return new EmailVerificationLinkResponse(this); } - /// Field number for the "count" field. - public const int CountFieldNumber = 1; - private int count_; + /// Field number for the "emailVerified" field. + public const int EmailVerifiedFieldNumber = 1; + private bool emailVerified_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Count { - get { return count_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool EmailVerified { + get { return emailVerified_; } set { - count_ = value; + emailVerified_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ReusedPasswordsRequest); + return Equals(other as EmailVerificationLinkResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ReusedPasswordsRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EmailVerificationLinkResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Count != other.Count) return false; + if (EmailVerified != other.EmailVerified) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Count != 0) hash ^= Count.GetHashCode(); + if (EmailVerified != false) hash ^= EmailVerified.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9936,26 +14000,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Count != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EmailVerified != false) { output.WriteRawTag(8); - output.WriteInt32(Count); + output.WriteBool(EmailVerified); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EmailVerified != false) { + output.WriteRawTag(8); + output.WriteBool(EmailVerified); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Count != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Count); + if (EmailVerified != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -9964,114 +14049,166 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ReusedPasswordsRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EmailVerificationLinkResponse other) { if (other == null) { return; } - if (other.Count != 0) { - Count = other.Count; + if (other.EmailVerified != false) { + EmailVerified = other.EmailVerified; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Count = input.ReadInt32(); + EmailVerified = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EmailVerified = input.ReadBool(); break; } } } } + #endif } - public sealed partial class SummaryConsoleReport : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SummaryConsoleReport()); + /// + /// used in SecurityDataRequest + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityData()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[43]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[42]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SummaryConsoleReport() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityData() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SummaryConsoleReport(SummaryConsoleReport other) : this() { - reportType_ = other.reportType_; - reportData_ = other.reportData_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityData(SecurityData other) : this() { + uid_ = other.uid_; + data_ = other.data_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SummaryConsoleReport Clone() { - return new SummaryConsoleReport(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityData Clone() { + return new SecurityData(this); } - /// Field number for the "reportType" field. - public const int ReportTypeFieldNumber = 1; - private int reportType_; + /// Field number for the "uid" field. + public const int UidFieldNumber = 1; + private pb::ByteString uid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ReportType { - get { return reportType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Uid { + get { return uid_; } set { - reportType_ = value; + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "reportData" field. - public const int ReportDataFieldNumber = 2; - private pb::ByteString reportData_ = pb::ByteString.Empty; + /// Field number for the "data" field. + public const int DataFieldNumber = 2; + private pb::ByteString data_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ReportData { - get { return reportData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } set { - reportData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SummaryConsoleReport); + return Equals(other as SecurityData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SummaryConsoleReport other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityData other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ReportType != other.ReportType) return false; - if (ReportData != other.ReportData) return false; + if (Uid != other.Uid) return false; + if (Data != other.Data) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ReportType != 0) hash ^= ReportType.GetHashCode(); - if (ReportData.Length != 0) hash ^= ReportData.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10079,33 +14216,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ReportType != 0) { - output.WriteRawTag(8); - output.WriteInt32(ReportType); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); } - if (ReportData.Length != 0) { + if (Data.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(ReportData); + output.WriteBytes(Data); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (Data.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ReportType != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReportType); + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); } - if (ReportData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ReportData); + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10114,149 +14276,190 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SummaryConsoleReport other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityData other) { if (other == null) { return; } - if (other.ReportType != 0) { - ReportType = other.ReportType; + if (other.Uid.Length != 0) { + Uid = other.Uid; } - if (other.ReportData.Length != 0) { - ReportData = other.ReportData; + if (other.Data.Length != 0) { + Data = other.Data; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ReportType = input.ReadInt32(); + case 10: { + Uid = input.ReadBytes(); break; } case 18: { - ReportData = input.ReadBytes(); + Data = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 18: { + Data = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class ChangeToKeyTypeOne : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOne()); + /// + /// to update a records security data + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityDataRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityDataRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[44]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[43]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOne() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityDataRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOne(ChangeToKeyTypeOne other) : this() { - objectType_ = other.objectType_; - primaryUid_ = other.primaryUid_; - secondaryUid_ = other.secondaryUid_; - key_ = other.key_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityDataRequest(SecurityDataRequest other) : this() { + recordSecurityData_ = other.recordSecurityData_.Clone(); + masterPasswordSecurityData_ = other.masterPasswordSecurityData_.Clone(); + encryptionType_ = other.encryptionType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOne Clone() { - return new ChangeToKeyTypeOne(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityDataRequest Clone() { + return new SecurityDataRequest(this); } - /// Field number for the "objectType" field. - public const int ObjectTypeFieldNumber = 1; - private global::Authentication.ObjectTypes objectType_ = global::Authentication.ObjectTypes.Record; + /// Field number for the "recordSecurityData" field. + public const int RecordSecurityDataFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordSecurityData_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.SecurityData.Parser); + private readonly pbc::RepeatedField recordSecurityData_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.ObjectTypes ObjectType { - get { return objectType_; } - set { - objectType_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordSecurityData { + get { return recordSecurityData_; } } - /// Field number for the "primaryUid" field. - public const int PrimaryUidFieldNumber = 2; - private pb::ByteString primaryUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PrimaryUid { - get { return primaryUid_; } - set { - primaryUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "secondaryUid" field. - public const int SecondaryUidFieldNumber = 3; - private pb::ByteString secondaryUid_ = pb::ByteString.Empty; + /// Field number for the "masterPasswordSecurityData" field. + public const int MasterPasswordSecurityDataFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_masterPasswordSecurityData_codec + = pb::FieldCodec.ForMessage(18, global::Authentication.SecurityData.Parser); + private readonly pbc::RepeatedField masterPasswordSecurityData_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString SecondaryUid { - get { return secondaryUid_; } - set { - secondaryUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MasterPasswordSecurityData { + get { return masterPasswordSecurityData_; } } - /// Field number for the "key" field. - public const int KeyFieldNumber = 4; - private pb::ByteString key_ = pb::ByteString.Empty; + /// Field number for the "encryptionType" field. + public const int EncryptionTypeFieldNumber = 3; + private global::Enterprise.EncryptedKeyType encryptionType_ = global::Enterprise.EncryptedKeyType.KtNoKey; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Key { - get { return key_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType EncryptionType { + get { return encryptionType_; } set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptionType_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeToKeyTypeOne); + return Equals(other as SecurityDataRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ChangeToKeyTypeOne other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityDataRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ObjectType != other.ObjectType) return false; - if (PrimaryUid != other.PrimaryUid) return false; - if (SecondaryUid != other.SecondaryUid) return false; - if (Key != other.Key) return false; + if(!recordSecurityData_.Equals(other.recordSecurityData_)) return false; + if(!masterPasswordSecurityData_.Equals(other.masterPasswordSecurityData_)) return false; + if (EncryptionType != other.EncryptionType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ObjectType != global::Authentication.ObjectTypes.Record) hash ^= ObjectType.GetHashCode(); - if (PrimaryUid.Length != 0) hash ^= PrimaryUid.GetHashCode(); - if (SecondaryUid.Length != 0) hash ^= SecondaryUid.GetHashCode(); - if (Key.Length != 0) hash ^= Key.GetHashCode(); + hash ^= recordSecurityData_.GetHashCode(); + hash ^= masterPasswordSecurityData_.GetHashCode(); + if (EncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= EncryptionType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10264,47 +14467,53 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ObjectType != global::Authentication.ObjectTypes.Record) { - output.WriteRawTag(8); - output.WriteEnum((int) ObjectType); - } - if (PrimaryUid.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(PrimaryUid); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordSecurityData_.WriteTo(output, _repeated_recordSecurityData_codec); + masterPasswordSecurityData_.WriteTo(output, _repeated_masterPasswordSecurityData_codec); + if (EncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) EncryptionType); } - if (SecondaryUid.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(SecondaryUid); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Key.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(Key); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordSecurityData_.WriteTo(ref output, _repeated_recordSecurityData_codec); + masterPasswordSecurityData_.WriteTo(ref output, _repeated_masterPasswordSecurityData_codec); + if (EncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) EncryptionType); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ObjectType != global::Authentication.ObjectTypes.Record) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ObjectType); - } - if (PrimaryUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrimaryUid); - } - if (SecondaryUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecondaryUid); - } - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + size += recordSecurityData_.CalculateSize(_repeated_recordSecurityData_codec); + size += masterPasswordSecurityData_.CalculateSize(_repeated_masterPasswordSecurityData_codec); + if (EncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EncryptionType); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10313,120 +14522,259 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ChangeToKeyTypeOne other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityDataRequest other) { if (other == null) { return; } - if (other.ObjectType != global::Authentication.ObjectTypes.Record) { - ObjectType = other.ObjectType; - } - if (other.PrimaryUid.Length != 0) { - PrimaryUid = other.PrimaryUid; - } - if (other.SecondaryUid.Length != 0) { - SecondaryUid = other.SecondaryUid; - } - if (other.Key.Length != 0) { - Key = other.Key; + recordSecurityData_.Add(other.recordSecurityData_); + masterPasswordSecurityData_.Add(other.masterPasswordSecurityData_); + if (other.EncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + EncryptionType = other.EncryptionType; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ObjectType = (global::Authentication.ObjectTypes) input.ReadEnum(); + case 10: { + recordSecurityData_.AddEntriesFrom(input, _repeated_recordSecurityData_codec); break; } case 18: { - PrimaryUid = input.ReadBytes(); + masterPasswordSecurityData_.AddEntriesFrom(input, _repeated_masterPasswordSecurityData_codec); break; } - case 26: { - SecondaryUid = input.ReadBytes(); + case 24: { + EncryptionType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); break; } - case 34: { - Key = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordSecurityData_.AddEntriesFrom(ref input, _repeated_recordSecurityData_codec); + break; + } + case 18: { + masterPasswordSecurityData_.AddEntriesFrom(ref input, _repeated_masterPasswordSecurityData_codec); + break; + } + case 24: { + EncryptionType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class ChangeToKeyTypeOneRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOneRequest()); + /// + /// if mp or not, by user, include reused passwords + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityReportIncrementalData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportIncrementalData()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[45]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[44]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportIncrementalData() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneRequest(ChangeToKeyTypeOneRequest other) : this() { - changeToKeyTypeOne_ = other.changeToKeyTypeOne_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportIncrementalData(SecurityReportIncrementalData other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + currentSecurityData_ = other.currentSecurityData_; + currentSecurityDataRevision_ = other.currentSecurityDataRevision_; + oldSecurityData_ = other.oldSecurityData_; + oldSecurityDataRevision_ = other.oldSecurityDataRevision_; + currentDataEncryptionType_ = other.currentDataEncryptionType_; + oldDataEncryptionType_ = other.oldDataEncryptionType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneRequest Clone() { - return new ChangeToKeyTypeOneRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportIncrementalData Clone() { + return new SecurityReportIncrementalData(this); } - /// Field number for the "changeToKeyTypeOne" field. - public const int ChangeToKeyTypeOneFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_changeToKeyTypeOne_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.ChangeToKeyTypeOne.Parser); - private readonly pbc::RepeatedField changeToKeyTypeOne_ = new pbc::RepeatedField(); + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField ChangeToKeyTypeOne { - get { return changeToKeyTypeOne_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "currentSecurityData" field. + public const int CurrentSecurityDataFieldNumber = 2; + private pb::ByteString currentSecurityData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString CurrentSecurityData { + get { return currentSecurityData_; } + set { + currentSecurityData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "currentSecurityDataRevision" field. + public const int CurrentSecurityDataRevisionFieldNumber = 3; + private long currentSecurityDataRevision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long CurrentSecurityDataRevision { + get { return currentSecurityDataRevision_; } + set { + currentSecurityDataRevision_ = value; + } + } + + /// Field number for the "oldSecurityData" field. + public const int OldSecurityDataFieldNumber = 4; + private pb::ByteString oldSecurityData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString OldSecurityData { + get { return oldSecurityData_; } + set { + oldSecurityData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "oldSecurityDataRevision" field. + public const int OldSecurityDataRevisionFieldNumber = 5; + private long oldSecurityDataRevision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long OldSecurityDataRevision { + get { return oldSecurityDataRevision_; } + set { + oldSecurityDataRevision_ = value; + } + } + + /// Field number for the "currentDataEncryptionType" field. + public const int CurrentDataEncryptionTypeFieldNumber = 6; + private global::Enterprise.EncryptedKeyType currentDataEncryptionType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType CurrentDataEncryptionType { + get { return currentDataEncryptionType_; } + set { + currentDataEncryptionType_ = value; + } + } + + /// Field number for the "oldDataEncryptionType" field. + public const int OldDataEncryptionTypeFieldNumber = 7; + private global::Enterprise.EncryptedKeyType oldDataEncryptionType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType OldDataEncryptionType { + get { return oldDataEncryptionType_; } + set { + oldDataEncryptionType_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeToKeyTypeOneRequest); + return Equals(other as SecurityReportIncrementalData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ChangeToKeyTypeOneRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityReportIncrementalData other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!changeToKeyTypeOne_.Equals(other.changeToKeyTypeOne_)) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (CurrentSecurityData != other.CurrentSecurityData) return false; + if (CurrentSecurityDataRevision != other.CurrentSecurityDataRevision) return false; + if (OldSecurityData != other.OldSecurityData) return false; + if (OldSecurityDataRevision != other.OldSecurityDataRevision) return false; + if (CurrentDataEncryptionType != other.CurrentDataEncryptionType) return false; + if (OldDataEncryptionType != other.OldDataEncryptionType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= changeToKeyTypeOne_.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (CurrentSecurityData.Length != 0) hash ^= CurrentSecurityData.GetHashCode(); + if (CurrentSecurityDataRevision != 0L) hash ^= CurrentSecurityDataRevision.GetHashCode(); + if (OldSecurityData.Length != 0) hash ^= OldSecurityData.GetHashCode(); + if (OldSecurityDataRevision != 0L) hash ^= OldSecurityDataRevision.GetHashCode(); + if (CurrentDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= CurrentDataEncryptionType.GetHashCode(); + if (OldDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= OldDataEncryptionType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10434,163 +14782,463 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - changeToKeyTypeOne_.WriteTo(output, _repeated_changeToKeyTypeOne_codec); - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - size += changeToKeyTypeOne_.CalculateSize(_repeated_changeToKeyTypeOne_codec); - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - return size; + if (CurrentSecurityData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(CurrentSecurityData); + } + if (CurrentSecurityDataRevision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(CurrentSecurityDataRevision); + } + if (OldSecurityData.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(OldSecurityData); + } + if (OldSecurityDataRevision != 0L) { + output.WriteRawTag(40); + output.WriteInt64(OldSecurityDataRevision); + } + if (CurrentDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(48); + output.WriteEnum((int) CurrentDataEncryptionType); + } + if (OldDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(56); + output.WriteEnum((int) OldDataEncryptionType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ChangeToKeyTypeOneRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (CurrentSecurityData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(CurrentSecurityData); + } + if (CurrentSecurityDataRevision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(CurrentSecurityDataRevision); + } + if (OldSecurityData.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(OldSecurityData); + } + if (OldSecurityDataRevision != 0L) { + output.WriteRawTag(40); + output.WriteInt64(OldSecurityDataRevision); + } + if (CurrentDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(48); + output.WriteEnum((int) CurrentDataEncryptionType); + } + if (OldDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(56); + output.WriteEnum((int) OldDataEncryptionType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (CurrentSecurityData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(CurrentSecurityData); + } + if (CurrentSecurityDataRevision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CurrentSecurityDataRevision); + } + if (OldSecurityData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(OldSecurityData); + } + if (OldSecurityDataRevision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(OldSecurityDataRevision); + } + if (CurrentDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CurrentDataEncryptionType); + } + if (OldDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) OldDataEncryptionType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityReportIncrementalData other) { if (other == null) { return; } - changeToKeyTypeOne_.Add(other.changeToKeyTypeOne_); + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.CurrentSecurityData.Length != 0) { + CurrentSecurityData = other.CurrentSecurityData; + } + if (other.CurrentSecurityDataRevision != 0L) { + CurrentSecurityDataRevision = other.CurrentSecurityDataRevision; + } + if (other.OldSecurityData.Length != 0) { + OldSecurityData = other.OldSecurityData; + } + if (other.OldSecurityDataRevision != 0L) { + OldSecurityDataRevision = other.OldSecurityDataRevision; + } + if (other.CurrentDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + CurrentDataEncryptionType = other.CurrentDataEncryptionType; + } + if (other.OldDataEncryptionType != global::Enterprise.EncryptedKeyType.KtNoKey) { + OldDataEncryptionType = other.OldDataEncryptionType; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - changeToKeyTypeOne_.AddEntriesFrom(input, _repeated_changeToKeyTypeOne_codec); + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + CurrentSecurityData = input.ReadBytes(); + break; + } + case 24: { + CurrentSecurityDataRevision = input.ReadInt64(); + break; + } + case 34: { + OldSecurityData = input.ReadBytes(); + break; + } + case 40: { + OldSecurityDataRevision = input.ReadInt64(); + break; + } + case 48: { + CurrentDataEncryptionType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 56: { + OldDataEncryptionType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + CurrentSecurityData = input.ReadBytes(); + break; + } + case 24: { + CurrentSecurityDataRevision = input.ReadInt64(); + break; + } + case 34: { + OldSecurityData = input.ReadBytes(); + break; + } + case 40: { + OldSecurityDataRevision = input.ReadInt64(); + break; + } + case 48: { + CurrentDataEncryptionType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 56: { + OldDataEncryptionType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class ChangeToKeyTypeOneStatus : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOneStatus()); + /// + /// used for both get and save + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityReport : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReport()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[46]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[45]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneStatus() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReport() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneStatus(ChangeToKeyTypeOneStatus other) : this() { - uid_ = other.uid_; - type_ = other.type_; - status_ = other.status_; - reason_ = other.reason_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReport(SecurityReport other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + encryptedReportData_ = other.encryptedReportData_; + revision_ = other.revision_; + twoFactor_ = other.twoFactor_; + lastLogin_ = other.lastLogin_; + numberOfReusedPassword_ = other.numberOfReusedPassword_; + securityReportIncrementalData_ = other.securityReportIncrementalData_.Clone(); + userId_ = other.userId_; + hasOldEncryption_ = other.hasOldEncryption_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneStatus Clone() { - return new ChangeToKeyTypeOneStatus(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReport Clone() { + return new SecurityReport(this); } - /// Field number for the "uid" field. - public const int UidFieldNumber = 1; - private pb::ByteString uid_ = pb::ByteString.Empty; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Uid { - get { return uid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; } } - /// Field number for the "type" field. - public const int TypeFieldNumber = 2; - private string type_ = ""; + /// Field number for the "encryptedReportData" field. + public const int EncryptedReportDataFieldNumber = 2; + private pb::ByteString encryptedReportData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Type { - get { return type_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedReportData { + get { return encryptedReportData_; } set { - type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedReportData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "status" field. - public const int StatusFieldNumber = 3; - private string status_ = ""; + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 3; + private long revision_; + /// + /// for save this was returned in get, for get this is the saved revision + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Status { - get { return status_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } set { - status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + revision_ = value; } } - /// Field number for the "reason" field. - public const int ReasonFieldNumber = 4; - private string reason_ = ""; + /// Field number for the "twoFactor" field. + public const int TwoFactorFieldNumber = 4; + private string twoFactor_ = ""; + /// + /// for get not save + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Reason { - get { return reason_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TwoFactor { + get { return twoFactor_; } set { - reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + twoFactor_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "lastLogin" field. + public const int LastLoginFieldNumber = 5; + private long lastLogin_; + /// + /// for get not save + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as ChangeToKeyTypeOneStatus); - } - + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LastLogin { + get { return lastLogin_; } + set { + lastLogin_ = value; + } + } + + /// Field number for the "numberOfReusedPassword" field. + public const int NumberOfReusedPasswordFieldNumber = 6; + private int numberOfReusedPassword_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ChangeToKeyTypeOneStatus other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberOfReusedPassword { + get { return numberOfReusedPassword_; } + set { + numberOfReusedPassword_ = value; + } + } + + /// Field number for the "securityReportIncrementalData" field. + public const int SecurityReportIncrementalDataFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_securityReportIncrementalData_codec + = pb::FieldCodec.ForMessage(58, global::Authentication.SecurityReportIncrementalData.Parser); + private readonly pbc::RepeatedField securityReportIncrementalData_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SecurityReportIncrementalData { + get { return securityReportIncrementalData_; } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 8; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "hasOldEncryption" field. + public const int HasOldEncryptionFieldNumber = 9; + private bool hasOldEncryption_; + /// + /// specifically, RSA encrypted keys + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasOldEncryption { + get { return hasOldEncryption_; } + set { + hasOldEncryption_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SecurityReport); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityReport other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Uid != other.Uid) return false; - if (Type != other.Type) return false; - if (Status != other.Status) return false; - if (Reason != other.Reason) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedReportData != other.EncryptedReportData) return false; + if (Revision != other.Revision) return false; + if (TwoFactor != other.TwoFactor) return false; + if (LastLogin != other.LastLogin) return false; + if (NumberOfReusedPassword != other.NumberOfReusedPassword) return false; + if(!securityReportIncrementalData_.Equals(other.securityReportIncrementalData_)) return false; + if (UserId != other.UserId) return false; + if (HasOldEncryption != other.HasOldEncryption) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Uid.Length != 0) hash ^= Uid.GetHashCode(); - if (Type.Length != 0) hash ^= Type.GetHashCode(); - if (Status.Length != 0) hash ^= Status.GetHashCode(); - if (Reason.Length != 0) hash ^= Reason.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedReportData.Length != 0) hash ^= EncryptedReportData.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (TwoFactor.Length != 0) hash ^= TwoFactor.GetHashCode(); + if (LastLogin != 0L) hash ^= LastLogin.GetHashCode(); + if (NumberOfReusedPassword != 0) hash ^= NumberOfReusedPassword.GetHashCode(); + hash ^= securityReportIncrementalData_.GetHashCode(); + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (HasOldEncryption != false) hash ^= HasOldEncryption.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10598,47 +15246,127 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Uid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(Uid); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (Type.Length != 0) { + if (EncryptedReportData.Length != 0) { output.WriteRawTag(18); - output.WriteString(Type); + output.WriteBytes(EncryptedReportData); } - if (Status.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Status); + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); } - if (Reason.Length != 0) { + if (TwoFactor.Length != 0) { output.WriteRawTag(34); - output.WriteString(Reason); + output.WriteString(TwoFactor); + } + if (LastLogin != 0L) { + output.WriteRawTag(40); + output.WriteInt64(LastLogin); + } + if (NumberOfReusedPassword != 0) { + output.WriteRawTag(48); + output.WriteInt32(NumberOfReusedPassword); + } + securityReportIncrementalData_.WriteTo(output, _repeated_securityReportIncrementalData_codec); + if (UserId != 0) { + output.WriteRawTag(64); + output.WriteInt32(UserId); + } + if (HasOldEncryption != false) { + output.WriteRawTag(72); + output.WriteBool(HasOldEncryption); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedReportData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedReportData); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (TwoFactor.Length != 0) { + output.WriteRawTag(34); + output.WriteString(TwoFactor); + } + if (LastLogin != 0L) { + output.WriteRawTag(40); + output.WriteInt64(LastLogin); + } + if (NumberOfReusedPassword != 0) { + output.WriteRawTag(48); + output.WriteInt32(NumberOfReusedPassword); + } + securityReportIncrementalData_.WriteTo(ref output, _repeated_securityReportIncrementalData_codec); + if (UserId != 0) { + output.WriteRawTag(64); + output.WriteInt32(UserId); + } + if (HasOldEncryption != false) { + output.WriteRawTag(72); + output.WriteBool(HasOldEncryption); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Uid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (Type.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + if (EncryptedReportData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedReportData); } - if (Status.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); } - if (Reason.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason); + if (TwoFactor.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TwoFactor); + } + if (LastLogin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastLogin); + } + if (NumberOfReusedPassword != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfReusedPassword); + } + size += securityReportIncrementalData_.CalculateSize(_repeated_securityReportIncrementalData_codec); + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (HasOldEncryption != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10647,120 +15375,233 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ChangeToKeyTypeOneStatus other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityReport other) { if (other == null) { return; } - if (other.Uid.Length != 0) { - Uid = other.Uid; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.Type.Length != 0) { - Type = other.Type; + if (other.EncryptedReportData.Length != 0) { + EncryptedReportData = other.EncryptedReportData; } - if (other.Status.Length != 0) { - Status = other.Status; + if (other.Revision != 0L) { + Revision = other.Revision; } - if (other.Reason.Length != 0) { - Reason = other.Reason; + if (other.TwoFactor.Length != 0) { + TwoFactor = other.TwoFactor; + } + if (other.LastLogin != 0L) { + LastLogin = other.LastLogin; + } + if (other.NumberOfReusedPassword != 0) { + NumberOfReusedPassword = other.NumberOfReusedPassword; + } + securityReportIncrementalData_.Add(other.securityReportIncrementalData_); + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.HasOldEncryption != false) { + HasOldEncryption = other.HasOldEncryption; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Uid = input.ReadBytes(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } case 18: { - Type = input.ReadString(); + EncryptedReportData = input.ReadBytes(); break; } - case 26: { - Status = input.ReadString(); + case 24: { + Revision = input.ReadInt64(); break; } case 34: { - Reason = input.ReadString(); + TwoFactor = input.ReadString(); + break; + } + case 40: { + LastLogin = input.ReadInt64(); + break; + } + case 48: { + NumberOfReusedPassword = input.ReadInt32(); + break; + } + case 58: { + securityReportIncrementalData_.AddEntriesFrom(input, _repeated_securityReportIncrementalData_codec); + break; + } + case 64: { + UserId = input.ReadInt32(); + break; + } + case 72: { + HasOldEncryption = input.ReadBool(); break; } } } + #endif } - } - - public sealed partial class ChangeToKeyTypeOneResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOneResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[47]; } - } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneResponse() { - OnConstruction(); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + EncryptedReportData = input.ReadBytes(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 34: { + TwoFactor = input.ReadString(); + break; + } + case 40: { + LastLogin = input.ReadInt64(); + break; + } + case 48: { + NumberOfReusedPassword = input.ReadInt32(); + break; + } + case 58: { + securityReportIncrementalData_.AddEntriesFrom(ref input, _repeated_securityReportIncrementalData_codec); + break; + } + case 64: { + UserId = input.ReadInt32(); + break; + } + case 72: { + HasOldEncryption = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityReportSaveRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportSaveRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[46]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportSaveRequest() { + OnConstruction(); + } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneResponse(ChangeToKeyTypeOneResponse other) : this() { - changeToKeyTypeOneStatus_ = other.changeToKeyTypeOneStatus_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportSaveRequest(SecurityReportSaveRequest other) : this() { + securityReport_ = other.securityReport_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ChangeToKeyTypeOneResponse Clone() { - return new ChangeToKeyTypeOneResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportSaveRequest Clone() { + return new SecurityReportSaveRequest(this); } - /// Field number for the "changeToKeyTypeOneStatus" field. - public const int ChangeToKeyTypeOneStatusFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_changeToKeyTypeOneStatus_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.ChangeToKeyTypeOneStatus.Parser); - private readonly pbc::RepeatedField changeToKeyTypeOneStatus_ = new pbc::RepeatedField(); + /// Field number for the "securityReport" field. + public const int SecurityReportFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_securityReport_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.SecurityReport.Parser); + private readonly pbc::RepeatedField securityReport_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField ChangeToKeyTypeOneStatus { - get { return changeToKeyTypeOneStatus_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SecurityReport { + get { return securityReport_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ChangeToKeyTypeOneResponse); + return Equals(other as SecurityReportSaveRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ChangeToKeyTypeOneResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityReportSaveRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!changeToKeyTypeOneStatus_.Equals(other.changeToKeyTypeOneStatus_)) return false; + if(!securityReport_.Equals(other.securityReport_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= changeToKeyTypeOneStatus_.GetHashCode(); + hash ^= securityReport_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10768,22 +15609,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - changeToKeyTypeOneStatus_.WriteTo(output, _repeated_changeToKeyTypeOneStatus_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + securityReport_.WriteTo(output, _repeated_securityReport_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + securityReport_.WriteTo(ref output, _repeated_securityReport_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += changeToKeyTypeOneStatus_.CalculateSize(_repeated_changeToKeyTypeOneStatus_codec); + size += securityReport_.CalculateSize(_repeated_securityReport_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -10791,121 +15650,146 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ChangeToKeyTypeOneResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityReportSaveRequest other) { if (other == null) { return; } - changeToKeyTypeOneStatus_.Add(other.changeToKeyTypeOneStatus_); + securityReport_.Add(other.securityReport_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - changeToKeyTypeOneStatus_.AddEntriesFrom(input, _repeated_changeToKeyTypeOneStatus_codec); + securityReport_.AddEntriesFrom(input, _repeated_securityReport_codec); break; } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + securityReport_.AddEntriesFrom(ref input, _repeated_securityReport_codec); + break; + } + } + } + } + #endif + } - /// - /// for setting keys where the id is a long value - /// - public sealed partial class SetKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityReportRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[48]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[47]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetKey() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetKey(SetKey other) : this() { - id_ = other.id_; - key_ = other.key_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportRequest(SecurityReportRequest other) : this() { + fromPage_ = other.fromPage_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetKey Clone() { - return new SetKey(this); - } - - /// Field number for the "id" field. - public const int IdFieldNumber = 1; - private long id_; - /// - /// role_id - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Id { - get { return id_; } - set { - id_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportRequest Clone() { + return new SecurityReportRequest(this); } - /// Field number for the "key" field. - public const int KeyFieldNumber = 2; - private pb::ByteString key_ = pb::ByteString.Empty; - /// - /// role key GCM encrypted with the tree key - /// + /// Field number for the "fromPage" field. + public const int FromPageFieldNumber = 1; + private long fromPage_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Key { - get { return key_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FromPage { + get { return fromPage_; } set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + fromPage_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SetKey); + return Equals(other as SecurityReportRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SetKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityReportRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Id != other.Id) return false; - if (Key != other.Key) return false; + if (FromPage != other.FromPage) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Id != 0L) hash ^= Id.GetHashCode(); - if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (FromPage != 0L) hash ^= FromPage.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10913,33 +15797,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Id != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FromPage != 0L) { output.WriteRawTag(8); - output.WriteInt64(Id); - } - if (Key.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(Key); + output.WriteInt64(FromPage); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FromPage != 0L) { + output.WriteRawTag(8); + output.WriteInt64(FromPage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Id != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); - } - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + if (FromPage != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FromPage); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10948,106 +15846,240 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SetKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityReportRequest other) { if (other == null) { return; } - if (other.Id != 0L) { - Id = other.Id; - } - if (other.Key.Length != 0) { - Key = other.Key; + if (other.FromPage != 0L) { + FromPage = other.FromPage; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - Id = input.ReadInt64(); + FromPage = input.ReadInt64(); break; } - case 18: { - Key = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + FromPage = input.ReadInt64(); break; } } } } + #endif } - public sealed partial class SetKeyRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetKeyRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityReportResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityReportResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[49]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[48]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetKeyRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetKeyRequest(SetKeyRequest other) : this() { - keys_ = other.keys_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportResponse(SecurityReportResponse other) : this() { + enterprisePrivateKey_ = other.enterprisePrivateKey_; + securityReport_ = other.securityReport_.Clone(); + asOfRevision_ = other.asOfRevision_; + fromPage_ = other.fromPage_; + toPage_ = other.toPage_; + complete_ = other.complete_; + enterpriseEccPrivateKey_ = other.enterpriseEccPrivateKey_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetKeyRequest Clone() { - return new SetKeyRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SecurityReportResponse Clone() { + return new SecurityReportResponse(this); } - /// Field number for the "keys" field. - public const int KeysFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_keys_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.SetKey.Parser); - private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + /// Field number for the "enterprisePrivateKey" field. + public const int EnterprisePrivateKeyFieldNumber = 1; + private pb::ByteString enterprisePrivateKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Keys { - get { return keys_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EnterprisePrivateKey { + get { return enterprisePrivateKey_; } + set { + enterprisePrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "securityReport" field. + public const int SecurityReportFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_securityReport_codec + = pb::FieldCodec.ForMessage(18, global::Authentication.SecurityReport.Parser); + private readonly pbc::RepeatedField securityReport_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SecurityReport { + get { return securityReport_; } + } + + /// Field number for the "asOfRevision" field. + public const int AsOfRevisionFieldNumber = 3; + private long asOfRevision_; + /// + /// the revision the data was retrieved for + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AsOfRevision { + get { return asOfRevision_; } + set { + asOfRevision_ = value; + } + } + + /// Field number for the "fromPage" field. + public const int FromPageFieldNumber = 4; + private long fromPage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FromPage { + get { return fromPage_; } + set { + fromPage_ = value; + } + } + + /// Field number for the "toPage" field. + public const int ToPageFieldNumber = 5; + private long toPage_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ToPage { + get { return toPage_; } + set { + toPage_ = value; + } + } + + /// Field number for the "complete" field. + public const int CompleteFieldNumber = 6; + private bool complete_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Complete { + get { return complete_; } + set { + complete_ = value; + } + } + + /// Field number for the "enterpriseEccPrivateKey" field. + public const int EnterpriseEccPrivateKeyFieldNumber = 7; + private pb::ByteString enterpriseEccPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EnterpriseEccPrivateKey { + get { return enterpriseEccPrivateKey_; } + set { + enterpriseEccPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SetKeyRequest); + return Equals(other as SecurityReportResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SetKeyRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SecurityReportResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!keys_.Equals(other.keys_)) return false; + if (EnterprisePrivateKey != other.EnterprisePrivateKey) return false; + if(!securityReport_.Equals(other.securityReport_)) return false; + if (AsOfRevision != other.AsOfRevision) return false; + if (FromPage != other.FromPage) return false; + if (ToPage != other.ToPage) return false; + if (Complete != other.Complete) return false; + if (EnterpriseEccPrivateKey != other.EnterpriseEccPrivateKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= keys_.GetHashCode(); + if (EnterprisePrivateKey.Length != 0) hash ^= EnterprisePrivateKey.GetHashCode(); + hash ^= securityReport_.GetHashCode(); + if (AsOfRevision != 0L) hash ^= AsOfRevision.GetHashCode(); + if (FromPage != 0L) hash ^= FromPage.GetHashCode(); + if (ToPage != 0L) hash ^= ToPage.GetHashCode(); + if (Complete != false) hash ^= Complete.GetHashCode(); + if (EnterpriseEccPrivateKey.Length != 0) hash ^= EnterpriseEccPrivateKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -11055,22 +16087,106 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - keys_.WriteTo(output, _repeated_keys_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterprisePrivateKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EnterprisePrivateKey); + } + securityReport_.WriteTo(output, _repeated_securityReport_codec); + if (AsOfRevision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(AsOfRevision); + } + if (FromPage != 0L) { + output.WriteRawTag(32); + output.WriteInt64(FromPage); + } + if (ToPage != 0L) { + output.WriteRawTag(40); + output.WriteInt64(ToPage); + } + if (Complete != false) { + output.WriteRawTag(48); + output.WriteBool(Complete); + } + if (EnterpriseEccPrivateKey.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(EnterpriseEccPrivateKey); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterprisePrivateKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EnterprisePrivateKey); + } + securityReport_.WriteTo(ref output, _repeated_securityReport_codec); + if (AsOfRevision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(AsOfRevision); + } + if (FromPage != 0L) { + output.WriteRawTag(32); + output.WriteInt64(FromPage); + } + if (ToPage != 0L) { + output.WriteRawTag(40); + output.WriteInt64(ToPage); + } + if (Complete != false) { + output.WriteRawTag(48); + output.WriteBool(Complete); + } + if (EnterpriseEccPrivateKey.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(EnterpriseEccPrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += keys_.CalculateSize(_repeated_keys_codec); + if (EnterprisePrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterprisePrivateKey); + } + size += securityReport_.CalculateSize(_repeated_securityReport_codec); + if (AsOfRevision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AsOfRevision); + } + if (FromPage != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FromPage); + } + if (ToPage != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ToPage); + } + if (Complete != false) { + size += 1 + 1; + } + if (EnterpriseEccPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterpriseEccPrivateKey); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -11078,483 +16194,425 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SetKeyRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SecurityReportResponse other) { if (other == null) { return; } - keys_.Add(other.keys_); + if (other.EnterprisePrivateKey.Length != 0) { + EnterprisePrivateKey = other.EnterprisePrivateKey; + } + securityReport_.Add(other.securityReport_); + if (other.AsOfRevision != 0L) { + AsOfRevision = other.AsOfRevision; + } + if (other.FromPage != 0L) { + FromPage = other.FromPage; + } + if (other.ToPage != 0L) { + ToPage = other.ToPage; + } + if (other.Complete != false) { + Complete = other.Complete; + } + if (other.EnterpriseEccPrivateKey.Length != 0) { + EnterpriseEccPrivateKey = other.EnterpriseEccPrivateKey; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - keys_.AddEntriesFrom(input, _repeated_keys_codec); + EnterprisePrivateKey = input.ReadBytes(); + break; + } + case 18: { + securityReport_.AddEntriesFrom(input, _repeated_securityReport_codec); + break; + } + case 24: { + AsOfRevision = input.ReadInt64(); + break; + } + case 32: { + FromPage = input.ReadInt64(); + break; + } + case 40: { + ToPage = input.ReadInt64(); + break; + } + case 48: { + Complete = input.ReadBool(); + break; + } + case 58: { + EnterpriseEccPrivateKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EnterprisePrivateKey = input.ReadBytes(); + break; + } + case 18: { + securityReport_.AddEntriesFrom(ref input, _repeated_securityReport_codec); + break; + } + case 24: { + AsOfRevision = input.ReadInt64(); + break; + } + case 32: { + FromPage = input.ReadInt64(); + break; + } + case 40: { + ToPage = input.ReadInt64(); + break; + } + case 48: { + Complete = input.ReadBool(); + break; + } + case 58: { + EnterpriseEccPrivateKey = input.ReadBytes(); break; } } } } + #endif } - /// - ///same input as the register command - /// - public sealed partial class CreateUserRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateUserRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReusedPasswordsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReusedPasswordsRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[50]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[49]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CreateUserRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReusedPasswordsRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CreateUserRequest(CreateUserRequest other) : this() { - username_ = other.username_; - authVerifier_ = other.authVerifier_; - encryptionParams_ = other.encryptionParams_; - rsaPublicKey_ = other.rsaPublicKey_; - rsaEncryptedPrivateKey_ = other.rsaEncryptedPrivateKey_; - eccPublicKey_ = other.eccPublicKey_; - eccEncryptedPrivateKey_ = other.eccEncryptedPrivateKey_; - encryptedDeviceToken_ = other.encryptedDeviceToken_; - encryptedClientKey_ = other.encryptedClientKey_; - clientVersion_ = other.clientVersion_; - encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; - encryptedLoginToken_ = other.encryptedLoginToken_; - messageSessionUid_ = other.messageSessionUid_; - installReferrer_ = other.installReferrer_; - mccMNC_ = other.mccMNC_; - mfg_ = other.mfg_; - model_ = other.model_; - brand_ = other.brand_; - product_ = other.product_; - device_ = other.device_; - carrier_ = other.carrier_; - verificationCode_ = other.verificationCode_; - enterpriseRegistration_ = other.enterpriseRegistration_ != null ? other.enterpriseRegistration_.Clone() : null; - encryptedVerificationToken_ = other.encryptedVerificationToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReusedPasswordsRequest(ReusedPasswordsRequest other) : this() { + count_ = other.count_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public CreateUserRequest Clone() { - return new CreateUserRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReusedPasswordsRequest Clone() { + return new ReusedPasswordsRequest(this); } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; - /// - /// must be valid email - /// + /// Field number for the "count" field. + public const int CountFieldNumber = 1; + private int count_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Count { + get { return count_; } set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + count_ = value; } } - /// Field number for the "authVerifier" field. - public const int AuthVerifierFieldNumber = 2; - private pb::ByteString authVerifier_ = pb::ByteString.Empty; - /// - ///new Field("auth_verifier", new AuthVerifierFieldValidator(), true); size=(70, 70)? - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AuthVerifier { - get { return authVerifier_; } - set { - authVerifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReusedPasswordsRequest); } - /// Field number for the "encryptionParams" field. - public const int EncryptionParamsFieldNumber = 3; - private pb::ByteString encryptionParams_ = pb::ByteString.Empty; - /// - ///new Field("encryption_params", new EncryptionParamsFieldValidator(), true); size=(134, 134)? - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptionParams { - get { return encryptionParams_; } - set { - encryptionParams_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReusedPasswordsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; } + if (Count != other.Count) return false; + return Equals(_unknownFields, other._unknownFields); } - /// Field number for the "rsaPublicKey" field. - public const int RsaPublicKeyFieldNumber = 4; - private pb::ByteString rsaPublicKey_ = pb::ByteString.Empty; - /// - ///new Field("public_key", new PublicKeyFieldValidator(), true); size=(10, 2000)? - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RsaPublicKey { - get { return rsaPublicKey_; } - set { - rsaPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Count != 0) hash ^= Count.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } + return hash; } - /// Field number for the "rsaEncryptedPrivateKey" field. - public const int RsaEncryptedPrivateKeyFieldNumber = 5; - private pb::ByteString rsaEncryptedPrivateKey_ = pb::ByteString.Empty; - /// - ///new Field("encrypted_private_key", new DataKeyEncPrivateKeyFieldValidator(), true); size=(10, 2000)? - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RsaEncryptedPrivateKey { - get { return rsaEncryptedPrivateKey_; } - set { - rsaEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); } - /// Field number for the "eccPublicKey" field. - public const int EccPublicKeyFieldNumber = 6; - private pb::ByteString eccPublicKey_ = pb::ByteString.Empty; - /// - /// 65 bytes, on curve - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EccPublicKey { - get { return eccPublicKey_; } - set { - eccPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Count != 0) { + output.WriteRawTag(8); + output.WriteInt32(Count); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } + #endif } - /// Field number for the "eccEncryptedPrivateKey" field. - public const int EccEncryptedPrivateKeyFieldNumber = 7; - private pb::ByteString eccEncryptedPrivateKey_ = pb::ByteString.Empty; - /// - /// 60 bytes - /// + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EccEncryptedPrivateKey { - get { return eccEncryptedPrivateKey_; } - set { - eccEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Count != 0) { + output.WriteRawTag(8); + output.WriteInt32(Count); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } } + #endif - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 8; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - /// - /// 65 bytes - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Count != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Count); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); } + return size; } - /// Field number for the "encryptedClientKey" field. - public const int EncryptedClientKeyFieldNumber = 9; - private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; - /// - /// switch to gcm? old clients can't be used 60 bytes, otherwise 64 bytes; new Field("client_key", new DataKeyEncDataKeyFieldValidator(), false); - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedClientKey { - get { return encryptedClientKey_; } - set { - encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReusedPasswordsRequest other) { + if (other == null) { + return; + } + if (other.Count != 0) { + Count = other.Count; } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 10; - private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Count = input.ReadInt32(); + break; + } + } } + #endif } - /// Field number for the "encryptedDeviceDataKey" field. - public const int EncryptedDeviceDataKeyFieldNumber = 11; - private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; - /// - /// have to check - /// + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceDataKey { - get { return encryptedDeviceDataKey_; } - set { - encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Count = input.ReadInt32(); + break; + } + } } } + #endif - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 12; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; - /// - /// this is from cloud sso - /// + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SummaryConsoleReport : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SummaryConsoleReport()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } - set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[50]; } } - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 13; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } - set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "installReferrer" field. - public const int InstallReferrerFieldNumber = 14; - private string installReferrer_ = ""; - /// - ///new Field("install_referrer", new StringFieldValidator(0, 1024), false); size=(0, 1024)? - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string InstallReferrer { - get { return installReferrer_; } - set { - installReferrer_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "mccMNC" field. - public const int MccMNCFieldNumber = 15; - private int mccMNC_; - /// - ///input.optString("mcc_mnc") in verifyDevice(); carrier_sim_codes.mcc_mnc int(6) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int MccMNC { - get { return mccMNC_; } - set { - mccMNC_ = value; - } - } - - /// Field number for the "mfg" field. - public const int MfgFieldNumber = 16; - private string mfg_ = ""; - /// - ///input.optString("mfg") in verifyDevice(); appstore_device_history.mfg char(64) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Mfg { - get { return mfg_; } - set { - mfg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "model" field. - public const int ModelFieldNumber = 17; - private string model_ = ""; - /// - ///input.optString("model") in verifyDevice(); appstore_device_history.model char(64) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Model { - get { return model_; } - set { - model_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "brand" field. - public const int BrandFieldNumber = 18; - private string brand_ = ""; - /// - ///input.optString("brand") in verifyDevice(); appstore_device_history.brand char(64) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Brand { - get { return brand_; } - set { - brand_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "product" field. - public const int ProductFieldNumber = 19; - private string product_ = ""; - /// - ///input.optString("product") in verifyDevice(); appstore_device_history.product char(64) - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Product { - get { return product_; } - set { - product_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SummaryConsoleReport() { + OnConstruction(); } - /// Field number for the "device" field. - public const int DeviceFieldNumber = 20; - private string device_ = ""; - /// - ///input.optString("device"); used in PromotionMatcher; appstore_device_history.device char(64)? - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Device { - get { return device_; } - set { - device_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } + partial void OnConstruction(); - /// Field number for the "carrier" field. - public const int CarrierFieldNumber = 21; - private string carrier_ = ""; - /// - ///input.optString("carrier"); used in PromotionMatcher; appstore_device_history.carrier char(64)? - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Carrier { - get { return carrier_; } - set { - carrier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SummaryConsoleReport(SummaryConsoleReport other) : this() { + reportType_ = other.reportType_; + reportData_ = other.reportData_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "verificationCode" field. - public const int VerificationCodeFieldNumber = 22; - private string verificationCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationCode { - get { return verificationCode_; } - set { - verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SummaryConsoleReport Clone() { + return new SummaryConsoleReport(this); } - /// Field number for the "enterpriseRegistration" field. - public const int EnterpriseRegistrationFieldNumber = 23; - private global::Enterprise.EnterpriseRegistration enterpriseRegistration_; - /// - /// optinal for creating an account when creating an enterprise - /// + /// Field number for the "reportType" field. + public const int ReportTypeFieldNumber = 1; + private int reportType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EnterpriseRegistration EnterpriseRegistration { - get { return enterpriseRegistration_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ReportType { + get { return reportType_; } set { - enterpriseRegistration_ = value; + reportType_ = value; } } - /// Field number for the "encryptedVerificationToken" field. - public const int EncryptedVerificationTokenFieldNumber = 24; - private pb::ByteString encryptedVerificationToken_ = pb::ByteString.Empty; + /// Field number for the "reportData" field. + public const int ReportDataFieldNumber = 2; + private pb::ByteString reportData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedVerificationToken { - get { return encryptedVerificationToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ReportData { + get { return reportData_; } set { - encryptedVerificationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + reportData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as CreateUserRequest); + return Equals(other as SummaryConsoleReport); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(CreateUserRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SummaryConsoleReport other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; - if (AuthVerifier != other.AuthVerifier) return false; - if (EncryptionParams != other.EncryptionParams) return false; - if (RsaPublicKey != other.RsaPublicKey) return false; - if (RsaEncryptedPrivateKey != other.RsaEncryptedPrivateKey) return false; - if (EccPublicKey != other.EccPublicKey) return false; - if (EccEncryptedPrivateKey != other.EccEncryptedPrivateKey) return false; - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (EncryptedClientKey != other.EncryptedClientKey) return false; - if (ClientVersion != other.ClientVersion) return false; - if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; - if (MessageSessionUid != other.MessageSessionUid) return false; - if (InstallReferrer != other.InstallReferrer) return false; - if (MccMNC != other.MccMNC) return false; - if (Mfg != other.Mfg) return false; - if (Model != other.Model) return false; - if (Brand != other.Brand) return false; - if (Product != other.Product) return false; - if (Device != other.Device) return false; - if (Carrier != other.Carrier) return false; - if (VerificationCode != other.VerificationCode) return false; - if (!object.Equals(EnterpriseRegistration, other.EnterpriseRegistration)) return false; - if (EncryptedVerificationToken != other.EncryptedVerificationToken) return false; + if (ReportType != other.ReportType) return false; + if (ReportData != other.ReportData) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (AuthVerifier.Length != 0) hash ^= AuthVerifier.GetHashCode(); - if (EncryptionParams.Length != 0) hash ^= EncryptionParams.GetHashCode(); - if (RsaPublicKey.Length != 0) hash ^= RsaPublicKey.GetHashCode(); - if (RsaEncryptedPrivateKey.Length != 0) hash ^= RsaEncryptedPrivateKey.GetHashCode(); - if (EccPublicKey.Length != 0) hash ^= EccPublicKey.GetHashCode(); - if (EccEncryptedPrivateKey.Length != 0) hash ^= EccEncryptedPrivateKey.GetHashCode(); - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); - if (InstallReferrer.Length != 0) hash ^= InstallReferrer.GetHashCode(); - if (MccMNC != 0) hash ^= MccMNC.GetHashCode(); - if (Mfg.Length != 0) hash ^= Mfg.GetHashCode(); - if (Model.Length != 0) hash ^= Model.GetHashCode(); - if (Brand.Length != 0) hash ^= Brand.GetHashCode(); - if (Product.Length != 0) hash ^= Product.GetHashCode(); - if (Device.Length != 0) hash ^= Device.GetHashCode(); - if (Carrier.Length != 0) hash ^= Carrier.GetHashCode(); - if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); - if (enterpriseRegistration_ != null) hash ^= EnterpriseRegistration.GetHashCode(); - if (EncryptedVerificationToken.Length != 0) hash ^= EncryptedVerificationToken.GetHashCode(); + if (ReportType != 0) hash ^= ReportType.GetHashCode(); + if (ReportData.Length != 0) hash ^= ReportData.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -11562,188 +16620,13383 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Username); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ReportType != 0) { + output.WriteRawTag(8); + output.WriteInt32(ReportType); } - if (AuthVerifier.Length != 0) { + if (ReportData.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(AuthVerifier); - } - if (EncryptionParams.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(EncryptionParams); + output.WriteBytes(ReportData); } - if (RsaPublicKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(RsaPublicKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (RsaEncryptedPrivateKey.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(RsaEncryptedPrivateKey); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ReportType != 0) { + output.WriteRawTag(8); + output.WriteInt32(ReportType); } - if (EccPublicKey.Length != 0) { - output.WriteRawTag(50); - output.WriteBytes(EccPublicKey); + if (ReportData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ReportData); } - if (EccEncryptedPrivateKey.Length != 0) { - output.WriteRawTag(58); - output.WriteBytes(EccEncryptedPrivateKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(66); - output.WriteBytes(EncryptedDeviceToken); + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ReportType != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ReportType); } - if (EncryptedClientKey.Length != 0) { - output.WriteRawTag(74); - output.WriteBytes(EncryptedClientKey); + if (ReportData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ReportData); } - if (ClientVersion.Length != 0) { - output.WriteRawTag(82); - output.WriteString(ClientVersion); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SummaryConsoleReport other) { + if (other == null) { + return; + } + if (other.ReportType != 0) { + ReportType = other.ReportType; + } + if (other.ReportData.Length != 0) { + ReportData = other.ReportData; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ReportType = input.ReadInt32(); + break; + } + case 18: { + ReportData = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ReportType = input.ReadInt32(); + break; + } + case 18: { + ReportData = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeToKeyTypeOne : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOne()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[51]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOne() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOne(ChangeToKeyTypeOne other) : this() { + objectType_ = other.objectType_; + primaryUid_ = other.primaryUid_; + secondaryUid_ = other.secondaryUid_; + key_ = other.key_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOne Clone() { + return new ChangeToKeyTypeOne(this); + } + + /// Field number for the "objectType" field. + public const int ObjectTypeFieldNumber = 1; + private global::Authentication.ObjectTypes objectType_ = global::Authentication.ObjectTypes.Record; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.ObjectTypes ObjectType { + get { return objectType_; } + set { + objectType_ = value; + } + } + + /// Field number for the "primaryUid" field. + public const int PrimaryUidFieldNumber = 2; + private pb::ByteString primaryUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PrimaryUid { + get { return primaryUid_; } + set { + primaryUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "secondaryUid" field. + public const int SecondaryUidFieldNumber = 3; + private pb::ByteString secondaryUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SecondaryUid { + get { return secondaryUid_; } + set { + secondaryUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 4; + private pb::ByteString key_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeToKeyTypeOne); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeToKeyTypeOne other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ObjectType != other.ObjectType) return false; + if (PrimaryUid != other.PrimaryUid) return false; + if (SecondaryUid != other.SecondaryUid) return false; + if (Key != other.Key) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ObjectType != global::Authentication.ObjectTypes.Record) hash ^= ObjectType.GetHashCode(); + if (PrimaryUid.Length != 0) hash ^= PrimaryUid.GetHashCode(); + if (SecondaryUid.Length != 0) hash ^= SecondaryUid.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ObjectType != global::Authentication.ObjectTypes.Record) { + output.WriteRawTag(8); + output.WriteEnum((int) ObjectType); + } + if (PrimaryUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PrimaryUid); + } + if (SecondaryUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SecondaryUid); + } + if (Key.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Key); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ObjectType != global::Authentication.ObjectTypes.Record) { + output.WriteRawTag(8); + output.WriteEnum((int) ObjectType); + } + if (PrimaryUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PrimaryUid); + } + if (SecondaryUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SecondaryUid); + } + if (Key.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Key); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ObjectType != global::Authentication.ObjectTypes.Record) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ObjectType); + } + if (PrimaryUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrimaryUid); + } + if (SecondaryUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecondaryUid); + } + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeToKeyTypeOne other) { + if (other == null) { + return; + } + if (other.ObjectType != global::Authentication.ObjectTypes.Record) { + ObjectType = other.ObjectType; + } + if (other.PrimaryUid.Length != 0) { + PrimaryUid = other.PrimaryUid; + } + if (other.SecondaryUid.Length != 0) { + SecondaryUid = other.SecondaryUid; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ObjectType = (global::Authentication.ObjectTypes) input.ReadEnum(); + break; + } + case 18: { + PrimaryUid = input.ReadBytes(); + break; + } + case 26: { + SecondaryUid = input.ReadBytes(); + break; + } + case 34: { + Key = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ObjectType = (global::Authentication.ObjectTypes) input.ReadEnum(); + break; + } + case 18: { + PrimaryUid = input.ReadBytes(); + break; + } + case 26: { + SecondaryUid = input.ReadBytes(); + break; + } + case 34: { + Key = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeToKeyTypeOneRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOneRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[52]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneRequest(ChangeToKeyTypeOneRequest other) : this() { + changeToKeyTypeOne_ = other.changeToKeyTypeOne_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneRequest Clone() { + return new ChangeToKeyTypeOneRequest(this); + } + + /// Field number for the "changeToKeyTypeOne" field. + public const int ChangeToKeyTypeOneFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_changeToKeyTypeOne_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.ChangeToKeyTypeOne.Parser); + private readonly pbc::RepeatedField changeToKeyTypeOne_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ChangeToKeyTypeOne { + get { return changeToKeyTypeOne_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeToKeyTypeOneRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeToKeyTypeOneRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!changeToKeyTypeOne_.Equals(other.changeToKeyTypeOne_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= changeToKeyTypeOne_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + changeToKeyTypeOne_.WriteTo(output, _repeated_changeToKeyTypeOne_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + changeToKeyTypeOne_.WriteTo(ref output, _repeated_changeToKeyTypeOne_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += changeToKeyTypeOne_.CalculateSize(_repeated_changeToKeyTypeOne_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeToKeyTypeOneRequest other) { + if (other == null) { + return; + } + changeToKeyTypeOne_.Add(other.changeToKeyTypeOne_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + changeToKeyTypeOne_.AddEntriesFrom(input, _repeated_changeToKeyTypeOne_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + changeToKeyTypeOne_.AddEntriesFrom(ref input, _repeated_changeToKeyTypeOne_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeToKeyTypeOneStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOneStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[53]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneStatus(ChangeToKeyTypeOneStatus other) : this() { + uid_ = other.uid_; + type_ = other.type_; + status_ = other.status_; + reason_ = other.reason_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneStatus Clone() { + return new ChangeToKeyTypeOneStatus(this); + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 1; + private pb::ByteString uid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 2; + private string type_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "reason" field. + public const int ReasonFieldNumber = 4; + private string reason_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reason { + get { return reason_; } + set { + reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeToKeyTypeOneStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeToKeyTypeOneStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Uid != other.Uid) return false; + if (Type != other.Type) return false; + if (Status != other.Status) return false; + if (Reason != other.Reason) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (Reason.Length != 0) hash ^= Reason.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (Type.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Type); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (Reason.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Reason); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (Type.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Type); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (Reason.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Reason); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); + } + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (Reason.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeToKeyTypeOneStatus other) { + if (other == null) { + return; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.Reason.Length != 0) { + Reason = other.Reason; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 18: { + Type = input.ReadString(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 34: { + Reason = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 18: { + Type = input.ReadString(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 34: { + Reason = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeToKeyTypeOneResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeToKeyTypeOneResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[54]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneResponse(ChangeToKeyTypeOneResponse other) : this() { + changeToKeyTypeOneStatus_ = other.changeToKeyTypeOneStatus_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeToKeyTypeOneResponse Clone() { + return new ChangeToKeyTypeOneResponse(this); + } + + /// Field number for the "changeToKeyTypeOneStatus" field. + public const int ChangeToKeyTypeOneStatusFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_changeToKeyTypeOneStatus_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.ChangeToKeyTypeOneStatus.Parser); + private readonly pbc::RepeatedField changeToKeyTypeOneStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ChangeToKeyTypeOneStatus { + get { return changeToKeyTypeOneStatus_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeToKeyTypeOneResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeToKeyTypeOneResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!changeToKeyTypeOneStatus_.Equals(other.changeToKeyTypeOneStatus_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= changeToKeyTypeOneStatus_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + changeToKeyTypeOneStatus_.WriteTo(output, _repeated_changeToKeyTypeOneStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + changeToKeyTypeOneStatus_.WriteTo(ref output, _repeated_changeToKeyTypeOneStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += changeToKeyTypeOneStatus_.CalculateSize(_repeated_changeToKeyTypeOneStatus_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeToKeyTypeOneResponse other) { + if (other == null) { + return; + } + changeToKeyTypeOneStatus_.Add(other.changeToKeyTypeOneStatus_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + changeToKeyTypeOneStatus_.AddEntriesFrom(input, _repeated_changeToKeyTypeOneStatus_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + changeToKeyTypeOneStatus_.AddEntriesFrom(ref input, _repeated_changeToKeyTypeOneStatus_codec); + break; + } + } + } + } + #endif + + } + + /// + /// See get_change_key_types + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetChangeKeyTypesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetChangeKeyTypesRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[55]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetChangeKeyTypesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetChangeKeyTypesRequest(GetChangeKeyTypesRequest other) : this() { + onlyTheseObjects_ = other.onlyTheseObjects_.Clone(); + limit_ = other.limit_; + includeRecommended_ = other.includeRecommended_; + includeKeys_ = other.includeKeys_; + includeAllowedKeyTypes_ = other.includeAllowedKeyTypes_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetChangeKeyTypesRequest Clone() { + return new GetChangeKeyTypesRequest(this); + } + + /// Field number for the "onlyTheseObjects" field. + public const int OnlyTheseObjectsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_onlyTheseObjects_codec + = pb::FieldCodec.ForEnum(10, x => (int) x, x => (global::Authentication.EncryptedObjectType) x); + private readonly pbc::RepeatedField onlyTheseObjects_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField OnlyTheseObjects { + get { return onlyTheseObjects_; } + } + + /// Field number for the "limit" field. + public const int LimitFieldNumber = 2; + private int limit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Limit { + get { return limit_; } + set { + limit_ = value; + } + } + + /// Field number for the "includeRecommended" field. + public const int IncludeRecommendedFieldNumber = 3; + private bool includeRecommended_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeRecommended { + get { return includeRecommended_; } + set { + includeRecommended_ = value; + } + } + + /// Field number for the "includeKeys" field. + public const int IncludeKeysFieldNumber = 4; + private bool includeKeys_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeKeys { + get { return includeKeys_; } + set { + includeKeys_ = value; + } + } + + /// Field number for the "includeAllowedKeyTypes" field. + public const int IncludeAllowedKeyTypesFieldNumber = 5; + private bool includeAllowedKeyTypes_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeAllowedKeyTypes { + get { return includeAllowedKeyTypes_; } + set { + includeAllowedKeyTypes_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetChangeKeyTypesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetChangeKeyTypesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!onlyTheseObjects_.Equals(other.onlyTheseObjects_)) return false; + if (Limit != other.Limit) return false; + if (IncludeRecommended != other.IncludeRecommended) return false; + if (IncludeKeys != other.IncludeKeys) return false; + if (IncludeAllowedKeyTypes != other.IncludeAllowedKeyTypes) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= onlyTheseObjects_.GetHashCode(); + if (Limit != 0) hash ^= Limit.GetHashCode(); + if (IncludeRecommended != false) hash ^= IncludeRecommended.GetHashCode(); + if (IncludeKeys != false) hash ^= IncludeKeys.GetHashCode(); + if (IncludeAllowedKeyTypes != false) hash ^= IncludeAllowedKeyTypes.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + onlyTheseObjects_.WriteTo(output, _repeated_onlyTheseObjects_codec); + if (Limit != 0) { + output.WriteRawTag(16); + output.WriteInt32(Limit); + } + if (IncludeRecommended != false) { + output.WriteRawTag(24); + output.WriteBool(IncludeRecommended); + } + if (IncludeKeys != false) { + output.WriteRawTag(32); + output.WriteBool(IncludeKeys); + } + if (IncludeAllowedKeyTypes != false) { + output.WriteRawTag(40); + output.WriteBool(IncludeAllowedKeyTypes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + onlyTheseObjects_.WriteTo(ref output, _repeated_onlyTheseObjects_codec); + if (Limit != 0) { + output.WriteRawTag(16); + output.WriteInt32(Limit); + } + if (IncludeRecommended != false) { + output.WriteRawTag(24); + output.WriteBool(IncludeRecommended); + } + if (IncludeKeys != false) { + output.WriteRawTag(32); + output.WriteBool(IncludeKeys); + } + if (IncludeAllowedKeyTypes != false) { + output.WriteRawTag(40); + output.WriteBool(IncludeAllowedKeyTypes); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += onlyTheseObjects_.CalculateSize(_repeated_onlyTheseObjects_codec); + if (Limit != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit); + } + if (IncludeRecommended != false) { + size += 1 + 1; + } + if (IncludeKeys != false) { + size += 1 + 1; + } + if (IncludeAllowedKeyTypes != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetChangeKeyTypesRequest other) { + if (other == null) { + return; + } + onlyTheseObjects_.Add(other.onlyTheseObjects_); + if (other.Limit != 0) { + Limit = other.Limit; + } + if (other.IncludeRecommended != false) { + IncludeRecommended = other.IncludeRecommended; + } + if (other.IncludeKeys != false) { + IncludeKeys = other.IncludeKeys; + } + if (other.IncludeAllowedKeyTypes != false) { + IncludeAllowedKeyTypes = other.IncludeAllowedKeyTypes; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + onlyTheseObjects_.AddEntriesFrom(input, _repeated_onlyTheseObjects_codec); + break; + } + case 16: { + Limit = input.ReadInt32(); + break; + } + case 24: { + IncludeRecommended = input.ReadBool(); + break; + } + case 32: { + IncludeKeys = input.ReadBool(); + break; + } + case 40: { + IncludeAllowedKeyTypes = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + onlyTheseObjects_.AddEntriesFrom(ref input, _repeated_onlyTheseObjects_codec); + break; + } + case 16: { + Limit = input.ReadInt32(); + break; + } + case 24: { + IncludeRecommended = input.ReadBool(); + break; + } + case 32: { + IncludeKeys = input.ReadBool(); + break; + } + case 40: { + IncludeAllowedKeyTypes = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// See get_change_key_types + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetChangeKeyTypesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetChangeKeyTypesResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[56]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetChangeKeyTypesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetChangeKeyTypesResponse(GetChangeKeyTypesResponse other) : this() { + keys_ = other.keys_.Clone(); + allowedKeyTypes_ = other.allowedKeyTypes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetChangeKeyTypesResponse Clone() { + return new GetChangeKeyTypesResponse(this); + } + + /// Field number for the "keys" field. + public const int KeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keys_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.ChangeKeyType.Parser); + private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Keys { + get { return keys_; } + } + + /// Field number for the "allowedKeyTypes" field. + public const int AllowedKeyTypesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_allowedKeyTypes_codec + = pb::FieldCodec.ForMessage(18, global::Authentication.AllowedKeyTypes.Parser); + private readonly pbc::RepeatedField allowedKeyTypes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedKeyTypes { + get { return allowedKeyTypes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetChangeKeyTypesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetChangeKeyTypesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keys_.Equals(other.keys_)) return false; + if(!allowedKeyTypes_.Equals(other.allowedKeyTypes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= keys_.GetHashCode(); + hash ^= allowedKeyTypes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keys_.WriteTo(output, _repeated_keys_codec); + allowedKeyTypes_.WriteTo(output, _repeated_allowedKeyTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keys_.WriteTo(ref output, _repeated_keys_codec); + allowedKeyTypes_.WriteTo(ref output, _repeated_allowedKeyTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += keys_.CalculateSize(_repeated_keys_codec); + size += allowedKeyTypes_.CalculateSize(_repeated_allowedKeyTypes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetChangeKeyTypesResponse other) { + if (other == null) { + return; + } + keys_.Add(other.keys_); + allowedKeyTypes_.Add(other.allowedKeyTypes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + keys_.AddEntriesFrom(input, _repeated_keys_codec); + break; + } + case 18: { + allowedKeyTypes_.AddEntriesFrom(input, _repeated_allowedKeyTypes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + keys_.AddEntriesFrom(ref input, _repeated_keys_codec); + break; + } + case 18: { + allowedKeyTypes_.AddEntriesFrom(ref input, _repeated_allowedKeyTypes_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AllowedKeyTypes : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AllowedKeyTypes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[57]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AllowedKeyTypes() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AllowedKeyTypes(AllowedKeyTypes other) : this() { + objectType_ = other.objectType_; + allowedKeyTypes_ = other.allowedKeyTypes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AllowedKeyTypes Clone() { + return new AllowedKeyTypes(this); + } + + /// Field number for the "objectType" field. + public const int ObjectTypeFieldNumber = 1; + private global::Authentication.EncryptedObjectType objectType_ = global::Authentication.EncryptedObjectType.EotUnspecified; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.EncryptedObjectType ObjectType { + get { return objectType_; } + set { + objectType_ = value; + } + } + + /// Field number for the "allowedKeyTypes" field. + public const int AllowedKeyTypes_FieldNumber = 2; + private static readonly pb::FieldCodec _repeated_allowedKeyTypes_codec + = pb::FieldCodec.ForEnum(18, x => (int) x, x => (global::Enterprise.EncryptedKeyType) x); + private readonly pbc::RepeatedField allowedKeyTypes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedKeyTypes_ { + get { return allowedKeyTypes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AllowedKeyTypes); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AllowedKeyTypes other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ObjectType != other.ObjectType) return false; + if(!allowedKeyTypes_.Equals(other.allowedKeyTypes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) hash ^= ObjectType.GetHashCode(); + hash ^= allowedKeyTypes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) ObjectType); + } + allowedKeyTypes_.WriteTo(output, _repeated_allowedKeyTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) ObjectType); + } + allowedKeyTypes_.WriteTo(ref output, _repeated_allowedKeyTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ObjectType); + } + size += allowedKeyTypes_.CalculateSize(_repeated_allowedKeyTypes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AllowedKeyTypes other) { + if (other == null) { + return; + } + if (other.ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + ObjectType = other.ObjectType; + } + allowedKeyTypes_.Add(other.allowedKeyTypes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ObjectType = (global::Authentication.EncryptedObjectType) input.ReadEnum(); + break; + } + case 18: + case 16: { + allowedKeyTypes_.AddEntriesFrom(input, _repeated_allowedKeyTypes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ObjectType = (global::Authentication.EncryptedObjectType) input.ReadEnum(); + break; + } + case 18: + case 16: { + allowedKeyTypes_.AddEntriesFrom(ref input, _repeated_allowedKeyTypes_codec); + break; + } + } + } + } + #endif + + } + + /// + /// This is the request and response for change_key_types; replaces + /// ChangeToKeyTypeOneRequest and ChangeToKeyTypeOneResponse. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeKeyTypes : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeKeyTypes()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[58]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeKeyTypes() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeKeyTypes(ChangeKeyTypes other) : this() { + keys_ = other.keys_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeKeyTypes Clone() { + return new ChangeKeyTypes(this); + } + + /// Field number for the "keys" field. + public const int KeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keys_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.ChangeKeyType.Parser); + private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Keys { + get { return keys_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeKeyTypes); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeKeyTypes other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keys_.Equals(other.keys_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= keys_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keys_.WriteTo(output, _repeated_keys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keys_.WriteTo(ref output, _repeated_keys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += keys_.CalculateSize(_repeated_keys_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeKeyTypes other) { + if (other == null) { + return; + } + keys_.Add(other.keys_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + keys_.AddEntriesFrom(input, _repeated_keys_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + keys_.AddEntriesFrom(ref input, _repeated_keys_codec); + break; + } + } + } + } + #endif + + } + + /// + /// See get_change_key_types and change_key_types. Replaces ChangeToKeyTypeOne + /// and ChangeToKeyTypeOneStatus. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeKeyType : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeKeyType()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[59]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeKeyType() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeKeyType(ChangeKeyType other) : this() { + objectType_ = other.objectType_; + uid_ = other.uid_; + secondaryUid_ = other.secondaryUid_; + key_ = other.key_; + keyType_ = other.keyType_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeKeyType Clone() { + return new ChangeKeyType(this); + } + + /// Field number for the "objectType" field. + public const int ObjectTypeFieldNumber = 1; + private global::Authentication.EncryptedObjectType objectType_ = global::Authentication.EncryptedObjectType.EotUnspecified; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.EncryptedObjectType ObjectType { + get { return objectType_; } + set { + objectType_ = value; + } + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 2; + private pb::ByteString uid_ = pb::ByteString.Empty; + /// + /// see EncryptedObjectType comments for what this is + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "secondaryUid" field. + public const int SecondaryUidFieldNumber = 3; + private pb::ByteString secondaryUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SecondaryUid { + get { return secondaryUid_; } + set { + secondaryUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 4; + private pb::ByteString key_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 5; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 6; + private global::Authentication.GenericStatus status_ = global::Authentication.GenericStatus.Success; + /// + /// ignored in requests + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.GenericStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ChangeKeyType); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeKeyType other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ObjectType != other.ObjectType) return false; + if (Uid != other.Uid) return false; + if (SecondaryUid != other.SecondaryUid) return false; + if (Key != other.Key) return false; + if (KeyType != other.KeyType) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) hash ^= ObjectType.GetHashCode(); + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (SecondaryUid.Length != 0) hash ^= SecondaryUid.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (Status != global::Authentication.GenericStatus.Success) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) ObjectType); + } + if (Uid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Uid); + } + if (SecondaryUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SecondaryUid); + } + if (Key.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Key); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) KeyType); + } + if (Status != global::Authentication.GenericStatus.Success) { + output.WriteRawTag(48); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + output.WriteRawTag(8); + output.WriteEnum((int) ObjectType); + } + if (Uid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Uid); + } + if (SecondaryUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SecondaryUid); + } + if (Key.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Key); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) KeyType); + } + if (Status != global::Authentication.GenericStatus.Success) { + output.WriteRawTag(48); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ObjectType); + } + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); + } + if (SecondaryUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecondaryUid); + } + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (Status != global::Authentication.GenericStatus.Success) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeKeyType other) { + if (other == null) { + return; + } + if (other.ObjectType != global::Authentication.EncryptedObjectType.EotUnspecified) { + ObjectType = other.ObjectType; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.SecondaryUid.Length != 0) { + SecondaryUid = other.SecondaryUid; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; + } + if (other.Status != global::Authentication.GenericStatus.Success) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ObjectType = (global::Authentication.EncryptedObjectType) input.ReadEnum(); + break; + } + case 18: { + Uid = input.ReadBytes(); + break; + } + case 26: { + SecondaryUid = input.ReadBytes(); + break; + } + case 34: { + Key = input.ReadBytes(); + break; + } + case 40: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 48: { + Status = (global::Authentication.GenericStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ObjectType = (global::Authentication.EncryptedObjectType) input.ReadEnum(); + break; + } + case 18: { + Uid = input.ReadBytes(); + break; + } + case 26: { + SecondaryUid = input.ReadBytes(); + break; + } + case 34: { + Key = input.ReadBytes(); + break; + } + case 40: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 48: { + Status = (global::Authentication.GenericStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// for setting keys where the id is a long value + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SetKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[60]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetKey(SetKey other) : this() { + id_ = other.id_; + key_ = other.key_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetKey Clone() { + return new SetKey(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private long id_; + /// + /// role_id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 2; + private pb::ByteString key_ = pb::ByteString.Empty; + /// + /// role key GCM encrypted with the tree key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SetKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SetKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Key != other.Key) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0L) hash ^= Id.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Key.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Key); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Key.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Key); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Id); + } + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SetKey other) { + if (other == null) { + return; + } + if (other.Id != 0L) { + Id = other.Id; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + Key = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + Key = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SetKeyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetKeyRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[61]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetKeyRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetKeyRequest(SetKeyRequest other) : this() { + keys_ = other.keys_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetKeyRequest Clone() { + return new SetKeyRequest(this); + } + + /// Field number for the "keys" field. + public const int KeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keys_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.SetKey.Parser); + private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Keys { + get { return keys_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SetKeyRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SetKeyRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keys_.Equals(other.keys_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= keys_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keys_.WriteTo(output, _repeated_keys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keys_.WriteTo(ref output, _repeated_keys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += keys_.CalculateSize(_repeated_keys_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SetKeyRequest other) { + if (other == null) { + return; + } + keys_.Add(other.keys_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + keys_.AddEntriesFrom(input, _repeated_keys_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + keys_.AddEntriesFrom(ref input, _repeated_keys_codec); + break; + } + } + } + } + #endif + + } + + /// + ///same input as the register command + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class CreateUserRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CreateUserRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[62]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateUserRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateUserRequest(CreateUserRequest other) : this() { + username_ = other.username_; + authVerifier_ = other.authVerifier_; + encryptionParams_ = other.encryptionParams_; + rsaPublicKey_ = other.rsaPublicKey_; + rsaEncryptedPrivateKey_ = other.rsaEncryptedPrivateKey_; + eccPublicKey_ = other.eccPublicKey_; + eccEncryptedPrivateKey_ = other.eccEncryptedPrivateKey_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + encryptedClientKey_ = other.encryptedClientKey_; + clientVersion_ = other.clientVersion_; + encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; + encryptedLoginToken_ = other.encryptedLoginToken_; + messageSessionUid_ = other.messageSessionUid_; + installReferrer_ = other.installReferrer_; + mccMNC_ = other.mccMNC_; + mfg_ = other.mfg_; + model_ = other.model_; + brand_ = other.brand_; + product_ = other.product_; + device_ = other.device_; + carrier_ = other.carrier_; + verificationCode_ = other.verificationCode_; + enterpriseRegistration_ = other.enterpriseRegistration_ != null ? other.enterpriseRegistration_.Clone() : null; + encryptedVerificationToken_ = other.encryptedVerificationToken_; + enterpriseUsersDataKey_ = other.enterpriseUsersDataKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public CreateUserRequest Clone() { + return new CreateUserRequest(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + /// + /// must be valid email + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "authVerifier" field. + public const int AuthVerifierFieldNumber = 2; + private pb::ByteString authVerifier_ = pb::ByteString.Empty; + /// + ///new Field("auth_verifier", new AuthVerifierFieldValidator(), true); size=(70, 70)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AuthVerifier { + get { return authVerifier_; } + set { + authVerifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptionParams" field. + public const int EncryptionParamsFieldNumber = 3; + private pb::ByteString encryptionParams_ = pb::ByteString.Empty; + /// + ///new Field("encryption_params", new EncryptionParamsFieldValidator(), true); size=(134, 134)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptionParams { + get { return encryptionParams_; } + set { + encryptionParams_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "rsaPublicKey" field. + public const int RsaPublicKeyFieldNumber = 4; + private pb::ByteString rsaPublicKey_ = pb::ByteString.Empty; + /// + ///new Field("public_key", new PublicKeyFieldValidator(), true); size=(10, 2000)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RsaPublicKey { + get { return rsaPublicKey_; } + set { + rsaPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "rsaEncryptedPrivateKey" field. + public const int RsaEncryptedPrivateKeyFieldNumber = 5; + private pb::ByteString rsaEncryptedPrivateKey_ = pb::ByteString.Empty; + /// + ///new Field("encrypted_private_key", new DataKeyEncPrivateKeyFieldValidator(), true); size=(10, 2000)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RsaEncryptedPrivateKey { + get { return rsaEncryptedPrivateKey_; } + set { + rsaEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "eccPublicKey" field. + public const int EccPublicKeyFieldNumber = 6; + private pb::ByteString eccPublicKey_ = pb::ByteString.Empty; + /// + /// 65 bytes, on curve + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EccPublicKey { + get { return eccPublicKey_; } + set { + eccPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "eccEncryptedPrivateKey" field. + public const int EccEncryptedPrivateKeyFieldNumber = 7; + private pb::ByteString eccEncryptedPrivateKey_ = pb::ByteString.Empty; + /// + /// 60 bytes + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EccEncryptedPrivateKey { + get { return eccEncryptedPrivateKey_; } + set { + eccEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 8; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + /// + /// 65 bytes + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedClientKey" field. + public const int EncryptedClientKeyFieldNumber = 9; + private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; + /// + /// switch to gcm? old clients can't be used 60 bytes, otherwise 64 bytes; new Field("client_key", new DataKeyEncDataKeyFieldValidator(), false); + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedClientKey { + get { return encryptedClientKey_; } + set { + encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 10; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceDataKey" field. + public const int EncryptedDeviceDataKeyFieldNumber = 11; + private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + /// + /// have to check + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceDataKey { + get { return encryptedDeviceDataKey_; } + set { + encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 12; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; + /// + /// this is from cloud sso + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } + set { + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 13; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "installReferrer" field. + public const int InstallReferrerFieldNumber = 14; + private string installReferrer_ = ""; + /// + ///new Field("install_referrer", new StringFieldValidator(0, 1024), false); size=(0, 1024)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InstallReferrer { + get { return installReferrer_; } + set { + installReferrer_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mccMNC" field. + public const int MccMNCFieldNumber = 15; + private int mccMNC_; + /// + ///input.optString("mcc_mnc") in verifyDevice(); carrier_sim_codes.mcc_mnc int(6) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MccMNC { + get { return mccMNC_; } + set { + mccMNC_ = value; + } + } + + /// Field number for the "mfg" field. + public const int MfgFieldNumber = 16; + private string mfg_ = ""; + /// + ///input.optString("mfg") in verifyDevice(); appstore_device_history.mfg char(64) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Mfg { + get { return mfg_; } + set { + mfg_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "model" field. + public const int ModelFieldNumber = 17; + private string model_ = ""; + /// + ///input.optString("model") in verifyDevice(); appstore_device_history.model char(64) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Model { + get { return model_; } + set { + model_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "brand" field. + public const int BrandFieldNumber = 18; + private string brand_ = ""; + /// + ///input.optString("brand") in verifyDevice(); appstore_device_history.brand char(64) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Brand { + get { return brand_; } + set { + brand_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "product" field. + public const int ProductFieldNumber = 19; + private string product_ = ""; + /// + ///input.optString("product") in verifyDevice(); appstore_device_history.product char(64) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Product { + get { return product_; } + set { + product_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "device" field. + public const int DeviceFieldNumber = 20; + private string device_ = ""; + /// + ///input.optString("device"); used in PromotionMatcher; appstore_device_history.device char(64)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Device { + get { return device_; } + set { + device_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "carrier" field. + public const int CarrierFieldNumber = 21; + private string carrier_ = ""; + /// + ///input.optString("carrier"); used in PromotionMatcher; appstore_device_history.carrier char(64)? + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Carrier { + get { return carrier_; } + set { + carrier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 22; + private string verificationCode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseRegistration" field. + public const int EnterpriseRegistrationFieldNumber = 23; + private global::Enterprise.EnterpriseRegistration enterpriseRegistration_; + /// + /// optinal for creating an account when creating an enterprise + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EnterpriseRegistration EnterpriseRegistration { + get { return enterpriseRegistration_; } + set { + enterpriseRegistration_ = value; + } + } + + /// Field number for the "encryptedVerificationToken" field. + public const int EncryptedVerificationTokenFieldNumber = 24; + private pb::ByteString encryptedVerificationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedVerificationToken { + get { return encryptedVerificationToken_; } + set { + encryptedVerificationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseUsersDataKey" field. + public const int EnterpriseUsersDataKeyFieldNumber = 25; + private pb::ByteString enterpriseUsersDataKey_ = pb::ByteString.Empty; + /// + /// user's data key encrypted with enterprise ecc public key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EnterpriseUsersDataKey { + get { return enterpriseUsersDataKey_; } + set { + enterpriseUsersDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as CreateUserRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(CreateUserRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (AuthVerifier != other.AuthVerifier) return false; + if (EncryptionParams != other.EncryptionParams) return false; + if (RsaPublicKey != other.RsaPublicKey) return false; + if (RsaEncryptedPrivateKey != other.RsaEncryptedPrivateKey) return false; + if (EccPublicKey != other.EccPublicKey) return false; + if (EccEncryptedPrivateKey != other.EccEncryptedPrivateKey) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (EncryptedClientKey != other.EncryptedClientKey) return false; + if (ClientVersion != other.ClientVersion) return false; + if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (MessageSessionUid != other.MessageSessionUid) return false; + if (InstallReferrer != other.InstallReferrer) return false; + if (MccMNC != other.MccMNC) return false; + if (Mfg != other.Mfg) return false; + if (Model != other.Model) return false; + if (Brand != other.Brand) return false; + if (Product != other.Product) return false; + if (Device != other.Device) return false; + if (Carrier != other.Carrier) return false; + if (VerificationCode != other.VerificationCode) return false; + if (!object.Equals(EnterpriseRegistration, other.EnterpriseRegistration)) return false; + if (EncryptedVerificationToken != other.EncryptedVerificationToken) return false; + if (EnterpriseUsersDataKey != other.EnterpriseUsersDataKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (AuthVerifier.Length != 0) hash ^= AuthVerifier.GetHashCode(); + if (EncryptionParams.Length != 0) hash ^= EncryptionParams.GetHashCode(); + if (RsaPublicKey.Length != 0) hash ^= RsaPublicKey.GetHashCode(); + if (RsaEncryptedPrivateKey.Length != 0) hash ^= RsaEncryptedPrivateKey.GetHashCode(); + if (EccPublicKey.Length != 0) hash ^= EccPublicKey.GetHashCode(); + if (EccEncryptedPrivateKey.Length != 0) hash ^= EccEncryptedPrivateKey.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (InstallReferrer.Length != 0) hash ^= InstallReferrer.GetHashCode(); + if (MccMNC != 0) hash ^= MccMNC.GetHashCode(); + if (Mfg.Length != 0) hash ^= Mfg.GetHashCode(); + if (Model.Length != 0) hash ^= Model.GetHashCode(); + if (Brand.Length != 0) hash ^= Brand.GetHashCode(); + if (Product.Length != 0) hash ^= Product.GetHashCode(); + if (Device.Length != 0) hash ^= Device.GetHashCode(); + if (Carrier.Length != 0) hash ^= Carrier.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (enterpriseRegistration_ != null) hash ^= EnterpriseRegistration.GetHashCode(); + if (EncryptedVerificationToken.Length != 0) hash ^= EncryptedVerificationToken.GetHashCode(); + if (EnterpriseUsersDataKey.Length != 0) hash ^= EnterpriseUsersDataKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (AuthVerifier.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptionParams); + } + if (RsaPublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(EccEncryptedPrivateKey); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(EncryptedClientKey); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(82); + output.WriteString(ClientVersion); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(90); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(EncryptedLoginToken); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(MessageSessionUid); + } + if (InstallReferrer.Length != 0) { + output.WriteRawTag(114); + output.WriteString(InstallReferrer); + } + if (MccMNC != 0) { + output.WriteRawTag(120); + output.WriteInt32(MccMNC); + } + if (Mfg.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(Mfg); + } + if (Model.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(Model); + } + if (Brand.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(Brand); + } + if (Product.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(Product); + } + if (Device.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(Device); + } + if (Carrier.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(Carrier); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(178, 1); + output.WriteString(VerificationCode); + } + if (enterpriseRegistration_ != null) { + output.WriteRawTag(186, 1); + output.WriteMessage(EnterpriseRegistration); + } + if (EncryptedVerificationToken.Length != 0) { + output.WriteRawTag(194, 1); + output.WriteBytes(EncryptedVerificationToken); + } + if (EnterpriseUsersDataKey.Length != 0) { + output.WriteRawTag(202, 1); + output.WriteBytes(EnterpriseUsersDataKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (AuthVerifier.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptionParams); + } + if (RsaPublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(EccEncryptedPrivateKey); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(EncryptedClientKey); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(82); + output.WriteString(ClientVersion); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(90); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(EncryptedLoginToken); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(MessageSessionUid); + } + if (InstallReferrer.Length != 0) { + output.WriteRawTag(114); + output.WriteString(InstallReferrer); + } + if (MccMNC != 0) { + output.WriteRawTag(120); + output.WriteInt32(MccMNC); + } + if (Mfg.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteString(Mfg); + } + if (Model.Length != 0) { + output.WriteRawTag(138, 1); + output.WriteString(Model); + } + if (Brand.Length != 0) { + output.WriteRawTag(146, 1); + output.WriteString(Brand); + } + if (Product.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteString(Product); + } + if (Device.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(Device); + } + if (Carrier.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(Carrier); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(178, 1); + output.WriteString(VerificationCode); + } + if (enterpriseRegistration_ != null) { + output.WriteRawTag(186, 1); + output.WriteMessage(EnterpriseRegistration); + } + if (EncryptedVerificationToken.Length != 0) { + output.WriteRawTag(194, 1); + output.WriteBytes(EncryptedVerificationToken); + } + if (EnterpriseUsersDataKey.Length != 0) { + output.WriteRawTag(202, 1); + output.WriteBytes(EnterpriseUsersDataKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (AuthVerifier.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptionParams); + } + if (RsaPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccEncryptedPrivateKey); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (EncryptedClientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (EncryptedDeviceDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); + } + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + } + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (InstallReferrer.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InstallReferrer); + } + if (MccMNC != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MccMNC); + } + if (Mfg.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Mfg); + } + if (Model.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Model); + } + if (Brand.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Brand); + } + if (Product.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Product); + } + if (Device.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Device); + } + if (Carrier.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(Carrier); + } + if (VerificationCode.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (enterpriseRegistration_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(EnterpriseRegistration); + } + if (EncryptedVerificationToken.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeBytesSize(EncryptedVerificationToken); + } + if (EnterpriseUsersDataKey.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeBytesSize(EnterpriseUsersDataKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(CreateUserRequest other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.AuthVerifier.Length != 0) { + AuthVerifier = other.AuthVerifier; + } + if (other.EncryptionParams.Length != 0) { + EncryptionParams = other.EncryptionParams; + } + if (other.RsaPublicKey.Length != 0) { + RsaPublicKey = other.RsaPublicKey; + } + if (other.RsaEncryptedPrivateKey.Length != 0) { + RsaEncryptedPrivateKey = other.RsaEncryptedPrivateKey; + } + if (other.EccPublicKey.Length != 0) { + EccPublicKey = other.EccPublicKey; + } + if (other.EccEncryptedPrivateKey.Length != 0) { + EccEncryptedPrivateKey = other.EccEncryptedPrivateKey; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.EncryptedClientKey.Length != 0) { + EncryptedClientKey = other.EncryptedClientKey; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.EncryptedDeviceDataKey.Length != 0) { + EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; + } + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + if (other.InstallReferrer.Length != 0) { + InstallReferrer = other.InstallReferrer; + } + if (other.MccMNC != 0) { + MccMNC = other.MccMNC; + } + if (other.Mfg.Length != 0) { + Mfg = other.Mfg; + } + if (other.Model.Length != 0) { + Model = other.Model; + } + if (other.Brand.Length != 0) { + Brand = other.Brand; + } + if (other.Product.Length != 0) { + Product = other.Product; + } + if (other.Device.Length != 0) { + Device = other.Device; + } + if (other.Carrier.Length != 0) { + Carrier = other.Carrier; + } + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + if (other.enterpriseRegistration_ != null) { + if (enterpriseRegistration_ == null) { + EnterpriseRegistration = new global::Enterprise.EnterpriseRegistration(); + } + EnterpriseRegistration.MergeFrom(other.EnterpriseRegistration); + } + if (other.EncryptedVerificationToken.Length != 0) { + EncryptedVerificationToken = other.EncryptedVerificationToken; + } + if (other.EnterpriseUsersDataKey.Length != 0) { + EnterpriseUsersDataKey = other.EnterpriseUsersDataKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + AuthVerifier = input.ReadBytes(); + break; + } + case 26: { + EncryptionParams = input.ReadBytes(); + break; + } + case 34: { + RsaPublicKey = input.ReadBytes(); + break; + } + case 42: { + RsaEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 50: { + EccPublicKey = input.ReadBytes(); + break; + } + case 58: { + EccEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 66: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 74: { + EncryptedClientKey = input.ReadBytes(); + break; + } + case 82: { + ClientVersion = input.ReadString(); + break; + } + case 90: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + case 98: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 106: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 114: { + InstallReferrer = input.ReadString(); + break; + } + case 120: { + MccMNC = input.ReadInt32(); + break; + } + case 130: { + Mfg = input.ReadString(); + break; + } + case 138: { + Model = input.ReadString(); + break; + } + case 146: { + Brand = input.ReadString(); + break; + } + case 154: { + Product = input.ReadString(); + break; + } + case 162: { + Device = input.ReadString(); + break; + } + case 170: { + Carrier = input.ReadString(); + break; + } + case 178: { + VerificationCode = input.ReadString(); + break; + } + case 186: { + if (enterpriseRegistration_ == null) { + EnterpriseRegistration = new global::Enterprise.EnterpriseRegistration(); + } + input.ReadMessage(EnterpriseRegistration); + break; + } + case 194: { + EncryptedVerificationToken = input.ReadBytes(); + break; + } + case 202: { + EnterpriseUsersDataKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + AuthVerifier = input.ReadBytes(); + break; + } + case 26: { + EncryptionParams = input.ReadBytes(); + break; + } + case 34: { + RsaPublicKey = input.ReadBytes(); + break; + } + case 42: { + RsaEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 50: { + EccPublicKey = input.ReadBytes(); + break; + } + case 58: { + EccEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 66: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 74: { + EncryptedClientKey = input.ReadBytes(); + break; + } + case 82: { + ClientVersion = input.ReadString(); + break; + } + case 90: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + case 98: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 106: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 114: { + InstallReferrer = input.ReadString(); + break; + } + case 120: { + MccMNC = input.ReadInt32(); + break; + } + case 130: { + Mfg = input.ReadString(); + break; + } + case 138: { + Model = input.ReadString(); + break; + } + case 146: { + Brand = input.ReadString(); + break; + } + case 154: { + Product = input.ReadString(); + break; + } + case 162: { + Device = input.ReadString(); + break; + } + case 170: { + Carrier = input.ReadString(); + break; + } + case 178: { + VerificationCode = input.ReadString(); + break; + } + case 186: { + if (enterpriseRegistration_ == null) { + EnterpriseRegistration = new global::Enterprise.EnterpriseRegistration(); + } + input.ReadMessage(EnterpriseRegistration); + break; + } + case 194: { + EncryptedVerificationToken = input.ReadBytes(); + break; + } + case 202: { + EnterpriseUsersDataKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NodeEnforcementAddOrUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeEnforcementAddOrUpdateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[63]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeEnforcementAddOrUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeEnforcementAddOrUpdateRequest(NodeEnforcementAddOrUpdateRequest other) : this() { + nodeId_ = other.nodeId_; + enforcement_ = other.enforcement_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeEnforcementAddOrUpdateRequest Clone() { + return new NodeEnforcementAddOrUpdateRequest(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "enforcement" field. + public const int EnforcementFieldNumber = 2; + private string enforcement_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Enforcement { + get { return enforcement_; } + set { + enforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 3; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NodeEnforcementAddOrUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NodeEnforcementAddOrUpdateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (Enforcement != other.Enforcement) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (Enforcement.Length != 0) hash ^= Enforcement.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (Enforcement.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Enforcement); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (Enforcement.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Enforcement); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (Enforcement.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Enforcement); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NodeEnforcementAddOrUpdateRequest other) { + if (other == null) { + return; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.Enforcement.Length != 0) { + Enforcement = other.Enforcement; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 18: { + Enforcement = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 18: { + Enforcement = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NodeEnforcementRemoveRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeEnforcementRemoveRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[64]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeEnforcementRemoveRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeEnforcementRemoveRequest(NodeEnforcementRemoveRequest other) : this() { + nodeId_ = other.nodeId_; + enforcement_ = other.enforcement_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public NodeEnforcementRemoveRequest Clone() { + return new NodeEnforcementRemoveRequest(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "enforcement" field. + public const int EnforcementFieldNumber = 2; + private string enforcement_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Enforcement { + get { return enforcement_; } + set { + enforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as NodeEnforcementRemoveRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(NodeEnforcementRemoveRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (Enforcement != other.Enforcement) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (Enforcement.Length != 0) hash ^= Enforcement.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (Enforcement.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Enforcement); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (Enforcement.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Enforcement); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (Enforcement.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Enforcement); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(NodeEnforcementRemoveRequest other) { + if (other == null) { + return; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.Enforcement.Length != 0) { + Enforcement = other.Enforcement; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 18: { + Enforcement = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 18: { + Enforcement = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApiRequestByKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApiRequestByKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[65]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApiRequestByKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApiRequestByKey(ApiRequestByKey other) : this() { + keyId_ = other.keyId_; + payload_ = other.payload_; + username_ = other.username_; + locale_ = other.locale_; + supportedLanguage_ = other.supportedLanguage_; + type_ = other.type_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApiRequestByKey Clone() { + return new ApiRequestByKey(this); + } + + /// Field number for the "keyId" field. + public const int KeyIdFieldNumber = 1; + private int keyId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int KeyId { + get { return keyId_; } + set { + keyId_ = value; + } + } + + /// Field number for the "payload" field. + public const int PayloadFieldNumber = 2; + private pb::ByteString payload_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Payload { + get { return payload_; } + set { + payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 3; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "locale" field. + public const int LocaleFieldNumber = 4; + private string locale_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Locale { + get { return locale_; } + set { + locale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "supportedLanguage" field. + public const int SupportedLanguageFieldNumber = 5; + private global::Authentication.SupportedLanguage supportedLanguage_ = global::Authentication.SupportedLanguage.English; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.SupportedLanguage SupportedLanguage { + get { return supportedLanguage_; } + set { + supportedLanguage_ = value; + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 6; + private int type_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Type { + get { return type_; } + set { + type_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApiRequestByKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApiRequestByKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (KeyId != other.KeyId) return false; + if (Payload != other.Payload) return false; + if (Username != other.Username) return false; + if (Locale != other.Locale) return false; + if (SupportedLanguage != other.SupportedLanguage) return false; + if (Type != other.Type) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (KeyId != 0) hash ^= KeyId.GetHashCode(); + if (Payload.Length != 0) hash ^= Payload.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Locale.Length != 0) hash ^= Locale.GetHashCode(); + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) hash ^= SupportedLanguage.GetHashCode(); + if (Type != 0) hash ^= Type.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (KeyId != 0) { + output.WriteRawTag(8); + output.WriteInt32(KeyId); + } + if (Payload.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Payload); + } + if (Username.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Username); + } + if (Locale.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Locale); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + output.WriteRawTag(40); + output.WriteEnum((int) SupportedLanguage); + } + if (Type != 0) { + output.WriteRawTag(48); + output.WriteInt32(Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (KeyId != 0) { + output.WriteRawTag(8); + output.WriteInt32(KeyId); + } + if (Payload.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Payload); + } + if (Username.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Username); + } + if (Locale.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Locale); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + output.WriteRawTag(40); + output.WriteEnum((int) SupportedLanguage); + } + if (Type != 0) { + output.WriteRawTag(48); + output.WriteInt32(Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (KeyId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(KeyId); + } + if (Payload.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Locale.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Locale); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SupportedLanguage); + } + if (Type != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApiRequestByKey other) { + if (other == null) { + return; + } + if (other.KeyId != 0) { + KeyId = other.KeyId; + } + if (other.Payload.Length != 0) { + Payload = other.Payload; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Locale.Length != 0) { + Locale = other.Locale; + } + if (other.SupportedLanguage != global::Authentication.SupportedLanguage.English) { + SupportedLanguage = other.SupportedLanguage; + } + if (other.Type != 0) { + Type = other.Type; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + KeyId = input.ReadInt32(); + break; + } + case 18: { + Payload = input.ReadBytes(); + break; + } + case 26: { + Username = input.ReadString(); + break; + } + case 34: { + Locale = input.ReadString(); + break; + } + case 40: { + SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + break; + } + case 48: { + Type = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + KeyId = input.ReadInt32(); + break; + } + case 18: { + Payload = input.ReadBytes(); + break; + } + case 26: { + Username = input.ReadString(); + break; + } + case 34: { + Locale = input.ReadString(); + break; + } + case 40: { + SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + break; + } + case 48: { + Type = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApiRequestByKAtoKAKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApiRequestByKAtoKAKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[66]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApiRequestByKAtoKAKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApiRequestByKAtoKAKey(ApiRequestByKAtoKAKey other) : this() { + sourceRegion_ = other.sourceRegion_; + payload_ = other.payload_; + supportedLanguage_ = other.supportedLanguage_; + destinationRegion_ = other.destinationRegion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApiRequestByKAtoKAKey Clone() { + return new ApiRequestByKAtoKAKey(this); + } + + /// Field number for the "sourceRegion" field. + public const int SourceRegionFieldNumber = 1; + private global::Authentication.Region sourceRegion_ = global::Authentication.Region.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.Region SourceRegion { + get { return sourceRegion_; } + set { + sourceRegion_ = value; + } + } + + /// Field number for the "payload" field. + public const int PayloadFieldNumber = 2; + private pb::ByteString payload_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Payload { + get { return payload_; } + set { + payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "supportedLanguage" field. + public const int SupportedLanguageFieldNumber = 3; + private global::Authentication.SupportedLanguage supportedLanguage_ = global::Authentication.SupportedLanguage.English; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.SupportedLanguage SupportedLanguage { + get { return supportedLanguage_; } + set { + supportedLanguage_ = value; + } + } + + /// Field number for the "destinationRegion" field. + public const int DestinationRegionFieldNumber = 4; + private global::Authentication.Region destinationRegion_ = global::Authentication.Region.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.Region DestinationRegion { + get { return destinationRegion_; } + set { + destinationRegion_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApiRequestByKAtoKAKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApiRequestByKAtoKAKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SourceRegion != other.SourceRegion) return false; + if (Payload != other.Payload) return false; + if (SupportedLanguage != other.SupportedLanguage) return false; + if (DestinationRegion != other.DestinationRegion) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SourceRegion != global::Authentication.Region.Unknown) hash ^= SourceRegion.GetHashCode(); + if (Payload.Length != 0) hash ^= Payload.GetHashCode(); + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) hash ^= SupportedLanguage.GetHashCode(); + if (DestinationRegion != global::Authentication.Region.Unknown) hash ^= DestinationRegion.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SourceRegion != global::Authentication.Region.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) SourceRegion); + } + if (Payload.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Payload); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + output.WriteRawTag(24); + output.WriteEnum((int) SupportedLanguage); + } + if (DestinationRegion != global::Authentication.Region.Unknown) { + output.WriteRawTag(32); + output.WriteEnum((int) DestinationRegion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SourceRegion != global::Authentication.Region.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) SourceRegion); + } + if (Payload.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Payload); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + output.WriteRawTag(24); + output.WriteEnum((int) SupportedLanguage); + } + if (DestinationRegion != global::Authentication.Region.Unknown) { + output.WriteRawTag(32); + output.WriteEnum((int) DestinationRegion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SourceRegion != global::Authentication.Region.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SourceRegion); + } + if (Payload.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SupportedLanguage); + } + if (DestinationRegion != global::Authentication.Region.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DestinationRegion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApiRequestByKAtoKAKey other) { + if (other == null) { + return; + } + if (other.SourceRegion != global::Authentication.Region.Unknown) { + SourceRegion = other.SourceRegion; + } + if (other.Payload.Length != 0) { + Payload = other.Payload; + } + if (other.SupportedLanguage != global::Authentication.SupportedLanguage.English) { + SupportedLanguage = other.SupportedLanguage; + } + if (other.DestinationRegion != global::Authentication.Region.Unknown) { + DestinationRegion = other.DestinationRegion; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + SourceRegion = (global::Authentication.Region) input.ReadEnum(); + break; + } + case 18: { + Payload = input.ReadBytes(); + break; + } + case 24: { + SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + break; + } + case 32: { + DestinationRegion = (global::Authentication.Region) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SourceRegion = (global::Authentication.Region) input.ReadEnum(); + break; + } + case 18: { + Payload = input.ReadBytes(); + break; + } + case 24: { + SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + break; + } + case 32: { + DestinationRegion = (global::Authentication.Region) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MemcacheRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MemcacheRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[67]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MemcacheRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MemcacheRequest(MemcacheRequest other) : this() { + key_ = other.key_; + userId_ = other.userId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MemcacheRequest Clone() { + return new MemcacheRequest(this); + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private string key_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 2; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MemcacheRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MemcacheRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Key != other.Key) return false; + if (UserId != other.UserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteInt32(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteInt32(UserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MemcacheRequest other) { + if (other == null) { + return; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 16: { + UserId = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 16: { + UserId = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MemcacheResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MemcacheResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[68]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MemcacheResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MemcacheResponse(MemcacheResponse other) : this() { + key_ = other.key_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MemcacheResponse Clone() { + return new MemcacheResponse(this); + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private string key_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MemcacheResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MemcacheResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Key != other.Key) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MemcacheResponse other) { + if (other == null) { + return; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + Value = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MasterPasswordReentryRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MasterPasswordReentryRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[69]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordReentryRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordReentryRequest(MasterPasswordReentryRequest other) : this() { + pbkdf2Password_ = other.pbkdf2Password_; + action_ = other.action_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordReentryRequest Clone() { + return new MasterPasswordReentryRequest(this); + } + + /// Field number for the "pbkdf2Password" field. + public const int Pbkdf2PasswordFieldNumber = 1; + private string pbkdf2Password_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Pbkdf2Password { + get { return pbkdf2Password_; } + set { + pbkdf2Password_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "action" field. + public const int ActionFieldNumber = 2; + private global::Authentication.MasterPasswordReentryActionType action_ = global::Authentication.MasterPasswordReentryActionType.Unmask; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.MasterPasswordReentryActionType Action { + get { return action_; } + set { + action_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MasterPasswordReentryRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MasterPasswordReentryRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Pbkdf2Password != other.Pbkdf2Password) return false; + if (Action != other.Action) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Pbkdf2Password.Length != 0) hash ^= Pbkdf2Password.GetHashCode(); + if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) hash ^= Action.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Pbkdf2Password.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Pbkdf2Password); + } + if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { + output.WriteRawTag(16); + output.WriteEnum((int) Action); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Pbkdf2Password.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Pbkdf2Password); + } + if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { + output.WriteRawTag(16); + output.WriteEnum((int) Action); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Pbkdf2Password.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Pbkdf2Password); + } + if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Action); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MasterPasswordReentryRequest other) { + if (other == null) { + return; + } + if (other.Pbkdf2Password.Length != 0) { + Pbkdf2Password = other.Pbkdf2Password; + } + if (other.Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { + Action = other.Action; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Pbkdf2Password = input.ReadString(); + break; + } + case 16: { + Action = (global::Authentication.MasterPasswordReentryActionType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Pbkdf2Password = input.ReadString(); + break; + } + case 16: { + Action = (global::Authentication.MasterPasswordReentryActionType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MasterPasswordReentryResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MasterPasswordReentryResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[70]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordReentryResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordReentryResponse(MasterPasswordReentryResponse other) : this() { + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordReentryResponse Clone() { + return new MasterPasswordReentryResponse(this); + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 1; + private global::Authentication.MasterPasswordReentryStatus status_ = global::Authentication.MasterPasswordReentryStatus.MpUnknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.MasterPasswordReentryStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MasterPasswordReentryResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MasterPasswordReentryResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Status != global::Authentication.MasterPasswordReentryStatus.MpUnknown) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Status != global::Authentication.MasterPasswordReentryStatus.MpUnknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Status != global::Authentication.MasterPasswordReentryStatus.MpUnknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Status != global::Authentication.MasterPasswordReentryStatus.MpUnknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MasterPasswordReentryResponse other) { + if (other == null) { + return; + } + if (other.Status != global::Authentication.MasterPasswordReentryStatus.MpUnknown) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Status = (global::Authentication.MasterPasswordReentryStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Status = (global::Authentication.MasterPasswordReentryStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceRegistrationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceRegistrationRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[71]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceRegistrationRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceRegistrationRequest(DeviceRegistrationRequest other) : this() { + clientVersion_ = other.clientVersion_; + deviceName_ = other.deviceName_; + devicePublicKey_ = other.devicePublicKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceRegistrationRequest Clone() { + return new DeviceRegistrationRequest(this); + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 1; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceName" field. + public const int DeviceNameFieldNumber = 2; + private string deviceName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceName { + get { return deviceName_; } + set { + deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "devicePublicKey" field. + public const int DevicePublicKeyFieldNumber = 3; + private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DevicePublicKey { + get { return devicePublicKey_; } + set { + devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceRegistrationRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceRegistrationRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ClientVersion != other.ClientVersion) return false; + if (DeviceName != other.DeviceName) return false; + if (DevicePublicKey != other.DevicePublicKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); + if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ClientVersion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(DevicePublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ClientVersion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ClientVersion); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(DevicePublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (DeviceName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + } + if (DevicePublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceRegistrationRequest other) { + if (other == null) { + return; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.DeviceName.Length != 0) { + DeviceName = other.DeviceName; + } + if (other.DevicePublicKey.Length != 0) { + DevicePublicKey = other.DevicePublicKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ClientVersion = input.ReadString(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + case 26: { + DevicePublicKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ClientVersion = input.ReadString(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + case 26: { + DevicePublicKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceVerificationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceVerificationRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[72]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceVerificationRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceVerificationRequest(DeviceVerificationRequest other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + username_ = other.username_; + verificationChannel_ = other.verificationChannel_; + messageSessionUid_ = other.messageSessionUid_; + clientVersion_ = other.clientVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceVerificationRequest Clone() { + return new DeviceVerificationRequest(this); + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verificationChannel" field. + public const int VerificationChannelFieldNumber = 3; + private string verificationChannel_ = ""; + /// + /// email for now, could be "sms" if we allow username as cell number in the future. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationChannel { + get { return verificationChannel_; } + set { + verificationChannel_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 4; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 5; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceVerificationRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceVerificationRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (Username != other.Username) return false; + if (VerificationChannel != other.VerificationChannel) return false; + if (MessageSessionUid != other.MessageSessionUid) return false; + if (ClientVersion != other.ClientVersion) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (VerificationChannel.Length != 0) hash ^= VerificationChannel.GetHashCode(); + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (VerificationChannel.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationChannel); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ClientVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (VerificationChannel.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationChannel); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ClientVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (VerificationChannel.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationChannel); + } + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceVerificationRequest other) { + if (other == null) { + return; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.VerificationChannel.Length != 0) { + VerificationChannel = other.VerificationChannel; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 26: { + VerificationChannel = input.ReadString(); + break; + } + case 34: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 42: { + ClientVersion = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 26: { + VerificationChannel = input.ReadString(); + break; + } + case 34: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 42: { + ClientVersion = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceVerificationResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceVerificationResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[73]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceVerificationResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceVerificationResponse(DeviceVerificationResponse other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + username_ = other.username_; + messageSessionUid_ = other.messageSessionUid_; + clientVersion_ = other.clientVersion_; + deviceStatus_ = other.deviceStatus_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceVerificationResponse Clone() { + return new DeviceVerificationResponse(this); + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 3; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 4; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceStatus" field. + public const int DeviceStatusFieldNumber = 5; + private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.DeviceStatus DeviceStatus { + get { return deviceStatus_; } + set { + deviceStatus_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceVerificationResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceVerificationResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (Username != other.Username) return false; + if (MessageSessionUid != other.MessageSessionUid) return false; + if (ClientVersion != other.ClientVersion) return false; + if (DeviceStatus != other.DeviceStatus) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ClientVersion); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(40); + output.WriteEnum((int) DeviceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ClientVersion); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(40); + output.WriteEnum((int) DeviceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceStatus); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceVerificationResponse other) { + if (other == null) { + return; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + DeviceStatus = other.DeviceStatus; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 26: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 34: { + ClientVersion = input.ReadString(); + break; + } + case 40: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 26: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 34: { + ClientVersion = input.ReadString(); + break; + } + case 40: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceApprovalRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceApprovalRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[74]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceApprovalRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceApprovalRequest(DeviceApprovalRequest other) : this() { + email_ = other.email_; + twoFactorChannel_ = other.twoFactorChannel_; + clientVersion_ = other.clientVersion_; + locale_ = other.locale_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + totpCode_ = other.totpCode_; + deviceIp_ = other.deviceIp_; + deviceTokenExpireDays_ = other.deviceTokenExpireDays_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceApprovalRequest Clone() { + return new DeviceApprovalRequest(this); + } + + /// Field number for the "email" field. + public const int EmailFieldNumber = 1; + private string email_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } + set { + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "twoFactorChannel" field. + public const int TwoFactorChannelFieldNumber = 2; + private string twoFactorChannel_ = ""; + /// + /// TwoFactorChannel, only "sms", "duo", "on_device" or "on_approved_device"; default to email verification + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TwoFactorChannel { + get { return twoFactorChannel_; } + set { + twoFactorChannel_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 3; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "locale" field. + public const int LocaleFieldNumber = 4; + private string locale_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Locale { + get { return locale_; } + set { + locale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 5; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "totpCode" field. + public const int TotpCodeFieldNumber = 6; + private string totpCode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TotpCode { + get { return totpCode_; } + set { + totpCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceIp" field. + public const int DeviceIpFieldNumber = 7; + private string deviceIp_ = ""; + /// + ///This is the ip address of the original device that needs to be approved, which will be included in the TwoFactorToken. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceIp { + get { return deviceIp_; } + set { + deviceIp_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceTokenExpireDays" field. + public const int DeviceTokenExpireDaysFieldNumber = 8; + private string deviceTokenExpireDays_ = ""; + /// + ///equivalent to the device_token_expire_days that is used in the Login command + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceTokenExpireDays { + get { return deviceTokenExpireDays_; } + set { + deviceTokenExpireDays_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceApprovalRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceApprovalRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Email != other.Email) return false; + if (TwoFactorChannel != other.TwoFactorChannel) return false; + if (ClientVersion != other.ClientVersion) return false; + if (Locale != other.Locale) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (TotpCode != other.TotpCode) return false; + if (DeviceIp != other.DeviceIp) return false; + if (DeviceTokenExpireDays != other.DeviceTokenExpireDays) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (TwoFactorChannel.Length != 0) hash ^= TwoFactorChannel.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (Locale.Length != 0) hash ^= Locale.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (TotpCode.Length != 0) hash ^= TotpCode.GetHashCode(); + if (DeviceIp.Length != 0) hash ^= DeviceIp.GetHashCode(); + if (DeviceTokenExpireDays.Length != 0) hash ^= DeviceTokenExpireDays.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + if (TwoFactorChannel.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TwoFactorChannel); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ClientVersion); + } + if (Locale.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Locale); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedDeviceToken); + } + if (TotpCode.Length != 0) { + output.WriteRawTag(50); + output.WriteString(TotpCode); + } + if (DeviceIp.Length != 0) { + output.WriteRawTag(58); + output.WriteString(DeviceIp); + } + if (DeviceTokenExpireDays.Length != 0) { + output.WriteRawTag(66); + output.WriteString(DeviceTokenExpireDays); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + if (TwoFactorChannel.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TwoFactorChannel); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ClientVersion); + } + if (Locale.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Locale); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedDeviceToken); + } + if (TotpCode.Length != 0) { + output.WriteRawTag(50); + output.WriteString(TotpCode); + } + if (DeviceIp.Length != 0) { + output.WriteRawTag(58); + output.WriteString(DeviceIp); + } + if (DeviceTokenExpireDays.Length != 0) { + output.WriteRawTag(66); + output.WriteString(DeviceTokenExpireDays); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (TwoFactorChannel.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TwoFactorChannel); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (Locale.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Locale); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (TotpCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TotpCode); + } + if (DeviceIp.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceIp); + } + if (DeviceTokenExpireDays.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceTokenExpireDays); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceApprovalRequest other) { + if (other == null) { + return; + } + if (other.Email.Length != 0) { + Email = other.Email; + } + if (other.TwoFactorChannel.Length != 0) { + TwoFactorChannel = other.TwoFactorChannel; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.Locale.Length != 0) { + Locale = other.Locale; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.TotpCode.Length != 0) { + TotpCode = other.TotpCode; + } + if (other.DeviceIp.Length != 0) { + DeviceIp = other.DeviceIp; + } + if (other.DeviceTokenExpireDays.Length != 0) { + DeviceTokenExpireDays = other.DeviceTokenExpireDays; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Email = input.ReadString(); + break; + } + case 18: { + TwoFactorChannel = input.ReadString(); + break; + } + case 26: { + ClientVersion = input.ReadString(); + break; + } + case 34: { + Locale = input.ReadString(); + break; + } + case 42: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 50: { + TotpCode = input.ReadString(); + break; + } + case 58: { + DeviceIp = input.ReadString(); + break; + } + case 66: { + DeviceTokenExpireDays = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Email = input.ReadString(); + break; + } + case 18: { + TwoFactorChannel = input.ReadString(); + break; + } + case 26: { + ClientVersion = input.ReadString(); + break; + } + case 34: { + Locale = input.ReadString(); + break; + } + case 42: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 50: { + TotpCode = input.ReadString(); + break; + } + case 58: { + DeviceIp = input.ReadString(); + break; + } + case 66: { + DeviceTokenExpireDays = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceApprovalResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceApprovalResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[75]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceApprovalResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceApprovalResponse(DeviceApprovalResponse other) : this() { + encryptedTwoFactorToken_ = other.encryptedTwoFactorToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceApprovalResponse Clone() { + return new DeviceApprovalResponse(this); + } + + /// Field number for the "encryptedTwoFactorToken" field. + public const int EncryptedTwoFactorTokenFieldNumber = 1; + private pb::ByteString encryptedTwoFactorToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedTwoFactorToken { + get { return encryptedTwoFactorToken_; } + set { + encryptedTwoFactorToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceApprovalResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceApprovalResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedTwoFactorToken != other.EncryptedTwoFactorToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedTwoFactorToken.Length != 0) hash ^= EncryptedTwoFactorToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedTwoFactorToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedTwoFactorToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedTwoFactorToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedTwoFactorToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedTwoFactorToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedTwoFactorToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceApprovalResponse other) { + if (other == null) { + return; + } + if (other.EncryptedTwoFactorToken.Length != 0) { + EncryptedTwoFactorToken = other.EncryptedTwoFactorToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedTwoFactorToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedTwoFactorToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApproveDeviceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveDeviceRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[76]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveDeviceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveDeviceRequest(ApproveDeviceRequest other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; + denyApproval_ = other.denyApproval_; + linkDevice_ = other.linkDevice_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveDeviceRequest Clone() { + return new ApproveDeviceRequest(this); + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceDataKey" field. + public const int EncryptedDeviceDataKeyFieldNumber = 2; + private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + /// + /// required for cloud sso and link + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceDataKey { + get { return encryptedDeviceDataKey_; } + set { + encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "denyApproval" field. + public const int DenyApprovalFieldNumber = 3; + private bool denyApproval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DenyApproval { + get { return denyApproval_; } + set { + denyApproval_ = value; + } + } + + /// Field number for the "linkDevice" field. + public const int LinkDeviceFieldNumber = 4; + private bool linkDevice_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool LinkDevice { + get { return linkDevice_; } + set { + linkDevice_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApproveDeviceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApproveDeviceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; + if (DenyApproval != other.DenyApproval) return false; + if (LinkDevice != other.LinkDevice) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); + if (DenyApproval != false) hash ^= DenyApproval.GetHashCode(); + if (LinkDevice != false) hash ^= LinkDevice.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (DenyApproval != false) { + output.WriteRawTag(24); + output.WriteBool(DenyApproval); + } + if (LinkDevice != false) { + output.WriteRawTag(32); + output.WriteBool(LinkDevice); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (DenyApproval != false) { + output.WriteRawTag(24); + output.WriteBool(DenyApproval); + } + if (LinkDevice != false) { + output.WriteRawTag(32); + output.WriteBool(LinkDevice); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); + } + if (DenyApproval != false) { + size += 1 + 1; + } + if (LinkDevice != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApproveDeviceRequest other) { + if (other == null) { + return; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.EncryptedDeviceDataKey.Length != 0) { + EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; + } + if (other.DenyApproval != false) { + DenyApproval = other.DenyApproval; + } + if (other.LinkDevice != false) { + LinkDevice = other.LinkDevice; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + case 24: { + DenyApproval = input.ReadBool(); + break; + } + case 32: { + LinkDevice = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + case 24: { + DenyApproval = input.ReadBool(); + break; + } + case 32: { + LinkDevice = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserAliasRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserAliasRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[77]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAliasRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAliasRequest(EnterpriseUserAliasRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + alias_ = other.alias_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAliasRequest Clone() { + return new EnterpriseUserAliasRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "alias" field. + public const int AliasFieldNumber = 2; + private string alias_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Alias { + get { return alias_; } + set { + alias_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserAliasRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserAliasRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Alias != other.Alias) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Alias.Length != 0) hash ^= Alias.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Alias.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Alias); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Alias.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Alias); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Alias.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Alias); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserAliasRequest other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Alias.Length != 0) { + Alias = other.Alias; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Alias = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Alias = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserAddAliasRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserAddAliasRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[78]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasRequest(EnterpriseUserAddAliasRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + alias_ = other.alias_; + primary_ = other.primary_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasRequest Clone() { + return new EnterpriseUserAddAliasRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "alias" field. + public const int AliasFieldNumber = 2; + private string alias_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Alias { + get { return alias_; } + set { + alias_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "primary" field. + public const int PrimaryFieldNumber = 3; + private bool primary_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Primary { + get { return primary_; } + set { + primary_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserAddAliasRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserAddAliasRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Alias != other.Alias) return false; + if (Primary != other.Primary) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Alias.Length != 0) hash ^= Alias.GetHashCode(); + if (Primary != false) hash ^= Primary.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Alias.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Alias); + } + if (Primary != false) { + output.WriteRawTag(24); + output.WriteBool(Primary); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Alias.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Alias); + } + if (Primary != false) { + output.WriteRawTag(24); + output.WriteBool(Primary); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Alias.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Alias); + } + if (Primary != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserAddAliasRequest other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Alias.Length != 0) { + Alias = other.Alias; + } + if (other.Primary != false) { + Primary = other.Primary; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Alias = input.ReadString(); + break; + } + case 24: { + Primary = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Alias = input.ReadString(); + break; + } + case 24: { + Primary = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserAddAliasRequestV2 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserAddAliasRequestV2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[79]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasRequestV2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasRequestV2(EnterpriseUserAddAliasRequestV2 other) : this() { + enterpriseUserAddAliasRequest_ = other.enterpriseUserAddAliasRequest_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasRequestV2 Clone() { + return new EnterpriseUserAddAliasRequestV2(this); + } + + /// Field number for the "enterpriseUserAddAliasRequest" field. + public const int EnterpriseUserAddAliasRequestFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_enterpriseUserAddAliasRequest_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.EnterpriseUserAddAliasRequest.Parser); + private readonly pbc::RepeatedField enterpriseUserAddAliasRequest_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserAddAliasRequest { + get { return enterpriseUserAddAliasRequest_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserAddAliasRequestV2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserAddAliasRequestV2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!enterpriseUserAddAliasRequest_.Equals(other.enterpriseUserAddAliasRequest_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= enterpriseUserAddAliasRequest_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + enterpriseUserAddAliasRequest_.WriteTo(output, _repeated_enterpriseUserAddAliasRequest_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUserAddAliasRequest_.WriteTo(ref output, _repeated_enterpriseUserAddAliasRequest_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += enterpriseUserAddAliasRequest_.CalculateSize(_repeated_enterpriseUserAddAliasRequest_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserAddAliasRequestV2 other) { + if (other == null) { + return; + } + enterpriseUserAddAliasRequest_.Add(other.enterpriseUserAddAliasRequest_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + enterpriseUserAddAliasRequest_.AddEntriesFrom(input, _repeated_enterpriseUserAddAliasRequest_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + enterpriseUserAddAliasRequest_.AddEntriesFrom(ref input, _repeated_enterpriseUserAddAliasRequest_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserAddAliasStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserAddAliasStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[80]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasStatus(EnterpriseUserAddAliasStatus other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasStatus Clone() { + return new EnterpriseUserAddAliasStatus(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserAddAliasStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserAddAliasStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserAddAliasStatus other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserAddAliasResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserAddAliasResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[81]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasResponse(EnterpriseUserAddAliasResponse other) : this() { + status_ = other.status_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserAddAliasResponse Clone() { + return new EnterpriseUserAddAliasResponse(this); + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_status_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.EnterpriseUserAddAliasStatus.Parser); + private readonly pbc::RepeatedField status_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Status { + get { return status_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserAddAliasResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserAddAliasResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!status_.Equals(other.status_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= status_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + status_.WriteTo(output, _repeated_status_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + status_.WriteTo(ref output, _repeated_status_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += status_.CalculateSize(_repeated_status_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserAddAliasResponse other) { + if (other == null) { + return; + } + status_.Add(other.status_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + status_.AddEntriesFrom(input, _repeated_status_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + status_.AddEntriesFrom(ref input, _repeated_status_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Device : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Device()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[82]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Device() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Device(Device other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Device Clone() { + return new Device(this); + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Device); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Device other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Device other) { + if (other == null) { + return; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RegisterDeviceDataKeyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegisterDeviceDataKeyRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[83]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegisterDeviceDataKeyRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegisterDeviceDataKeyRequest(RegisterDeviceDataKeyRequest other) : this() { + encryptedDeviceToken_ = other.encryptedDeviceToken_; + encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RegisterDeviceDataKeyRequest Clone() { + return new RegisterDeviceDataKeyRequest(this); + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 1; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceDataKey" field. + public const int EncryptedDeviceDataKeyFieldNumber = 2; + private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceDataKey { + get { return encryptedDeviceDataKey_; } + set { + encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RegisterDeviceDataKeyRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RegisterDeviceDataKeyRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); } if (EncryptedDeviceDataKey.Length != 0) { - output.WriteRawTag(90); + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(18); output.WriteBytes(EncryptedDeviceDataKey); } - if (EncryptedLoginToken.Length != 0) { - output.WriteRawTag(98); - output.WriteBytes(EncryptedLoginToken); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RegisterDeviceDataKeyRequest other) { + if (other == null) { + return; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.EncryptedDeviceDataKey.Length != 0) { + EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ValidateCreateUserVerificationCodeRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateCreateUserVerificationCodeRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[84]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateCreateUserVerificationCodeRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateCreateUserVerificationCodeRequest(ValidateCreateUserVerificationCodeRequest other) : this() { + username_ = other.username_; + clientVersion_ = other.clientVersion_; + verificationCode_ = other.verificationCode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateCreateUserVerificationCodeRequest Clone() { + return new ValidateCreateUserVerificationCodeRequest(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 3; + private string verificationCode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ValidateCreateUserVerificationCodeRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ValidateCreateUserVerificationCodeRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (ClientVersion != other.ClientVersion) return false; + if (VerificationCode != other.VerificationCode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ValidateCreateUserVerificationCodeRequest other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + VerificationCode = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + VerificationCode = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ValidateDeviceVerificationCodeRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateDeviceVerificationCodeRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[85]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateDeviceVerificationCodeRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateDeviceVerificationCodeRequest(ValidateDeviceVerificationCodeRequest other) : this() { + username_ = other.username_; + clientVersion_ = other.clientVersion_; + verificationCode_ = other.verificationCode_; + messageSessionUid_ = other.messageSessionUid_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateDeviceVerificationCodeRequest Clone() { + return new ValidateDeviceVerificationCodeRequest(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 3; + private string verificationCode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 4; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 5; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ValidateDeviceVerificationCodeRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ValidateDeviceVerificationCodeRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (ClientVersion != other.ClientVersion) return false; + if (VerificationCode != other.VerificationCode) return false; + if (MessageSessionUid != other.MessageSessionUid) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationCode); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(MessageSessionUid); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedDeviceToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationCode); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(MessageSessionUid); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedDeviceToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ValidateDeviceVerificationCodeRequest other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + VerificationCode = input.ReadString(); + break; + } + case 34: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 42: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + VerificationCode = input.ReadString(); + break; + } + case 34: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 42: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SendSessionMessageRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SendSessionMessageRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[86]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SendSessionMessageRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SendSessionMessageRequest(SendSessionMessageRequest other) : this() { + messageSessionUid_ = other.messageSessionUid_; + command_ = other.command_; + username_ = other.username_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SendSessionMessageRequest Clone() { + return new SendSessionMessageRequest(this); + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 1; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "command" field. + public const int CommandFieldNumber = 2; + private string command_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Command { + get { return command_; } + set { + command_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 3; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SendSessionMessageRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SendSessionMessageRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MessageSessionUid != other.MessageSessionUid) return false; + if (Command != other.Command) return false; + if (Username != other.Username) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (Command.Length != 0) hash ^= Command.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (Command.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Command); + } + if (Username.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (Command.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Command); + } + if (Username.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (Command.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Command); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SendSessionMessageRequest other) { + if (other == null) { + return; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + if (other.Command.Length != 0) { + Command = other.Command; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 18: { + Command = input.ReadString(); + break; + } + case 26: { + Username = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 18: { + Command = input.ReadString(); + break; + } + case 26: { + Username = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GlobalUserAccount : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GlobalUserAccount()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[87]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GlobalUserAccount() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GlobalUserAccount(GlobalUserAccount other) : this() { + username_ = other.username_; + accountUid_ = other.accountUid_; + regionName_ = other.regionName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GlobalUserAccount Clone() { + return new GlobalUserAccount(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 2; + private pb::ByteString accountUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AccountUid { + get { return accountUid_; } + set { + accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "regionName" field. + public const int RegionNameFieldNumber = 3; + private string regionName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RegionName { + get { return regionName_; } + set { + regionName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GlobalUserAccount); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GlobalUserAccount other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (AccountUid != other.AccountUid) return false; + if (RegionName != other.RegionName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (RegionName.Length != 0) hash ^= RegionName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AccountUid); + } + if (RegionName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RegionName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AccountUid); + } + if (RegionName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RegionName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (RegionName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RegionName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GlobalUserAccount other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.AccountUid.Length != 0) { + AccountUid = other.AccountUid; + } + if (other.RegionName.Length != 0) { + RegionName = other.RegionName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + case 26: { + RegionName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + case 26: { + RegionName = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AccountUsername : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AccountUsername()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[88]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountUsername() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountUsername(AccountUsername other) : this() { + username_ = other.username_; + dateActive_ = other.dateActive_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountUsername Clone() { + return new AccountUsername(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dateActive" field. + public const int DateActiveFieldNumber = 2; + private string dateActive_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DateActive { + get { return dateActive_; } + set { + dateActive_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AccountUsername); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AccountUsername other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (DateActive != other.DateActive) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (DateActive.Length != 0) hash ^= DateActive.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (DateActive.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DateActive); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (DateActive.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DateActive); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (DateActive.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DateActive); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AccountUsername other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.DateActive.Length != 0) { + DateActive = other.DateActive; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + DateActive = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + DateActive = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// This is the input to the get_sso_service_provider command. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoServiceProviderRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoServiceProviderRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[89]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoServiceProviderRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoServiceProviderRequest(SsoServiceProviderRequest other) : this() { + name_ = other.name_; + clientVersion_ = other.clientVersion_; + locale_ = other.locale_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoServiceProviderRequest Clone() { + return new SsoServiceProviderRequest(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// the name entered by the user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "locale" field. + public const int LocaleFieldNumber = 3; + private string locale_ = ""; + /// + /// such as "en_US" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Locale { + get { return locale_; } + set { + locale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoServiceProviderRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoServiceProviderRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (ClientVersion != other.ClientVersion) return false; + if (Locale != other.Locale) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (Locale.Length != 0) hash ^= Locale.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (Locale.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Locale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (Locale.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Locale); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (Locale.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Locale); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoServiceProviderRequest other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.Locale.Length != 0) { + Locale = other.Locale; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + Locale = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 26: { + Locale = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// This is the response from the get_sso_service_provider command. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoServiceProviderResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoServiceProviderResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[90]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoServiceProviderResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoServiceProviderResponse(SsoServiceProviderResponse other) : this() { + name_ = other.name_; + spUrl_ = other.spUrl_; + isCloud_ = other.isCloud_; + clientVersion_ = other.clientVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoServiceProviderResponse Clone() { + return new SsoServiceProviderResponse(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + /// + /// the official name + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "spUrl" field. + public const int SpUrlFieldNumber = 2; + private string spUrl_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SpUrl { + get { return spUrl_; } + set { + spUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "isCloud" field. + public const int IsCloudFieldNumber = 3; + private bool isCloud_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsCloud { + get { return isCloud_; } + set { + isCloud_ = value; + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 4; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoServiceProviderResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoServiceProviderResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (SpUrl != other.SpUrl) return false; + if (IsCloud != other.IsCloud) return false; + if (ClientVersion != other.ClientVersion) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (SpUrl.Length != 0) hash ^= SpUrl.GetHashCode(); + if (IsCloud != false) hash ^= IsCloud.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (SpUrl.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SpUrl); + } + if (IsCloud != false) { + output.WriteRawTag(24); + output.WriteBool(IsCloud); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ClientVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (SpUrl.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SpUrl); + } + if (IsCloud != false) { + output.WriteRawTag(24); + output.WriteBool(IsCloud); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ClientVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (SpUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SpUrl); + } + if (IsCloud != false) { + size += 1 + 1; + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoServiceProviderResponse other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.SpUrl.Length != 0) { + SpUrl = other.SpUrl; + } + if (other.IsCloud != false) { + IsCloud = other.IsCloud; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + SpUrl = input.ReadString(); + break; + } + case 24: { + IsCloud = input.ReadBool(); + break; + } + case 34: { + ClientVersion = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + SpUrl = input.ReadString(); + break; + } + case 24: { + IsCloud = input.ReadBool(); + break; + } + case 34: { + ClientVersion = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserSettingRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserSettingRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[91]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserSettingRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserSettingRequest(UserSettingRequest other) : this() { + setting_ = other.setting_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserSettingRequest Clone() { + return new UserSettingRequest(this); + } + + /// Field number for the "setting" field. + public const int SettingFieldNumber = 1; + private string setting_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Setting { + get { return setting_; } + set { + setting_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserSettingRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserSettingRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Setting != other.Setting) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Setting.Length != 0) hash ^= Setting.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Setting.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Setting); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Setting.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Setting); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Setting.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Setting); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserSettingRequest other) { + if (other == null) { + return; + } + if (other.Setting.Length != 0) { + Setting = other.Setting; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Setting = input.ReadString(); + break; + } + case 18: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Setting = input.ReadString(); + break; + } + case 18: { + Value = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ThrottleState : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThrottleState()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[92]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThrottleState() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThrottleState(ThrottleState other) : this() { + type_ = other.type_; + key_ = other.key_; + value_ = other.value_; + state_ = other.state_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThrottleState Clone() { + return new ThrottleState(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private global::Authentication.ThrottleType type_ = global::Authentication.ThrottleType.PasswordRetryThrottle; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.ThrottleType Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 2; + private string key_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 3; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "state" field. + public const int StateFieldNumber = 4; + private bool state_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool State { + get { return state_; } + set { + state_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ThrottleState); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ThrottleState other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Key != other.Key) return false; + if (Value != other.Value) return false; + if (State != other.State) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) hash ^= Type.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (State != false) hash ^= State.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (Key.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Key); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (State != false) { + output.WriteRawTag(32); + output.WriteBool(State); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (Key.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Key); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (State != false) { + output.WriteRawTag(32); + output.WriteBool(State); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (State != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ThrottleState other) { + if (other == null) { + return; + } + if (other.Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { + Type = other.Type; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + if (other.State != false) { + State = other.State; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Type = (global::Authentication.ThrottleType) input.ReadEnum(); + break; + } + case 18: { + Key = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + case 32: { + State = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Type = (global::Authentication.ThrottleType) input.ReadEnum(); + break; + } + case 18: { + Key = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + case 32: { + State = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ThrottleState2 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThrottleState2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[93]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThrottleState2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThrottleState2(ThrottleState2 other) : this() { + key_ = other.key_; + keyDescription_ = other.keyDescription_; + value_ = other.value_; + valueDescription_ = other.valueDescription_; + identifier_ = other.identifier_; + locked_ = other.locked_; + includedInAllClear_ = other.includedInAllClear_; + expireSeconds_ = other.expireSeconds_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ThrottleState2 Clone() { + return new ThrottleState2(this); + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private string key_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyDescription" field. + public const int KeyDescriptionFieldNumber = 2; + private string keyDescription_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string KeyDescription { + get { return keyDescription_; } + set { + keyDescription_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 3; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "valueDescription" field. + public const int ValueDescriptionFieldNumber = 4; + private string valueDescription_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ValueDescription { + get { return valueDescription_; } + set { + valueDescription_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "identifier" field. + public const int IdentifierFieldNumber = 5; + private string identifier_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Identifier { + get { return identifier_; } + set { + identifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "locked" field. + public const int LockedFieldNumber = 6; + private bool locked_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Locked { + get { return locked_; } + set { + locked_ = value; + } + } + + /// Field number for the "includedInAllClear" field. + public const int IncludedInAllClearFieldNumber = 7; + private bool includedInAllClear_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludedInAllClear { + get { return includedInAllClear_; } + set { + includedInAllClear_ = value; + } + } + + /// Field number for the "expireSeconds" field. + public const int ExpireSecondsFieldNumber = 8; + private int expireSeconds_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ExpireSeconds { + get { return expireSeconds_; } + set { + expireSeconds_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ThrottleState2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ThrottleState2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Key != other.Key) return false; + if (KeyDescription != other.KeyDescription) return false; + if (Value != other.Value) return false; + if (ValueDescription != other.ValueDescription) return false; + if (Identifier != other.Identifier) return false; + if (Locked != other.Locked) return false; + if (IncludedInAllClear != other.IncludedInAllClear) return false; + if (ExpireSeconds != other.ExpireSeconds) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (KeyDescription.Length != 0) hash ^= KeyDescription.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (ValueDescription.Length != 0) hash ^= ValueDescription.GetHashCode(); + if (Identifier.Length != 0) hash ^= Identifier.GetHashCode(); + if (Locked != false) hash ^= Locked.GetHashCode(); + if (IncludedInAllClear != false) hash ^= IncludedInAllClear.GetHashCode(); + if (ExpireSeconds != 0) hash ^= ExpireSeconds.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (KeyDescription.Length != 0) { + output.WriteRawTag(18); + output.WriteString(KeyDescription); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (ValueDescription.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ValueDescription); + } + if (Identifier.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Identifier); + } + if (Locked != false) { + output.WriteRawTag(48); + output.WriteBool(Locked); + } + if (IncludedInAllClear != false) { + output.WriteRawTag(56); + output.WriteBool(IncludedInAllClear); + } + if (ExpireSeconds != 0) { + output.WriteRawTag(64); + output.WriteInt32(ExpireSeconds); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (KeyDescription.Length != 0) { + output.WriteRawTag(18); + output.WriteString(KeyDescription); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (ValueDescription.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ValueDescription); + } + if (Identifier.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Identifier); + } + if (Locked != false) { + output.WriteRawTag(48); + output.WriteBool(Locked); + } + if (IncludedInAllClear != false) { + output.WriteRawTag(56); + output.WriteBool(IncludedInAllClear); + } + if (ExpireSeconds != 0) { + output.WriteRawTag(64); + output.WriteInt32(ExpireSeconds); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + } + if (KeyDescription.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyDescription); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (ValueDescription.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ValueDescription); + } + if (Identifier.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Identifier); + } + if (Locked != false) { + size += 1 + 1; + } + if (IncludedInAllClear != false) { + size += 1 + 1; + } + if (ExpireSeconds != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ExpireSeconds); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ThrottleState2 other) { + if (other == null) { + return; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.KeyDescription.Length != 0) { + KeyDescription = other.KeyDescription; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + if (other.ValueDescription.Length != 0) { + ValueDescription = other.ValueDescription; + } + if (other.Identifier.Length != 0) { + Identifier = other.Identifier; + } + if (other.Locked != false) { + Locked = other.Locked; + } + if (other.IncludedInAllClear != false) { + IncludedInAllClear = other.IncludedInAllClear; + } + if (other.ExpireSeconds != 0) { + ExpireSeconds = other.ExpireSeconds; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + KeyDescription = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + case 34: { + ValueDescription = input.ReadString(); + break; + } + case 42: { + Identifier = input.ReadString(); + break; + } + case 48: { + Locked = input.ReadBool(); + break; + } + case 56: { + IncludedInAllClear = input.ReadBool(); + break; + } + case 64: { + ExpireSeconds = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + KeyDescription = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + case 34: { + ValueDescription = input.ReadString(); + break; + } + case 42: { + Identifier = input.ReadString(); + break; + } + case 48: { + Locked = input.ReadBool(); + break; + } + case 56: { + IncludedInAllClear = input.ReadBool(); + break; + } + case 64: { + ExpireSeconds = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceInformation : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceInformation()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[94]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceInformation() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceInformation(DeviceInformation other) : this() { + deviceId_ = other.deviceId_; + deviceName_ = other.deviceName_; + clientVersion_ = other.clientVersion_; + lastLogin_ = other.lastLogin_; + deviceStatus_ = other.deviceStatus_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceInformation Clone() { + return new DeviceInformation(this); + } + + /// Field number for the "deviceId" field. + public const int DeviceIdFieldNumber = 1; + private long deviceId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DeviceId { + get { return deviceId_; } + set { + deviceId_ = value; + } + } + + /// Field number for the "deviceName" field. + public const int DeviceNameFieldNumber = 2; + private string deviceName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceName { + get { return deviceName_; } + set { + deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 3; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "lastLogin" field. + public const int LastLoginFieldNumber = 4; + private long lastLogin_; + /// + /// for get not save + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LastLogin { + get { return lastLogin_; } + set { + lastLogin_ = value; + } + } + + /// Field number for the "deviceStatus" field. + public const int DeviceStatusFieldNumber = 5; + private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.DeviceStatus DeviceStatus { + get { return deviceStatus_; } + set { + deviceStatus_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceInformation); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceInformation other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (DeviceId != other.DeviceId) return false; + if (DeviceName != other.DeviceName) return false; + if (ClientVersion != other.ClientVersion) return false; + if (LastLogin != other.LastLogin) return false; + if (DeviceStatus != other.DeviceStatus) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (DeviceId != 0L) hash ^= DeviceId.GetHashCode(); + if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (LastLogin != 0L) hash ^= LastLogin.GetHashCode(); + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (DeviceId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DeviceId); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ClientVersion); + } + if (LastLogin != 0L) { + output.WriteRawTag(32); + output.WriteInt64(LastLogin); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(40); + output.WriteEnum((int) DeviceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DeviceId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DeviceId); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ClientVersion); + } + if (LastLogin != 0L) { + output.WriteRawTag(32); + output.WriteInt64(LastLogin); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(40); + output.WriteEnum((int) DeviceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (DeviceId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeviceId); + } + if (DeviceName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (LastLogin != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastLogin); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceStatus); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceInformation other) { + if (other == null) { + return; + } + if (other.DeviceId != 0L) { + DeviceId = other.DeviceId; + } + if (other.DeviceName.Length != 0) { + DeviceName = other.DeviceName; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.LastLogin != 0L) { + LastLogin = other.LastLogin; + } + if (other.DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + DeviceStatus = other.DeviceStatus; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + DeviceId = input.ReadInt64(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + case 26: { + ClientVersion = input.ReadString(); + break; + } + case 32: { + LastLogin = input.ReadInt64(); + break; + } + case 40: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + DeviceId = input.ReadInt64(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + case 26: { + ClientVersion = input.ReadString(); + break; + } + case 32: { + LastLogin = input.ReadInt64(); + break; + } + case 40: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserSetting : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserSetting()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[95]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserSetting() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserSetting(UserSetting other) : this() { + name_ = other.name_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserSetting Clone() { + return new UserSetting(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 2; + private bool value_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Value { + get { return value_; } + set { + value_ = value; } - if (MessageSessionUid.Length != 0) { - output.WriteRawTag(106); - output.WriteBytes(MessageSessionUid); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserSetting); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserSetting other) { + if (ReferenceEquals(other, null)) { + return false; } - if (InstallReferrer.Length != 0) { - output.WriteRawTag(114); - output.WriteString(InstallReferrer); + if (ReferenceEquals(other, this)) { + return true; } - if (MccMNC != 0) { - output.WriteRawTag(120); - output.WriteInt32(MccMNC); + if (Name != other.Name) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Value != false) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } - if (Mfg.Length != 0) { - output.WriteRawTag(130, 1); - output.WriteString(Mfg); + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); } - if (Model.Length != 0) { - output.WriteRawTag(138, 1); - output.WriteString(Model); + if (Value != false) { + output.WriteRawTag(16); + output.WriteBool(Value); } - if (Brand.Length != 0) { - output.WriteRawTag(146, 1); - output.WriteString(Brand); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Product.Length != 0) { - output.WriteRawTag(154, 1); - output.WriteString(Product); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); } - if (Device.Length != 0) { - output.WriteRawTag(162, 1); - output.WriteString(Device); + if (Value != false) { + output.WriteRawTag(16); + output.WriteBool(Value); } - if (Carrier.Length != 0) { - output.WriteRawTag(170, 1); - output.WriteString(Carrier); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } - if (VerificationCode.Length != 0) { - output.WriteRawTag(178, 1); - output.WriteString(VerificationCode); + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Value != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserSetting other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Value != false) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Value = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Value = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserDataKeyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserDataKeyRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[96]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKeyRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKeyRequest(UserDataKeyRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKeyRequest Clone() { + return new UserDataKeyRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_enterpriseUserId_codec + = pb::FieldCodec.ForInt64(10); + private readonly pbc::RepeatedField enterpriseUserId_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserId { + get { return enterpriseUserId_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserDataKeyRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserDataKeyRequest other) { + if (ReferenceEquals(other, null)) { + return false; } - if (enterpriseRegistration_ != null) { - output.WriteRawTag(186, 1); - output.WriteMessage(EnterpriseRegistration); + if (ReferenceEquals(other, this)) { + return true; } - if (EncryptedVerificationToken.Length != 0) { - output.WriteRawTag(194, 1); - output.WriteBytes(EncryptedVerificationToken); + if(!enterpriseUserId_.Equals(other.enterpriseUserId_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= enterpriseUserId_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + enterpriseUserId_.WriteTo(output, _repeated_enterpriseUserId_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUserId_.WriteTo(ref output, _repeated_enterpriseUserId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (AuthVerifier.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuthVerifier); - } - if (EncryptionParams.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptionParams); - } - if (RsaPublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaPublicKey); - } - if (RsaEncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaEncryptedPrivateKey); - } - if (EccPublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccPublicKey); - } - if (EccEncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccEncryptedPrivateKey); - } - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (EncryptedClientKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } - if (EncryptedDeviceDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); - } - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); - } - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); - } - if (InstallReferrer.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(InstallReferrer); - } - if (MccMNC != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MccMNC); - } - if (Mfg.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(Mfg); - } - if (Model.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(Model); - } - if (Brand.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(Brand); - } - if (Product.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(Product); - } - if (Device.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(Device); - } - if (Carrier.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(Carrier); - } - if (VerificationCode.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); - } - if (enterpriseRegistration_ != null) { - size += 2 + pb::CodedOutputStream.ComputeMessageSize(EnterpriseRegistration); - } - if (EncryptedVerificationToken.Length != 0) { - size += 2 + pb::CodedOutputStream.ComputeBytesSize(EncryptedVerificationToken); - } + size += enterpriseUserId_.CalculateSize(_repeated_enterpriseUserId_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -11751,295 +30004,464 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(CreateUserRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserDataKeyRequest other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; + enterpriseUserId_.Add(other.enterpriseUserId_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - if (other.AuthVerifier.Length != 0) { - AuthVerifier = other.AuthVerifier; + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + enterpriseUserId_.AddEntriesFrom(input, _repeated_enterpriseUserId_codec); + break; + } + } } - if (other.EncryptionParams.Length != 0) { - EncryptionParams = other.EncryptionParams; + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - if (other.RsaPublicKey.Length != 0) { - RsaPublicKey = other.RsaPublicKey; + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + enterpriseUserId_.AddEntriesFrom(ref input, _repeated_enterpriseUserId_codec); + break; + } + } } - if (other.RsaEncryptedPrivateKey.Length != 0) { - RsaEncryptedPrivateKey = other.RsaEncryptedPrivateKey; + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserIdDataKeyPair : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserIdDataKeyPair()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[97]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserIdDataKeyPair() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserIdDataKeyPair(EnterpriseUserIdDataKeyPair other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + encryptedDataKey_ = other.encryptedDataKey_; + keyType_ = other.keyType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserIdDataKeyPair Clone() { + return new EnterpriseUserIdDataKeyPair(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; } - if (other.EccPublicKey.Length != 0) { - EccPublicKey = other.EccPublicKey; + } + + /// Field number for the "encryptedDataKey" field. + public const int EncryptedDataKeyFieldNumber = 2; + private pb::ByteString encryptedDataKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDataKey { + get { return encryptedDataKey_; } + set { + encryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - if (other.EccEncryptedPrivateKey.Length != 0) { - EccEncryptedPrivateKey = other.EccEncryptedPrivateKey; + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 3; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserIdDataKeyPair); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserIdDataKeyPair other) { + if (ReferenceEquals(other, null)) { + return false; } - if (other.EncryptedClientKey.Length != 0) { - EncryptedClientKey = other.EncryptedClientKey; + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedDataKey != other.EncryptedDataKey) return false; + if (KeyType != other.KeyType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedDataKey.Length != 0) hash ^= EncryptedDataKey.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (EncryptedDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDataKey); } - if (other.EncryptedDeviceDataKey.Length != 0) { - EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) KeyType); } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (other.InstallReferrer.Length != 0) { - InstallReferrer = other.InstallReferrer; + if (EncryptedDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDataKey); } - if (other.MccMNC != 0) { - MccMNC = other.MccMNC; + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) KeyType); } - if (other.Mfg.Length != 0) { - Mfg = other.Mfg; + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } - if (other.Model.Length != 0) { - Model = other.Model; + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (other.Brand.Length != 0) { - Brand = other.Brand; + if (EncryptedDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDataKey); } - if (other.Product.Length != 0) { - Product = other.Product; + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); } - if (other.Device.Length != 0) { - Device = other.Device; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); } - if (other.Carrier.Length != 0) { - Carrier = other.Carrier; + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserIdDataKeyPair other) { + if (other == null) { + return; } - if (other.VerificationCode.Length != 0) { - VerificationCode = other.VerificationCode; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.enterpriseRegistration_ != null) { - if (enterpriseRegistration_ == null) { - EnterpriseRegistration = new global::Enterprise.EnterpriseRegistration(); - } - EnterpriseRegistration.MergeFrom(other.EnterpriseRegistration); + if (other.EncryptedDataKey.Length != 0) { + EncryptedDataKey = other.EncryptedDataKey; } - if (other.EncryptedVerificationToken.Length != 0) { - EncryptedVerificationToken = other.EncryptedVerificationToken; + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Username = input.ReadString(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } case 18: { - AuthVerifier = input.ReadBytes(); - break; - } - case 26: { - EncryptionParams = input.ReadBytes(); - break; - } - case 34: { - RsaPublicKey = input.ReadBytes(); - break; - } - case 42: { - RsaEncryptedPrivateKey = input.ReadBytes(); - break; - } - case 50: { - EccPublicKey = input.ReadBytes(); - break; - } - case 58: { - EccEncryptedPrivateKey = input.ReadBytes(); - break; - } - case 66: { - EncryptedDeviceToken = input.ReadBytes(); - break; - } - case 74: { - EncryptedClientKey = input.ReadBytes(); - break; - } - case 82: { - ClientVersion = input.ReadString(); - break; - } - case 90: { - EncryptedDeviceDataKey = input.ReadBytes(); - break; - } - case 98: { - EncryptedLoginToken = input.ReadBytes(); - break; - } - case 106: { - MessageSessionUid = input.ReadBytes(); - break; - } - case 114: { - InstallReferrer = input.ReadString(); - break; - } - case 120: { - MccMNC = input.ReadInt32(); - break; - } - case 130: { - Mfg = input.ReadString(); - break; - } - case 138: { - Model = input.ReadString(); - break; - } - case 146: { - Brand = input.ReadString(); - break; - } - case 154: { - Product = input.ReadString(); + EncryptedDataKey = input.ReadBytes(); break; } - case 162: { - Device = input.ReadString(); + case 24: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); break; } - case 170: { - Carrier = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 178: { - VerificationCode = input.ReadString(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } - case 186: { - if (enterpriseRegistration_ == null) { - EnterpriseRegistration = new global::Enterprise.EnterpriseRegistration(); - } - input.ReadMessage(EnterpriseRegistration); + case 18: { + EncryptedDataKey = input.ReadBytes(); break; } - case 194: { - EncryptedVerificationToken = input.ReadBytes(); + case 24: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class NodeEnforcementAddOrUpdateRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeEnforcementAddOrUpdateRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserDataKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserDataKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[51]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[98]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public NodeEnforcementAddOrUpdateRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKey() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public NodeEnforcementAddOrUpdateRequest(NodeEnforcementAddOrUpdateRequest other) : this() { - nodeId_ = other.nodeId_; - enforcement_ = other.enforcement_; - value_ = other.value_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKey(UserDataKey other) : this() { + roleId_ = other.roleId_; + roleKey_ = other.roleKey_; + privateKey_ = other.privateKey_; + enterpriseUserIdDataKeyPairs_ = other.enterpriseUserIdDataKeyPairs_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public NodeEnforcementAddOrUpdateRequest Clone() { - return new NodeEnforcementAddOrUpdateRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKey Clone() { + return new UserDataKey(this); } - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 1; - private long nodeId_; + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } set { - nodeId_ = value; + roleId_ = value; } } - /// Field number for the "enforcement" field. - public const int EnforcementFieldNumber = 2; - private string enforcement_ = ""; + /// Field number for the "roleKey" field. + public const int RoleKeyFieldNumber = 2; + private pb::ByteString roleKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Enforcement { - get { return enforcement_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RoleKey { + get { return roleKey_; } set { - enforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + roleKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 3; - private string value_ = ""; + /// Field number for the "privateKey" field. + public const int PrivateKeyFieldNumber = 3; + private string privateKey_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PrivateKey { + get { return privateKey_; } set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + privateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "enterpriseUserIdDataKeyPairs" field. + public const int EnterpriseUserIdDataKeyPairsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_enterpriseUserIdDataKeyPairs_codec + = pb::FieldCodec.ForMessage(34, global::Authentication.EnterpriseUserIdDataKeyPair.Parser); + private readonly pbc::RepeatedField enterpriseUserIdDataKeyPairs_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIdDataKeyPairs { + get { return enterpriseUserIdDataKeyPairs_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as NodeEnforcementAddOrUpdateRequest); + return Equals(other as UserDataKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(NodeEnforcementAddOrUpdateRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserDataKey other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; - } - if (NodeId != other.NodeId) return false; - if (Enforcement != other.Enforcement) return false; - if (Value != other.Value) return false; + } + if (RoleId != other.RoleId) return false; + if (RoleKey != other.RoleKey) return false; + if (PrivateKey != other.PrivateKey) return false; + if(!enterpriseUserIdDataKeyPairs_.Equals(other.enterpriseUserIdDataKeyPairs_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (Enforcement.Length != 0) hash ^= Enforcement.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (RoleKey.Length != 0) hash ^= RoleKey.GetHashCode(); + if (PrivateKey.Length != 0) hash ^= PrivateKey.GetHashCode(); + hash ^= enterpriseUserIdDataKeyPairs_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12047,41 +30469,73 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (NodeId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { output.WriteRawTag(8); - output.WriteInt64(NodeId); + output.WriteInt64(RoleId); } - if (Enforcement.Length != 0) { + if (RoleKey.Length != 0) { output.WriteRawTag(18); - output.WriteString(Enforcement); + output.WriteBytes(RoleKey); } - if (Value.Length != 0) { + if (PrivateKey.Length != 0) { output.WriteRawTag(26); - output.WriteString(Value); + output.WriteString(PrivateKey); } + enterpriseUserIdDataKeyPairs_.WriteTo(output, _repeated_enterpriseUserIdDataKeyPairs_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (RoleKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RoleKey); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PrivateKey); + } + enterpriseUserIdDataKeyPairs_.WriteTo(ref output, _repeated_enterpriseUserIdDataKeyPairs_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); } - if (Enforcement.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Enforcement); + if (RoleKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleKey); } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (PrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PrivateKey); } + size += enterpriseUserIdDataKeyPairs_.CalculateSize(_repeated_enterpriseUserIdDataKeyPairs_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -12089,128 +30543,206 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(NodeEnforcementAddOrUpdateRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserDataKey other) { if (other == null) { return; } - if (other.NodeId != 0L) { - NodeId = other.NodeId; + if (other.RoleId != 0L) { + RoleId = other.RoleId; } - if (other.Enforcement.Length != 0) { - Enforcement = other.Enforcement; + if (other.RoleKey.Length != 0) { + RoleKey = other.RoleKey; } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.PrivateKey.Length != 0) { + PrivateKey = other.PrivateKey; } + enterpriseUserIdDataKeyPairs_.Add(other.enterpriseUserIdDataKeyPairs_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - NodeId = input.ReadInt64(); + RoleId = input.ReadInt64(); break; } case 18: { - Enforcement = input.ReadString(); + RoleKey = input.ReadBytes(); break; } case 26: { - Value = input.ReadString(); + PrivateKey = input.ReadString(); + break; + } + case 34: { + enterpriseUserIdDataKeyPairs_.AddEntriesFrom(input, _repeated_enterpriseUserIdDataKeyPairs_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + RoleKey = input.ReadBytes(); + break; + } + case 26: { + PrivateKey = input.ReadString(); + break; + } + case 34: { + enterpriseUserIdDataKeyPairs_.AddEntriesFrom(ref input, _repeated_enterpriseUserIdDataKeyPairs_codec); break; } } } } + #endif } - public sealed partial class NodeEnforcementRemoveRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeEnforcementRemoveRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserDataKeyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserDataKeyResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[52]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[99]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public NodeEnforcementRemoveRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKeyResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public NodeEnforcementRemoveRequest(NodeEnforcementRemoveRequest other) : this() { - nodeId_ = other.nodeId_; - enforcement_ = other.enforcement_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKeyResponse(UserDataKeyResponse other) : this() { + userDataKeys_ = other.userDataKeys_.Clone(); + accessDenied_ = other.accessDenied_.Clone(); + noEncryptedDataKey_ = other.noEncryptedDataKey_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public NodeEnforcementRemoveRequest Clone() { - return new NodeEnforcementRemoveRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserDataKeyResponse Clone() { + return new UserDataKeyResponse(this); } - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 1; - private long nodeId_; + /// Field number for the "userDataKeys" field. + public const int UserDataKeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_userDataKeys_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.UserDataKey.Parser); + private readonly pbc::RepeatedField userDataKeys_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserDataKeys { + get { return userDataKeys_; } } - /// Field number for the "enforcement" field. - public const int EnforcementFieldNumber = 2; - private string enforcement_ = ""; + /// Field number for the "accessDenied" field. + public const int AccessDeniedFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_accessDenied_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField accessDenied_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Enforcement { - get { return enforcement_; } - set { - enforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AccessDenied { + get { return accessDenied_; } + } + + /// Field number for the "noEncryptedDataKey" field. + public const int NoEncryptedDataKeyFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_noEncryptedDataKey_codec + = pb::FieldCodec.ForInt64(26); + private readonly pbc::RepeatedField noEncryptedDataKey_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField NoEncryptedDataKey { + get { return noEncryptedDataKey_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as NodeEnforcementRemoveRequest); + return Equals(other as UserDataKeyResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(NodeEnforcementRemoveRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserDataKeyResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (NodeId != other.NodeId) return false; - if (Enforcement != other.Enforcement) return false; + if(!userDataKeys_.Equals(other.userDataKeys_)) return false; + if(!accessDenied_.Equals(other.accessDenied_)) return false; + if(!noEncryptedDataKey_.Equals(other.noEncryptedDataKey_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (Enforcement.Length != 0) hash ^= Enforcement.GetHashCode(); + hash ^= userDataKeys_.GetHashCode(); + hash ^= accessDenied_.GetHashCode(); + hash ^= noEncryptedDataKey_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12218,34 +30750,46 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (NodeId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(NodeId); - } - if (Enforcement.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Enforcement); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + userDataKeys_.WriteTo(output, _repeated_userDataKeys_codec); + accessDenied_.WriteTo(output, _repeated_accessDenied_codec); + noEncryptedDataKey_.WriteTo(output, _repeated_noEncryptedDataKey_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + userDataKeys_.WriteTo(ref output, _repeated_userDataKeys_codec); + accessDenied_.WriteTo(ref output, _repeated_accessDenied_codec); + noEncryptedDataKey_.WriteTo(ref output, _repeated_noEncryptedDataKey_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (Enforcement.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Enforcement); - } + size += userDataKeys_.CalculateSize(_repeated_userDataKeys_codec); + size += accessDenied_.CalculateSize(_repeated_accessDenied_codec); + size += noEncryptedDataKey_.CalculateSize(_repeated_noEncryptedDataKey_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -12253,106 +30797,168 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(NodeEnforcementRemoveRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserDataKeyResponse other) { if (other == null) { return; } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.Enforcement.Length != 0) { - Enforcement = other.Enforcement; - } + userDataKeys_.Add(other.userDataKeys_); + accessDenied_.Add(other.accessDenied_); + noEncryptedDataKey_.Add(other.noEncryptedDataKey_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - NodeId = input.ReadInt64(); + case 10: { + userDataKeys_.AddEntriesFrom(input, _repeated_userDataKeys_codec); break; } - case 18: { - Enforcement = input.ReadString(); + case 18: + case 16: { + accessDenied_.AddEntriesFrom(input, _repeated_accessDenied_codec); + break; + } + case 26: + case 24: { + noEncryptedDataKey_.AddEntriesFrom(input, _repeated_noEncryptedDataKey_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + userDataKeys_.AddEntriesFrom(ref input, _repeated_userDataKeys_codec); + break; + } + case 18: + case 16: { + accessDenied_.AddEntriesFrom(ref input, _repeated_accessDenied_codec); + break; + } + case 26: + case 24: { + noEncryptedDataKey_.AddEntriesFrom(ref input, _repeated_noEncryptedDataKey_codec); break; } } } } + #endif } - public sealed partial class UserAccounts : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAccounts()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MasterPasswordRecoveryVerificationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MasterPasswordRecoveryVerificationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[53]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[100]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAccounts() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordRecoveryVerificationRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAccounts(UserAccounts other) : this() { - accountUid_ = other.accountUid_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordRecoveryVerificationRequest(MasterPasswordRecoveryVerificationRequest other) : this() { + encryptedLoginToken_ = other.encryptedLoginToken_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAccounts Clone() { - return new UserAccounts(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MasterPasswordRecoveryVerificationRequest Clone() { + return new MasterPasswordRecoveryVerificationRequest(this); } - /// Field number for the "accountUid" field. - public const int AccountUidFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_accountUid_codec - = pb::FieldCodec.ForBytes(10); - private readonly pbc::RepeatedField accountUid_ = new pbc::RepeatedField(); + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 1; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField AccountUid { - get { return accountUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } + set { + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserAccounts); + return Equals(other as MasterPasswordRecoveryVerificationRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserAccounts other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MasterPasswordRecoveryVerificationRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!accountUid_.Equals(other.accountUid_)) return false; + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= accountUid_.GetHashCode(); + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12360,22 +30966,48 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - accountUid_.WriteTo(output, _repeated_accountUid_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += accountUid_.CalculateSize(_repeated_accountUid_codec); + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -12383,168 +31015,163 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserAccounts other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MasterPasswordRecoveryVerificationRequest other) { if (other == null) { return; } - accountUid_.Add(other.accountUid_); + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - accountUid_.AddEntriesFrom(input, _repeated_accountUid_codec); + EncryptedLoginToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedLoginToken = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class ApiRequestByKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApiRequestByKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetSecurityQuestionV3Request : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSecurityQuestionV3Request()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[54]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[101]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApiRequestByKey() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSecurityQuestionV3Request() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApiRequestByKey(ApiRequestByKey other) : this() { - keyId_ = other.keyId_; - payload_ = other.payload_; - username_ = other.username_; - locale_ = other.locale_; - supportedLanguage_ = other.supportedLanguage_; - type_ = other.type_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSecurityQuestionV3Request(GetSecurityQuestionV3Request other) : this() { + encryptedLoginToken_ = other.encryptedLoginToken_; + verificationCode_ = other.verificationCode_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApiRequestByKey Clone() { - return new ApiRequestByKey(this); - } - - /// Field number for the "keyId" field. - public const int KeyIdFieldNumber = 1; - private int keyId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int KeyId { - get { return keyId_; } - set { - keyId_ = value; - } - } - - /// Field number for the "payload" field. - public const int PayloadFieldNumber = 2; - private pb::ByteString payload_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Payload { - get { return payload_; } - set { - payload_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 3; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "locale" field. - public const int LocaleFieldNumber = 4; - private string locale_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Locale { - get { return locale_; } - set { - locale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSecurityQuestionV3Request Clone() { + return new GetSecurityQuestionV3Request(this); } - /// Field number for the "supportedLanguage" field. - public const int SupportedLanguageFieldNumber = 5; - private global::Authentication.SupportedLanguage supportedLanguage_ = global::Authentication.SupportedLanguage.English; + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 1; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.SupportedLanguage SupportedLanguage { - get { return supportedLanguage_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } set { - supportedLanguage_ = value; + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "type" field. - public const int TypeFieldNumber = 6; - private int type_; + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 2; + private string verificationCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Type { - get { return type_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } set { - type_ = value; + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ApiRequestByKey); + return Equals(other as GetSecurityQuestionV3Request); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ApiRequestByKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetSecurityQuestionV3Request other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (KeyId != other.KeyId) return false; - if (Payload != other.Payload) return false; - if (Username != other.Username) return false; - if (Locale != other.Locale) return false; - if (SupportedLanguage != other.SupportedLanguage) return false; - if (Type != other.Type) return false; + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (VerificationCode != other.VerificationCode) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (KeyId != 0) hash ^= KeyId.GetHashCode(); - if (Payload.Length != 0) hash ^= Payload.GetHashCode(); - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (Locale.Length != 0) hash ^= Locale.GetHashCode(); - if (SupportedLanguage != global::Authentication.SupportedLanguage.English) hash ^= SupportedLanguage.GetHashCode(); - if (Type != 0) hash ^= Type.GetHashCode(); + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12552,61 +31179,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (KeyId != 0) { - output.WriteRawTag(8); - output.WriteInt32(KeyId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); } - if (Payload.Length != 0) { + if (VerificationCode.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(Payload); - } - if (Username.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Username); + output.WriteString(VerificationCode); } - if (Locale.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Locale); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { - output.WriteRawTag(40); - output.WriteEnum((int) SupportedLanguage); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); } - if (Type != 0) { - output.WriteRawTag(48); - output.WriteInt32(Type); + if (VerificationCode.Length != 0) { + output.WriteRawTag(18); + output.WriteString(VerificationCode); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (KeyId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(KeyId); - } - if (Payload.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Payload); - } - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (Locale.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Locale); - } - if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SupportedLanguage); + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); } - if (Type != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Type); + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -12615,149 +31239,204 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ApiRequestByKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetSecurityQuestionV3Request other) { if (other == null) { return; } - if (other.KeyId != 0) { - KeyId = other.KeyId; - } - if (other.Payload.Length != 0) { - Payload = other.Payload; - } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.Locale.Length != 0) { - Locale = other.Locale; - } - if (other.SupportedLanguage != global::Authentication.SupportedLanguage.English) { - SupportedLanguage = other.SupportedLanguage; + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; } - if (other.Type != 0) { - Type = other.Type; + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - KeyId = input.ReadInt32(); + case 10: { + EncryptedLoginToken = input.ReadBytes(); break; } case 18: { - Payload = input.ReadBytes(); - break; - } - case 26: { - Username = input.ReadString(); + VerificationCode = input.ReadString(); break; } - case 34: { - Locale = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 40: { - SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + case 10: { + EncryptedLoginToken = input.ReadBytes(); break; } - case 48: { - Type = input.ReadInt32(); + case 18: { + VerificationCode = input.ReadString(); break; } } } } + #endif } - public sealed partial class MemcacheRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MemcacheRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetSecurityQuestionV3Response : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSecurityQuestionV3Response()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[55]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[102]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MemcacheRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSecurityQuestionV3Response() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MemcacheRequest(MemcacheRequest other) : this() { - key_ = other.key_; - userId_ = other.userId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSecurityQuestionV3Response(GetSecurityQuestionV3Response other) : this() { + securityQuestion_ = other.securityQuestion_; + backupKeyDate_ = other.backupKeyDate_; + salt_ = other.salt_; + iterations_ = other.iterations_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MemcacheRequest Clone() { - return new MemcacheRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSecurityQuestionV3Response Clone() { + return new GetSecurityQuestionV3Response(this); } - /// Field number for the "key" field. - public const int KeyFieldNumber = 1; - private string key_ = ""; + /// Field number for the "securityQuestion" field. + public const int SecurityQuestionFieldNumber = 1; + private string securityQuestion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Key { - get { return key_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SecurityQuestion { + get { return securityQuestion_; } set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + securityQuestion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 2; - private int userId_; + /// Field number for the "backupKeyDate" field. + public const int BackupKeyDateFieldNumber = 2; + private long backupKeyDate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UserId { - get { return userId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BackupKeyDate { + get { return backupKeyDate_; } set { - userId_ = value; + backupKeyDate_ = value; + } + } + + /// Field number for the "salt" field. + public const int SaltFieldNumber = 3; + private pb::ByteString salt_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Salt { + get { return salt_; } + set { + salt_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "iterations" field. + public const int IterationsFieldNumber = 4; + private int iterations_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Iterations { + get { return iterations_; } + set { + iterations_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MemcacheRequest); + return Equals(other as GetSecurityQuestionV3Response); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MemcacheRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetSecurityQuestionV3Response other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Key != other.Key) return false; - if (UserId != other.UserId) return false; + if (SecurityQuestion != other.SecurityQuestion) return false; + if (BackupKeyDate != other.BackupKeyDate) return false; + if (Salt != other.Salt) return false; + if (Iterations != other.Iterations) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Key.Length != 0) hash ^= Key.GetHashCode(); - if (UserId != 0) hash ^= UserId.GetHashCode(); + if (SecurityQuestion.Length != 0) hash ^= SecurityQuestion.GetHashCode(); + if (BackupKeyDate != 0L) hash ^= BackupKeyDate.GetHashCode(); + if (Salt.Length != 0) hash ^= Salt.GetHashCode(); + if (Iterations != 0) hash ^= Iterations.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12765,33 +31444,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Key.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SecurityQuestion.Length != 0) { output.WriteRawTag(10); - output.WriteString(Key); + output.WriteString(SecurityQuestion); } - if (UserId != 0) { + if (BackupKeyDate != 0L) { output.WriteRawTag(16); - output.WriteInt32(UserId); + output.WriteInt64(BackupKeyDate); + } + if (Salt.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Salt); + } + if (Iterations != 0) { + output.WriteRawTag(32); + output.WriteInt32(Iterations); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SecurityQuestion.Length != 0) { + output.WriteRawTag(10); + output.WriteString(SecurityQuestion); + } + if (BackupKeyDate != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BackupKeyDate); + } + if (Salt.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Salt); + } + if (Iterations != 0) { + output.WriteRawTag(32); + output.WriteInt32(Iterations); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + if (SecurityQuestion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SecurityQuestion); } - if (UserId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + if (BackupKeyDate != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BackupKeyDate); + } + if (Salt.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Salt); + } + if (Iterations != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Iterations); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -12800,121 +31526,211 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MemcacheRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetSecurityQuestionV3Response other) { if (other == null) { return; } - if (other.Key.Length != 0) { - Key = other.Key; + if (other.SecurityQuestion.Length != 0) { + SecurityQuestion = other.SecurityQuestion; } - if (other.UserId != 0) { - UserId = other.UserId; + if (other.BackupKeyDate != 0L) { + BackupKeyDate = other.BackupKeyDate; + } + if (other.Salt.Length != 0) { + Salt = other.Salt; + } + if (other.Iterations != 0) { + Iterations = other.Iterations; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Key = input.ReadString(); + SecurityQuestion = input.ReadString(); break; } case 16: { - UserId = input.ReadInt32(); + BackupKeyDate = input.ReadInt64(); + break; + } + case 26: { + Salt = input.ReadBytes(); + break; + } + case 32: { + Iterations = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SecurityQuestion = input.ReadString(); + break; + } + case 16: { + BackupKeyDate = input.ReadInt64(); + break; + } + case 26: { + Salt = input.ReadBytes(); + break; + } + case 32: { + Iterations = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class MemcacheResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MemcacheResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetDataKeyBackupV3Request : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetDataKeyBackupV3Request()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[56]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[103]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MemcacheResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDataKeyBackupV3Request() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MemcacheResponse(MemcacheResponse other) : this() { - key_ = other.key_; - value_ = other.value_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDataKeyBackupV3Request(GetDataKeyBackupV3Request other) : this() { + encryptedLoginToken_ = other.encryptedLoginToken_; + verificationCode_ = other.verificationCode_; + securityAnswerHash_ = other.securityAnswerHash_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MemcacheResponse Clone() { - return new MemcacheResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDataKeyBackupV3Request Clone() { + return new GetDataKeyBackupV3Request(this); } - /// Field number for the "key" field. - public const int KeyFieldNumber = 1; - private string key_ = ""; + /// Field number for the "encryptedLoginToken" field. + public const int EncryptedLoginTokenFieldNumber = 1; + private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Key { - get { return key_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedLoginToken { + get { return encryptedLoginToken_; } set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 2; - private string value_ = ""; + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 2; + private string verificationCode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "securityAnswerHash" field. + public const int SecurityAnswerHashFieldNumber = 3; + private pb::ByteString securityAnswerHash_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SecurityAnswerHash { + get { return securityAnswerHash_; } set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + securityAnswerHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MemcacheResponse); + return Equals(other as GetDataKeyBackupV3Request); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MemcacheResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetDataKeyBackupV3Request other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Key != other.Key) return false; - if (Value != other.Value) return false; + if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (VerificationCode != other.VerificationCode) return false; + if (SecurityAnswerHash != other.SecurityAnswerHash) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Key.Length != 0) hash ^= Key.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (SecurityAnswerHash.Length != 0) hash ^= SecurityAnswerHash.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12922,33 +31738,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Key.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedLoginToken.Length != 0) { output.WriteRawTag(10); - output.WriteString(Key); + output.WriteBytes(EncryptedLoginToken); } - if (Value.Length != 0) { + if (VerificationCode.Length != 0) { output.WriteRawTag(18); - output.WriteString(Value); + output.WriteString(VerificationCode); + } + if (SecurityAnswerHash.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SecurityAnswerHash); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedLoginToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedLoginToken); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(18); + output.WriteString(VerificationCode); + } + if (SecurityAnswerHash.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SecurityAnswerHash); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (SecurityAnswerHash.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecurityAnswerHash); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -12957,155 +31809,348 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MemcacheResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetDataKeyBackupV3Request other) { if (other == null) { return; } - if (other.Key.Length != 0) { - Key = other.Key; + if (other.EncryptedLoginToken.Length != 0) { + EncryptedLoginToken = other.EncryptedLoginToken; } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + if (other.SecurityAnswerHash.Length != 0) { + SecurityAnswerHash = other.SecurityAnswerHash; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Key = input.ReadString(); + EncryptedLoginToken = input.ReadBytes(); break; } case 18: { - Value = input.ReadString(); + VerificationCode = input.ReadString(); + break; + } + case 26: { + SecurityAnswerHash = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 18: { + VerificationCode = input.ReadString(); + break; + } + case 26: { + SecurityAnswerHash = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class MasterPasswordReentryRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MasterPasswordReentryRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PasswordRules : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PasswordRules()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[57]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[104]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MasterPasswordReentryRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PasswordRules() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MasterPasswordReentryRequest(MasterPasswordReentryRequest other) : this() { - pbkdf2Password_ = other.pbkdf2Password_; - action_ = other.action_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PasswordRules(PasswordRules other) : this() { + ruleType_ = other.ruleType_; + match_ = other.match_; + pattern_ = other.pattern_; + description_ = other.description_; + minimum_ = other.minimum_; + value_ = other.value_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MasterPasswordReentryRequest Clone() { - return new MasterPasswordReentryRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PasswordRules Clone() { + return new PasswordRules(this); } - /// Field number for the "pbkdf2Password" field. - public const int Pbkdf2PasswordFieldNumber = 1; - private string pbkdf2Password_ = ""; + /// Field number for the "ruleType" field. + public const int RuleTypeFieldNumber = 1; + private string ruleType_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Pbkdf2Password { - get { return pbkdf2Password_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RuleType { + get { return ruleType_; } set { - pbkdf2Password_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + ruleType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "action" field. - public const int ActionFieldNumber = 2; - private global::Authentication.MasterPasswordReentryActionType action_ = global::Authentication.MasterPasswordReentryActionType.Unmask; + /// Field number for the "match" field. + public const int MatchFieldNumber = 2; + private bool match_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.MasterPasswordReentryActionType Action { - get { return action_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Match { + get { return match_; } set { - action_ = value; + match_ = value; + } + } + + /// Field number for the "pattern" field. + public const int PatternFieldNumber = 3; + private string pattern_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Pattern { + get { return pattern_; } + set { + pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "description" field. + public const int DescriptionFieldNumber = 4; + private string description_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Description { + get { return description_; } + set { + description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "minimum" field. + public const int MinimumFieldNumber = 5; + private int minimum_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Minimum { + get { return minimum_; } + set { + minimum_ = value; + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 6; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MasterPasswordReentryRequest); + return Equals(other as PasswordRules); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MasterPasswordReentryRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PasswordRules other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Pbkdf2Password != other.Pbkdf2Password) return false; - if (Action != other.Action) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (Pbkdf2Password.Length != 0) hash ^= Pbkdf2Password.GetHashCode(); - if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) hash ^= Action.GetHashCode(); + if (RuleType != other.RuleType) return false; + if (Match != other.Match) return false; + if (Pattern != other.Pattern) return false; + if (Description != other.Description) return false; + if (Minimum != other.Minimum) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RuleType.Length != 0) hash ^= RuleType.GetHashCode(); + if (Match != false) hash ^= Match.GetHashCode(); + if (Pattern.Length != 0) hash ^= Pattern.GetHashCode(); + if (Description.Length != 0) hash ^= Description.GetHashCode(); + if (Minimum != 0) hash ^= Minimum.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RuleType.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RuleType); + } + if (Match != false) { + output.WriteRawTag(16); + output.WriteBool(Match); + } + if (Pattern.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Pattern); + } + if (Description.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Description); + } + if (Minimum != 0) { + output.WriteRawTag(40); + output.WriteInt32(Minimum); + } + if (Value.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Value); + } if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); + _unknownFields.WriteTo(output); } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Pbkdf2Password.Length != 0) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RuleType.Length != 0) { output.WriteRawTag(10); - output.WriteString(Pbkdf2Password); + output.WriteString(RuleType); } - if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { + if (Match != false) { output.WriteRawTag(16); - output.WriteEnum((int) Action); + output.WriteBool(Match); + } + if (Pattern.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Pattern); + } + if (Description.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Description); + } + if (Minimum != 0) { + output.WriteRawTag(40); + output.WriteInt32(Minimum); + } + if (Value.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Value); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Pbkdf2Password.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Pbkdf2Password); + if (RuleType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RuleType); } - if (Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Action); + if (Match != false) { + size += 1 + 1; + } + if (Pattern.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Pattern); + } + if (Description.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); + } + if (Minimum != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minimum); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13114,135 +32159,343 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MasterPasswordReentryRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PasswordRules other) { if (other == null) { return; } - if (other.Pbkdf2Password.Length != 0) { - Pbkdf2Password = other.Pbkdf2Password; + if (other.RuleType.Length != 0) { + RuleType = other.RuleType; } - if (other.Action != global::Authentication.MasterPasswordReentryActionType.Unmask) { - Action = other.Action; + if (other.Match != false) { + Match = other.Match; + } + if (other.Pattern.Length != 0) { + Pattern = other.Pattern; + } + if (other.Description.Length != 0) { + Description = other.Description; + } + if (other.Minimum != 0) { + Minimum = other.Minimum; + } + if (other.Value.Length != 0) { + Value = other.Value; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Pbkdf2Password = input.ReadString(); + RuleType = input.ReadString(); break; } case 16: { - Action = (global::Authentication.MasterPasswordReentryActionType) input.ReadEnum(); + Match = input.ReadBool(); + break; + } + case 26: { + Pattern = input.ReadString(); + break; + } + case 34: { + Description = input.ReadString(); + break; + } + case 40: { + Minimum = input.ReadInt32(); + break; + } + case 50: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RuleType = input.ReadString(); + break; + } + case 16: { + Match = input.ReadBool(); + break; + } + case 26: { + Pattern = input.ReadString(); + break; + } + case 34: { + Description = input.ReadString(); + break; + } + case 40: { + Minimum = input.ReadInt32(); + break; + } + case 50: { + Value = input.ReadString(); break; } } } } + #endif } - public sealed partial class DeviceRegistrationRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceRegistrationRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetDataKeyBackupV3Response : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetDataKeyBackupV3Response()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[58]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[105]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceRegistrationRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDataKeyBackupV3Response() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceRegistrationRequest(DeviceRegistrationRequest other) : this() { - clientVersion_ = other.clientVersion_; - deviceName_ = other.deviceName_; - devicePublicKey_ = other.devicePublicKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDataKeyBackupV3Response(GetDataKeyBackupV3Response other) : this() { + dataKeyBackup_ = other.dataKeyBackup_; + dataKeyBackupDate_ = other.dataKeyBackupDate_; + publicKey_ = other.publicKey_; + encryptedPrivateKey_ = other.encryptedPrivateKey_; + clientKey_ = other.clientKey_; + encryptedSessionToken_ = other.encryptedSessionToken_; + passwordRules_ = other.passwordRules_.Clone(); + passwordRulesIntro_ = other.passwordRulesIntro_; + minimumPbkdf2Iterations_ = other.minimumPbkdf2Iterations_; + keyType_ = other.keyType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceRegistrationRequest Clone() { - return new DeviceRegistrationRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDataKeyBackupV3Response Clone() { + return new GetDataKeyBackupV3Response(this); } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 1; - private string clientVersion_ = ""; + /// Field number for the "dataKeyBackup" field. + public const int DataKeyBackupFieldNumber = 1; + private pb::ByteString dataKeyBackup_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DataKeyBackup { + get { return dataKeyBackup_; } set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + dataKeyBackup_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dataKeyBackupDate" field. + public const int DataKeyBackupDateFieldNumber = 2; + private long dataKeyBackupDate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DataKeyBackupDate { + get { return dataKeyBackupDate_; } + set { + dataKeyBackupDate_ = value; + } + } + + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 3; + private pb::ByteString publicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } + set { + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedPrivateKey" field. + public const int EncryptedPrivateKeyFieldNumber = 4; + private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedPrivateKey { + get { return encryptedPrivateKey_; } + set { + encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientKey" field. + public const int ClientKeyFieldNumber = 5; + private pb::ByteString clientKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ClientKey { + get { return clientKey_; } + set { + clientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedSessionToken" field. + public const int EncryptedSessionTokenFieldNumber = 6; + private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedSessionToken { + get { return encryptedSessionToken_; } + set { + encryptedSessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "passwordRules" field. + public const int PasswordRulesFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_passwordRules_codec + = pb::FieldCodec.ForMessage(58, global::Authentication.PasswordRules.Parser); + private readonly pbc::RepeatedField passwordRules_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField PasswordRules { + get { return passwordRules_; } + } + + /// Field number for the "passwordRulesIntro" field. + public const int PasswordRulesIntroFieldNumber = 8; + private string passwordRulesIntro_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PasswordRulesIntro { + get { return passwordRulesIntro_; } + set { + passwordRulesIntro_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "deviceName" field. - public const int DeviceNameFieldNumber = 2; - private string deviceName_ = ""; + /// Field number for the "minimumPbkdf2Iterations" field. + public const int MinimumPbkdf2IterationsFieldNumber = 9; + private int minimumPbkdf2Iterations_; + /// + ///when EnforcementType.MINIMUM_PBKDF2_ITERATIONS exists + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceName { - get { return deviceName_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MinimumPbkdf2Iterations { + get { return minimumPbkdf2Iterations_; } set { - deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + minimumPbkdf2Iterations_ = value; } } - /// Field number for the "devicePublicKey" field. - public const int DevicePublicKeyFieldNumber = 3; - private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 10; + private global::Enterprise.KeyType keyType_ = global::Enterprise.KeyType.Rsa; + /// + /// describes publicKey/encryptedPrivateKey pair + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DevicePublicKey { - get { return devicePublicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.KeyType KeyType { + get { return keyType_; } set { - devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + keyType_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceRegistrationRequest); + return Equals(other as GetDataKeyBackupV3Response); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceRegistrationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetDataKeyBackupV3Response other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ClientVersion != other.ClientVersion) return false; - if (DeviceName != other.DeviceName) return false; - if (DevicePublicKey != other.DevicePublicKey) return false; + if (DataKeyBackup != other.DataKeyBackup) return false; + if (DataKeyBackupDate != other.DataKeyBackupDate) return false; + if (PublicKey != other.PublicKey) return false; + if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; + if (ClientKey != other.ClientKey) return false; + if (EncryptedSessionToken != other.EncryptedSessionToken) return false; + if(!passwordRules_.Equals(other.passwordRules_)) return false; + if (PasswordRulesIntro != other.PasswordRulesIntro) return false; + if (MinimumPbkdf2Iterations != other.MinimumPbkdf2Iterations) return false; + if (KeyType != other.KeyType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); - if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); + if (DataKeyBackup.Length != 0) hash ^= DataKeyBackup.GetHashCode(); + if (DataKeyBackupDate != 0L) hash ^= DataKeyBackupDate.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); + if (ClientKey.Length != 0) hash ^= ClientKey.GetHashCode(); + if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); + hash ^= passwordRules_.GetHashCode(); + if (PasswordRulesIntro.Length != 0) hash ^= PasswordRulesIntro.GetHashCode(); + if (MinimumPbkdf2Iterations != 0) hash ^= MinimumPbkdf2Iterations.GetHashCode(); + if (KeyType != global::Enterprise.KeyType.Rsa) hash ^= KeyType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13250,40 +32503,138 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ClientVersion.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (DataKeyBackup.Length != 0) { output.WriteRawTag(10); - output.WriteString(ClientVersion); + output.WriteBytes(DataKeyBackup); } - if (DeviceName.Length != 0) { - output.WriteRawTag(18); - output.WriteString(DeviceName); + if (DataKeyBackupDate != 0L) { + output.WriteRawTag(16); + output.WriteInt64(DataKeyBackupDate); } - if (DevicePublicKey.Length != 0) { + if (PublicKey.Length != 0) { output.WriteRawTag(26); - output.WriteBytes(DevicePublicKey); + output.WriteBytes(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedPrivateKey); + } + if (ClientKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(ClientKey); + } + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedSessionToken); + } + passwordRules_.WriteTo(output, _repeated_passwordRules_codec); + if (PasswordRulesIntro.Length != 0) { + output.WriteRawTag(66); + output.WriteString(PasswordRulesIntro); + } + if (MinimumPbkdf2Iterations != 0) { + output.WriteRawTag(72); + output.WriteInt32(MinimumPbkdf2Iterations); + } + if (KeyType != global::Enterprise.KeyType.Rsa) { + output.WriteRawTag(80); + output.WriteEnum((int) KeyType); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DataKeyBackup.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(DataKeyBackup); + } + if (DataKeyBackupDate != 0L) { + output.WriteRawTag(16); + output.WriteInt64(DataKeyBackupDate); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedPrivateKey); + } + if (ClientKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(ClientKey); + } + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedSessionToken); + } + passwordRules_.WriteTo(ref output, _repeated_passwordRules_codec); + if (PasswordRulesIntro.Length != 0) { + output.WriteRawTag(66); + output.WriteString(PasswordRulesIntro); + } + if (MinimumPbkdf2Iterations != 0) { + output.WriteRawTag(72); + output.WriteInt32(MinimumPbkdf2Iterations); + } + if (KeyType != global::Enterprise.KeyType.Rsa) { + output.WriteRawTag(80); + output.WriteEnum((int) KeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + if (DataKeyBackup.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DataKeyBackup); } - if (DeviceName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + if (DataKeyBackupDate != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DataKeyBackupDate); } - if (DevicePublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); + } + if (ClientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientKey); + } + if (EncryptedSessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + } + size += passwordRules_.CalculateSize(_repeated_passwordRules_codec); + if (PasswordRulesIntro.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PasswordRulesIntro); + } + if (MinimumPbkdf2Iterations != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinimumPbkdf2Iterations); + } + if (KeyType != global::Enterprise.KeyType.Rsa) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13292,173 +32643,244 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceRegistrationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetDataKeyBackupV3Response other) { if (other == null) { return; } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (other.DataKeyBackup.Length != 0) { + DataKeyBackup = other.DataKeyBackup; } - if (other.DeviceName.Length != 0) { - DeviceName = other.DeviceName; + if (other.DataKeyBackupDate != 0L) { + DataKeyBackupDate = other.DataKeyBackupDate; } - if (other.DevicePublicKey.Length != 0) { - DevicePublicKey = other.DevicePublicKey; + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; + } + if (other.EncryptedPrivateKey.Length != 0) { + EncryptedPrivateKey = other.EncryptedPrivateKey; + } + if (other.ClientKey.Length != 0) { + ClientKey = other.ClientKey; + } + if (other.EncryptedSessionToken.Length != 0) { + EncryptedSessionToken = other.EncryptedSessionToken; + } + passwordRules_.Add(other.passwordRules_); + if (other.PasswordRulesIntro.Length != 0) { + PasswordRulesIntro = other.PasswordRulesIntro; + } + if (other.MinimumPbkdf2Iterations != 0) { + MinimumPbkdf2Iterations = other.MinimumPbkdf2Iterations; + } + if (other.KeyType != global::Enterprise.KeyType.Rsa) { + KeyType = other.KeyType; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - ClientVersion = input.ReadString(); + case 10: { + DataKeyBackup = input.ReadBytes(); + break; + } + case 16: { + DataKeyBackupDate = input.ReadInt64(); + break; + } + case 26: { + PublicKey = input.ReadBytes(); + break; + } + case 34: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + case 42: { + ClientKey = input.ReadBytes(); + break; + } + case 50: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 58: { + passwordRules_.AddEntriesFrom(input, _repeated_passwordRules_codec); + break; + } + case 66: { + PasswordRulesIntro = input.ReadString(); + break; + } + case 72: { + MinimumPbkdf2Iterations = input.ReadInt32(); + break; + } + case 80: { + KeyType = (global::Enterprise.KeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + DataKeyBackup = input.ReadBytes(); + break; + } + case 16: { + DataKeyBackupDate = input.ReadInt64(); + break; + } + case 26: { + PublicKey = input.ReadBytes(); + break; + } + case 34: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + case 42: { + ClientKey = input.ReadBytes(); + break; + } + case 50: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 58: { + passwordRules_.AddEntriesFrom(ref input, _repeated_passwordRules_codec); break; } - case 18: { - DeviceName = input.ReadString(); + case 66: { + PasswordRulesIntro = input.ReadString(); break; } - case 26: { - DevicePublicKey = input.ReadBytes(); + case 72: { + MinimumPbkdf2Iterations = input.ReadInt32(); + break; + } + case 80: { + KeyType = (global::Enterprise.KeyType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class DeviceVerificationRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceVerificationRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetPublicKeysRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetPublicKeysRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[59]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[106]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceVerificationRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetPublicKeysRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceVerificationRequest(DeviceVerificationRequest other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; - username_ = other.username_; - verificationChannel_ = other.verificationChannel_; - messageSessionUid_ = other.messageSessionUid_; - clientVersion_ = other.clientVersion_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetPublicKeysRequest(GetPublicKeysRequest other) : this() { + usernames_ = other.usernames_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceVerificationRequest Clone() { - return new DeviceVerificationRequest(this); - } - - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 2; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "verificationChannel" field. - public const int VerificationChannelFieldNumber = 3; - private string verificationChannel_ = ""; - /// - /// email for now, could be "sms" if we allow username as cell number in the future. - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationChannel { - get { return verificationChannel_; } - set { - verificationChannel_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 4; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } - set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetPublicKeysRequest Clone() { + return new GetPublicKeysRequest(this); } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 5; - private string clientVersion_ = ""; + /// Field number for the "usernames" field. + public const int UsernamesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_usernames_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField usernames_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Usernames { + get { return usernames_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceVerificationRequest); + return Equals(other as GetPublicKeysRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceVerificationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetPublicKeysRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (Username != other.Username) return false; - if (VerificationChannel != other.VerificationChannel) return false; - if (MessageSessionUid != other.MessageSessionUid) return false; - if (ClientVersion != other.ClientVersion) return false; + if(!usernames_.Equals(other.usernames_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (VerificationChannel.Length != 0) hash ^= VerificationChannel.GetHashCode(); - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + hash ^= usernames_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13466,55 +32888,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); - } - if (Username.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Username); - } - if (VerificationChannel.Length != 0) { - output.WriteRawTag(26); - output.WriteString(VerificationChannel); - } - if (MessageSessionUid.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(MessageSessionUid); - } - if (ClientVersion.Length != 0) { - output.WriteRawTag(42); - output.WriteString(ClientVersion); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + usernames_.WriteTo(output, _repeated_usernames_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + usernames_.WriteTo(ref output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (VerificationChannel.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationChannel); - } - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } + size += usernames_.CalculateSize(_repeated_usernames_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -13522,115 +32929,119 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceVerificationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetPublicKeysRequest other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.VerificationChannel.Length != 0) { - VerificationChannel = other.VerificationChannel; - } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; - } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; - } + usernames_.Add(other.usernames_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); - break; - } - case 18: { - Username = input.ReadString(); - break; - } - case 26: { - VerificationChannel = input.ReadString(); + usernames_.AddEntriesFrom(input, _repeated_usernames_codec); break; } - case 34: { - MessageSessionUid = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 42: { - ClientVersion = input.ReadString(); + case 10: { + usernames_.AddEntriesFrom(ref input, _repeated_usernames_codec); break; } } } } + #endif } - public sealed partial class DeviceVerificationResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceVerificationResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PublicKeyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PublicKeyResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[60]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[107]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceVerificationResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PublicKeyResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceVerificationResponse(DeviceVerificationResponse other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PublicKeyResponse(PublicKeyResponse other) : this() { username_ = other.username_; - messageSessionUid_ = other.messageSessionUid_; - clientVersion_ = other.clientVersion_; - deviceStatus_ = other.deviceStatus_; + publicKey_ = other.publicKey_; + publicEccKey_ = other.publicEccKey_; + message_ = other.message_; + errorCode_ = other.errorCode_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceVerificationResponse Clone() { - return new DeviceVerificationResponse(this); - } - - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PublicKeyResponse Clone() { + return new PublicKeyResponse(this); } /// Field number for the "username" field. - public const int UsernameFieldNumber = 2; + public const int UsernameFieldNumber = 1; private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Username { get { return username_; } set { @@ -13638,68 +33049,86 @@ public string Username { } } - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 3; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 2; + private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } + set { + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "publicEccKey" field. + public const int PublicEccKeyFieldNumber = 3; + private pb::ByteString publicEccKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicEccKey { + get { return publicEccKey_; } set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + publicEccKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 4; - private string clientVersion_ = ""; + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "deviceStatus" field. - public const int DeviceStatusFieldNumber = 5; - private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; + /// Field number for the "errorCode" field. + public const int ErrorCodeFieldNumber = 5; + private string errorCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.DeviceStatus DeviceStatus { - get { return deviceStatus_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ErrorCode { + get { return errorCode_; } set { - deviceStatus_ = value; + errorCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceVerificationResponse); + return Equals(other as PublicKeyResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceVerificationResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PublicKeyResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; if (Username != other.Username) return false; - if (MessageSessionUid != other.MessageSessionUid) return false; - if (ClientVersion != other.ClientVersion) return false; - if (DeviceStatus != other.DeviceStatus) return false; + if (PublicKey != other.PublicKey) return false; + if (PublicEccKey != other.PublicEccKey) return false; + if (Message != other.Message) return false; + if (ErrorCode != other.ErrorCode) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (PublicEccKey.Length != 0) hash ^= PublicEccKey.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (ErrorCode.Length != 0) hash ^= ErrorCode.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13707,54 +33136,91 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); + output.WriteString(Username); } - if (Username.Length != 0) { + if (PublicKey.Length != 0) { output.WriteRawTag(18); - output.WriteString(Username); + output.WriteBytes(PublicKey); } - if (MessageSessionUid.Length != 0) { + if (PublicEccKey.Length != 0) { output.WriteRawTag(26); - output.WriteBytes(MessageSessionUid); + output.WriteBytes(PublicEccKey); } - if (ClientVersion.Length != 0) { + if (Message.Length != 0) { output.WriteRawTag(34); - output.WriteString(ClientVersion); + output.WriteString(Message); } - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - output.WriteRawTag(40); - output.WriteEnum((int) DeviceStatus); + if (ErrorCode.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ErrorCode); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PublicKey); + } + if (PublicEccKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(PublicEccKey); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (ErrorCode.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ErrorCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } if (Username.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + if (PublicEccKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicEccKey); } - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceStatus); + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (ErrorCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorCode); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13763,235 +33229,191 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceVerificationResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PublicKeyResponse other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } if (other.Username.Length != 0) { Username = other.Username; } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (other.PublicEccKey.Length != 0) { + PublicEccKey = other.PublicEccKey; } - if (other.DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - DeviceStatus = other.DeviceStatus; + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.ErrorCode.Length != 0) { + ErrorCode = other.ErrorCode; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); + Username = input.ReadString(); break; } case 18: { + PublicKey = input.ReadBytes(); + break; + } + case 26: { + PublicEccKey = input.ReadBytes(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + ErrorCode = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { Username = input.ReadString(); break; } + case 18: { + PublicKey = input.ReadBytes(); + break; + } case 26: { - MessageSessionUid = input.ReadBytes(); + PublicEccKey = input.ReadBytes(); break; } case 34: { - ClientVersion = input.ReadString(); + Message = input.ReadString(); break; } - case 40: { - DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + case 42: { + ErrorCode = input.ReadString(); break; } } } } + #endif } - public sealed partial class DeviceApprovalRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceApprovalRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetPublicKeysResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetPublicKeysResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[61]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceApprovalRequest() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceApprovalRequest(DeviceApprovalRequest other) : this() { - email_ = other.email_; - twoFactorChannel_ = other.twoFactorChannel_; - clientVersion_ = other.clientVersion_; - locale_ = other.locale_; - encryptedDeviceToken_ = other.encryptedDeviceToken_; - totpCode_ = other.totpCode_; - deviceIp_ = other.deviceIp_; - deviceTokenExpireDays_ = other.deviceTokenExpireDays_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceApprovalRequest Clone() { - return new DeviceApprovalRequest(this); - } - - /// Field number for the "email" field. - public const int EmailFieldNumber = 1; - private string email_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Email { - get { return email_; } - set { - email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "twoFactorChannel" field. - public const int TwoFactorChannelFieldNumber = 2; - private string twoFactorChannel_ = ""; - /// - /// TwoFactorChannel, only "sms", "duo", "on_device" or "on_approved_device"; default to email verification - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string TwoFactorChannel { - get { return twoFactorChannel_; } - set { - twoFactorChannel_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 3; - private string clientVersion_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[108]; } } - - /// Field number for the "locale" field. - public const int LocaleFieldNumber = 4; - private string locale_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Locale { - get { return locale_; } - set { - locale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 5; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetPublicKeysResponse() { + OnConstruction(); } - /// Field number for the "totpCode" field. - public const int TotpCodeFieldNumber = 6; - private string totpCode_ = ""; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string TotpCode { - get { return totpCode_; } - set { - totpCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetPublicKeysResponse(GetPublicKeysResponse other) : this() { + keyResponses_ = other.keyResponses_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "deviceIp" field. - public const int DeviceIpFieldNumber = 7; - private string deviceIp_ = ""; - /// - ///This is the ip address of the original device that needs to be approved, which will be included in the TwoFactorToken. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceIp { - get { return deviceIp_; } - set { - deviceIp_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetPublicKeysResponse Clone() { + return new GetPublicKeysResponse(this); } - /// Field number for the "deviceTokenExpireDays" field. - public const int DeviceTokenExpireDaysFieldNumber = 8; - private string deviceTokenExpireDays_ = ""; - /// - ///equivalent to the device_token_expire_days that is used in the Login command - /// + /// Field number for the "keyResponses" field. + public const int KeyResponsesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keyResponses_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.PublicKeyResponse.Parser); + private readonly pbc::RepeatedField keyResponses_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceTokenExpireDays { - get { return deviceTokenExpireDays_; } - set { - deviceTokenExpireDays_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField KeyResponses { + get { return keyResponses_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceApprovalRequest); + return Equals(other as GetPublicKeysResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceApprovalRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetPublicKeysResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Email != other.Email) return false; - if (TwoFactorChannel != other.TwoFactorChannel) return false; - if (ClientVersion != other.ClientVersion) return false; - if (Locale != other.Locale) return false; - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (TotpCode != other.TotpCode) return false; - if (DeviceIp != other.DeviceIp) return false; - if (DeviceTokenExpireDays != other.DeviceTokenExpireDays) return false; + if(!keyResponses_.Equals(other.keyResponses_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Email.Length != 0) hash ^= Email.GetHashCode(); - if (TwoFactorChannel.Length != 0) hash ^= TwoFactorChannel.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (Locale.Length != 0) hash ^= Locale.GetHashCode(); - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (TotpCode.Length != 0) hash ^= TotpCode.GetHashCode(); - if (DeviceIp.Length != 0) hash ^= DeviceIp.GetHashCode(); - if (DeviceTokenExpireDays.Length != 0) hash ^= DeviceTokenExpireDays.GetHashCode(); + hash ^= keyResponses_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13999,76 +33421,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Email.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Email); - } - if (TwoFactorChannel.Length != 0) { - output.WriteRawTag(18); - output.WriteString(TwoFactorChannel); - } - if (ClientVersion.Length != 0) { - output.WriteRawTag(26); - output.WriteString(ClientVersion); - } - if (Locale.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Locale); - } - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(EncryptedDeviceToken); - } - if (TotpCode.Length != 0) { - output.WriteRawTag(50); - output.WriteString(TotpCode); - } - if (DeviceIp.Length != 0) { - output.WriteRawTag(58); - output.WriteString(DeviceIp); - } - if (DeviceTokenExpireDays.Length != 0) { - output.WriteRawTag(66); - output.WriteString(DeviceTokenExpireDays); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keyResponses_.WriteTo(output, _repeated_keyResponses_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keyResponses_.WriteTo(ref output, _repeated_keyResponses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Email.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); - } - if (TwoFactorChannel.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(TwoFactorChannel); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } - if (Locale.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Locale); - } - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (TotpCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(TotpCode); - } - if (DeviceIp.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceIp); - } - if (DeviceTokenExpireDays.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceTokenExpireDays); - } + size += keyResponses_.CalculateSize(_repeated_keyResponses_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -14076,149 +33462,161 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceApprovalRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetPublicKeysResponse other) { if (other == null) { return; } - if (other.Email.Length != 0) { - Email = other.Email; - } - if (other.TwoFactorChannel.Length != 0) { - TwoFactorChannel = other.TwoFactorChannel; - } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; - } - if (other.Locale.Length != 0) { - Locale = other.Locale; - } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.TotpCode.Length != 0) { - TotpCode = other.TotpCode; - } - if (other.DeviceIp.Length != 0) { - DeviceIp = other.DeviceIp; - } - if (other.DeviceTokenExpireDays.Length != 0) { - DeviceTokenExpireDays = other.DeviceTokenExpireDays; - } + keyResponses_.Add(other.keyResponses_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Email = input.ReadString(); - break; - } - case 18: { - TwoFactorChannel = input.ReadString(); - break; - } - case 26: { - ClientVersion = input.ReadString(); - break; - } - case 34: { - Locale = input.ReadString(); - break; - } - case 42: { - EncryptedDeviceToken = input.ReadBytes(); - break; - } - case 50: { - TotpCode = input.ReadString(); + keyResponses_.AddEntriesFrom(input, _repeated_keyResponses_codec); break; } - case 58: { - DeviceIp = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 66: { - DeviceTokenExpireDays = input.ReadString(); + case 10: { + keyResponses_.AddEntriesFrom(ref input, _repeated_keyResponses_codec); break; } } } } + #endif } - public sealed partial class DeviceApprovalResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceApprovalResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SetEccKeyPairRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetEccKeyPairRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[62]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[109]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceApprovalResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceApprovalResponse(DeviceApprovalResponse other) : this() { - encryptedTwoFactorToken_ = other.encryptedTwoFactorToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairRequest(SetEccKeyPairRequest other) : this() { + publicKey_ = other.publicKey_; + encryptedPrivateKey_ = other.encryptedPrivateKey_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceApprovalResponse Clone() { - return new DeviceApprovalResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairRequest Clone() { + return new SetEccKeyPairRequest(this); } - /// Field number for the "encryptedTwoFactorToken" field. - public const int EncryptedTwoFactorTokenFieldNumber = 1; - private pb::ByteString encryptedTwoFactorToken_ = pb::ByteString.Empty; + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 1; + private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedTwoFactorToken { - get { return encryptedTwoFactorToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } set { - encryptedTwoFactorToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedPrivateKey" field. + public const int EncryptedPrivateKeyFieldNumber = 2; + private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedPrivateKey { + get { return encryptedPrivateKey_; } + set { + encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceApprovalResponse); + return Equals(other as SetEccKeyPairRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceApprovalResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SetEccKeyPairRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedTwoFactorToken != other.EncryptedTwoFactorToken) return false; + if (PublicKey != other.PublicKey) return false; + if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedTwoFactorToken.Length != 0) hash ^= EncryptedTwoFactorToken.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14226,26 +33624,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedTwoFactorToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (PublicKey.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedTwoFactorToken); + output.WriteBytes(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedPrivateKey); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PublicKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedPrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedTwoFactorToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedTwoFactorToken); + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -14254,145 +33684,164 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceApprovalResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SetEccKeyPairRequest other) { if (other == null) { return; } - if (other.EncryptedTwoFactorToken.Length != 0) { - EncryptedTwoFactorToken = other.EncryptedTwoFactorToken; + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; + } + if (other.EncryptedPrivateKey.Length != 0) { + EncryptedPrivateKey = other.EncryptedPrivateKey; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedTwoFactorToken = input.ReadBytes(); + PublicKey = input.ReadBytes(); + break; + } + case 18: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + PublicKey = input.ReadBytes(); + break; + } + case 18: { + EncryptedPrivateKey = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class ApproveDeviceRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveDeviceRequest()); + /// + /// used for teams & roles + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SetEccKeyPairsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetEccKeyPairsRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[63]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[110]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveDeviceRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairsRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveDeviceRequest(ApproveDeviceRequest other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; - encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; - denyApproval_ = other.denyApproval_; - linkDevice_ = other.linkDevice_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairsRequest(SetEccKeyPairsRequest other) : this() { + teamKeys_ = other.teamKeys_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveDeviceRequest Clone() { - return new ApproveDeviceRequest(this); - } - - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairsRequest Clone() { + return new SetEccKeyPairsRequest(this); } - /// Field number for the "encryptedDeviceDataKey" field. - public const int EncryptedDeviceDataKeyFieldNumber = 2; - private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + /// Field number for the "teamKeys" field. + public const int TeamKeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_teamKeys_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.TeamEccKeyPair.Parser); + private readonly pbc::RepeatedField teamKeys_ = new pbc::RepeatedField(); /// - /// required for cloud sso and link + ///repeated RoleEccKeyPair roleKeys = 2; /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceDataKey { - get { return encryptedDeviceDataKey_; } - set { - encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "denyApproval" field. - public const int DenyApprovalFieldNumber = 3; - private bool denyApproval_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool DenyApproval { - get { return denyApproval_; } - set { - denyApproval_ = value; - } - } - - /// Field number for the "linkDevice" field. - public const int LinkDeviceFieldNumber = 4; - private bool linkDevice_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool LinkDevice { - get { return linkDevice_; } - set { - linkDevice_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TeamKeys { + get { return teamKeys_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ApproveDeviceRequest); + return Equals(other as SetEccKeyPairsRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ApproveDeviceRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SetEccKeyPairsRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; - if (DenyApproval != other.DenyApproval) return false; - if (LinkDevice != other.LinkDevice) return false; + if(!teamKeys_.Equals(other.teamKeys_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); - if (DenyApproval != false) hash ^= DenyApproval.GetHashCode(); - if (LinkDevice != false) hash ^= LinkDevice.GetHashCode(); + hash ^= teamKeys_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14400,48 +33849,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); - } - if (EncryptedDeviceDataKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(EncryptedDeviceDataKey); - } - if (DenyApproval != false) { - output.WriteRawTag(24); - output.WriteBool(DenyApproval); - } - if (LinkDevice != false) { - output.WriteRawTag(32); - output.WriteBool(LinkDevice); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + teamKeys_.WriteTo(output, _repeated_teamKeys_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + teamKeys_.WriteTo(ref output, _repeated_teamKeys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (EncryptedDeviceDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); - } - if (DenyApproval != false) { - size += 1 + 1; - } - if (LinkDevice != false) { - size += 1 + 1; - } + size += teamKeys_.CalculateSize(_repeated_teamKeys_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -14449,135 +33890,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ApproveDeviceRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SetEccKeyPairsRequest other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.EncryptedDeviceDataKey.Length != 0) { - EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; - } - if (other.DenyApproval != false) { - DenyApproval = other.DenyApproval; - } - if (other.LinkDevice != false) { - LinkDevice = other.LinkDevice; - } + teamKeys_.Add(other.teamKeys_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); - break; - } - case 18: { - EncryptedDeviceDataKey = input.ReadBytes(); + teamKeys_.AddEntriesFrom(input, _repeated_teamKeys_codec); break; } - case 24: { - DenyApproval = input.ReadBool(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 32: { - LinkDevice = input.ReadBool(); + case 10: { + teamKeys_.AddEntriesFrom(ref input, _repeated_teamKeys_codec); break; } } } } + #endif } - public sealed partial class EnterpriseUserAliasRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserAliasRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SetEccKeyPairsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetEccKeyPairsResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[64]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[111]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserAliasRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairsResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserAliasRequest(EnterpriseUserAliasRequest other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - alias_ = other.alias_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairsResponse(SetEccKeyPairsResponse other) : this() { + teamKeys_ = other.teamKeys_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserAliasRequest Clone() { - return new EnterpriseUserAliasRequest(this); - } - - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } - set { - enterpriseUserId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetEccKeyPairsResponse Clone() { + return new SetEccKeyPairsResponse(this); } - /// Field number for the "alias" field. - public const int AliasFieldNumber = 2; - private string alias_ = ""; + /// Field number for the "teamKeys" field. + public const int TeamKeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_teamKeys_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.TeamEccKeyPairResponse.Parser); + private readonly pbc::RepeatedField teamKeys_ = new pbc::RepeatedField(); + /// + ///repeated RoleEccKeyPairResponse roleKeys = 2; + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Alias { - get { return alias_; } - set { - alias_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TeamKeys { + get { return teamKeys_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseUserAliasRequest); + return Equals(other as SetEccKeyPairsResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseUserAliasRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SetEccKeyPairsResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (Alias != other.Alias) return false; + if(!teamKeys_.Equals(other.teamKeys_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (Alias.Length != 0) hash ^= Alias.GetHashCode(); + hash ^= teamKeys_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14585,34 +34039,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); - } - if (Alias.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Alias); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + teamKeys_.WriteTo(output, _repeated_teamKeys_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (Alias.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Alias); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + teamKeys_.WriteTo(ref output, _repeated_teamKeys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += teamKeys_.CalculateSize(_repeated_teamKeys_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -14620,107 +34080,176 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseUserAliasRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SetEccKeyPairsResponse other) { if (other == null) { return; } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.Alias.Length != 0) { - Alias = other.Alias; - } + teamKeys_.Add(other.teamKeys_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseUserId = input.ReadInt64(); + case 10: { + teamKeys_.AddEntriesFrom(input, _repeated_teamKeys_codec); break; } - case 18: { - Alias = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + teamKeys_.AddEntriesFrom(ref input, _repeated_teamKeys_codec); break; } } } } + #endif } - public sealed partial class Device : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Device()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamEccKeyPair : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamEccKeyPair()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[65]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[112]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Device() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamEccKeyPair() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Device(Device other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamEccKeyPair(TeamEccKeyPair other) : this() { + teamUid_ = other.teamUid_; + publicKey_ = other.publicKey_; + encryptedPrivateKey_ = other.encryptedPrivateKey_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Device Clone() { - return new Device(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamEccKeyPair Clone() { + return new TeamEccKeyPair(this); } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 2; + private pb::ByteString publicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } + set { + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedPrivateKey" field. + public const int EncryptedPrivateKeyFieldNumber = 3; + private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedPrivateKey { + get { return encryptedPrivateKey_; } + set { + encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Device); + return Equals(other as TeamEccKeyPair); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Device other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamEccKeyPair other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (TeamUid != other.TeamUid) return false; + if (PublicKey != other.PublicKey) return false; + if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14728,26 +34257,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); + output.WriteBytes(TeamUid); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedPrivateKey); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedPrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + } + if (EncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -14756,114 +34328,185 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Device other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamEccKeyPair other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; + } + if (other.EncryptedPrivateKey.Length != 0) { + EncryptedPrivateKey = other.EncryptedPrivateKey; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); + TeamUid = input.ReadBytes(); + break; + } + case 18: { + PublicKey = input.ReadBytes(); + break; + } + case 26: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + PublicKey = input.ReadBytes(); + break; + } + case 26: { + EncryptedPrivateKey = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class RegisterDeviceDataKeyRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RegisterDeviceDataKeyRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamEccKeyPairResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamEccKeyPairResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[66]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[113]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegisterDeviceDataKeyRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamEccKeyPairResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegisterDeviceDataKeyRequest(RegisterDeviceDataKeyRequest other) : this() { - encryptedDeviceToken_ = other.encryptedDeviceToken_; - encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamEccKeyPairResponse(TeamEccKeyPairResponse other) : this() { + teamUid_ = other.teamUid_; + status_ = other.status_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RegisterDeviceDataKeyRequest Clone() { - return new RegisterDeviceDataKeyRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamEccKeyPairResponse Clone() { + return new TeamEccKeyPairResponse(this); } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 1; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedDeviceDataKey" field. - public const int EncryptedDeviceDataKeyFieldNumber = 2; - private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Authentication.GenericStatus status_ = global::Authentication.GenericStatus.Success; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceDataKey { - get { return encryptedDeviceDataKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.GenericStatus Status { + get { return status_; } set { - encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + status_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RegisterDeviceDataKeyRequest); + return Equals(other as TeamEccKeyPairResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RegisterDeviceDataKeyRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamEccKeyPairResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; + if (TeamUid != other.TeamUid) return false; + if (Status != other.Status) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (Status != global::Authentication.GenericStatus.Success) hash ^= Status.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14871,33 +34514,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedDeviceToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedDeviceToken); + output.WriteBytes(TeamUid); } - if (EncryptedDeviceDataKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(EncryptedDeviceDataKey); + if (Status != global::Authentication.GenericStatus.Success) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Status != global::Authentication.GenericStatus.Success) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); } - if (EncryptedDeviceDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); + if (Status != global::Authentication.GenericStatus.Success) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -14906,135 +34574,172 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RegisterDeviceDataKeyRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamEccKeyPairResponse other) { if (other == null) { return; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; } - if (other.EncryptedDeviceDataKey.Length != 0) { - EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; + if (other.Status != global::Authentication.GenericStatus.Success) { + Status = other.Status; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedDeviceToken = input.ReadBytes(); + TeamUid = input.ReadBytes(); break; } - case 18: { - EncryptedDeviceDataKey = input.ReadBytes(); + case 16: { + Status = (global::Authentication.GenericStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Authentication.GenericStatus) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class ValidateCreateUserVerificationCodeRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateCreateUserVerificationCodeRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetKsmPublicKeysRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetKsmPublicKeysRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[67]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[114]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidateCreateUserVerificationCodeRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetKsmPublicKeysRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidateCreateUserVerificationCodeRequest(ValidateCreateUserVerificationCodeRequest other) : this() { - username_ = other.username_; - clientVersion_ = other.clientVersion_; - verificationCode_ = other.verificationCode_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetKsmPublicKeysRequest(GetKsmPublicKeysRequest other) : this() { + clientIds_ = other.clientIds_.Clone(); + controllerUids_ = other.controllerUids_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidateCreateUserVerificationCodeRequest Clone() { - return new ValidateCreateUserVerificationCodeRequest(this); - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetKsmPublicKeysRequest Clone() { + return new GetKsmPublicKeysRequest(this); } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 2; - private string clientVersion_ = ""; + /// Field number for the "clientIds" field. + public const int ClientIdsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_clientIds_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField clientIds_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ClientIds { + get { return clientIds_; } } - /// Field number for the "verificationCode" field. - public const int VerificationCodeFieldNumber = 3; - private string verificationCode_ = ""; + /// Field number for the "controllerUids" field. + public const int ControllerUidsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_controllerUids_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField controllerUids_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationCode { - get { return verificationCode_; } - set { - verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ControllerUids { + get { return controllerUids_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ValidateCreateUserVerificationCodeRequest); + return Equals(other as GetKsmPublicKeysRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ValidateCreateUserVerificationCodeRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetKsmPublicKeysRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; - if (ClientVersion != other.ClientVersion) return false; - if (VerificationCode != other.VerificationCode) return false; + if(!clientIds_.Equals(other.clientIds_)) return false; + if(!controllerUids_.Equals(other.controllerUids_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + hash ^= clientIds_.GetHashCode(); + hash ^= controllerUids_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -15042,41 +34747,43 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Username); - } - if (ClientVersion.Length != 0) { - output.WriteRawTag(18); - output.WriteString(ClientVersion); - } - if (VerificationCode.Length != 0) { - output.WriteRawTag(26); - output.WriteString(VerificationCode); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + clientIds_.WriteTo(output, _repeated_clientIds_codec); + controllerUids_.WriteTo(output, _repeated_controllerUids_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + clientIds_.WriteTo(ref output, _repeated_clientIds_codec); + controllerUids_.WriteTo(ref output, _repeated_controllerUids_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } - if (VerificationCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); - } + size += clientIds_.CalculateSize(_repeated_clientIds_codec); + size += controllerUids_.CalculateSize(_repeated_controllerUids_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -15084,170 +34791,185 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ValidateCreateUserVerificationCodeRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetKsmPublicKeysRequest other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; - } - if (other.VerificationCode.Length != 0) { - VerificationCode = other.VerificationCode; - } + clientIds_.Add(other.clientIds_); + controllerUids_.Add(other.controllerUids_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Username = input.ReadString(); + clientIds_.AddEntriesFrom(input, _repeated_clientIds_codec); break; } case 18: { - ClientVersion = input.ReadString(); + controllerUids_.AddEntriesFrom(input, _repeated_controllerUids_codec); break; } - case 26: { - VerificationCode = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + clientIds_.AddEntriesFrom(ref input, _repeated_clientIds_codec); + break; + } + case 18: { + controllerUids_.AddEntriesFrom(ref input, _repeated_controllerUids_codec); break; } } } } + #endif } - public sealed partial class ValidateDeviceVerificationCodeRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateDeviceVerificationCodeRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DevicePublicKeyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DevicePublicKeyResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[68]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[115]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidateDeviceVerificationCodeRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DevicePublicKeyResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidateDeviceVerificationCodeRequest(ValidateDeviceVerificationCodeRequest other) : this() { - username_ = other.username_; - clientVersion_ = other.clientVersion_; - verificationCode_ = other.verificationCode_; - messageSessionUid_ = other.messageSessionUid_; - encryptedDeviceToken_ = other.encryptedDeviceToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DevicePublicKeyResponse(DevicePublicKeyResponse other) : this() { + clientId_ = other.clientId_; + publicKey_ = other.publicKey_; + controllerUid_ = other.controllerUid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidateDeviceVerificationCodeRequest Clone() { - return new ValidateDeviceVerificationCodeRequest(this); - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 2; - private string clientVersion_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DevicePublicKeyResponse Clone() { + return new DevicePublicKeyResponse(this); } - /// Field number for the "verificationCode" field. - public const int VerificationCodeFieldNumber = 3; - private string verificationCode_ = ""; + /// Field number for the "clientId" field. + public const int ClientIdFieldNumber = 1; + private pb::ByteString clientId_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationCode { - get { return verificationCode_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ClientId { + get { return clientId_; } set { - verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + clientId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 4; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 2; + private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 5; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + /// Field number for the "controllerUid" field. + public const int ControllerUidFieldNumber = 3; + private pb::ByteString controllerUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ControllerUid { + get { return controllerUid_; } set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + controllerUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ValidateDeviceVerificationCodeRequest); + return Equals(other as DevicePublicKeyResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ValidateDeviceVerificationCodeRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DevicePublicKeyResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; - if (ClientVersion != other.ClientVersion) return false; - if (VerificationCode != other.VerificationCode) return false; - if (MessageSessionUid != other.MessageSessionUid) return false; - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (ClientId != other.ClientId) return false; + if (PublicKey != other.PublicKey) return false; + if (ControllerUid != other.ControllerUid) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (ClientId.Length != 0) hash ^= ClientId.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (ControllerUid.Length != 0) hash ^= ControllerUid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -15255,54 +34977,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ClientId.Length != 0) { output.WriteRawTag(10); - output.WriteString(Username); + output.WriteBytes(ClientId); } - if (ClientVersion.Length != 0) { + if (PublicKey.Length != 0) { output.WriteRawTag(18); - output.WriteString(ClientVersion); + output.WriteBytes(PublicKey); } - if (VerificationCode.Length != 0) { + if (ControllerUid.Length != 0) { output.WriteRawTag(26); - output.WriteString(VerificationCode); + output.WriteBytes(ControllerUid); } - if (MessageSessionUid.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(MessageSessionUid); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(EncryptedDeviceToken); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ClientId.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ClientId); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PublicKey); + } + if (ControllerUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ControllerUid); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } - if (VerificationCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + if (ClientId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientId); } - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); } - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + if (ControllerUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ControllerUid); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -15311,156 +35048,169 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ValidateDeviceVerificationCodeRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DevicePublicKeyResponse other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; - } - if (other.VerificationCode.Length != 0) { - VerificationCode = other.VerificationCode; + if (other.ClientId.Length != 0) { + ClientId = other.ClientId; } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; + if (other.ControllerUid.Length != 0) { + ControllerUid = other.ControllerUid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Username = input.ReadString(); + ClientId = input.ReadBytes(); break; } case 18: { - ClientVersion = input.ReadString(); + PublicKey = input.ReadBytes(); break; } case 26: { - VerificationCode = input.ReadString(); + ControllerUid = input.ReadBytes(); break; } - case 34: { - MessageSessionUid = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ClientId = input.ReadBytes(); break; } - case 42: { - EncryptedDeviceToken = input.ReadBytes(); + case 18: { + PublicKey = input.ReadBytes(); + break; + } + case 26: { + ControllerUid = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class SendSessionMessageRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SendSessionMessageRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetKsmPublicKeysResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetKsmPublicKeysResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[69]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[116]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SendSessionMessageRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetKsmPublicKeysResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SendSessionMessageRequest(SendSessionMessageRequest other) : this() { - messageSessionUid_ = other.messageSessionUid_; - command_ = other.command_; - username_ = other.username_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetKsmPublicKeysResponse(GetKsmPublicKeysResponse other) : this() { + keyResponses_ = other.keyResponses_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SendSessionMessageRequest Clone() { - return new SendSessionMessageRequest(this); - } - - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 1; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } - set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "command" field. - public const int CommandFieldNumber = 2; - private string command_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Command { - get { return command_; } - set { - command_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetKsmPublicKeysResponse Clone() { + return new GetKsmPublicKeysResponse(this); } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 3; - private string username_ = ""; + /// Field number for the "keyResponses" field. + public const int KeyResponsesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keyResponses_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.DevicePublicKeyResponse.Parser); + private readonly pbc::RepeatedField keyResponses_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField KeyResponses { + get { return keyResponses_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SendSessionMessageRequest); + return Equals(other as GetKsmPublicKeysResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SendSessionMessageRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetKsmPublicKeysResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (MessageSessionUid != other.MessageSessionUid) return false; - if (Command != other.Command) return false; - if (Username != other.Username) return false; + if(!keyResponses_.Equals(other.keyResponses_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); - if (Command.Length != 0) hash ^= Command.GetHashCode(); - if (Username.Length != 0) hash ^= Username.GetHashCode(); + hash ^= keyResponses_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -15468,41 +35218,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (MessageSessionUid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(MessageSessionUid); - } - if (Command.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Command); - } - if (Username.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Username); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keyResponses_.WriteTo(output, _repeated_keyResponses_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keyResponses_.WriteTo(ref output, _repeated_keyResponses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); - } - if (Command.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Command); - } - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } + size += keyResponses_.CalculateSize(_repeated_keyResponses_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -15510,142 +35259,160 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SendSessionMessageRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetKsmPublicKeysResponse other) { if (other == null) { return; } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; - } - if (other.Command.Length != 0) { - Command = other.Command; - } - if (other.Username.Length != 0) { - Username = other.Username; - } + keyResponses_.Add(other.keyResponses_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - MessageSessionUid = input.ReadBytes(); + keyResponses_.AddEntriesFrom(input, _repeated_keyResponses_codec); break; } - case 18: { - Command = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 26: { - Username = input.ReadString(); + case 10: { + keyResponses_.AddEntriesFrom(ref input, _repeated_keyResponses_codec); break; } } } } + #endif } - public sealed partial class GlobalUserAccount : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GlobalUserAccount()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AddAppSharesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddAppSharesRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[70]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[117]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GlobalUserAccount() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAppSharesRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GlobalUserAccount(GlobalUserAccount other) : this() { - username_ = other.username_; - accountUid_ = other.accountUid_; - regionName_ = other.regionName_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAppSharesRequest(AddAppSharesRequest other) : this() { + appRecordUid_ = other.appRecordUid_; + shares_ = other.shares_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GlobalUserAccount Clone() { - return new GlobalUserAccount(this); - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAppSharesRequest Clone() { + return new AddAppSharesRequest(this); } - /// Field number for the "accountUid" field. - public const int AccountUidFieldNumber = 2; - private pb::ByteString accountUid_ = pb::ByteString.Empty; + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private pb::ByteString appRecordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AccountUid { - get { return accountUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppRecordUid { + get { return appRecordUid_; } set { - accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "regionName" field. - public const int RegionNameFieldNumber = 3; - private string regionName_ = ""; + /// Field number for the "shares" field. + public const int SharesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_shares_codec + = pb::FieldCodec.ForMessage(18, global::Authentication.AppShareAdd.Parser); + private readonly pbc::RepeatedField shares_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string RegionName { - get { return regionName_; } - set { - regionName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Shares { + get { return shares_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GlobalUserAccount); + return Equals(other as AddAppSharesRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GlobalUserAccount other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AddAppSharesRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; - if (AccountUid != other.AccountUid) return false; - if (RegionName != other.RegionName) return false; + if (AppRecordUid != other.AppRecordUid) return false; + if(!shares_.Equals(other.shares_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); - if (RegionName.Length != 0) hash ^= RegionName.GetHashCode(); + if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); + hash ^= shares_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -15653,41 +35420,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppRecordUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Username); + output.WriteBytes(AppRecordUid); } - if (AccountUid.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(AccountUid); + shares_.WriteTo(output, _repeated_shares_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (RegionName.Length != 0) { - output.WriteRawTag(26); - output.WriteString(RegionName); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); } + shares_.WriteTo(ref output, _repeated_shares_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (AccountUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); - } - if (RegionName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(RegionName); + if (AppRecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); } + size += shares_.CalculateSize(_repeated_shares_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -15695,128 +35472,171 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GlobalUserAccount other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AddAppSharesRequest other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.AccountUid.Length != 0) { - AccountUid = other.AccountUid; - } - if (other.RegionName.Length != 0) { - RegionName = other.RegionName; + if (other.AppRecordUid.Length != 0) { + AppRecordUid = other.AppRecordUid; } + shares_.Add(other.shares_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Username = input.ReadString(); + AppRecordUid = input.ReadBytes(); break; } case 18: { - AccountUid = input.ReadBytes(); + shares_.AddEntriesFrom(input, _repeated_shares_codec); break; } - case 26: { - RegionName = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 18: { + shares_.AddEntriesFrom(ref input, _repeated_shares_codec); break; } } } } + #endif } - public sealed partial class AccountUsername : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AccountUsername()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RemoveAppSharesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RemoveAppSharesRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[71]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[118]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AccountUsername() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RemoveAppSharesRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AccountUsername(AccountUsername other) : this() { - username_ = other.username_; - dateActive_ = other.dateActive_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RemoveAppSharesRequest(RemoveAppSharesRequest other) : this() { + appRecordUid_ = other.appRecordUid_; + shares_ = other.shares_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AccountUsername Clone() { - return new AccountUsername(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RemoveAppSharesRequest Clone() { + return new RemoveAppSharesRequest(this); } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private pb::ByteString appRecordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppRecordUid { + get { return appRecordUid_; } set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "dateActive" field. - public const int DateActiveFieldNumber = 2; - private string dateActive_ = ""; + /// Field number for the "shares" field. + public const int SharesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_shares_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField shares_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DateActive { - get { return dateActive_; } - set { - dateActive_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Shares { + get { return shares_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as AccountUsername); + return Equals(other as RemoveAppSharesRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(AccountUsername other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RemoveAppSharesRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; - if (DateActive != other.DateActive) return false; + if (AppRecordUid != other.AppRecordUid) return false; + if(!shares_.Equals(other.shares_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (DateActive.Length != 0) hash ^= DateActive.GetHashCode(); + if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); + hash ^= shares_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -15824,34 +35644,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppRecordUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Username); - } - if (DateActive.Length != 0) { - output.WriteRawTag(18); - output.WriteString(DateActive); + output.WriteBytes(AppRecordUid); } + shares_.WriteTo(output, _repeated_shares_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); + } + shares_.WriteTo(ref output, _repeated_shares_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (DateActive.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DateActive); + if (AppRecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); } + size += shares_.CalculateSize(_repeated_shares_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -15859,145 +35696,202 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(AccountUsername other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RemoveAppSharesRequest other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.DateActive.Length != 0) { - DateActive = other.DateActive; + if (other.AppRecordUid.Length != 0) { + AppRecordUid = other.AppRecordUid; } + shares_.Add(other.shares_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Username = input.ReadString(); + AppRecordUid = input.ReadBytes(); break; } case 18: { - DateActive = input.ReadString(); + shares_.AddEntriesFrom(input, _repeated_shares_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 18: { + shares_.AddEntriesFrom(ref input, _repeated_shares_codec); break; } } } } + #endif } - /// - ///* - /// This is the input to the get_sso_service_provider command. - /// - public sealed partial class SsoServiceProviderRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoServiceProviderRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AppShareAdd : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AppShareAdd()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[72]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[119]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoServiceProviderRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppShareAdd() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoServiceProviderRequest(SsoServiceProviderRequest other) : this() { - name_ = other.name_; - clientVersion_ = other.clientVersion_; - locale_ = other.locale_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppShareAdd(AppShareAdd other) : this() { + secretUid_ = other.secretUid_; + shareType_ = other.shareType_; + encryptedSecretKey_ = other.encryptedSecretKey_; + editable_ = other.editable_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoServiceProviderRequest Clone() { - return new SsoServiceProviderRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppShareAdd Clone() { + return new AppShareAdd(this); } - /// Field number for the "name" field. - public const int NameFieldNumber = 1; - private string name_ = ""; - /// - /// the name entered by the user - /// + /// Field number for the "secretUid" field. + public const int SecretUidFieldNumber = 2; + private pb::ByteString secretUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SecretUid { + get { return secretUid_; } set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + secretUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 2; - private string clientVersion_ = ""; + /// Field number for the "shareType" field. + public const int ShareTypeFieldNumber = 3; + private global::Authentication.ApplicationShareType shareType_ = global::Authentication.ApplicationShareType.ShareTypeRecord; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.ApplicationShareType ShareType { + get { return shareType_; } set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + shareType_ = value; } } - /// Field number for the "locale" field. - public const int LocaleFieldNumber = 3; - private string locale_ = ""; - /// - /// such as "en_US" - /// + /// Field number for the "encryptedSecretKey" field. + public const int EncryptedSecretKeyFieldNumber = 4; + private pb::ByteString encryptedSecretKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Locale { - get { return locale_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedSecretKey { + get { return encryptedSecretKey_; } set { - locale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedSecretKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "editable" field. + public const int EditableFieldNumber = 5; + private bool editable_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Editable { + get { return editable_; } + set { + editable_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SsoServiceProviderRequest); + return Equals(other as AppShareAdd); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoServiceProviderRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AppShareAdd other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; - if (ClientVersion != other.ClientVersion) return false; - if (Locale != other.Locale) return false; + if (SecretUid != other.SecretUid) return false; + if (ShareType != other.ShareType) return false; + if (EncryptedSecretKey != other.EncryptedSecretKey) return false; + if (Editable != other.Editable) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (Locale.Length != 0) hash ^= Locale.GetHashCode(); + if (SecretUid.Length != 0) hash ^= SecretUid.GetHashCode(); + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) hash ^= ShareType.GetHashCode(); + if (EncryptedSecretKey.Length != 0) hash ^= EncryptedSecretKey.GetHashCode(); + if (Editable != false) hash ^= Editable.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -16005,40 +35899,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); - } - if (ClientVersion.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SecretUid.Length != 0) { output.WriteRawTag(18); - output.WriteString(ClientVersion); + output.WriteBytes(SecretUid); } - if (Locale.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Locale); + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + output.WriteRawTag(24); + output.WriteEnum((int) ShareType); + } + if (EncryptedSecretKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedSecretKey); + } + if (Editable != false) { + output.WriteRawTag(40); + output.WriteBool(Editable); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SecretUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SecretUid); + } + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + output.WriteRawTag(24); + output.WriteEnum((int) ShareType); + } + if (EncryptedSecretKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedSecretKey); + } + if (Editable != false) { + output.WriteRawTag(40); + output.WriteBool(Editable); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + if (SecretUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecretUid); } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ShareType); } - if (Locale.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Locale); + if (EncryptedSecretKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSecretKey); + } + if (Editable != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -16047,163 +35981,226 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoServiceProviderRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AppShareAdd other) { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; + if (other.SecretUid.Length != 0) { + SecretUid = other.SecretUid; } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (other.ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + ShareType = other.ShareType; } - if (other.Locale.Length != 0) { - Locale = other.Locale; + if (other.EncryptedSecretKey.Length != 0) { + EncryptedSecretKey = other.EncryptedSecretKey; + } + if (other.Editable != false) { + Editable = other.Editable; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Name = input.ReadString(); + case 18: { + SecretUid = input.ReadBytes(); + break; + } + case 24: { + ShareType = (global::Authentication.ApplicationShareType) input.ReadEnum(); + break; + } + case 34: { + EncryptedSecretKey = input.ReadBytes(); + break; + } + case 40: { + Editable = input.ReadBool(); break; } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; case 18: { - ClientVersion = input.ReadString(); + SecretUid = input.ReadBytes(); break; } - case 26: { - Locale = input.ReadString(); + case 24: { + ShareType = (global::Authentication.ApplicationShareType) input.ReadEnum(); + break; + } + case 34: { + EncryptedSecretKey = input.ReadBytes(); + break; + } + case 40: { + Editable = input.ReadBool(); break; } } } } + #endif } - /// - ///* - /// This is the response from the get_sso_service_provider command. - /// - public sealed partial class SsoServiceProviderResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoServiceProviderResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AppShare : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AppShare()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[73]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[120]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoServiceProviderResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppShare() { OnConstruction(); } partial void OnConstruction(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoServiceProviderResponse(SsoServiceProviderResponse other) : this() { - name_ = other.name_; - spUrl_ = other.spUrl_; - isCloud_ = other.isCloud_; - clientVersion_ = other.clientVersion_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppShare(AppShare other) : this() { + secretUid_ = other.secretUid_; + shareType_ = other.shareType_; + editable_ = other.editable_; + createdOn_ = other.createdOn_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoServiceProviderResponse Clone() { - return new SsoServiceProviderResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppShare Clone() { + return new AppShare(this); } - /// Field number for the "name" field. - public const int NameFieldNumber = 1; - private string name_ = ""; - /// - /// the official name - /// + /// Field number for the "secretUid" field. + public const int SecretUidFieldNumber = 1; + private pb::ByteString secretUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SecretUid { + get { return secretUid_; } set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + secretUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "spUrl" field. - public const int SpUrlFieldNumber = 2; - private string spUrl_ = ""; + /// Field number for the "shareType" field. + public const int ShareTypeFieldNumber = 2; + private global::Authentication.ApplicationShareType shareType_ = global::Authentication.ApplicationShareType.ShareTypeRecord; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string SpUrl { - get { return spUrl_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.ApplicationShareType ShareType { + get { return shareType_; } set { - spUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + shareType_ = value; } } - /// Field number for the "isCloud" field. - public const int IsCloudFieldNumber = 3; - private bool isCloud_; + /// Field number for the "editable" field. + public const int EditableFieldNumber = 3; + private bool editable_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IsCloud { - get { return isCloud_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Editable { + get { return editable_; } set { - isCloud_ = value; + editable_ = value; } } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 4; - private string clientVersion_ = ""; + /// Field number for the "createdOn" field. + public const int CreatedOnFieldNumber = 4; + private long createdOn_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long CreatedOn { + get { return createdOn_; } set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + createdOn_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SsoServiceProviderResponse); + return Equals(other as AppShare); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoServiceProviderResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AppShare other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; - if (SpUrl != other.SpUrl) return false; - if (IsCloud != other.IsCloud) return false; - if (ClientVersion != other.ClientVersion) return false; + if (SecretUid != other.SecretUid) return false; + if (ShareType != other.ShareType) return false; + if (Editable != other.Editable) return false; + if (CreatedOn != other.CreatedOn) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (SpUrl.Length != 0) hash ^= SpUrl.GetHashCode(); - if (IsCloud != false) hash ^= IsCloud.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (SecretUid.Length != 0) hash ^= SecretUid.GetHashCode(); + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) hash ^= ShareType.GetHashCode(); + if (Editable != false) hash ^= Editable.GetHashCode(); + if (CreatedOn != 0L) hash ^= CreatedOn.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -16211,47 +36208,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Name.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SecretUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Name); + output.WriteBytes(SecretUid); } - if (SpUrl.Length != 0) { - output.WriteRawTag(18); - output.WriteString(SpUrl); + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + output.WriteRawTag(16); + output.WriteEnum((int) ShareType); } - if (IsCloud != false) { + if (Editable != false) { output.WriteRawTag(24); - output.WriteBool(IsCloud); + output.WriteBool(Editable); } - if (ClientVersion.Length != 0) { - output.WriteRawTag(34); - output.WriteString(ClientVersion); + if (CreatedOn != 0L) { + output.WriteRawTag(32); + output.WriteInt64(CreatedOn); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SecretUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SecretUid); + } + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + output.WriteRawTag(16); + output.WriteEnum((int) ShareType); + } + if (Editable != false) { + output.WriteRawTag(24); + output.WriteBool(Editable); + } + if (CreatedOn != 0L) { + output.WriteRawTag(32); + output.WriteInt64(CreatedOn); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + if (SecretUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecretUid); } - if (SpUrl.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(SpUrl); + if (ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ShareType); } - if (IsCloud != false) { + if (Editable != false) { size += 1 + 1; } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + if (CreatedOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CreatedOn); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -16260,135 +36290,289 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoServiceProviderResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AppShare other) { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; + if (other.SecretUid.Length != 0) { + SecretUid = other.SecretUid; } - if (other.SpUrl.Length != 0) { - SpUrl = other.SpUrl; + if (other.ShareType != global::Authentication.ApplicationShareType.ShareTypeRecord) { + ShareType = other.ShareType; } - if (other.IsCloud != false) { - IsCloud = other.IsCloud; + if (other.Editable != false) { + Editable = other.Editable; } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (other.CreatedOn != 0L) { + CreatedOn = other.CreatedOn; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Name = input.ReadString(); + SecretUid = input.ReadBytes(); break; } - case 18: { - SpUrl = input.ReadString(); + case 16: { + ShareType = (global::Authentication.ApplicationShareType) input.ReadEnum(); break; } case 24: { - IsCloud = input.ReadBool(); + Editable = input.ReadBool(); break; } - case 34: { - ClientVersion = input.ReadString(); + case 32: { + CreatedOn = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SecretUid = input.ReadBytes(); + break; + } + case 16: { + ShareType = (global::Authentication.ApplicationShareType) input.ReadEnum(); + break; + } + case 24: { + Editable = input.ReadBool(); + break; + } + case 32: { + CreatedOn = input.ReadInt64(); break; } } } } + #endif } - public sealed partial class UserSettingRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserSettingRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AddAppClientRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddAppClientRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[74]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[121]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserSettingRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAppClientRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserSettingRequest(UserSettingRequest other) : this() { - setting_ = other.setting_; - value_ = other.value_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAppClientRequest(AddAppClientRequest other) : this() { + appRecordUid_ = other.appRecordUid_; + encryptedAppKey_ = other.encryptedAppKey_; + clientId_ = other.clientId_; + lockIp_ = other.lockIp_; + firstAccessExpireOn_ = other.firstAccessExpireOn_; + accessExpireOn_ = other.accessExpireOn_; + id_ = other.id_; + appClientType_ = other.appClientType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserSettingRequest Clone() { - return new UserSettingRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAppClientRequest Clone() { + return new AddAppClientRequest(this); } - /// Field number for the "setting" field. - public const int SettingFieldNumber = 1; - private string setting_ = ""; + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private pb::ByteString appRecordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Setting { - get { return setting_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppRecordUid { + get { return appRecordUid_; } set { - setting_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 2; - private string value_ = ""; + /// Field number for the "encryptedAppKey" field. + public const int EncryptedAppKeyFieldNumber = 2; + private pb::ByteString encryptedAppKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedAppKey { + get { return encryptedAppKey_; } set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedAppKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientId" field. + public const int ClientIdFieldNumber = 3; + private pb::ByteString clientId_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ClientId { + get { return clientId_; } + set { + clientId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "lockIp" field. + public const int LockIpFieldNumber = 4; + private bool lockIp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool LockIp { + get { return lockIp_; } + set { + lockIp_ = value; + } + } + + /// Field number for the "firstAccessExpireOn" field. + public const int FirstAccessExpireOnFieldNumber = 5; + private long firstAccessExpireOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FirstAccessExpireOn { + get { return firstAccessExpireOn_; } + set { + firstAccessExpireOn_ = value; + } + } + + /// Field number for the "accessExpireOn" field. + public const int AccessExpireOnFieldNumber = 6; + private long accessExpireOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AccessExpireOn { + get { return accessExpireOn_; } + set { + accessExpireOn_ = value; + } + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 7; + private string id_ = ""; + /// + /// optional, defaults to obfuscated device id + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } + set { + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "appClientType" field. + public const int AppClientTypeFieldNumber = 8; + private global::Enterprise.AppClientType appClientType_ = global::Enterprise.AppClientType.NotUsed; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.AppClientType AppClientType { + get { return appClientType_; } + set { + appClientType_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserSettingRequest); + return Equals(other as AddAppClientRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserSettingRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AddAppClientRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Setting != other.Setting) return false; - if (Value != other.Value) return false; + if (AppRecordUid != other.AppRecordUid) return false; + if (EncryptedAppKey != other.EncryptedAppKey) return false; + if (ClientId != other.ClientId) return false; + if (LockIp != other.LockIp) return false; + if (FirstAccessExpireOn != other.FirstAccessExpireOn) return false; + if (AccessExpireOn != other.AccessExpireOn) return false; + if (Id != other.Id) return false; + if (AppClientType != other.AppClientType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Setting.Length != 0) hash ^= Setting.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); + if (EncryptedAppKey.Length != 0) hash ^= EncryptedAppKey.GetHashCode(); + if (ClientId.Length != 0) hash ^= ClientId.GetHashCode(); + if (LockIp != false) hash ^= LockIp.GetHashCode(); + if (FirstAccessExpireOn != 0L) hash ^= FirstAccessExpireOn.GetHashCode(); + if (AccessExpireOn != 0L) hash ^= AccessExpireOn.GetHashCode(); + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (AppClientType != global::Enterprise.AppClientType.NotUsed) hash ^= AppClientType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -16396,33 +36580,124 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (Setting.Length != 0) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); + } + if (EncryptedAppKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedAppKey); + } + if (ClientId.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ClientId); + } + if (LockIp != false) { + output.WriteRawTag(32); + output.WriteBool(LockIp); + } + if (FirstAccessExpireOn != 0L) { + output.WriteRawTag(40); + output.WriteInt64(FirstAccessExpireOn); + } + if (AccessExpireOn != 0L) { + output.WriteRawTag(48); + output.WriteInt64(AccessExpireOn); + } + if (Id.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Id); + } + if (AppClientType != global::Enterprise.AppClientType.NotUsed) { + output.WriteRawTag(64); + output.WriteEnum((int) AppClientType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppRecordUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Setting); + output.WriteBytes(AppRecordUid); } - if (Value.Length != 0) { + if (EncryptedAppKey.Length != 0) { output.WriteRawTag(18); - output.WriteString(Value); + output.WriteBytes(EncryptedAppKey); + } + if (ClientId.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ClientId); + } + if (LockIp != false) { + output.WriteRawTag(32); + output.WriteBool(LockIp); + } + if (FirstAccessExpireOn != 0L) { + output.WriteRawTag(40); + output.WriteInt64(FirstAccessExpireOn); + } + if (AccessExpireOn != 0L) { + output.WriteRawTag(48); + output.WriteInt64(AccessExpireOn); + } + if (Id.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Id); + } + if (AppClientType != global::Enterprise.AppClientType.NotUsed) { + output.WriteRawTag(64); + output.WriteEnum((int) AppClientType); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Setting.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Setting); + if (AppRecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (EncryptedAppKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedAppKey); + } + if (ClientId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientId); + } + if (LockIp != false) { + size += 1 + 1; + } + if (FirstAccessExpireOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FirstAccessExpireOn); + } + if (AccessExpireOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AccessExpireOn); + } + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); + } + if (AppClientType != global::Enterprise.AppClientType.NotUsed) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AppClientType); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -16431,149 +36706,239 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserSettingRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AddAppClientRequest other) { if (other == null) { return; } - if (other.Setting.Length != 0) { - Setting = other.Setting; + if (other.AppRecordUid.Length != 0) { + AppRecordUid = other.AppRecordUid; } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.EncryptedAppKey.Length != 0) { + EncryptedAppKey = other.EncryptedAppKey; + } + if (other.ClientId.Length != 0) { + ClientId = other.ClientId; + } + if (other.LockIp != false) { + LockIp = other.LockIp; + } + if (other.FirstAccessExpireOn != 0L) { + FirstAccessExpireOn = other.FirstAccessExpireOn; + } + if (other.AccessExpireOn != 0L) { + AccessExpireOn = other.AccessExpireOn; + } + if (other.Id.Length != 0) { + Id = other.Id; + } + if (other.AppClientType != global::Enterprise.AppClientType.NotUsed) { + AppClientType = other.AppClientType; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Setting = input.ReadString(); + AppRecordUid = input.ReadBytes(); break; } case 18: { - Value = input.ReadString(); + EncryptedAppKey = input.ReadBytes(); + break; + } + case 26: { + ClientId = input.ReadBytes(); + break; + } + case 32: { + LockIp = input.ReadBool(); + break; + } + case 40: { + FirstAccessExpireOn = input.ReadInt64(); + break; + } + case 48: { + AccessExpireOn = input.ReadInt64(); + break; + } + case 58: { + Id = input.ReadString(); + break; + } + case 64: { + AppClientType = (global::Enterprise.AppClientType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedAppKey = input.ReadBytes(); + break; + } + case 26: { + ClientId = input.ReadBytes(); + break; + } + case 32: { + LockIp = input.ReadBool(); + break; + } + case 40: { + FirstAccessExpireOn = input.ReadInt64(); + break; + } + case 48: { + AccessExpireOn = input.ReadInt64(); + break; + } + case 58: { + Id = input.ReadString(); + break; + } + case 64: { + AppClientType = (global::Enterprise.AppClientType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class ThrottleState : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThrottleState()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RemoveAppClientsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RemoveAppClientsRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[75]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[122]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ThrottleState() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RemoveAppClientsRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ThrottleState(ThrottleState other) : this() { - type_ = other.type_; - key_ = other.key_; - value_ = other.value_; - state_ = other.state_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RemoveAppClientsRequest(RemoveAppClientsRequest other) : this() { + appRecordUid_ = other.appRecordUid_; + clients_ = other.clients_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ThrottleState Clone() { - return new ThrottleState(this); - } - - /// Field number for the "type" field. - public const int TypeFieldNumber = 1; - private global::Authentication.ThrottleType type_ = global::Authentication.ThrottleType.PasswordRetryThrottle; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.ThrottleType Type { - get { return type_; } - set { - type_ = value; - } - } - - /// Field number for the "key" field. - public const int KeyFieldNumber = 2; - private string key_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Key { - get { return key_; } - set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RemoveAppClientsRequest Clone() { + return new RemoveAppClientsRequest(this); } - /// Field number for the "value" field. - public const int ValueFieldNumber = 3; - private string value_ = ""; + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private pb::ByteString appRecordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppRecordUid { + get { return appRecordUid_; } set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "state" field. - public const int StateFieldNumber = 4; - private bool state_; + /// Field number for the "clients" field. + public const int ClientsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_clients_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField clients_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool State { - get { return state_; } - set { - state_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Clients { + get { return clients_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ThrottleState); + return Equals(other as RemoveAppClientsRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ThrottleState other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RemoveAppClientsRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Type != other.Type) return false; - if (Key != other.Key) return false; - if (Value != other.Value) return false; - if (State != other.State) return false; + if (AppRecordUid != other.AppRecordUid) return false; + if(!clients_.Equals(other.clients_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) hash ^= Type.GetHashCode(); - if (Key.Length != 0) hash ^= Key.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); - if (State != false) hash ^= State.GetHashCode(); + if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); + hash ^= clients_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -16581,48 +36946,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { - output.WriteRawTag(8); - output.WriteEnum((int) Type); - } - if (Key.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Key); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); } - if (Value.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Value); + clients_.WriteTo(output, _repeated_clients_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (State != false) { - output.WriteRawTag(32); - output.WriteBool(State); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); } + clients_.WriteTo(ref output, _repeated_clients_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); - } - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); - } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); - } - if (State != false) { - size += 1 + 1; + if (AppRecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); } + size += clients_.CalculateSize(_repeated_clients_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -16630,219 +36998,235 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ThrottleState other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RemoveAppClientsRequest other) { if (other == null) { return; } - if (other.Type != global::Authentication.ThrottleType.PasswordRetryThrottle) { - Type = other.Type; - } - if (other.Key.Length != 0) { - Key = other.Key; - } - if (other.Value.Length != 0) { - Value = other.Value; - } - if (other.State != false) { - State = other.State; + if (other.AppRecordUid.Length != 0) { + AppRecordUid = other.AppRecordUid; } + clients_.Add(other.clients_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 18: { + clients_.AddEntriesFrom(input, _repeated_clients_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - Type = (global::Authentication.ThrottleType) input.ReadEnum(); + case 10: { + AppRecordUid = input.ReadBytes(); break; } case 18: { - Key = input.ReadString(); - break; - } - case 26: { - Value = input.ReadString(); - break; - } - case 32: { - State = input.ReadBool(); + clients_.AddEntriesFrom(ref input, _repeated_clients_codec); break; } } } } + #endif } - public sealed partial class ThrottleState2 : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ThrottleState2()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AddExternalShareRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddExternalShareRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[76]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[123]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ThrottleState2() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddExternalShareRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ThrottleState2(ThrottleState2 other) : this() { - key_ = other.key_; - keyDescription_ = other.keyDescription_; - value_ = other.value_; - valueDescription_ = other.valueDescription_; - identifier_ = other.identifier_; - locked_ = other.locked_; - includedInAllClear_ = other.includedInAllClear_; - expireSeconds_ = other.expireSeconds_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddExternalShareRequest(AddExternalShareRequest other) : this() { + recordUid_ = other.recordUid_; + encryptedRecordKey_ = other.encryptedRecordKey_; + clientId_ = other.clientId_; + accessExpireOn_ = other.accessExpireOn_; + id_ = other.id_; + isSelfDestruct_ = other.isSelfDestruct_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ThrottleState2 Clone() { - return new ThrottleState2(this); - } - - /// Field number for the "key" field. - public const int KeyFieldNumber = 1; - private string key_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Key { - get { return key_; } - set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "keyDescription" field. - public const int KeyDescriptionFieldNumber = 2; - private string keyDescription_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string KeyDescription { - get { return keyDescription_; } - set { - keyDescription_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddExternalShareRequest Clone() { + return new AddExternalShareRequest(this); } - /// Field number for the "value" field. - public const int ValueFieldNumber = 3; - private string value_ = ""; + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "valueDescription" field. - public const int ValueDescriptionFieldNumber = 4; - private string valueDescription_ = ""; + /// Field number for the "encryptedRecordKey" field. + public const int EncryptedRecordKeyFieldNumber = 2; + private pb::ByteString encryptedRecordKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ValueDescription { - get { return valueDescription_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedRecordKey { + get { return encryptedRecordKey_; } set { - valueDescription_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedRecordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "identifier" field. - public const int IdentifierFieldNumber = 5; - private string identifier_ = ""; + /// Field number for the "clientId" field. + public const int ClientIdFieldNumber = 3; + private pb::ByteString clientId_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Identifier { - get { return identifier_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ClientId { + get { return clientId_; } set { - identifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + clientId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "locked" field. - public const int LockedFieldNumber = 6; - private bool locked_; + /// Field number for the "accessExpireOn" field. + public const int AccessExpireOnFieldNumber = 4; + private long accessExpireOn_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Locked { - get { return locked_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AccessExpireOn { + get { return accessExpireOn_; } set { - locked_ = value; + accessExpireOn_ = value; } } - /// Field number for the "includedInAllClear" field. - public const int IncludedInAllClearFieldNumber = 7; - private bool includedInAllClear_; + /// Field number for the "id" field. + public const int IdFieldNumber = 5; + private string id_ = ""; + /// + /// optional, defaults to obfuscated device id + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IncludedInAllClear { - get { return includedInAllClear_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } set { - includedInAllClear_ = value; + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "expireSeconds" field. - public const int ExpireSecondsFieldNumber = 8; - private int expireSeconds_; + /// Field number for the "isSelfDestruct" field. + public const int IsSelfDestructFieldNumber = 6; + private bool isSelfDestruct_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ExpireSeconds { - get { return expireSeconds_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsSelfDestruct { + get { return isSelfDestruct_; } set { - expireSeconds_ = value; + isSelfDestruct_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ThrottleState2); + return Equals(other as AddExternalShareRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ThrottleState2 other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AddExternalShareRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Key != other.Key) return false; - if (KeyDescription != other.KeyDescription) return false; - if (Value != other.Value) return false; - if (ValueDescription != other.ValueDescription) return false; - if (Identifier != other.Identifier) return false; - if (Locked != other.Locked) return false; - if (IncludedInAllClear != other.IncludedInAllClear) return false; - if (ExpireSeconds != other.ExpireSeconds) return false; + if (RecordUid != other.RecordUid) return false; + if (EncryptedRecordKey != other.EncryptedRecordKey) return false; + if (ClientId != other.ClientId) return false; + if (AccessExpireOn != other.AccessExpireOn) return false; + if (Id != other.Id) return false; + if (IsSelfDestruct != other.IsSelfDestruct) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Key.Length != 0) hash ^= Key.GetHashCode(); - if (KeyDescription.Length != 0) hash ^= KeyDescription.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); - if (ValueDescription.Length != 0) hash ^= ValueDescription.GetHashCode(); - if (Identifier.Length != 0) hash ^= Identifier.GetHashCode(); - if (Locked != false) hash ^= Locked.GetHashCode(); - if (IncludedInAllClear != false) hash ^= IncludedInAllClear.GetHashCode(); - if (ExpireSeconds != 0) hash ^= ExpireSeconds.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (EncryptedRecordKey.Length != 0) hash ^= EncryptedRecordKey.GetHashCode(); + if (ClientId.Length != 0) hash ^= ClientId.GetHashCode(); + if (AccessExpireOn != 0L) hash ^= AccessExpireOn.GetHashCode(); + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (IsSelfDestruct != false) hash ^= IsSelfDestruct.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -16850,76 +37234,103 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Key.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Key); + output.WriteBytes(RecordUid); } - if (KeyDescription.Length != 0) { + if (EncryptedRecordKey.Length != 0) { output.WriteRawTag(18); - output.WriteString(KeyDescription); + output.WriteBytes(EncryptedRecordKey); } - if (Value.Length != 0) { + if (ClientId.Length != 0) { output.WriteRawTag(26); - output.WriteString(Value); + output.WriteBytes(ClientId); } - if (ValueDescription.Length != 0) { - output.WriteRawTag(34); - output.WriteString(ValueDescription); + if (AccessExpireOn != 0L) { + output.WriteRawTag(32); + output.WriteInt64(AccessExpireOn); } - if (Identifier.Length != 0) { + if (Id.Length != 0) { output.WriteRawTag(42); - output.WriteString(Identifier); + output.WriteString(Id); } - if (Locked != false) { + if (IsSelfDestruct != false) { output.WriteRawTag(48); - output.WriteBool(Locked); + output.WriteBool(IsSelfDestruct); } - if (IncludedInAllClear != false) { - output.WriteRawTag(56); - output.WriteBool(IncludedInAllClear); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (ExpireSeconds != 0) { - output.WriteRawTag(64); - output.WriteInt32(ExpireSeconds); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (EncryptedRecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedRecordKey); + } + if (ClientId.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ClientId); + } + if (AccessExpireOn != 0L) { + output.WriteRawTag(32); + output.WriteInt64(AccessExpireOn); + } + if (Id.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Id); + } + if (IsSelfDestruct != false) { + output.WriteRawTag(48); + output.WriteBool(IsSelfDestruct); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Key); - } - if (KeyDescription.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyDescription); + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (EncryptedRecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedRecordKey); } - if (ValueDescription.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ValueDescription); + if (ClientId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientId); } - if (Identifier.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Identifier); + if (AccessExpireOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AccessExpireOn); } - if (Locked != false) { - size += 1 + 1; + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); } - if (IncludedInAllClear != false) { + if (IsSelfDestruct != false) { size += 1 + 1; } - if (ExpireSeconds != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ExpireSeconds); - } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -16927,208 +37338,353 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ThrottleState2 other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AddExternalShareRequest other) { if (other == null) { return; } - if (other.Key.Length != 0) { - Key = other.Key; - } - if (other.KeyDescription.Length != 0) { - KeyDescription = other.KeyDescription; - } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; } - if (other.ValueDescription.Length != 0) { - ValueDescription = other.ValueDescription; + if (other.EncryptedRecordKey.Length != 0) { + EncryptedRecordKey = other.EncryptedRecordKey; } - if (other.Identifier.Length != 0) { - Identifier = other.Identifier; + if (other.ClientId.Length != 0) { + ClientId = other.ClientId; } - if (other.Locked != false) { - Locked = other.Locked; + if (other.AccessExpireOn != 0L) { + AccessExpireOn = other.AccessExpireOn; } - if (other.IncludedInAllClear != false) { - IncludedInAllClear = other.IncludedInAllClear; + if (other.Id.Length != 0) { + Id = other.Id; } - if (other.ExpireSeconds != 0) { - ExpireSeconds = other.ExpireSeconds; + if (other.IsSelfDestruct != false) { + IsSelfDestruct = other.IsSelfDestruct; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Key = input.ReadString(); + RecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedRecordKey = input.ReadBytes(); + break; + } + case 26: { + ClientId = input.ReadBytes(); + break; + } + case 32: { + AccessExpireOn = input.ReadInt64(); + break; + } + case 42: { + Id = input.ReadString(); + break; + } + case 48: { + IsSelfDestruct = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); break; } case 18: { - KeyDescription = input.ReadString(); + EncryptedRecordKey = input.ReadBytes(); break; } case 26: { - Value = input.ReadString(); + ClientId = input.ReadBytes(); break; } - case 34: { - ValueDescription = input.ReadString(); + case 32: { + AccessExpireOn = input.ReadInt64(); break; } case 42: { - Identifier = input.ReadString(); + Id = input.ReadString(); break; } case 48: { - Locked = input.ReadBool(); - break; - } - case 56: { - IncludedInAllClear = input.ReadBool(); - break; - } - case 64: { - ExpireSeconds = input.ReadInt32(); + IsSelfDestruct = input.ReadBool(); break; } } } } + #endif } - public sealed partial class DeviceInformation : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceInformation()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AppClient : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AppClient()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[77]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[124]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceInformation() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppClient() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceInformation(DeviceInformation other) : this() { - deviceId_ = other.deviceId_; - deviceName_ = other.deviceName_; - clientVersion_ = other.clientVersion_; - lastLogin_ = other.lastLogin_; - deviceStatus_ = other.deviceStatus_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppClient(AppClient other) : this() { + id_ = other.id_; + clientId_ = other.clientId_; + createdOn_ = other.createdOn_; + firstAccess_ = other.firstAccess_; + lastAccess_ = other.lastAccess_; + publicKey_ = other.publicKey_; + lockIp_ = other.lockIp_; + ipAddress_ = other.ipAddress_; + firstAccessExpireOn_ = other.firstAccessExpireOn_; + accessExpireOn_ = other.accessExpireOn_; + appClientType_ = other.appClientType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceInformation Clone() { - return new DeviceInformation(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppClient Clone() { + return new AppClient(this); } - /// Field number for the "deviceId" field. - public const int DeviceIdFieldNumber = 1; - private long deviceId_; + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private string id_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long DeviceId { - get { return deviceId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Id { + get { return id_; } set { - deviceId_ = value; + id_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "deviceName" field. - public const int DeviceNameFieldNumber = 2; - private string deviceName_ = ""; + /// Field number for the "clientId" field. + public const int ClientIdFieldNumber = 2; + private pb::ByteString clientId_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceName { - get { return deviceName_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ClientId { + get { return clientId_; } set { - deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + clientId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 3; - private string clientVersion_ = ""; + /// Field number for the "createdOn" field. + public const int CreatedOnFieldNumber = 3; + private long createdOn_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long CreatedOn { + get { return createdOn_; } set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + createdOn_ = value; } } - /// Field number for the "lastLogin" field. - public const int LastLoginFieldNumber = 4; - private long lastLogin_; - /// - /// for get not save - /// + /// Field number for the "firstAccess" field. + public const int FirstAccessFieldNumber = 4; + private long firstAccess_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long LastLogin { - get { return lastLogin_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FirstAccess { + get { return firstAccess_; } set { - lastLogin_ = value; + firstAccess_ = value; } } - /// Field number for the "deviceStatus" field. - public const int DeviceStatusFieldNumber = 5; - private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; + /// Field number for the "lastAccess" field. + public const int LastAccessFieldNumber = 5; + private long lastAccess_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.DeviceStatus DeviceStatus { - get { return deviceStatus_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LastAccess { + get { return lastAccess_; } set { - deviceStatus_ = value; + lastAccess_ = value; + } + } + + /// Field number for the "publicKey" field. + public const int PublicKeyFieldNumber = 6; + private pb::ByteString publicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PublicKey { + get { return publicKey_; } + set { + publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "lockIp" field. + public const int LockIpFieldNumber = 7; + private bool lockIp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool LockIp { + get { return lockIp_; } + set { + lockIp_ = value; + } + } + + /// Field number for the "ipAddress" field. + public const int IpAddressFieldNumber = 8; + private string ipAddress_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IpAddress { + get { return ipAddress_; } + set { + ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "firstAccessExpireOn" field. + public const int FirstAccessExpireOnFieldNumber = 9; + private long firstAccessExpireOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FirstAccessExpireOn { + get { return firstAccessExpireOn_; } + set { + firstAccessExpireOn_ = value; + } + } + + /// Field number for the "accessExpireOn" field. + public const int AccessExpireOnFieldNumber = 10; + private long accessExpireOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AccessExpireOn { + get { return accessExpireOn_; } + set { + accessExpireOn_ = value; + } + } + + /// Field number for the "appClientType" field. + public const int AppClientTypeFieldNumber = 11; + private global::Enterprise.AppClientType appClientType_ = global::Enterprise.AppClientType.NotUsed; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.AppClientType AppClientType { + get { return appClientType_; } + set { + appClientType_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceInformation); + return Equals(other as AppClient); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceInformation other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AppClient other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (DeviceId != other.DeviceId) return false; - if (DeviceName != other.DeviceName) return false; - if (ClientVersion != other.ClientVersion) return false; - if (LastLogin != other.LastLogin) return false; - if (DeviceStatus != other.DeviceStatus) return false; + if (Id != other.Id) return false; + if (ClientId != other.ClientId) return false; + if (CreatedOn != other.CreatedOn) return false; + if (FirstAccess != other.FirstAccess) return false; + if (LastAccess != other.LastAccess) return false; + if (PublicKey != other.PublicKey) return false; + if (LockIp != other.LockIp) return false; + if (IpAddress != other.IpAddress) return false; + if (FirstAccessExpireOn != other.FirstAccessExpireOn) return false; + if (AccessExpireOn != other.AccessExpireOn) return false; + if (AppClientType != other.AppClientType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (DeviceId != 0L) hash ^= DeviceId.GetHashCode(); - if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (LastLogin != 0L) hash ^= LastLogin.GetHashCode(); - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) hash ^= DeviceStatus.GetHashCode(); + if (Id.Length != 0) hash ^= Id.GetHashCode(); + if (ClientId.Length != 0) hash ^= ClientId.GetHashCode(); + if (CreatedOn != 0L) hash ^= CreatedOn.GetHashCode(); + if (FirstAccess != 0L) hash ^= FirstAccess.GetHashCode(); + if (LastAccess != 0L) hash ^= LastAccess.GetHashCode(); + if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); + if (LockIp != false) hash ^= LockIp.GetHashCode(); + if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); + if (FirstAccessExpireOn != 0L) hash ^= FirstAccessExpireOn.GetHashCode(); + if (AccessExpireOn != 0L) hash ^= AccessExpireOn.GetHashCode(); + if (AppClientType != global::Enterprise.AppClientType.NotUsed) hash ^= AppClientType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17136,54 +37692,157 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (DeviceId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(DeviceId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); } - if (DeviceName.Length != 0) { + if (ClientId.Length != 0) { output.WriteRawTag(18); - output.WriteString(DeviceName); + output.WriteBytes(ClientId); } - if (ClientVersion.Length != 0) { - output.WriteRawTag(26); - output.WriteString(ClientVersion); + if (CreatedOn != 0L) { + output.WriteRawTag(24); + output.WriteInt64(CreatedOn); } - if (LastLogin != 0L) { + if (FirstAccess != 0L) { output.WriteRawTag(32); - output.WriteInt64(LastLogin); + output.WriteInt64(FirstAccess); } - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + if (LastAccess != 0L) { output.WriteRawTag(40); - output.WriteEnum((int) DeviceStatus); + output.WriteInt64(LastAccess); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(PublicKey); + } + if (LockIp != false) { + output.WriteRawTag(56); + output.WriteBool(LockIp); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(66); + output.WriteString(IpAddress); + } + if (FirstAccessExpireOn != 0L) { + output.WriteRawTag(72); + output.WriteInt64(FirstAccessExpireOn); + } + if (AccessExpireOn != 0L) { + output.WriteRawTag(80); + output.WriteInt64(AccessExpireOn); + } + if (AppClientType != global::Enterprise.AppClientType.NotUsed) { + output.WriteRawTag(88); + output.WriteEnum((int) AppClientType); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Id); + } + if (ClientId.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ClientId); + } + if (CreatedOn != 0L) { + output.WriteRawTag(24); + output.WriteInt64(CreatedOn); + } + if (FirstAccess != 0L) { + output.WriteRawTag(32); + output.WriteInt64(FirstAccess); + } + if (LastAccess != 0L) { + output.WriteRawTag(40); + output.WriteInt64(LastAccess); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(PublicKey); + } + if (LockIp != false) { + output.WriteRawTag(56); + output.WriteBool(LockIp); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(66); + output.WriteString(IpAddress); + } + if (FirstAccessExpireOn != 0L) { + output.WriteRawTag(72); + output.WriteInt64(FirstAccessExpireOn); + } + if (AccessExpireOn != 0L) { + output.WriteRawTag(80); + output.WriteInt64(AccessExpireOn); + } + if (AppClientType != global::Enterprise.AppClientType.NotUsed) { + output.WriteRawTag(88); + output.WriteEnum((int) AppClientType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (DeviceId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeviceId); + if (Id.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Id); } - if (DeviceName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + if (ClientId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientId); } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + if (CreatedOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(CreatedOn); } - if (LastLogin != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastLogin); + if (FirstAccess != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FirstAccess); } - if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DeviceStatus); + if (LastAccess != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastAccess); + } + if (PublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + } + if (LockIp != false) { + size += 1 + 1; + } + if (IpAddress.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + } + if (FirstAccessExpireOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FirstAccessExpireOn); + } + if (AccessExpireOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AccessExpireOn); + } + if (AppClientType != global::Enterprise.AppClientType.NotUsed) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AppClientType); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -17192,142 +37851,257 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceInformation other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AppClient other) { if (other == null) { return; } - if (other.DeviceId != 0L) { - DeviceId = other.DeviceId; + if (other.Id.Length != 0) { + Id = other.Id; } - if (other.DeviceName.Length != 0) { - DeviceName = other.DeviceName; + if (other.ClientId.Length != 0) { + ClientId = other.ClientId; } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + if (other.CreatedOn != 0L) { + CreatedOn = other.CreatedOn; } - if (other.LastLogin != 0L) { - LastLogin = other.LastLogin; + if (other.FirstAccess != 0L) { + FirstAccess = other.FirstAccess; } - if (other.DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { - DeviceStatus = other.DeviceStatus; + if (other.LastAccess != 0L) { + LastAccess = other.LastAccess; + } + if (other.PublicKey.Length != 0) { + PublicKey = other.PublicKey; + } + if (other.LockIp != false) { + LockIp = other.LockIp; + } + if (other.IpAddress.Length != 0) { + IpAddress = other.IpAddress; + } + if (other.FirstAccessExpireOn != 0L) { + FirstAccessExpireOn = other.FirstAccessExpireOn; + } + if (other.AccessExpireOn != 0L) { + AccessExpireOn = other.AccessExpireOn; + } + if (other.AppClientType != global::Enterprise.AppClientType.NotUsed) { + AppClientType = other.AppClientType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Id = input.ReadString(); + break; + } + case 18: { + ClientId = input.ReadBytes(); + break; + } + case 24: { + CreatedOn = input.ReadInt64(); + break; + } + case 32: { + FirstAccess = input.ReadInt64(); + break; + } + case 40: { + LastAccess = input.ReadInt64(); + break; + } + case 50: { + PublicKey = input.ReadBytes(); + break; + } + case 56: { + LockIp = input.ReadBool(); + break; + } + case 66: { + IpAddress = input.ReadString(); + break; + } + case 72: { + FirstAccessExpireOn = input.ReadInt64(); + break; + } + case 80: { + AccessExpireOn = input.ReadInt64(); + break; + } + case 88: { + AppClientType = (global::Enterprise.AppClientType) input.ReadEnum(); + break; + } + } } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - DeviceId = input.ReadInt64(); + case 10: { + Id = input.ReadString(); break; } case 18: { - DeviceName = input.ReadString(); + ClientId = input.ReadBytes(); break; } - case 26: { - ClientVersion = input.ReadString(); + case 24: { + CreatedOn = input.ReadInt64(); break; } case 32: { - LastLogin = input.ReadInt64(); + FirstAccess = input.ReadInt64(); break; } case 40: { - DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + LastAccess = input.ReadInt64(); + break; + } + case 50: { + PublicKey = input.ReadBytes(); + break; + } + case 56: { + LockIp = input.ReadBool(); + break; + } + case 66: { + IpAddress = input.ReadString(); + break; + } + case 72: { + FirstAccessExpireOn = input.ReadInt64(); + break; + } + case 80: { + AccessExpireOn = input.ReadInt64(); + break; + } + case 88: { + AppClientType = (global::Enterprise.AppClientType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class UserSetting : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserSetting()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetAppInfoRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetAppInfoRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[78]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[125]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserSetting() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetAppInfoRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserSetting(UserSetting other) : this() { - name_ = other.name_; - value_ = other.value_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetAppInfoRequest(GetAppInfoRequest other) : this() { + appRecordUid_ = other.appRecordUid_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserSetting Clone() { - return new UserSetting(this); - } - - /// Field number for the "name" field. - public const int NameFieldNumber = 1; - private string name_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetAppInfoRequest Clone() { + return new GetAppInfoRequest(this); } - /// Field number for the "value" field. - public const int ValueFieldNumber = 2; - private bool value_; + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_appRecordUid_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField appRecordUid_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Value { - get { return value_; } - set { - value_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AppRecordUid { + get { return appRecordUid_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserSetting); + return Equals(other as GetAppInfoRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserSetting other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetAppInfoRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; - if (Value != other.Value) return false; + if(!appRecordUid_.Equals(other.appRecordUid_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (Value != false) hash ^= Value.GetHashCode(); + hash ^= appRecordUid_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17335,34 +38109,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Name.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Name); - } - if (Value != false) { - output.WriteRawTag(16); - output.WriteBool(Value); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + appRecordUid_.WriteTo(output, _repeated_appRecordUid_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + appRecordUid_.WriteTo(ref output, _repeated_appRecordUid_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (Value != false) { - size += 1 + 1; - } + size += appRecordUid_.CalculateSize(_repeated_appRecordUid_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -17370,106 +38150,189 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserSetting other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetAppInfoRequest other) { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.Value != false) { - Value = other.Value; - } + appRecordUid_.Add(other.appRecordUid_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Name = input.ReadString(); + appRecordUid_.AddEntriesFrom(input, _repeated_appRecordUid_codec); break; } - case 16: { - Value = input.ReadBool(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + appRecordUid_.AddEntriesFrom(ref input, _repeated_appRecordUid_codec); break; } } } } + #endif } - public sealed partial class UserDataKeyRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserDataKeyRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AppInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AppInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[79]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[126]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKeyRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppInfo() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKeyRequest(UserDataKeyRequest other) : this() { - enterpriseUserId_ = other.enterpriseUserId_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppInfo(AppInfo other) : this() { + appRecordUid_ = other.appRecordUid_; + shares_ = other.shares_.Clone(); + clients_ = other.clients_.Clone(); + isExternalShare_ = other.isExternalShare_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKeyRequest Clone() { - return new UserDataKeyRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AppInfo Clone() { + return new AppInfo(this); } - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_enterpriseUserId_codec - = pb::FieldCodec.ForInt64(10); - private readonly pbc::RepeatedField enterpriseUserId_ = new pbc::RepeatedField(); + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private pb::ByteString appRecordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField EnterpriseUserId { - get { return enterpriseUserId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppRecordUid { + get { return appRecordUid_; } + set { + appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "shares" field. + public const int SharesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_shares_codec + = pb::FieldCodec.ForMessage(18, global::Authentication.AppShare.Parser); + private readonly pbc::RepeatedField shares_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Shares { + get { return shares_; } + } + + /// Field number for the "clients" field. + public const int ClientsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_clients_codec + = pb::FieldCodec.ForMessage(26, global::Authentication.AppClient.Parser); + private readonly pbc::RepeatedField clients_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Clients { + get { return clients_; } + } + + /// Field number for the "isExternalShare" field. + public const int IsExternalShareFieldNumber = 4; + private bool isExternalShare_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsExternalShare { + get { return isExternalShare_; } + set { + isExternalShare_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserDataKeyRequest); + return Equals(other as AppInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserDataKeyRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AppInfo other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!enterpriseUserId_.Equals(other.enterpriseUserId_)) return false; + if (AppRecordUid != other.AppRecordUid) return false; + if(!shares_.Equals(other.shares_)) return false; + if(!clients_.Equals(other.clients_)) return false; + if (IsExternalShare != other.IsExternalShare) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= enterpriseUserId_.GetHashCode(); + if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); + hash ^= shares_.GetHashCode(); + hash ^= clients_.GetHashCode(); + if (IsExternalShare != false) hash ^= IsExternalShare.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17477,22 +38340,65 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - enterpriseUserId_.WriteTo(output, _repeated_enterpriseUserId_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); + } + shares_.WriteTo(output, _repeated_shares_codec); + clients_.WriteTo(output, _repeated_clients_codec); + if (IsExternalShare != false) { + output.WriteRawTag(32); + output.WriteBool(IsExternalShare); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); + } + shares_.WriteTo(ref output, _repeated_shares_codec); + clients_.WriteTo(ref output, _repeated_clients_codec); + if (IsExternalShare != false) { + output.WriteRawTag(32); + output.WriteBool(IsExternalShare); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += enterpriseUserId_.CalculateSize(_repeated_enterpriseUserId_codec); + if (AppRecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); + } + size += shares_.CalculateSize(_repeated_shares_codec); + size += clients_.CalculateSize(_repeated_clients_codec); + if (IsExternalShare != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -17500,113 +38406,176 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserDataKeyRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AppInfo other) { if (other == null) { return; } - enterpriseUserId_.Add(other.enterpriseUserId_); + if (other.AppRecordUid.Length != 0) { + AppRecordUid = other.AppRecordUid; + } + shares_.Add(other.shares_); + clients_.Add(other.clients_); + if (other.IsExternalShare != false) { + IsExternalShare = other.IsExternalShare; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: - case 8: { - enterpriseUserId_.AddEntriesFrom(input, _repeated_enterpriseUserId_codec); + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 18: { + shares_.AddEntriesFrom(input, _repeated_shares_codec); + break; + } + case 26: { + clients_.AddEntriesFrom(input, _repeated_clients_codec); + break; + } + case 32: { + IsExternalShare = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 18: { + shares_.AddEntriesFrom(ref input, _repeated_shares_codec); + break; + } + case 26: { + clients_.AddEntriesFrom(ref input, _repeated_clients_codec); + break; + } + case 32: { + IsExternalShare = input.ReadBool(); break; } } } } + #endif } - public sealed partial class EnterpriseUserIdDataKeyPair : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserIdDataKeyPair()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetAppInfoResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetAppInfoResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[80]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[127]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserIdDataKeyPair() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetAppInfoResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserIdDataKeyPair(EnterpriseUserIdDataKeyPair other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - encryptedDataKey_ = other.encryptedDataKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetAppInfoResponse(GetAppInfoResponse other) : this() { + appInfo_ = other.appInfo_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserIdDataKeyPair Clone() { - return new EnterpriseUserIdDataKeyPair(this); - } - - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } - set { - enterpriseUserId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetAppInfoResponse Clone() { + return new GetAppInfoResponse(this); } - /// Field number for the "encryptedDataKey" field. - public const int EncryptedDataKeyFieldNumber = 2; - private pb::ByteString encryptedDataKey_ = pb::ByteString.Empty; + /// Field number for the "appInfo" field. + public const int AppInfoFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_appInfo_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.AppInfo.Parser); + private readonly pbc::RepeatedField appInfo_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDataKey { - get { return encryptedDataKey_; } - set { - encryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AppInfo { + get { return appInfo_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseUserIdDataKeyPair); + return Equals(other as GetAppInfoResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseUserIdDataKeyPair other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetAppInfoResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (EncryptedDataKey != other.EncryptedDataKey) return false; + if(!appInfo_.Equals(other.appInfo_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (EncryptedDataKey.Length != 0) hash ^= EncryptedDataKey.GetHashCode(); + hash ^= appInfo_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17614,34 +38583,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); - } - if (EncryptedDataKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(EncryptedDataKey); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + appInfo_.WriteTo(output, _repeated_appInfo_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + appInfo_.WriteTo(ref output, _repeated_appInfo_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (EncryptedDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDataKey); - } + size += appInfo_.CalculateSize(_repeated_appInfo_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -17649,148 +38624,254 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseUserIdDataKeyPair other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetAppInfoResponse other) { if (other == null) { return; } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.EncryptedDataKey.Length != 0) { - EncryptedDataKey = other.EncryptedDataKey; - } + appInfo_.Add(other.appInfo_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseUserId = input.ReadInt64(); + case 10: { + appInfo_.AddEntriesFrom(input, _repeated_appInfo_codec); break; } - case 18: { - EncryptedDataKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + appInfo_.AddEntriesFrom(ref input, _repeated_appInfo_codec); break; } } } } + #endif } - public sealed partial class UserDataKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserDataKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApplicationSummary : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApplicationSummary()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[81]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[128]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKey() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApplicationSummary() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKey(UserDataKey other) : this() { - roleId_ = other.roleId_; - roleKey_ = other.roleKey_; - privateKey_ = other.privateKey_; - enterpriseUserIdDataKeyPairs_ = other.enterpriseUserIdDataKeyPairs_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApplicationSummary(ApplicationSummary other) : this() { + appRecordUid_ = other.appRecordUid_; + lastAccess_ = other.lastAccess_; + recordShares_ = other.recordShares_; + folderShares_ = other.folderShares_; + folderRecords_ = other.folderRecords_; + clientCount_ = other.clientCount_; + expiredClientCount_ = other.expiredClientCount_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKey Clone() { - return new UserDataKey(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApplicationSummary Clone() { + return new ApplicationSummary(this); } - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private long roleId_; + /// Field number for the "appRecordUid" field. + public const int AppRecordUidFieldNumber = 1; + private pb::ByteString appRecordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppRecordUid { + get { return appRecordUid_; } set { - roleId_ = value; + appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "roleKey" field. - public const int RoleKeyFieldNumber = 2; - private pb::ByteString roleKey_ = pb::ByteString.Empty; + /// Field number for the "lastAccess" field. + public const int LastAccessFieldNumber = 2; + private long lastAccess_; + /// + /// last access time across all clients + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RoleKey { - get { return roleKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LastAccess { + get { return lastAccess_; } set { - roleKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + lastAccess_ = value; } } - /// Field number for the "privateKey" field. - public const int PrivateKeyFieldNumber = 3; - private string privateKey_ = ""; + /// Field number for the "recordShares" field. + public const int RecordSharesFieldNumber = 3; + private int recordShares_; + /// + /// number of records shared to the application + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string PrivateKey { - get { return privateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RecordShares { + get { return recordShares_; } set { - privateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recordShares_ = value; } } - /// Field number for the "enterpriseUserIdDataKeyPairs" field. - public const int EnterpriseUserIdDataKeyPairsFieldNumber = 4; - private static readonly pb::FieldCodec _repeated_enterpriseUserIdDataKeyPairs_codec - = pb::FieldCodec.ForMessage(34, global::Authentication.EnterpriseUserIdDataKeyPair.Parser); - private readonly pbc::RepeatedField enterpriseUserIdDataKeyPairs_ = new pbc::RepeatedField(); + /// Field number for the "folderShares" field. + public const int FolderSharesFieldNumber = 4; + private int folderShares_; + /// + /// number of folders shared to the application + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField EnterpriseUserIdDataKeyPairs { - get { return enterpriseUserIdDataKeyPairs_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int FolderShares { + get { return folderShares_; } + set { + folderShares_ = value; + } + } + + /// Field number for the "folderRecords" field. + public const int FolderRecordsFieldNumber = 5; + private int folderRecords_; + /// + /// number of records in the folders shared to the application + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int FolderRecords { + get { return folderRecords_; } + set { + folderRecords_ = value; + } + } + + /// Field number for the "clientCount" field. + public const int ClientCountFieldNumber = 6; + private int clientCount_; + /// + /// total number of clients + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ClientCount { + get { return clientCount_; } + set { + clientCount_ = value; + } + } + + /// Field number for the "expiredClientCount" field. + public const int ExpiredClientCountFieldNumber = 7; + private int expiredClientCount_; + /// + /// number of clients that no longert can have access + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ExpiredClientCount { + get { return expiredClientCount_; } + set { + expiredClientCount_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserDataKey); + return Equals(other as ApplicationSummary); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserDataKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApplicationSummary other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RoleId != other.RoleId) return false; - if (RoleKey != other.RoleKey) return false; - if (PrivateKey != other.PrivateKey) return false; - if(!enterpriseUserIdDataKeyPairs_.Equals(other.enterpriseUserIdDataKeyPairs_)) return false; + if (AppRecordUid != other.AppRecordUid) return false; + if (LastAccess != other.LastAccess) return false; + if (RecordShares != other.RecordShares) return false; + if (FolderShares != other.FolderShares) return false; + if (FolderRecords != other.FolderRecords) return false; + if (ClientCount != other.ClientCount) return false; + if (ExpiredClientCount != other.ExpiredClientCount) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); - if (RoleKey.Length != 0) hash ^= RoleKey.GetHashCode(); - if (PrivateKey.Length != 0) hash ^= PrivateKey.GetHashCode(); - hash ^= enterpriseUserIdDataKeyPairs_.GetHashCode(); + if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); + if (LastAccess != 0L) hash ^= LastAccess.GetHashCode(); + if (RecordShares != 0) hash ^= RecordShares.GetHashCode(); + if (FolderShares != 0) hash ^= FolderShares.GetHashCode(); + if (FolderRecords != 0) hash ^= FolderRecords.GetHashCode(); + if (ClientCount != 0) hash ^= ClientCount.GetHashCode(); + if (ExpiredClientCount != 0) hash ^= ExpiredClientCount.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17798,43 +38879,114 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RoleId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(RoleId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); } - if (RoleKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(RoleKey); + if (LastAccess != 0L) { + output.WriteRawTag(16); + output.WriteInt64(LastAccess); } - if (PrivateKey.Length != 0) { - output.WriteRawTag(26); - output.WriteString(PrivateKey); + if (RecordShares != 0) { + output.WriteRawTag(24); + output.WriteInt32(RecordShares); + } + if (FolderShares != 0) { + output.WriteRawTag(32); + output.WriteInt32(FolderShares); + } + if (FolderRecords != 0) { + output.WriteRawTag(40); + output.WriteInt32(FolderRecords); + } + if (ClientCount != 0) { + output.WriteRawTag(48); + output.WriteInt32(ClientCount); + } + if (ExpiredClientCount != 0) { + output.WriteRawTag(56); + output.WriteInt32(ExpiredClientCount); } - enterpriseUserIdDataKeyPairs_.WriteTo(output, _repeated_enterpriseUserIdDataKeyPairs_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppRecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppRecordUid); + } + if (LastAccess != 0L) { + output.WriteRawTag(16); + output.WriteInt64(LastAccess); + } + if (RecordShares != 0) { + output.WriteRawTag(24); + output.WriteInt32(RecordShares); + } + if (FolderShares != 0) { + output.WriteRawTag(32); + output.WriteInt32(FolderShares); + } + if (FolderRecords != 0) { + output.WriteRawTag(40); + output.WriteInt32(FolderRecords); + } + if (ClientCount != 0) { + output.WriteRawTag(48); + output.WriteInt32(ClientCount); + } + if (ExpiredClientCount != 0) { + output.WriteRawTag(56); + output.WriteInt32(ExpiredClientCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + if (AppRecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); } - if (RoleKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleKey); + if (LastAccess != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastAccess); } - if (PrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PrivateKey); + if (RecordShares != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RecordShares); + } + if (FolderShares != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FolderShares); + } + if (FolderRecords != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FolderRecords); + } + if (ClientCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ClientCount); + } + if (ExpiredClientCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ExpiredClientCount); } - size += enterpriseUserIdDataKeyPairs_.CalculateSize(_repeated_enterpriseUserIdDataKeyPairs_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -17842,144 +38994,213 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserDataKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApplicationSummary other) { if (other == null) { return; } - if (other.RoleId != 0L) { - RoleId = other.RoleId; + if (other.AppRecordUid.Length != 0) { + AppRecordUid = other.AppRecordUid; } - if (other.RoleKey.Length != 0) { - RoleKey = other.RoleKey; + if (other.LastAccess != 0L) { + LastAccess = other.LastAccess; } - if (other.PrivateKey.Length != 0) { - PrivateKey = other.PrivateKey; + if (other.RecordShares != 0) { + RecordShares = other.RecordShares; + } + if (other.FolderShares != 0) { + FolderShares = other.FolderShares; + } + if (other.FolderRecords != 0) { + FolderRecords = other.FolderRecords; + } + if (other.ClientCount != 0) { + ClientCount = other.ClientCount; + } + if (other.ExpiredClientCount != 0) { + ExpiredClientCount = other.ExpiredClientCount; } - enterpriseUserIdDataKeyPairs_.Add(other.enterpriseUserIdDataKeyPairs_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + AppRecordUid = input.ReadBytes(); + break; + } + case 16: { + LastAccess = input.ReadInt64(); + break; + } + case 24: { + RecordShares = input.ReadInt32(); + break; + } + case 32: { + FolderShares = input.ReadInt32(); + break; + } + case 40: { + FolderRecords = input.ReadInt32(); + break; + } + case 48: { + ClientCount = input.ReadInt32(); + break; + } + case 56: { + ExpiredClientCount = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 8: { - RoleId = input.ReadInt64(); + case 10: { + AppRecordUid = input.ReadBytes(); break; } - case 18: { - RoleKey = input.ReadBytes(); + case 16: { + LastAccess = input.ReadInt64(); break; } - case 26: { - PrivateKey = input.ReadString(); + case 24: { + RecordShares = input.ReadInt32(); break; } - case 34: { - enterpriseUserIdDataKeyPairs_.AddEntriesFrom(input, _repeated_enterpriseUserIdDataKeyPairs_codec); + case 32: { + FolderShares = input.ReadInt32(); + break; + } + case 40: { + FolderRecords = input.ReadInt32(); + break; + } + case 48: { + ClientCount = input.ReadInt32(); + break; + } + case 56: { + ExpiredClientCount = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class UserDataKeyResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserDataKeyResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetApplicationsSummaryResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetApplicationsSummaryResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[82]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[129]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKeyResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetApplicationsSummaryResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKeyResponse(UserDataKeyResponse other) : this() { - userDataKeys_ = other.userDataKeys_.Clone(); - accessDenied_ = other.accessDenied_.Clone(); - noEncryptedDataKey_ = other.noEncryptedDataKey_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetApplicationsSummaryResponse(GetApplicationsSummaryResponse other) : this() { + applicationSummary_ = other.applicationSummary_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserDataKeyResponse Clone() { - return new UserDataKeyResponse(this); - } - - /// Field number for the "userDataKeys" field. - public const int UserDataKeysFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_userDataKeys_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.UserDataKey.Parser); - private readonly pbc::RepeatedField userDataKeys_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField UserDataKeys { - get { return userDataKeys_; } - } - - /// Field number for the "accessDenied" field. - public const int AccessDeniedFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_accessDenied_codec - = pb::FieldCodec.ForInt64(18); - private readonly pbc::RepeatedField accessDenied_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField AccessDenied { - get { return accessDenied_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetApplicationsSummaryResponse Clone() { + return new GetApplicationsSummaryResponse(this); } - /// Field number for the "noEncryptedDataKey" field. - public const int NoEncryptedDataKeyFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_noEncryptedDataKey_codec - = pb::FieldCodec.ForInt64(26); - private readonly pbc::RepeatedField noEncryptedDataKey_ = new pbc::RepeatedField(); + /// Field number for the "applicationSummary" field. + public const int ApplicationSummaryFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_applicationSummary_codec + = pb::FieldCodec.ForMessage(10, global::Authentication.ApplicationSummary.Parser); + private readonly pbc::RepeatedField applicationSummary_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField NoEncryptedDataKey { - get { return noEncryptedDataKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ApplicationSummary { + get { return applicationSummary_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserDataKeyResponse); + return Equals(other as GetApplicationsSummaryResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserDataKeyResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetApplicationsSummaryResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!userDataKeys_.Equals(other.userDataKeys_)) return false; - if(!accessDenied_.Equals(other.accessDenied_)) return false; - if(!noEncryptedDataKey_.Equals(other.noEncryptedDataKey_)) return false; + if(!applicationSummary_.Equals(other.applicationSummary_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= userDataKeys_.GetHashCode(); - hash ^= accessDenied_.GetHashCode(); - hash ^= noEncryptedDataKey_.GetHashCode(); + hash ^= applicationSummary_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -17987,26 +39208,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - userDataKeys_.WriteTo(output, _repeated_userDataKeys_codec); - accessDenied_.WriteTo(output, _repeated_accessDenied_codec); - noEncryptedDataKey_.WriteTo(output, _repeated_noEncryptedDataKey_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + applicationSummary_.WriteTo(output, _repeated_applicationSummary_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + applicationSummary_.WriteTo(ref output, _repeated_applicationSummary_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += userDataKeys_.CalculateSize(_repeated_userDataKeys_codec); - size += accessDenied_.CalculateSize(_repeated_accessDenied_codec); - size += noEncryptedDataKey_.CalculateSize(_repeated_noEncryptedDataKey_codec); + size += applicationSummary_.CalculateSize(_repeated_applicationSummary_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -18014,110 +39249,146 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserDataKeyResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetApplicationsSummaryResponse other) { if (other == null) { return; } - userDataKeys_.Add(other.userDataKeys_); - accessDenied_.Add(other.accessDenied_); - noEncryptedDataKey_.Add(other.noEncryptedDataKey_); + applicationSummary_.Add(other.applicationSummary_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - userDataKeys_.AddEntriesFrom(input, _repeated_userDataKeys_codec); + applicationSummary_.AddEntriesFrom(input, _repeated_applicationSummary_codec); break; } - case 18: - case 16: { - accessDenied_.AddEntriesFrom(input, _repeated_accessDenied_codec); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 26: - case 24: { - noEncryptedDataKey_.AddEntriesFrom(input, _repeated_noEncryptedDataKey_codec); + case 10: { + applicationSummary_.AddEntriesFrom(ref input, _repeated_applicationSummary_codec); break; } } } } + #endif } - public sealed partial class MasterPasswordRecoveryVerificationRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MasterPasswordRecoveryVerificationRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetVerificationTokenRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetVerificationTokenRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[83]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[130]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MasterPasswordRecoveryVerificationRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetVerificationTokenRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MasterPasswordRecoveryVerificationRequest(MasterPasswordRecoveryVerificationRequest other) : this() { - encryptedLoginToken_ = other.encryptedLoginToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetVerificationTokenRequest(GetVerificationTokenRequest other) : this() { + username_ = other.username_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MasterPasswordRecoveryVerificationRequest Clone() { - return new MasterPasswordRecoveryVerificationRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetVerificationTokenRequest Clone() { + return new GetVerificationTokenRequest(this); } - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 1; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MasterPasswordRecoveryVerificationRequest); + return Equals(other as GetVerificationTokenRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MasterPasswordRecoveryVerificationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetVerificationTokenRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; + if (Username != other.Username) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -18125,26 +39396,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedLoginToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedLoginToken); + output.WriteString(Username); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -18153,114 +39445,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MasterPasswordRecoveryVerificationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetVerificationTokenRequest other) { if (other == null) { return; } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; + if (other.Username.Length != 0) { + Username = other.Username; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedLoginToken = input.ReadBytes(); + Username = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); break; } } } } + #endif } - public sealed partial class GetSecurityQuestionV3Request : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSecurityQuestionV3Request()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetVerificationTokenResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetVerificationTokenResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[84]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[131]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetSecurityQuestionV3Request() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetVerificationTokenResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetSecurityQuestionV3Request(GetSecurityQuestionV3Request other) : this() { - encryptedLoginToken_ = other.encryptedLoginToken_; - verificationCode_ = other.verificationCode_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetVerificationTokenResponse(GetVerificationTokenResponse other) : this() { + encryptedVerificationToken_ = other.encryptedVerificationToken_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetSecurityQuestionV3Request Clone() { - return new GetSecurityQuestionV3Request(this); - } - - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 1; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } - set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetVerificationTokenResponse Clone() { + return new GetVerificationTokenResponse(this); } - /// Field number for the "verificationCode" field. - public const int VerificationCodeFieldNumber = 2; - private string verificationCode_ = ""; + /// Field number for the "encryptedVerificationToken" field. + public const int EncryptedVerificationTokenFieldNumber = 1; + private pb::ByteString encryptedVerificationToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationCode { - get { return verificationCode_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedVerificationToken { + get { return encryptedVerificationToken_; } set { - verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedVerificationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetSecurityQuestionV3Request); + return Equals(other as GetVerificationTokenResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetSecurityQuestionV3Request other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetVerificationTokenResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; - if (VerificationCode != other.VerificationCode) return false; + if (EncryptedVerificationToken != other.EncryptedVerificationToken) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); - if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (EncryptedVerificationToken.Length != 0) hash ^= EncryptedVerificationToken.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -18268,33 +39594,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedLoginToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedVerificationToken.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedLoginToken); - } - if (VerificationCode.Length != 0) { - output.WriteRawTag(18); - output.WriteString(VerificationCode); + output.WriteBytes(EncryptedVerificationToken); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedVerificationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedVerificationToken); } - if (VerificationCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedVerificationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedVerificationToken); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -18303,149 +39643,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetSecurityQuestionV3Request other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetVerificationTokenResponse other) { if (other == null) { return; } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; - } - if (other.VerificationCode.Length != 0) { - VerificationCode = other.VerificationCode; + if (other.EncryptedVerificationToken.Length != 0) { + EncryptedVerificationToken = other.EncryptedVerificationToken; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedLoginToken = input.ReadBytes(); + EncryptedVerificationToken = input.ReadBytes(); break; } - case 18: { - VerificationCode = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedVerificationToken = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class GetSecurityQuestionV3Response : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSecurityQuestionV3Response()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SendShareInviteRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SendShareInviteRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[85]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[132]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetSecurityQuestionV3Response() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SendShareInviteRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetSecurityQuestionV3Response(GetSecurityQuestionV3Response other) : this() { - securityQuestion_ = other.securityQuestion_; - backupKeyDate_ = other.backupKeyDate_; - salt_ = other.salt_; - iterations_ = other.iterations_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SendShareInviteRequest(SendShareInviteRequest other) : this() { + email_ = other.email_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetSecurityQuestionV3Response Clone() { - return new GetSecurityQuestionV3Response(this); - } - - /// Field number for the "securityQuestion" field. - public const int SecurityQuestionFieldNumber = 1; - private string securityQuestion_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string SecurityQuestion { - get { return securityQuestion_; } - set { - securityQuestion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "backupKeyDate" field. - public const int BackupKeyDateFieldNumber = 2; - private long backupKeyDate_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long BackupKeyDate { - get { return backupKeyDate_; } - set { - backupKeyDate_ = value; - } - } - - /// Field number for the "salt" field. - public const int SaltFieldNumber = 3; - private pb::ByteString salt_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Salt { - get { return salt_; } - set { - salt_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SendShareInviteRequest Clone() { + return new SendShareInviteRequest(this); } - /// Field number for the "iterations" field. - public const int IterationsFieldNumber = 4; - private int iterations_; + /// Field number for the "email" field. + public const int EmailFieldNumber = 1; + private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Iterations { - get { return iterations_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } set { - iterations_ = value; + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetSecurityQuestionV3Response); + return Equals(other as SendShareInviteRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetSecurityQuestionV3Response other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SendShareInviteRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (SecurityQuestion != other.SecurityQuestion) return false; - if (BackupKeyDate != other.BackupKeyDate) return false; - if (Salt != other.Salt) return false; - if (Iterations != other.Iterations) return false; + if (Email != other.Email) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (SecurityQuestion.Length != 0) hash ^= SecurityQuestion.GetHashCode(); - if (BackupKeyDate != 0L) hash ^= BackupKeyDate.GetHashCode(); - if (Salt.Length != 0) hash ^= Salt.GetHashCode(); - if (Iterations != 0) hash ^= Iterations.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -18453,47 +39792,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (SecurityQuestion.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Email.Length != 0) { output.WriteRawTag(10); - output.WriteString(SecurityQuestion); - } - if (BackupKeyDate != 0L) { - output.WriteRawTag(16); - output.WriteInt64(BackupKeyDate); + output.WriteString(Email); } - if (Salt.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(Salt); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Iterations != 0) { - output.WriteRawTag(32); - output.WriteInt32(Iterations); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (SecurityQuestion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(SecurityQuestion); - } - if (BackupKeyDate != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(BackupKeyDate); - } - if (Salt.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Salt); - } - if (Iterations != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Iterations); + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -18502,149 +39841,147 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetSecurityQuestionV3Response other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SendShareInviteRequest other) { if (other == null) { return; } - if (other.SecurityQuestion.Length != 0) { - SecurityQuestion = other.SecurityQuestion; - } - if (other.BackupKeyDate != 0L) { - BackupKeyDate = other.BackupKeyDate; - } - if (other.Salt.Length != 0) { - Salt = other.Salt; - } - if (other.Iterations != 0) { - Iterations = other.Iterations; + if (other.Email.Length != 0) { + Email = other.Email; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - SecurityQuestion = input.ReadString(); - break; - } - case 16: { - BackupKeyDate = input.ReadInt64(); + Email = input.ReadString(); break; } - case 26: { - Salt = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 32: { - Iterations = input.ReadInt32(); + case 10: { + Email = input.ReadString(); break; } } } } + #endif } - public sealed partial class GetDataKeyBackupV3Request : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetDataKeyBackupV3Request()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RequestDownloadRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RequestDownloadRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[86]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[133]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetDataKeyBackupV3Request() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestDownloadRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetDataKeyBackupV3Request(GetDataKeyBackupV3Request other) : this() { - encryptedLoginToken_ = other.encryptedLoginToken_; - verificationCode_ = other.verificationCode_; - securityAnswerHash_ = other.securityAnswerHash_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestDownloadRequest(RequestDownloadRequest other) : this() { + fileNames_ = other.fileNames_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetDataKeyBackupV3Request Clone() { - return new GetDataKeyBackupV3Request(this); - } - - /// Field number for the "encryptedLoginToken" field. - public const int EncryptedLoginTokenFieldNumber = 1; - private pb::ByteString encryptedLoginToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedLoginToken { - get { return encryptedLoginToken_; } - set { - encryptedLoginToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "verificationCode" field. - public const int VerificationCodeFieldNumber = 2; - private string verificationCode_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string VerificationCode { - get { return verificationCode_; } - set { - verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestDownloadRequest Clone() { + return new RequestDownloadRequest(this); } - /// Field number for the "securityAnswerHash" field. - public const int SecurityAnswerHashFieldNumber = 3; - private pb::ByteString securityAnswerHash_ = pb::ByteString.Empty; + /// Field number for the "fileNames" field. + public const int FileNamesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_fileNames_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField fileNames_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString SecurityAnswerHash { - get { return securityAnswerHash_; } - set { - securityAnswerHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FileNames { + get { return fileNames_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetDataKeyBackupV3Request); + return Equals(other as RequestDownloadRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetDataKeyBackupV3Request other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RequestDownloadRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedLoginToken != other.EncryptedLoginToken) return false; - if (VerificationCode != other.VerificationCode) return false; - if (SecurityAnswerHash != other.SecurityAnswerHash) return false; + if(!fileNames_.Equals(other.fileNames_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedLoginToken.Length != 0) hash ^= EncryptedLoginToken.GetHashCode(); - if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); - if (SecurityAnswerHash.Length != 0) hash ^= SecurityAnswerHash.GetHashCode(); + hash ^= fileNames_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -18652,41 +39989,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedLoginToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedLoginToken); - } - if (VerificationCode.Length != 0) { - output.WriteRawTag(18); - output.WriteString(VerificationCode); - } - if (SecurityAnswerHash.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(SecurityAnswerHash); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + fileNames_.WriteTo(output, _repeated_fileNames_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); - } - if (VerificationCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); - } - if (SecurityAnswerHash.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecurityAnswerHash); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + fileNames_.WriteTo(ref output, _repeated_fileNames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += fileNames_.CalculateSize(_repeated_fileNames_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -18694,184 +40030,175 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetDataKeyBackupV3Request other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RequestDownloadRequest other) { if (other == null) { return; } - if (other.EncryptedLoginToken.Length != 0) { - EncryptedLoginToken = other.EncryptedLoginToken; - } - if (other.VerificationCode.Length != 0) { - VerificationCode = other.VerificationCode; - } - if (other.SecurityAnswerHash.Length != 0) { - SecurityAnswerHash = other.SecurityAnswerHash; - } + fileNames_.Add(other.fileNames_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedLoginToken = input.ReadBytes(); + fileNames_.AddEntriesFrom(input, _repeated_fileNames_codec); break; } - case 18: { - VerificationCode = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 26: { - SecurityAnswerHash = input.ReadBytes(); + case 10: { + fileNames_.AddEntriesFrom(ref input, _repeated_fileNames_codec); break; } } } } + #endif } - public sealed partial class PasswordRules : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PasswordRules()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RequestDownloadResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RequestDownloadResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[87]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[134]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PasswordRules() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestDownloadResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PasswordRules(PasswordRules other) : this() { - ruleType_ = other.ruleType_; - match_ = other.match_; - pattern_ = other.pattern_; - description_ = other.description_; - minimum_ = other.minimum_; - value_ = other.value_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestDownloadResponse(RequestDownloadResponse other) : this() { + result_ = other.result_; + message_ = other.message_; + downloads_ = other.downloads_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PasswordRules Clone() { - return new PasswordRules(this); - } - - /// Field number for the "ruleType" field. - public const int RuleTypeFieldNumber = 1; - private string ruleType_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string RuleType { - get { return ruleType_; } - set { - ruleType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "match" field. - public const int MatchFieldNumber = 2; - private bool match_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Match { - get { return match_; } - set { - match_ = value; - } - } - - /// Field number for the "pattern" field. - public const int PatternFieldNumber = 3; - private string pattern_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Pattern { - get { return pattern_; } - set { - pattern_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RequestDownloadResponse Clone() { + return new RequestDownloadResponse(this); } - /// Field number for the "description" field. - public const int DescriptionFieldNumber = 4; - private string description_ = ""; + /// Field number for the "result" field. + public const int ResultFieldNumber = 1; + private string result_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Description { - get { return description_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Result { + get { return result_; } set { - description_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "minimum" field. - public const int MinimumFieldNumber = 5; - private int minimum_; + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Minimum { - get { return minimum_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - minimum_ = value; + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 6; - private string value_ = ""; + /// Field number for the "downloads" field. + public const int DownloadsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_downloads_codec + = pb::FieldCodec.ForMessage(26, global::Authentication.Download.Parser); + private readonly pbc::RepeatedField downloads_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } - set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Downloads { + get { return downloads_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as PasswordRules); + return Equals(other as RequestDownloadResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(PasswordRules other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RequestDownloadResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RuleType != other.RuleType) return false; - if (Match != other.Match) return false; - if (Pattern != other.Pattern) return false; - if (Description != other.Description) return false; - if (Minimum != other.Minimum) return false; - if (Value != other.Value) return false; + if (Result != other.Result) return false; + if (Message != other.Message) return false; + if(!downloads_.Equals(other.downloads_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RuleType.Length != 0) hash ^= RuleType.GetHashCode(); - if (Match != false) hash ^= Match.GetHashCode(); - if (Pattern.Length != 0) hash ^= Pattern.GetHashCode(); - if (Description.Length != 0) hash ^= Description.GetHashCode(); - if (Minimum != 0) hash ^= Minimum.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (Result.Length != 0) hash ^= Result.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + hash ^= downloads_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -18879,62 +40206,62 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RuleType.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Result.Length != 0) { output.WriteRawTag(10); - output.WriteString(RuleType); - } - if (Match != false) { - output.WriteRawTag(16); - output.WriteBool(Match); + output.WriteString(Result); } - if (Pattern.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Pattern); + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); } - if (Description.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Description); + downloads_.WriteTo(output, _repeated_downloads_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Minimum != 0) { - output.WriteRawTag(40); - output.WriteInt32(Minimum); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Result.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Result); } - if (Value.Length != 0) { - output.WriteRawTag(50); - output.WriteString(Value); + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); } + downloads_.WriteTo(ref output, _repeated_downloads_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RuleType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(RuleType); - } - if (Match != false) { - size += 1 + 1; - } - if (Pattern.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Pattern); - } - if (Description.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Description); + if (Result.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Result); } - if (Minimum != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minimum); - } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); } + size += downloads_.CalculateSize(_repeated_downloads_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -18942,249 +40269,198 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(PasswordRules other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RequestDownloadResponse other) { if (other == null) { return; } - if (other.RuleType.Length != 0) { - RuleType = other.RuleType; - } - if (other.Match != false) { - Match = other.Match; - } - if (other.Pattern.Length != 0) { - Pattern = other.Pattern; - } - if (other.Description.Length != 0) { - Description = other.Description; - } - if (other.Minimum != 0) { - Minimum = other.Minimum; + if (other.Result.Length != 0) { + Result = other.Result; } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.Message.Length != 0) { + Message = other.Message; } + downloads_.Add(other.downloads_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - RuleType = input.ReadString(); + Result = input.ReadString(); break; } - case 16: { - Match = input.ReadBool(); + case 18: { + Message = input.ReadString(); break; } case 26: { - Pattern = input.ReadString(); + downloads_.AddEntriesFrom(input, _repeated_downloads_codec); break; } - case 34: { - Description = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Result = input.ReadString(); break; } - case 40: { - Minimum = input.ReadInt32(); + case 18: { + Message = input.ReadString(); break; } - case 50: { - Value = input.ReadString(); + case 26: { + downloads_.AddEntriesFrom(ref input, _repeated_downloads_codec); break; } } } } + #endif - } - - public sealed partial class GetDataKeyBackupV3Response : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetDataKeyBackupV3Response()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[88]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetDataKeyBackupV3Response() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetDataKeyBackupV3Response(GetDataKeyBackupV3Response other) : this() { - dataKeyBackup_ = other.dataKeyBackup_; - dataKeyBackupDate_ = other.dataKeyBackupDate_; - publicKey_ = other.publicKey_; - encryptedPrivateKey_ = other.encryptedPrivateKey_; - clientKey_ = other.clientKey_; - encryptedSessionToken_ = other.encryptedSessionToken_; - passwordRules_ = other.passwordRules_.Clone(); - passwordRulesIntro_ = other.passwordRulesIntro_; - minimumPbkdf2Iterations_ = other.minimumPbkdf2Iterations_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + } + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Download : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Download()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetDataKeyBackupV3Response Clone() { - return new GetDataKeyBackupV3Response(this); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } - /// Field number for the "dataKeyBackup" field. - public const int DataKeyBackupFieldNumber = 1; - private pb::ByteString dataKeyBackup_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DataKeyBackup { - get { return dataKeyBackup_; } - set { - dataKeyBackup_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[135]; } } - /// Field number for the "dataKeyBackupDate" field. - public const int DataKeyBackupDateFieldNumber = 2; - private long dataKeyBackupDate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long DataKeyBackupDate { - get { return dataKeyBackupDate_; } - set { - dataKeyBackupDate_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "publicKey" field. - public const int PublicKeyFieldNumber = 3; - private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PublicKey { - get { return publicKey_; } - set { - publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Download() { + OnConstruction(); } - /// Field number for the "encryptedPrivateKey" field. - public const int EncryptedPrivateKeyFieldNumber = 4; - private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedPrivateKey { - get { return encryptedPrivateKey_; } - set { - encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Download(Download other) : this() { + fileName_ = other.fileName_; + url_ = other.url_; + successStatusCode_ = other.successStatusCode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "clientKey" field. - public const int ClientKeyFieldNumber = 5; - private pb::ByteString clientKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ClientKey { - get { return clientKey_; } - set { - clientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Download Clone() { + return new Download(this); } - /// Field number for the "encryptedSessionToken" field. - public const int EncryptedSessionTokenFieldNumber = 6; - private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; + /// Field number for the "fileName" field. + public const int FileNameFieldNumber = 1; + private string fileName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedSessionToken { - get { return encryptedSessionToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FileName { + get { return fileName_; } set { - encryptedSessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "passwordRules" field. - public const int PasswordRulesFieldNumber = 7; - private static readonly pb::FieldCodec _repeated_passwordRules_codec - = pb::FieldCodec.ForMessage(58, global::Authentication.PasswordRules.Parser); - private readonly pbc::RepeatedField passwordRules_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField PasswordRules { - get { return passwordRules_; } - } - - /// Field number for the "passwordRulesIntro" field. - public const int PasswordRulesIntroFieldNumber = 8; - private string passwordRulesIntro_ = ""; + /// Field number for the "url" field. + public const int UrlFieldNumber = 2; + private string url_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string PasswordRulesIntro { - get { return passwordRulesIntro_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Url { + get { return url_; } set { - passwordRulesIntro_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + url_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "minimumPbkdf2Iterations" field. - public const int MinimumPbkdf2IterationsFieldNumber = 9; - private int minimumPbkdf2Iterations_; - /// - ///when EnforcementType.MINIMUM_PBKDF2_ITERATIONS exists - /// + /// Field number for the "successStatusCode" field. + public const int SuccessStatusCodeFieldNumber = 3; + private int successStatusCode_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int MinimumPbkdf2Iterations { - get { return minimumPbkdf2Iterations_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SuccessStatusCode { + get { return successStatusCode_; } set { - minimumPbkdf2Iterations_ = value; + successStatusCode_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetDataKeyBackupV3Response); + return Equals(other as Download); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetDataKeyBackupV3Response other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Download other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (DataKeyBackup != other.DataKeyBackup) return false; - if (DataKeyBackupDate != other.DataKeyBackupDate) return false; - if (PublicKey != other.PublicKey) return false; - if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; - if (ClientKey != other.ClientKey) return false; - if (EncryptedSessionToken != other.EncryptedSessionToken) return false; - if(!passwordRules_.Equals(other.passwordRules_)) return false; - if (PasswordRulesIntro != other.PasswordRulesIntro) return false; - if (MinimumPbkdf2Iterations != other.MinimumPbkdf2Iterations) return false; + if (FileName != other.FileName) return false; + if (Url != other.Url) return false; + if (SuccessStatusCode != other.SuccessStatusCode) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (DataKeyBackup.Length != 0) hash ^= DataKeyBackup.GetHashCode(); - if (DataKeyBackupDate != 0L) hash ^= DataKeyBackupDate.GetHashCode(); - if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); - if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); - if (ClientKey.Length != 0) hash ^= ClientKey.GetHashCode(); - if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); - hash ^= passwordRules_.GetHashCode(); - if (PasswordRulesIntro.Length != 0) hash ^= PasswordRulesIntro.GetHashCode(); - if (MinimumPbkdf2Iterations != 0) hash ^= MinimumPbkdf2Iterations.GetHashCode(); + if (FileName.Length != 0) hash ^= FileName.GetHashCode(); + if (Url.Length != 0) hash ^= Url.GetHashCode(); + if (SuccessStatusCode != 0) hash ^= SuccessStatusCode.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -19192,77 +40468,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (DataKeyBackup.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FileName.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(DataKeyBackup); - } - if (DataKeyBackupDate != 0L) { - output.WriteRawTag(16); - output.WriteInt64(DataKeyBackupDate); + output.WriteString(FileName); } - if (PublicKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(PublicKey); + if (Url.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Url); } - if (EncryptedPrivateKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(EncryptedPrivateKey); + if (SuccessStatusCode != 0) { + output.WriteRawTag(24); + output.WriteInt32(SuccessStatusCode); } - if (ClientKey.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(ClientKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (EncryptedSessionToken.Length != 0) { - output.WriteRawTag(50); - output.WriteBytes(EncryptedSessionToken); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FileName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FileName); } - passwordRules_.WriteTo(output, _repeated_passwordRules_codec); - if (PasswordRulesIntro.Length != 0) { - output.WriteRawTag(66); - output.WriteString(PasswordRulesIntro); + if (Url.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Url); } - if (MinimumPbkdf2Iterations != 0) { - output.WriteRawTag(72); - output.WriteInt32(MinimumPbkdf2Iterations); + if (SuccessStatusCode != 0) { + output.WriteRawTag(24); + output.WriteInt32(SuccessStatusCode); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (DataKeyBackup.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DataKeyBackup); - } - if (DataKeyBackupDate != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(DataKeyBackupDate); - } - if (PublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); - } - if (EncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); - } - if (ClientKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientKey); - } - if (EncryptedSessionToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + if (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); } - size += passwordRules_.CalculateSize(_repeated_passwordRules_codec); - if (PasswordRulesIntro.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PasswordRulesIntro); + if (Url.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); } - if (MinimumPbkdf2Iterations != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(MinimumPbkdf2Iterations); + if (SuccessStatusCode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SuccessStatusCode); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -19271,153 +40539,173 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetDataKeyBackupV3Response other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Download other) { if (other == null) { return; } - if (other.DataKeyBackup.Length != 0) { - DataKeyBackup = other.DataKeyBackup; - } - if (other.DataKeyBackupDate != 0L) { - DataKeyBackupDate = other.DataKeyBackupDate; - } - if (other.PublicKey.Length != 0) { - PublicKey = other.PublicKey; - } - if (other.EncryptedPrivateKey.Length != 0) { - EncryptedPrivateKey = other.EncryptedPrivateKey; - } - if (other.ClientKey.Length != 0) { - ClientKey = other.ClientKey; - } - if (other.EncryptedSessionToken.Length != 0) { - EncryptedSessionToken = other.EncryptedSessionToken; + if (other.FileName.Length != 0) { + FileName = other.FileName; } - passwordRules_.Add(other.passwordRules_); - if (other.PasswordRulesIntro.Length != 0) { - PasswordRulesIntro = other.PasswordRulesIntro; + if (other.Url.Length != 0) { + Url = other.Url; } - if (other.MinimumPbkdf2Iterations != 0) { - MinimumPbkdf2Iterations = other.MinimumPbkdf2Iterations; + if (other.SuccessStatusCode != 0) { + SuccessStatusCode = other.SuccessStatusCode; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - DataKeyBackup = input.ReadBytes(); - break; - } - case 16: { - DataKeyBackupDate = input.ReadInt64(); - break; - } - case 26: { - PublicKey = input.ReadBytes(); + FileName = input.ReadString(); break; } - case 34: { - EncryptedPrivateKey = input.ReadBytes(); + case 18: { + Url = input.ReadString(); break; } - case 42: { - ClientKey = input.ReadBytes(); + case 24: { + SuccessStatusCode = input.ReadInt32(); break; } - case 50: { - EncryptedSessionToken = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 58: { - passwordRules_.AddEntriesFrom(input, _repeated_passwordRules_codec); + case 10: { + FileName = input.ReadString(); break; } - case 66: { - PasswordRulesIntro = input.ReadString(); + case 18: { + Url = input.ReadString(); break; } - case 72: { - MinimumPbkdf2Iterations = input.ReadInt32(); + case 24: { + SuccessStatusCode = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class GetPublicKeysRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetPublicKeysRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteUserRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteUserRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[89]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[136]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetPublicKeysRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteUserRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetPublicKeysRequest(GetPublicKeysRequest other) : this() { - usernames_ = other.usernames_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteUserRequest(DeleteUserRequest other) : this() { + reason_ = other.reason_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetPublicKeysRequest Clone() { - return new GetPublicKeysRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteUserRequest Clone() { + return new DeleteUserRequest(this); } - /// Field number for the "usernames" field. - public const int UsernamesFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_usernames_codec - = pb::FieldCodec.ForString(10); - private readonly pbc::RepeatedField usernames_ = new pbc::RepeatedField(); + /// Field number for the "reason" field. + public const int ReasonFieldNumber = 1; + private string reason_ = ""; + /// + ///reason to delete + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Usernames { - get { return usernames_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Reason { + get { return reason_; } + set { + reason_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetPublicKeysRequest); + return Equals(other as DeleteUserRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetPublicKeysRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteUserRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!usernames_.Equals(other.usernames_)) return false; + if (Reason != other.Reason) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= usernames_.GetHashCode(); + if (Reason.Length != 0) hash ^= Reason.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -19425,22 +40713,48 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - usernames_.WriteTo(output, _repeated_usernames_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Reason.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Reason); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Reason.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Reason); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += usernames_.CalculateSize(_repeated_usernames_codec); + if (Reason.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Reason); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -19448,154 +40762,193 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetPublicKeysRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteUserRequest other) { if (other == null) { return; } - usernames_.Add(other.usernames_); + if (other.Reason.Length != 0) { + Reason = other.Reason; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - usernames_.AddEntriesFrom(input, _repeated_usernames_codec); + Reason = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Reason = input.ReadString(); break; } } } } + #endif } - public sealed partial class PublicKeyResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PublicKeyResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeMasterPasswordRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeMasterPasswordRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[90]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[137]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PublicKeyResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeMasterPasswordRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PublicKeyResponse(PublicKeyResponse other) : this() { - username_ = other.username_; - publicKey_ = other.publicKey_; - publicEccKey_ = other.publicEccKey_; - message_ = other.message_; - errorCode_ = other.errorCode_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeMasterPasswordRequest(ChangeMasterPasswordRequest other) : this() { + authVerifier_ = other.authVerifier_; + encryptionParams_ = other.encryptionParams_; + fromServiceProvider_ = other.fromServiceProvider_; + iterationsChange_ = other.iterationsChange_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public PublicKeyResponse Clone() { - return new PublicKeyResponse(this); - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeMasterPasswordRequest Clone() { + return new ChangeMasterPasswordRequest(this); } - /// Field number for the "publicKey" field. - public const int PublicKeyFieldNumber = 2; - private pb::ByteString publicKey_ = pb::ByteString.Empty; + /// Field number for the "authVerifier" field. + public const int AuthVerifierFieldNumber = 1; + private pb::ByteString authVerifier_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PublicKey { - get { return publicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AuthVerifier { + get { return authVerifier_; } set { - publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + authVerifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "publicEccKey" field. - public const int PublicEccKeyFieldNumber = 3; - private pb::ByteString publicEccKey_ = pb::ByteString.Empty; + /// Field number for the "encryptionParams" field. + public const int EncryptionParamsFieldNumber = 2; + private pb::ByteString encryptionParams_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PublicEccKey { - get { return publicEccKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptionParams { + get { return encryptionParams_; } set { - publicEccKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptionParams_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "message" field. - public const int MessageFieldNumber = 4; - private string message_ = ""; + /// Field number for the "fromServiceProvider" field. + public const int FromServiceProviderFieldNumber = 3; + private bool fromServiceProvider_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Message { - get { return message_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FromServiceProvider { + get { return fromServiceProvider_; } set { - message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + fromServiceProvider_ = value; } } - /// Field number for the "errorCode" field. - public const int ErrorCodeFieldNumber = 5; - private string errorCode_ = ""; + /// Field number for the "iterationsChange" field. + public const int IterationsChangeFieldNumber = 4; + private bool iterationsChange_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ErrorCode { - get { return errorCode_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IterationsChange { + get { return iterationsChange_; } set { - errorCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + iterationsChange_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as PublicKeyResponse); + return Equals(other as ChangeMasterPasswordRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(PublicKeyResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeMasterPasswordRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; - if (PublicKey != other.PublicKey) return false; - if (PublicEccKey != other.PublicEccKey) return false; - if (Message != other.Message) return false; - if (ErrorCode != other.ErrorCode) return false; + if (AuthVerifier != other.AuthVerifier) return false; + if (EncryptionParams != other.EncryptionParams) return false; + if (FromServiceProvider != other.FromServiceProvider) return false; + if (IterationsChange != other.IterationsChange) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); - if (PublicEccKey.Length != 0) hash ^= PublicEccKey.GetHashCode(); - if (Message.Length != 0) hash ^= Message.GetHashCode(); - if (ErrorCode.Length != 0) hash ^= ErrorCode.GetHashCode(); + if (AuthVerifier.Length != 0) hash ^= AuthVerifier.GetHashCode(); + if (EncryptionParams.Length != 0) hash ^= EncryptionParams.GetHashCode(); + if (FromServiceProvider != false) hash ^= FromServiceProvider.GetHashCode(); + if (IterationsChange != false) hash ^= IterationsChange.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -19603,54 +40956,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AuthVerifier.Length != 0) { output.WriteRawTag(10); - output.WriteString(Username); + output.WriteBytes(AuthVerifier); } - if (PublicKey.Length != 0) { + if (EncryptionParams.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(PublicKey); - } - if (PublicEccKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(PublicEccKey); + output.WriteBytes(EncryptionParams); } - if (Message.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Message); + if (FromServiceProvider != false) { + output.WriteRawTag(24); + output.WriteBool(FromServiceProvider); } - if (ErrorCode.Length != 0) { - output.WriteRawTag(42); - output.WriteString(ErrorCode); + if (IterationsChange != false) { + output.WriteRawTag(32); + output.WriteBool(IterationsChange); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AuthVerifier.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptionParams); + } + if (FromServiceProvider != false) { + output.WriteRawTag(24); + output.WriteBool(FromServiceProvider); + } + if (IterationsChange != false) { + output.WriteRawTag(32); + output.WriteBool(IterationsChange); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (PublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + if (AuthVerifier.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuthVerifier); } - if (PublicEccKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicEccKey); + if (EncryptionParams.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptionParams); } - if (Message.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + if (FromServiceProvider != false) { + size += 1 + 1; } - if (ErrorCode.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorCode); + if (IterationsChange != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -19659,127 +41038,181 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(PublicKeyResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeMasterPasswordRequest other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.PublicKey.Length != 0) { - PublicKey = other.PublicKey; + if (other.AuthVerifier.Length != 0) { + AuthVerifier = other.AuthVerifier; } - if (other.PublicEccKey.Length != 0) { - PublicEccKey = other.PublicEccKey; + if (other.EncryptionParams.Length != 0) { + EncryptionParams = other.EncryptionParams; } - if (other.Message.Length != 0) { - Message = other.Message; + if (other.FromServiceProvider != false) { + FromServiceProvider = other.FromServiceProvider; } - if (other.ErrorCode.Length != 0) { - ErrorCode = other.ErrorCode; + if (other.IterationsChange != false) { + IterationsChange = other.IterationsChange; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Username = input.ReadString(); + AuthVerifier = input.ReadBytes(); break; } case 18: { - PublicKey = input.ReadBytes(); + EncryptionParams = input.ReadBytes(); break; } - case 26: { - PublicEccKey = input.ReadBytes(); + case 24: { + FromServiceProvider = input.ReadBool(); break; } - case 34: { - Message = input.ReadString(); + case 32: { + IterationsChange = input.ReadBool(); break; } - case 42: { - ErrorCode = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AuthVerifier = input.ReadBytes(); + break; + } + case 18: { + EncryptionParams = input.ReadBytes(); + break; + } + case 24: { + FromServiceProvider = input.ReadBool(); + break; + } + case 32: { + IterationsChange = input.ReadBool(); break; } } } } + #endif } - public sealed partial class GetPublicKeysResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetPublicKeysResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ChangeMasterPasswordResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ChangeMasterPasswordResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[91]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[138]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetPublicKeysResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeMasterPasswordResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetPublicKeysResponse(GetPublicKeysResponse other) : this() { - keyResponses_ = other.keyResponses_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeMasterPasswordResponse(ChangeMasterPasswordResponse other) : this() { + encryptedSessionToken_ = other.encryptedSessionToken_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetPublicKeysResponse Clone() { - return new GetPublicKeysResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ChangeMasterPasswordResponse Clone() { + return new ChangeMasterPasswordResponse(this); } - /// Field number for the "keyResponses" field. - public const int KeyResponsesFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_keyResponses_codec - = pb::FieldCodec.ForMessage(10, global::Authentication.PublicKeyResponse.Parser); - private readonly pbc::RepeatedField keyResponses_ = new pbc::RepeatedField(); + /// Field number for the "encryptedSessionToken" field. + public const int EncryptedSessionTokenFieldNumber = 1; + private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField KeyResponses { - get { return keyResponses_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedSessionToken { + get { return encryptedSessionToken_; } + set { + encryptedSessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetPublicKeysResponse); + return Equals(other as ChangeMasterPasswordResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetPublicKeysResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ChangeMasterPasswordResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!keyResponses_.Equals(other.keyResponses_)) return false; + if (EncryptedSessionToken != other.EncryptedSessionToken) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= keyResponses_.GetHashCode(); + if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -19787,22 +41220,48 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - keyResponses_.WriteTo(output, _repeated_keyResponses_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += keyResponses_.CalculateSize(_repeated_keyResponses_codec); + if (EncryptedSessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -19810,112 +41269,163 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetPublicKeysResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ChangeMasterPasswordResponse other) { if (other == null) { return; } - keyResponses_.Add(other.keyResponses_); + if (other.EncryptedSessionToken.Length != 0) { + EncryptedSessionToken = other.EncryptedSessionToken; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - keyResponses_.AddEntriesFrom(input, _repeated_keyResponses_codec); + EncryptedSessionToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedSessionToken = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class SetEccKeyPairRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetEccKeyPairRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AccountRecoverySetupRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AccountRecoverySetupRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[92]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[139]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetEccKeyPairRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountRecoverySetupRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetEccKeyPairRequest(SetEccKeyPairRequest other) : this() { - publicKey_ = other.publicKey_; - encryptedPrivateKey_ = other.encryptedPrivateKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountRecoverySetupRequest(AccountRecoverySetupRequest other) : this() { + recoveryEncryptedDataKey_ = other.recoveryEncryptedDataKey_; + recoveryAuthHash_ = other.recoveryAuthHash_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetEccKeyPairRequest Clone() { - return new SetEccKeyPairRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountRecoverySetupRequest Clone() { + return new AccountRecoverySetupRequest(this); } - /// Field number for the "publicKey" field. - public const int PublicKeyFieldNumber = 1; - private pb::ByteString publicKey_ = pb::ByteString.Empty; + /// Field number for the "recoveryEncryptedDataKey" field. + public const int RecoveryEncryptedDataKeyFieldNumber = 1; + private pb::ByteString recoveryEncryptedDataKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PublicKey { - get { return publicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecoveryEncryptedDataKey { + get { return recoveryEncryptedDataKey_; } set { - publicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recoveryEncryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedPrivateKey" field. - public const int EncryptedPrivateKeyFieldNumber = 2; - private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; + /// Field number for the "recoveryAuthHash" field. + public const int RecoveryAuthHashFieldNumber = 2; + private pb::ByteString recoveryAuthHash_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedPrivateKey { - get { return encryptedPrivateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecoveryAuthHash { + get { return recoveryAuthHash_; } set { - encryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recoveryAuthHash_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SetEccKeyPairRequest); + return Equals(other as AccountRecoverySetupRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SetEccKeyPairRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AccountRecoverySetupRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (PublicKey != other.PublicKey) return false; - if (EncryptedPrivateKey != other.EncryptedPrivateKey) return false; + if (RecoveryEncryptedDataKey != other.RecoveryEncryptedDataKey) return false; + if (RecoveryAuthHash != other.RecoveryAuthHash) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (PublicKey.Length != 0) hash ^= PublicKey.GetHashCode(); - if (EncryptedPrivateKey.Length != 0) hash ^= EncryptedPrivateKey.GetHashCode(); + if (RecoveryEncryptedDataKey.Length != 0) hash ^= RecoveryEncryptedDataKey.GetHashCode(); + if (RecoveryAuthHash.Length != 0) hash ^= RecoveryAuthHash.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -19923,33 +41433,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (PublicKey.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecoveryEncryptedDataKey.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(PublicKey); + output.WriteBytes(RecoveryEncryptedDataKey); } - if (EncryptedPrivateKey.Length != 0) { + if (RecoveryAuthHash.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(EncryptedPrivateKey); + output.WriteBytes(RecoveryAuthHash); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecoveryEncryptedDataKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecoveryEncryptedDataKey); + } + if (RecoveryAuthHash.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecoveryAuthHash); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (PublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PublicKey); + if (RecoveryEncryptedDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecoveryEncryptedDataKey); } - if (EncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedPrivateKey); + if (RecoveryAuthHash.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecoveryAuthHash); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -19958,149 +41493,219 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SetEccKeyPairRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AccountRecoverySetupRequest other) { if (other == null) { return; } - if (other.PublicKey.Length != 0) { - PublicKey = other.PublicKey; + if (other.RecoveryEncryptedDataKey.Length != 0) { + RecoveryEncryptedDataKey = other.RecoveryEncryptedDataKey; } - if (other.EncryptedPrivateKey.Length != 0) { - EncryptedPrivateKey = other.EncryptedPrivateKey; + if (other.RecoveryAuthHash.Length != 0) { + RecoveryAuthHash = other.RecoveryAuthHash; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - PublicKey = input.ReadBytes(); + RecoveryEncryptedDataKey = input.ReadBytes(); break; } case 18: { - EncryptedPrivateKey = input.ReadBytes(); + RecoveryAuthHash = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecoveryEncryptedDataKey = input.ReadBytes(); + break; + } + case 18: { + RecoveryAuthHash = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class AddAppShareRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddAppShareRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AccountRecoveryVerifyCodeResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AccountRecoveryVerifyCodeResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[93]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[140]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddAppShareRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountRecoveryVerifyCodeResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddAppShareRequest(AddAppShareRequest other) : this() { - appRecordUid_ = other.appRecordUid_; - secretUid_ = other.secretUid_; - shareType_ = other.shareType_; - encryptedSecretKey_ = other.encryptedSecretKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountRecoveryVerifyCodeResponse(AccountRecoveryVerifyCodeResponse other) : this() { + backupKeyType_ = other.backupKeyType_; + backupKeyDate_ = other.backupKeyDate_; + securityQuestion_ = other.securityQuestion_; + salt_ = other.salt_; + iterations_ = other.iterations_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddAppShareRequest Clone() { - return new AddAppShareRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AccountRecoveryVerifyCodeResponse Clone() { + return new AccountRecoveryVerifyCodeResponse(this); } - /// Field number for the "appRecordUid" field. - public const int AppRecordUidFieldNumber = 1; - private pb::ByteString appRecordUid_ = pb::ByteString.Empty; + /// Field number for the "backupKeyType" field. + public const int BackupKeyTypeFieldNumber = 1; + private global::Authentication.BackupKeyType backupKeyType_ = global::Authentication.BackupKeyType.BktSecAnswer; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AppRecordUid { - get { return appRecordUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.BackupKeyType BackupKeyType { + get { return backupKeyType_; } set { - appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + backupKeyType_ = value; } } - /// Field number for the "secretUid" field. - public const int SecretUidFieldNumber = 2; - private pb::ByteString secretUid_ = pb::ByteString.Empty; + /// Field number for the "backupKeyDate" field. + public const int BackupKeyDateFieldNumber = 2; + private long backupKeyDate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString SecretUid { - get { return secretUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BackupKeyDate { + get { return backupKeyDate_; } set { - secretUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + backupKeyDate_ = value; } } - /// Field number for the "shareType" field. - public const int ShareTypeFieldNumber = 3; - private global::Authentication.ApplicationShareType shareType_ = global::Authentication.ApplicationShareType.ShtRecord; + /// Field number for the "securityQuestion" field. + public const int SecurityQuestionFieldNumber = 3; + private string securityQuestion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.ApplicationShareType ShareType { - get { return shareType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SecurityQuestion { + get { return securityQuestion_; } set { - shareType_ = value; + securityQuestion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedSecretKey" field. - public const int EncryptedSecretKeyFieldNumber = 4; - private pb::ByteString encryptedSecretKey_ = pb::ByteString.Empty; + /// Field number for the "salt" field. + public const int SaltFieldNumber = 4; + private pb::ByteString salt_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedSecretKey { - get { return encryptedSecretKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Salt { + get { return salt_; } set { - encryptedSecretKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + salt_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "iterations" field. + public const int IterationsFieldNumber = 5; + private int iterations_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Iterations { + get { return iterations_; } + set { + iterations_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as AddAppShareRequest); + return Equals(other as AccountRecoveryVerifyCodeResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(AddAppShareRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AccountRecoveryVerifyCodeResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (AppRecordUid != other.AppRecordUid) return false; - if (SecretUid != other.SecretUid) return false; - if (ShareType != other.ShareType) return false; - if (EncryptedSecretKey != other.EncryptedSecretKey) return false; + if (BackupKeyType != other.BackupKeyType) return false; + if (BackupKeyDate != other.BackupKeyDate) return false; + if (SecurityQuestion != other.SecurityQuestion) return false; + if (Salt != other.Salt) return false; + if (Iterations != other.Iterations) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); - if (SecretUid.Length != 0) hash ^= SecretUid.GetHashCode(); - if (ShareType != global::Authentication.ApplicationShareType.ShtRecord) hash ^= ShareType.GetHashCode(); - if (EncryptedSecretKey.Length != 0) hash ^= EncryptedSecretKey.GetHashCode(); + if (BackupKeyType != global::Authentication.BackupKeyType.BktSecAnswer) hash ^= BackupKeyType.GetHashCode(); + if (BackupKeyDate != 0L) hash ^= BackupKeyDate.GetHashCode(); + if (SecurityQuestion.Length != 0) hash ^= SecurityQuestion.GetHashCode(); + if (Salt.Length != 0) hash ^= Salt.GetHashCode(); + if (Iterations != 0) hash ^= Iterations.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -20108,47 +41713,91 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (AppRecordUid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(AppRecordUid); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (BackupKeyType != global::Authentication.BackupKeyType.BktSecAnswer) { + output.WriteRawTag(8); + output.WriteEnum((int) BackupKeyType); } - if (SecretUid.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(SecretUid); + if (BackupKeyDate != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BackupKeyDate); } - if (ShareType != global::Authentication.ApplicationShareType.ShtRecord) { - output.WriteRawTag(24); - output.WriteEnum((int) ShareType); + if (SecurityQuestion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(SecurityQuestion); } - if (EncryptedSecretKey.Length != 0) { + if (Salt.Length != 0) { output.WriteRawTag(34); - output.WriteBytes(EncryptedSecretKey); + output.WriteBytes(Salt); + } + if (Iterations != 0) { + output.WriteRawTag(40); + output.WriteInt32(Iterations); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (BackupKeyType != global::Authentication.BackupKeyType.BktSecAnswer) { + output.WriteRawTag(8); + output.WriteEnum((int) BackupKeyType); + } + if (BackupKeyDate != 0L) { + output.WriteRawTag(16); + output.WriteInt64(BackupKeyDate); + } + if (SecurityQuestion.Length != 0) { + output.WriteRawTag(26); + output.WriteString(SecurityQuestion); + } + if (Salt.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Salt); + } + if (Iterations != 0) { + output.WriteRawTag(40); + output.WriteInt32(Iterations); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (AppRecordUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); + if (BackupKeyType != global::Authentication.BackupKeyType.BktSecAnswer) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BackupKeyType); } - if (SecretUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(SecretUid); + if (BackupKeyDate != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BackupKeyDate); } - if (ShareType != global::Authentication.ApplicationShareType.ShtRecord) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ShareType); + if (SecurityQuestion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SecurityQuestion); + } + if (Salt.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Salt); } - if (EncryptedSecretKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSecretKey); + if (Iterations != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Iterations); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -20157,149 +41806,192 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(AddAppShareRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AccountRecoveryVerifyCodeResponse other) { if (other == null) { return; } - if (other.AppRecordUid.Length != 0) { - AppRecordUid = other.AppRecordUid; + if (other.BackupKeyType != global::Authentication.BackupKeyType.BktSecAnswer) { + BackupKeyType = other.BackupKeyType; } - if (other.SecretUid.Length != 0) { - SecretUid = other.SecretUid; + if (other.BackupKeyDate != 0L) { + BackupKeyDate = other.BackupKeyDate; } - if (other.ShareType != global::Authentication.ApplicationShareType.ShtRecord) { - ShareType = other.ShareType; + if (other.SecurityQuestion.Length != 0) { + SecurityQuestion = other.SecurityQuestion; } - if (other.EncryptedSecretKey.Length != 0) { - EncryptedSecretKey = other.EncryptedSecretKey; + if (other.Salt.Length != 0) { + Salt = other.Salt; + } + if (other.Iterations != 0) { + Iterations = other.Iterations; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - AppRecordUid = input.ReadBytes(); + case 8: { + BackupKeyType = (global::Authentication.BackupKeyType) input.ReadEnum(); break; } - case 18: { - SecretUid = input.ReadBytes(); + case 16: { + BackupKeyDate = input.ReadInt64(); break; } - case 24: { - ShareType = (global::Authentication.ApplicationShareType) input.ReadEnum(); + case 26: { + SecurityQuestion = input.ReadString(); break; } case 34: { - EncryptedSecretKey = input.ReadBytes(); + Salt = input.ReadBytes(); + break; + } + case 40: { + Iterations = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + BackupKeyType = (global::Authentication.BackupKeyType) input.ReadEnum(); + break; + } + case 16: { + BackupKeyDate = input.ReadInt64(); + break; + } + case 26: { + SecurityQuestion = input.ReadString(); + break; + } + case 34: { + Salt = input.ReadBytes(); + break; + } + case 40: { + Iterations = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class AddAppClientRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddAppClientRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EmergencyAccessLoginRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmergencyAccessLoginRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[94]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[141]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddAppClientRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmergencyAccessLoginRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddAppClientRequest(AddAppClientRequest other) : this() { - appRecordUid_ = other.appRecordUid_; - encryptedMasterKey_ = other.encryptedMasterKey_; - clientId_ = other.clientId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmergencyAccessLoginRequest(EmergencyAccessLoginRequest other) : this() { + owner_ = other.owner_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public AddAppClientRequest Clone() { - return new AddAppClientRequest(this); - } - - /// Field number for the "appRecordUid" field. - public const int AppRecordUidFieldNumber = 1; - private pb::ByteString appRecordUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AppRecordUid { - get { return appRecordUid_; } - set { - appRecordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "encryptedMasterKey" field. - public const int EncryptedMasterKeyFieldNumber = 2; - private pb::ByteString encryptedMasterKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedMasterKey { - get { return encryptedMasterKey_; } - set { - encryptedMasterKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmergencyAccessLoginRequest Clone() { + return new EmergencyAccessLoginRequest(this); } - /// Field number for the "clientId" field. - public const int ClientIdFieldNumber = 3; - private pb::ByteString clientId_ = pb::ByteString.Empty; + /// Field number for the "owner" field. + public const int OwnerFieldNumber = 1; + private string owner_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ClientId { - get { return clientId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Owner { + get { return owner_; } set { - clientId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + owner_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as AddAppClientRequest); + return Equals(other as EmergencyAccessLoginRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(AddAppClientRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EmergencyAccessLoginRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (AppRecordUid != other.AppRecordUid) return false; - if (EncryptedMasterKey != other.EncryptedMasterKey) return false; - if (ClientId != other.ClientId) return false; + if (Owner != other.Owner) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (AppRecordUid.Length != 0) hash ^= AppRecordUid.GetHashCode(); - if (EncryptedMasterKey.Length != 0) hash ^= EncryptedMasterKey.GetHashCode(); - if (ClientId.Length != 0) hash ^= ClientId.GetHashCode(); + if (Owner.Length != 0) hash ^= Owner.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -20307,40 +41999,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (AppRecordUid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Owner.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(AppRecordUid); + output.WriteString(Owner); } - if (EncryptedMasterKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(EncryptedMasterKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (ClientId.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(ClientId); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Owner.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Owner); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (AppRecordUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppRecordUid); - } - if (EncryptedMasterKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedMasterKey); - } - if (ClientId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ClientId); + if (Owner.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Owner); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -20349,114 +42048,199 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(AddAppClientRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EmergencyAccessLoginRequest other) { if (other == null) { return; } - if (other.AppRecordUid.Length != 0) { - AppRecordUid = other.AppRecordUid; - } - if (other.EncryptedMasterKey.Length != 0) { - EncryptedMasterKey = other.EncryptedMasterKey; - } - if (other.ClientId.Length != 0) { - ClientId = other.ClientId; + if (other.Owner.Length != 0) { + Owner = other.Owner; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - AppRecordUid = input.ReadBytes(); + Owner = input.ReadString(); break; } - case 18: { - EncryptedMasterKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 26: { - ClientId = input.ReadBytes(); + case 10: { + Owner = input.ReadString(); break; } } } } + #endif } - public sealed partial class GetVerificationTokenRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetVerificationTokenRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EmergencyAccessLoginResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmergencyAccessLoginResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[95]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[142]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetVerificationTokenRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmergencyAccessLoginResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetVerificationTokenRequest(GetVerificationTokenRequest other) : this() { - username_ = other.username_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmergencyAccessLoginResponse(EmergencyAccessLoginResponse other) : this() { + sessionToken_ = other.sessionToken_; + dataKey_ = other.dataKey_ != null ? other.dataKey_.Clone() : null; + rsaPrivateKey_ = other.rsaPrivateKey_ != null ? other.rsaPrivateKey_.Clone() : null; + eccPrivateKey_ = other.eccPrivateKey_ != null ? other.eccPrivateKey_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetVerificationTokenRequest Clone() { - return new GetVerificationTokenRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmergencyAccessLoginResponse Clone() { + return new EmergencyAccessLoginResponse(this); } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; + /// Field number for the "sessionToken" field. + public const int SessionTokenFieldNumber = 1; + private pb::ByteString sessionToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SessionToken { + get { return sessionToken_; } set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + sessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dataKey" field. + public const int DataKeyFieldNumber = 2; + private global::Enterprise.TypedKey dataKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TypedKey DataKey { + get { return dataKey_; } + set { + dataKey_ = value; + } + } + + /// Field number for the "rsaPrivateKey" field. + public const int RsaPrivateKeyFieldNumber = 3; + private global::Enterprise.TypedKey rsaPrivateKey_; + /// + /// may be empty + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TypedKey RsaPrivateKey { + get { return rsaPrivateKey_; } + set { + rsaPrivateKey_ = value; + } + } + + /// Field number for the "eccPrivateKey" field. + public const int EccPrivateKeyFieldNumber = 4; + private global::Enterprise.TypedKey eccPrivateKey_; + /// + /// may be empty + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TypedKey EccPrivateKey { + get { return eccPrivateKey_; } + set { + eccPrivateKey_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetVerificationTokenRequest); + return Equals(other as EmergencyAccessLoginResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetVerificationTokenRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EmergencyAccessLoginResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; + if (SessionToken != other.SessionToken) return false; + if (!object.Equals(DataKey, other.DataKey)) return false; + if (!object.Equals(RsaPrivateKey, other.RsaPrivateKey)) return false; + if (!object.Equals(EccPrivateKey, other.EccPrivateKey)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (SessionToken.Length != 0) hash ^= SessionToken.GetHashCode(); + if (dataKey_ != null) hash ^= DataKey.GetHashCode(); + if (rsaPrivateKey_ != null) hash ^= RsaPrivateKey.GetHashCode(); + if (eccPrivateKey_ != null) hash ^= EccPrivateKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -20464,26 +42248,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SessionToken.Length != 0) { output.WriteRawTag(10); - output.WriteString(Username); + output.WriteBytes(SessionToken); + } + if (dataKey_ != null) { + output.WriteRawTag(18); + output.WriteMessage(DataKey); + } + if (rsaPrivateKey_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RsaPrivateKey); + } + if (eccPrivateKey_ != null) { + output.WriteRawTag(34); + output.WriteMessage(EccPrivateKey); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SessionToken); + } + if (dataKey_ != null) { + output.WriteRawTag(18); + output.WriteMessage(DataKey); + } + if (rsaPrivateKey_ != null) { + output.WriteRawTag(26); + output.WriteMessage(RsaPrivateKey); + } + if (eccPrivateKey_ != null) { + output.WriteRawTag(34); + output.WriteMessage(EccPrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + if (SessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SessionToken); + } + if (dataKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(DataKey); + } + if (rsaPrivateKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RsaPrivateKey); + } + if (eccPrivateKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EccPrivateKey); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -20492,100 +42330,298 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetVerificationTokenRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EmergencyAccessLoginResponse other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; + if (other.SessionToken.Length != 0) { + SessionToken = other.SessionToken; + } + if (other.dataKey_ != null) { + if (dataKey_ == null) { + DataKey = new global::Enterprise.TypedKey(); + } + DataKey.MergeFrom(other.DataKey); + } + if (other.rsaPrivateKey_ != null) { + if (rsaPrivateKey_ == null) { + RsaPrivateKey = new global::Enterprise.TypedKey(); + } + RsaPrivateKey.MergeFrom(other.RsaPrivateKey); + } + if (other.eccPrivateKey_ != null) { + if (eccPrivateKey_ == null) { + EccPrivateKey = new global::Enterprise.TypedKey(); + } + EccPrivateKey.MergeFrom(other.EccPrivateKey); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Username = input.ReadString(); + case 10: { + SessionToken = input.ReadBytes(); + break; + } + case 18: { + if (dataKey_ == null) { + DataKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(DataKey); + break; + } + case 26: { + if (rsaPrivateKey_ == null) { + RsaPrivateKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(RsaPrivateKey); + break; + } + case 34: { + if (eccPrivateKey_ == null) { + EccPrivateKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(EccPrivateKey); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SessionToken = input.ReadBytes(); + break; + } + case 18: { + if (dataKey_ == null) { + DataKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(DataKey); + break; + } + case 26: { + if (rsaPrivateKey_ == null) { + RsaPrivateKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(RsaPrivateKey); + break; + } + case 34: { + if (eccPrivateKey_ == null) { + EccPrivateKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(EccPrivateKey); break; } } } } + #endif } - public sealed partial class GetVerificationTokenResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetVerificationTokenResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserTeamKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserTeamKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[96]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[143]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetVerificationTokenResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTeamKey() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetVerificationTokenResponse(GetVerificationTokenResponse other) : this() { - encryptedVerificationToken_ = other.encryptedVerificationToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTeamKey(UserTeamKey other) : this() { + teamUid_ = other.teamUid_; + username_ = other.username_; + enterpriseUserId_ = other.enterpriseUserId_; + encryptedTeamKeyRSA_ = other.encryptedTeamKeyRSA_; + encryptedTeamKeyEC_ = other.encryptedTeamKeyEC_; + status_ = other.status_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetVerificationTokenResponse Clone() { - return new GetVerificationTokenResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserTeamKey Clone() { + return new UserTeamKey(this); } - /// Field number for the "encryptedVerificationToken" field. - public const int EncryptedVerificationTokenFieldNumber = 1; - private pb::ByteString encryptedVerificationToken_ = pb::ByteString.Empty; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedVerificationToken { - get { return encryptedVerificationToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - encryptedVerificationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + /// + /// this is if the client has a username not an enterpriseUserId + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 3; + private long enterpriseUserId_; + /// + /// note: this is because new sync down is sending enterpriseUserIds not usernames for queued team members + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "encryptedTeamKeyRSA" field. + public const int EncryptedTeamKeyRSAFieldNumber = 4; + private pb::ByteString encryptedTeamKeyRSA_ = pb::ByteString.Empty; + /// + /// team key shared to the user via user's RSA public key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedTeamKeyRSA { + get { return encryptedTeamKeyRSA_; } + set { + encryptedTeamKeyRSA_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedTeamKeyEC" field. + public const int EncryptedTeamKeyECFieldNumber = 5; + private pb::ByteString encryptedTeamKeyEC_ = pb::ByteString.Empty; + /// + /// team key shared to the user via user's EC public key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedTeamKeyEC { + get { return encryptedTeamKeyEC_; } + set { + encryptedTeamKeyEC_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 6; + private global::Authentication.GenericStatus status_ = global::Authentication.GenericStatus.Success; + /// + /// used in the response to state success or failure, blank means success + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.GenericStatus Status { + get { return status_; } + set { + status_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetVerificationTokenResponse); + return Equals(other as UserTeamKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetVerificationTokenResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserTeamKey other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedVerificationToken != other.EncryptedVerificationToken) return false; + if (TeamUid != other.TeamUid) return false; + if (Username != other.Username) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedTeamKeyRSA != other.EncryptedTeamKeyRSA) return false; + if (EncryptedTeamKeyEC != other.EncryptedTeamKeyEC) return false; + if (Status != other.Status) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedVerificationToken.Length != 0) hash ^= EncryptedVerificationToken.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedTeamKeyRSA.Length != 0) hash ^= EncryptedTeamKeyRSA.GetHashCode(); + if (EncryptedTeamKeyEC.Length != 0) hash ^= EncryptedTeamKeyEC.GetHashCode(); + if (Status != global::Authentication.GenericStatus.Success) hash ^= Status.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -20593,26 +42629,102 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedVerificationToken.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(EncryptedVerificationToken); + output.WriteBytes(TeamUid); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedTeamKeyRSA.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedTeamKeyRSA); + } + if (EncryptedTeamKeyEC.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedTeamKeyEC); + } + if (Status != global::Authentication.GenericStatus.Success) { + output.WriteRawTag(48); + output.WriteEnum((int) Status); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedTeamKeyRSA.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedTeamKeyRSA); + } + if (EncryptedTeamKeyEC.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedTeamKeyEC); + } + if (Status != global::Authentication.GenericStatus.Success) { + output.WriteRawTag(48); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedVerificationToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedVerificationToken); + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (EncryptedTeamKeyRSA.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedTeamKeyRSA); + } + if (EncryptedTeamKeyEC.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedTeamKeyEC); + } + if (Status != global::Authentication.GenericStatus.Success) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -20621,100 +42733,205 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetVerificationTokenResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserTeamKey other) { if (other == null) { return; } - if (other.EncryptedVerificationToken.Length != 0) { - EncryptedVerificationToken = other.EncryptedVerificationToken; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.EncryptedTeamKeyRSA.Length != 0) { + EncryptedTeamKeyRSA = other.EncryptedTeamKeyRSA; + } + if (other.EncryptedTeamKeyEC.Length != 0) { + EncryptedTeamKeyEC = other.EncryptedTeamKeyEC; + } + if (other.Status != global::Authentication.GenericStatus.Success) { + Status = other.Status; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedVerificationToken = input.ReadBytes(); + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 24: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 34: { + EncryptedTeamKeyRSA = input.ReadBytes(); + break; + } + case 42: { + EncryptedTeamKeyEC = input.ReadBytes(); + break; + } + case 48: { + Status = (global::Authentication.GenericStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 24: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 34: { + EncryptedTeamKeyRSA = input.ReadBytes(); + break; + } + case 42: { + EncryptedTeamKeyEC = input.ReadBytes(); + break; + } + case 48: { + Status = (global::Authentication.GenericStatus) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class SendShareInviteRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SendShareInviteRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GenericRequestResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GenericRequestResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[97]; } + get { return global::Authentication.APIRequestReflection.Descriptor.MessageTypes[144]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SendShareInviteRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenericRequestResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SendShareInviteRequest(SendShareInviteRequest other) : this() { - email_ = other.email_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenericRequestResponse(GenericRequestResponse other) : this() { + request_ = other.request_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SendShareInviteRequest Clone() { - return new SendShareInviteRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GenericRequestResponse Clone() { + return new GenericRequestResponse(this); } - /// Field number for the "email" field. - public const int EmailFieldNumber = 1; - private string email_ = ""; + /// Field number for the "request" field. + public const int RequestFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_request_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField request_ = new pbc::RepeatedField(); + /// + /// this is just a repeated list of whatever request message the api called for as a bytestring + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Email { - get { return email_; } - set { - email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Request { + get { return request_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SendShareInviteRequest); + return Equals(other as GenericRequestResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SendShareInviteRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GenericRequestResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Email != other.Email) return false; + if(!request_.Equals(other.request_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Email.Length != 0) hash ^= Email.GetHashCode(); + hash ^= request_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -20722,27 +42939,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Email.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Email); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + request_.WriteTo(output, _repeated_request_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + request_.WriteTo(ref output, _repeated_request_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Email.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); - } + size += request_.CalculateSize(_repeated_request_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -20750,31 +42980,62 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SendShareInviteRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GenericRequestResponse other) { if (other == null) { return; } - if (other.Email.Length != 0) { - Email = other.Email; - } + request_.Add(other.request_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Email = input.ReadString(); + request_.AddEntriesFrom(input, _repeated_request_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + request_.AddEntriesFrom(ref input, _repeated_request_codec); break; } } } } + #endif } diff --git a/KeeperSdk/proto/AccountSummary.cs b/KeeperSdk/proto/AccountSummary.cs index 555d21c..737336c 100644 --- a/KeeperSdk/proto/AccountSummary.cs +++ b/KeeperSdk/proto/AccountSummary.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: AccountSummary.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -25,115 +25,123 @@ static AccountSummaryReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "ChRBY2NvdW50U3VtbWFyeS5wcm90bxIOQWNjb3VudFN1bW1hcnkaEEFQSVJl", - "cXVlc3QucHJvdG8iLwoVQWNjb3VudFN1bW1hcnlSZXF1ZXN0EhYKDnN1bW1h", - "cnlWZXJzaW9uGAEgASgFIokEChZBY2NvdW50U3VtbWFyeUVsZW1lbnRzEhEK", - "CWNsaWVudEtleRgBIAEoDBIqCghzZXR0aW5ncxgCIAEoCzIYLkFjY291bnRT", - "dW1tYXJ5LlNldHRpbmdzEioKCGtleXNJbmZvGAMgASgLMhguQWNjb3VudFN1", - "bW1hcnkuS2V5c0luZm8SKQoIc3luY0xvZ3MYBCADKAsyFy5BY2NvdW50U3Vt", - "bWFyeS5TeW5jTG9nEhkKEWlzRW50ZXJwcmlzZUFkbWluGAUgASgIEigKB2xp", - "Y2Vuc2UYBiABKAsyFy5BY2NvdW50U3VtbWFyeS5MaWNlbnNlEiQKBWdyb3Vw", - "GAcgASgLMhUuQWNjb3VudFN1bW1hcnkuR3JvdXASMgoMRW5mb3JjZW1lbnRz", - "GAggASgLMhwuQWNjb3VudFN1bW1hcnkuRW5mb3JjZW1lbnRzEigKBkltYWdl", - "cxgJIAMoCzIYLkFjY291bnRTdW1tYXJ5LktleVZhbHVlEjAKD3BlcnNvbmFs", - "TGljZW5zZRgKIAEoCzIXLkFjY291bnRTdW1tYXJ5LkxpY2Vuc2USHgoWZml4", - "U2hhcmVkRm9sZGVyUmVjb3JkcxgLIAEoCBIRCgl1c2VybmFtZXMYDCADKAkS", - "KwoHZGV2aWNlcxgNIAMoCzIaLkFjY291bnRTdW1tYXJ5LkRldmljZUluZm8i", - "twIKCkRldmljZUluZm8SHAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4YASABKAwS", - "EgoKZGV2aWNlTmFtZRgCIAEoCRIyCgxkZXZpY2VTdGF0dXMYAyABKA4yHC5B", - "dXRoZW50aWNhdGlvbi5EZXZpY2VTdGF0dXMSFwoPZGV2aWNlUHVibGljS2V5", - "GAQgASgMEiAKGGVuY3J5cHRlZERhdGFLZXlEb05vdFVzZRgFIAEoDBIVCg1j", - "bGllbnRWZXJzaW9uGAYgASgJEhAKCHVzZXJuYW1lGAcgASgJEhEKCWlwQWRk", - "cmVzcxgIIAEoCRIaChJhcHByb3ZlUmVxdWVzdFRpbWUYCSABKAMSHwoXZW5j", - "cnlwdGVkRGF0YUtleVByZXNlbnQYCiABKAgSDwoHZ3JvdXBJZBgLIAEoAyLB", - "AQoIS2V5c0luZm8SGAoQZW5jcnlwdGlvblBhcmFtcxgBIAEoDBIYChBlbmNy", - "eXB0ZWREYXRhS2V5GAIgASgMEhkKEWRhdGFLZXlCYWNrdXBEYXRlGAMgASgB", - "EhMKC3VzZXJBdXRoVWlkGAQgASgMEhsKE2VuY3J5cHRlZFByaXZhdGVLZXkY", - "BSABKAwSHgoWZW5jcnlwdGVkRWNjUHJpdmF0ZUtleRgGIAEoDBIUCgxlY2NQ", - "dWJsaWNLZXkYByABKAwigQEKB1N5bmNMb2cSEwoLY291bnRyeU5hbWUYASAB", - "KAkSEgoKc2Vjb25kc0FnbxgCIAEoAxISCgpkZXZpY2VOYW1lGAMgASgJEhMK", - "C2NvdW50cnlDb2RlGAQgASgJEhEKCWRldmljZVVJRBgFIAEoDBIRCglpcEFk", - "ZHJlc3MYBiABKAki4gUKB0xpY2Vuc2USGAoQc3Vic2NyaXB0aW9uQ29kZRgB", - "IAEoCRIVCg1wcm9kdWN0VHlwZUlkGAIgASgFEhcKD3Byb2R1Y3RUeXBlTmFt", - "ZRgDIAEoCRIWCg5leHBpcmF0aW9uRGF0ZRgEIAEoCRIeChZzZWNvbmRzVW50", - "aWxFeHBpcmF0aW9uGAUgASgDEhIKCm1heERldmljZXMYBiABKAUSFAoMZmls", - "ZVBsYW5UeXBlGAcgASgFEhEKCWJ5dGVzVXNlZBgIIAEoAxISCgpieXRlc1Rv", - "dGFsGAkgASgDEiUKHXNlY29uZHNVbnRpbFN0b3JhZ2VFeHBpcmF0aW9uGAog", - "ASgDEh0KFXN0b3JhZ2VFeHBpcmF0aW9uRGF0ZRgLIAEoCRIsCiRoYXNBdXRv", - "UmVuZXdhYmxlQXBwc3RvcmVTdWJzY3JpcHRpb24YDCABKAgSEwoLYWNjb3Vu", - "dFR5cGUYDSABKAUSGAoQdXBsb2Fkc1JlbWFpbmluZxgOIAEoBRIUCgxlbnRl", - "cnByaXNlSWQYDyABKAUSEwoLY2hhdEVuYWJsZWQYECABKAgSIAoYYXVkaXRB", - "bmRSZXBvcnRpbmdFbmFibGVkGBEgASgIEiEKGWJyZWFjaFdhdGNoRmVhdHVy", - "ZURpc2FibGUYEiABKAgSEgoKYWNjb3VudFVpZBgTIAEoDBIcChRhbGxvd1Bl", - "cnNvbmFsTGljZW5zZRgUIAEoCBISCgpsaWNlbnNlZEJ5GBUgASgJEg0KBWVt", - "YWlsGBYgASgJEhoKEmJyZWFjaFdhdGNoRW5hYmxlZBgXIAEoCBIaChJicmVh", - "Y2hXYXRjaFNjYW5uZWQYGCABKAgSHQoVYnJlYWNoV2F0Y2hFeHBpcmF0aW9u", - "GBkgASgDEh4KFmJyZWFjaFdhdGNoRGF0ZUNyZWF0ZWQYGiABKAMSJQoFZXJy", - "b3IYGyABKAsyFi5BY2NvdW50U3VtbWFyeS5SZXN1bHQiowEKBUFkZE9uEhQK", - "DGxpY2Vuc2VLZXlJZBgBIAEoBRIMCgRuYW1lGAIgASgJEhYKDmV4cGlyYXRp", - "b25EYXRlGAMgASgDEhMKC2NyZWF0ZWREYXRlGAQgASgDEg8KB2lzVHJpYWwY", - "BSABKAgSDwoHZW5hYmxlZBgGIAEoCBIPCgdzY2FubmVkGAcgASgIEhYKDmZl", - "YXR1cmVEaXNhYmxlGAggASgIIo0ICghTZXR0aW5ncxINCgVhdWRpdBgBIAEo", - "CBIhChltdXN0UGVyZm9ybUFjY291bnRTaGFyZUJ5GAIgASgDEj4KDnNoYXJl", - "QWNjb3VudFRvGAMgAygLMiYuQWNjb3VudFN1bW1hcnkuTWlzc2luZ0FjY291", - "bnRTaGFyZUtleRIrCgVydWxlcxgEIAMoCzIcLkFjY291bnRTdW1tYXJ5LlBh", - "c3N3b3JkUnVsZRIaChJwYXNzd29yZFJ1bGVzSW50cm8YBSABKAkSFgoOYXV0", - "b0JhY2t1cERheXMYBiABKAUSDQoFdGhlbWUYByABKAkSDwoHY2hhbm5lbBgI", - "IAEoCRIUCgxjaGFubmVsVmFsdWUYCSABKAkSFQoNcnNhQ29uZmlndXJlZBgK", - "IAEoCBIVCg1lbWFpbFZlcmlmaWVkGAsgASgIEiIKGm1hc3RlclBhc3N3b3Jk", - "TGFzdE1vZGlmaWVkGAwgASgBEhgKEGFjY291bnRGb2xkZXJLZXkYDSABKAwS", - "MQoMc2VjdXJpdHlLZXlzGA4gAygLMhsuQWNjb3VudFN1bW1hcnkuU2VjdXJp", - "dHlLZXkSKwoJa2V5VmFsdWVzGA8gAygLMhguQWNjb3VudFN1bW1hcnkuS2V5", - "VmFsdWUSDwoHc3NvVXNlchgQIAEoCBIYChBvbmxpbmVBY2Nlc3NPbmx5GBEg", - "ASgIEhwKFG1hc3RlclBhc3N3b3JkRXhwaXJ5GBIgASgFEhkKEXR3b0ZhY3Rv", - "clJlcXVpcmVkGBMgASgIEhYKDmRpc2FsbG93RXhwb3J0GBQgASgIEhUKDXJl", - "c3RyaWN0RmlsZXMYFSABKAgSGgoScmVzdHJpY3RBbGxTaGFyaW5nGBYgASgI", - "EhcKD3Jlc3RyaWN0U2hhcmluZxgXIAEoCBIiChpyZXN0cmljdFNoYXJpbmdJ", - "bmNvbWluZ0FsbBgYIAEoCBIpCiFyZXN0cmljdFNoYXJpbmdJbmNvbWluZ0Vu", - "dGVycHJpc2UYGSABKAgSEwoLbG9nb3V0VGltZXIYGiABKAMSFwoPcGVyc2lz", - "dGVudExvZ2luGBsgASgIEhwKFGlwRGlzYWJsZUF1dG9BcHByb3ZlGBwgASgI", - "EiQKHHNoYXJlRGF0YUtleVdpdGhFY2NQdWJsaWNLZXkYHSABKAgSJwofc2hh", - "cmVEYXRhS2V5V2l0aERldmljZVB1YmxpY0tleRgeIAEoCBIaChJSZWNvcmRU", - "eXBlc0NvdW50ZXIYHyABKAUSJAocUmVjb3JkVHlwZXNFbnRlcnByaXNlQ291", - "bnRlchggIAEoBRIaChJyZWNvcmRUeXBlc0VuYWJsZWQYISABKAgSHAoUY2Fu", - "TWFuYWdlUmVjb3JkVHlwZXMYIiABKAgiJgoIS2V5VmFsdWUSCwoDa2V5GAEg", - "ASgJEg0KBXZhbHVlGAIgASgJIi0KD0tleVZhbHVlQm9vbGVhbhILCgNrZXkY", - "ASABKAkSDQoFdmFsdWUYAiABKAgiKgoMS2V5VmFsdWVMb25nEgsKA2tleRgB", - "IAEoCRINCgV2YWx1ZRgCIAEoAyI9CgZSZXN1bHQSEgoKcmVzdWx0Q29kZRgB", - "IAEoCRIPCgdtZXNzYWdlGAIgASgJEg4KBnJlc3VsdBgDIAEoCSLCAQoMRW5m", - "b3JjZW1lbnRzEikKB3N0cmluZ3MYASADKAsyGC5BY2NvdW50U3VtbWFyeS5L", - "ZXlWYWx1ZRIxCghib29sZWFucxgCIAMoCzIfLkFjY291bnRTdW1tYXJ5Lktl", - "eVZhbHVlQm9vbGVhbhIrCgVsb25ncxgDIAMoCzIcLkFjY291bnRTdW1tYXJ5", - "LktleVZhbHVlTG9uZxInCgVqc29ucxgEIAMoCzIYLkFjY291bnRTdW1tYXJ5", - "LktleVZhbHVlIjwKFk1pc3NpbmdBY2NvdW50U2hhcmVLZXkSDwoHcm9sZV9p", - "ZBgBIAEoAxIRCglwdWJsaWNLZXkYAiABKAwidQoMUGFzc3dvcmRSdWxlEhAK", - "CHJ1bGVUeXBlGAEgASgJEg8KB3BhdHRlcm4YAiABKAkSDQoFbWF0Y2gYAyAB", - "KAgSDwoHbWluaW11bRgEIAEoBRITCgtkZXNjcmlwdGlvbhgFIAEoCRINCgV2", - "YWx1ZRgGIAEoCSKXAQoLU2VjdXJpdHlLZXkSEAoIZGV2aWNlSWQYASABKAMS", - "EgoKZGV2aWNlTmFtZRgCIAEoCRIRCglkYXRlQWRkZWQYAyABKAMSDwoHaXNW", - "YWxpZBgEIAEoCBI+ChJkZXZpY2VSZWdpc3RyYXRpb24YBSABKAsyIi5BY2Nv", - "dW50U3VtbWFyeS5EZXZpY2VSZWdpc3RyYXRpb24ieQoSRGV2aWNlUmVnaXN0", - "cmF0aW9uEhEKCWtleUhhbmRsZRgBIAEoCRIRCglwdWJsaWNLZXkYAiABKAwS", - "FwoPYXR0ZXN0YXRpb25DZXJ0GAMgASgJEg8KB2NvdW50ZXIYBCABKAMSEwoL", - "Y29tcHJvbWlzZWQYBSABKAgiawoFR3JvdXASDQoFYWRtaW4YASABKAgSHQoV", - "Z3JvdXBWZXJpZmljYXRpb25Db2RlGAIgASgJEjQKDWFkbWluaXN0cmF0b3IY", - "BCABKAsyHS5BY2NvdW50U3VtbWFyeS5BZG1pbmlzdHJhdG9yIsABCg1BZG1p", - "bmlzdHJhdG9yEhEKCWZpcnN0TmFtZRgBIAEoCRIQCghsYXN0TmFtZRgCIAEo", - "CRINCgVlbWFpbBgDIAEoCRIcChRjdXJyZW50TnVtYmVyT2ZVc2VycxgEIAEo", - "BRIVCg1udW1iZXJPZlVzZXJzGAUgASgFEhgKEHN1YnNjcmlwdGlvbkNvZGUY", - "ByABKAkSFgoOZXhwaXJhdGlvbkRhdGUYCCABKAkSFAoMcHVyY2hhc2VEYXRl", - "GAkgASgJQioKGGNvbS5rZWVwZXJzZWN1cml0eS5wcm90b0IOQWNjb3VudFN1", - "bW1hcnliBnByb3RvMw==")); + "cXVlc3QucHJvdG8iTgoVQWNjb3VudFN1bW1hcnlSZXF1ZXN0EhYKDnN1bW1h", + "cnlWZXJzaW9uGAEgASgFEh0KFWluY2x1ZGVSZWNlbnRBY3Rpdml0eRgCIAEo", + "CCKYBQoWQWNjb3VudFN1bW1hcnlFbGVtZW50cxIRCgljbGllbnRLZXkYASAB", + "KAwSKgoIc2V0dGluZ3MYAiABKAsyGC5BY2NvdW50U3VtbWFyeS5TZXR0aW5n", + "cxIqCghrZXlzSW5mbxgDIAEoCzIYLkFjY291bnRTdW1tYXJ5LktleXNJbmZv", + "EikKCHN5bmNMb2dzGAQgAygLMhcuQWNjb3VudFN1bW1hcnkuU3luY0xvZxIZ", + "ChFpc0VudGVycHJpc2VBZG1pbhgFIAEoCBIoCgdsaWNlbnNlGAYgASgLMhcu", + "QWNjb3VudFN1bW1hcnkuTGljZW5zZRIkCgVncm91cBgHIAEoCzIVLkFjY291", + "bnRTdW1tYXJ5Lkdyb3VwEjIKDEVuZm9yY2VtZW50cxgIIAEoCzIcLkFjY291", + "bnRTdW1tYXJ5LkVuZm9yY2VtZW50cxIoCgZJbWFnZXMYCSADKAsyGC5BY2Nv", + "dW50U3VtbWFyeS5LZXlWYWx1ZRIwCg9wZXJzb25hbExpY2Vuc2UYCiABKAsy", + "Fy5BY2NvdW50U3VtbWFyeS5MaWNlbnNlEh4KFmZpeFNoYXJlZEZvbGRlclJl", + "Y29yZHMYCyABKAgSEQoJdXNlcm5hbWVzGAwgAygJEisKB2RldmljZXMYDSAD", + "KAsyGi5BY2NvdW50U3VtbWFyeS5EZXZpY2VJbmZvEhQKDGlzU2hhcmVBZG1p", + "bhgOIAEoCBIXCg9hY2NvdW50UmVjb3ZlcnkYDyABKAgSHQoVYWNjb3VudFJl", + "Y292ZXJ5UHJvbXB0GBAgASgIEicKH21pbk1hc3RlclBhc3N3b3JkTGVuZ3Ro", + "Tm9Qcm9tcHQYESABKAUSFgoOZm9yYmlkS2V5VHlwZTIYEiABKAgitwIKCkRl", + "dmljZUluZm8SHAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4YASABKAwSEgoKZGV2", + "aWNlTmFtZRgCIAEoCRIyCgxkZXZpY2VTdGF0dXMYAyABKA4yHC5BdXRoZW50", + "aWNhdGlvbi5EZXZpY2VTdGF0dXMSFwoPZGV2aWNlUHVibGljS2V5GAQgASgM", + "EiAKGGVuY3J5cHRlZERhdGFLZXlEb05vdFVzZRgFIAEoDBIVCg1jbGllbnRW", + "ZXJzaW9uGAYgASgJEhAKCHVzZXJuYW1lGAcgASgJEhEKCWlwQWRkcmVzcxgI", + "IAEoCRIaChJhcHByb3ZlUmVxdWVzdFRpbWUYCSABKAMSHwoXZW5jcnlwdGVk", + "RGF0YUtleVByZXNlbnQYCiABKAgSDwoHZ3JvdXBJZBgLIAEoAyLBAQoIS2V5", + "c0luZm8SGAoQZW5jcnlwdGlvblBhcmFtcxgBIAEoDBIYChBlbmNyeXB0ZWRE", + "YXRhS2V5GAIgASgMEhkKEWRhdGFLZXlCYWNrdXBEYXRlGAMgASgBEhMKC3Vz", + "ZXJBdXRoVWlkGAQgASgMEhsKE2VuY3J5cHRlZFByaXZhdGVLZXkYBSABKAwS", + "HgoWZW5jcnlwdGVkRWNjUHJpdmF0ZUtleRgGIAEoDBIUCgxlY2NQdWJsaWNL", + "ZXkYByABKAwigQEKB1N5bmNMb2cSEwoLY291bnRyeU5hbWUYASABKAkSEgoK", + "c2Vjb25kc0FnbxgCIAEoAxISCgpkZXZpY2VOYW1lGAMgASgJEhMKC2NvdW50", + "cnlDb2RlGAQgASgJEhEKCWRldmljZVVJRBgFIAEoDBIRCglpcEFkZHJlc3MY", + "BiABKAki/QUKB0xpY2Vuc2USGAoQc3Vic2NyaXB0aW9uQ29kZRgBIAEoCRIV", + "Cg1wcm9kdWN0VHlwZUlkGAIgASgFEhcKD3Byb2R1Y3RUeXBlTmFtZRgDIAEo", + "CRIWCg5leHBpcmF0aW9uRGF0ZRgEIAEoCRIeChZzZWNvbmRzVW50aWxFeHBp", + "cmF0aW9uGAUgASgDEhIKCm1heERldmljZXMYBiABKAUSFAoMZmlsZVBsYW5U", + "eXBlGAcgASgFEhEKCWJ5dGVzVXNlZBgIIAEoAxISCgpieXRlc1RvdGFsGAkg", + "ASgDEiUKHXNlY29uZHNVbnRpbFN0b3JhZ2VFeHBpcmF0aW9uGAogASgDEh0K", + "FXN0b3JhZ2VFeHBpcmF0aW9uRGF0ZRgLIAEoCRIsCiRoYXNBdXRvUmVuZXdh", + "YmxlQXBwc3RvcmVTdWJzY3JpcHRpb24YDCABKAgSEwoLYWNjb3VudFR5cGUY", + "DSABKAUSGAoQdXBsb2Fkc1JlbWFpbmluZxgOIAEoBRIUCgxlbnRlcnByaXNl", + "SWQYDyABKAUSEwoLY2hhdEVuYWJsZWQYECABKAgSIAoYYXVkaXRBbmRSZXBv", + "cnRpbmdFbmFibGVkGBEgASgIEiEKGWJyZWFjaFdhdGNoRmVhdHVyZURpc2Fi", + "bGUYEiABKAgSEgoKYWNjb3VudFVpZBgTIAEoDBIcChRhbGxvd1BlcnNvbmFs", + "TGljZW5zZRgUIAEoCBISCgpsaWNlbnNlZEJ5GBUgASgJEg0KBWVtYWlsGBYg", + "ASgJEhoKEmJyZWFjaFdhdGNoRW5hYmxlZBgXIAEoCBIaChJicmVhY2hXYXRj", + "aFNjYW5uZWQYGCABKAgSHQoVYnJlYWNoV2F0Y2hFeHBpcmF0aW9uGBkgASgD", + "Eh4KFmJyZWFjaFdhdGNoRGF0ZUNyZWF0ZWQYGiABKAMSJQoFZXJyb3IYGyAB", + "KAsyFi5BY2NvdW50U3VtbWFyeS5SZXN1bHQSGQoRcGVuZGluZ0VudGVycHJp", + "c2UYISABKAgiowEKBUFkZE9uEhQKDGxpY2Vuc2VLZXlJZBgBIAEoBRIMCgRu", + "YW1lGAIgASgJEhYKDmV4cGlyYXRpb25EYXRlGAMgASgDEhMKC2NyZWF0ZWRE", + "YXRlGAQgASgDEg8KB2lzVHJpYWwYBSABKAgSDwoHZW5hYmxlZBgGIAEoCBIP", + "CgdzY2FubmVkGAcgASgIEhYKDmZlYXR1cmVEaXNhYmxlGAggASgIIqIJCghT", + "ZXR0aW5ncxINCgVhdWRpdBgBIAEoCBIhChltdXN0UGVyZm9ybUFjY291bnRT", + "aGFyZUJ5GAIgASgDEj4KDnNoYXJlQWNjb3VudFRvGAMgAygLMiYuQWNjb3Vu", + "dFN1bW1hcnkuTWlzc2luZ0FjY291bnRTaGFyZUtleRIrCgVydWxlcxgEIAMo", + "CzIcLkFjY291bnRTdW1tYXJ5LlBhc3N3b3JkUnVsZRIaChJwYXNzd29yZFJ1", + "bGVzSW50cm8YBSABKAkSFgoOYXV0b0JhY2t1cERheXMYBiABKAUSDQoFdGhl", + "bWUYByABKAkSDwoHY2hhbm5lbBgIIAEoCRIUCgxjaGFubmVsVmFsdWUYCSAB", + "KAkSFQoNcnNhQ29uZmlndXJlZBgKIAEoCBIVCg1lbWFpbFZlcmlmaWVkGAsg", + "ASgIEiIKGm1hc3RlclBhc3N3b3JkTGFzdE1vZGlmaWVkGAwgASgBEhgKEGFj", + "Y291bnRGb2xkZXJLZXkYDSABKAwSMQoMc2VjdXJpdHlLZXlzGA4gAygLMhsu", + "QWNjb3VudFN1bW1hcnkuU2VjdXJpdHlLZXkSKwoJa2V5VmFsdWVzGA8gAygL", + "MhguQWNjb3VudFN1bW1hcnkuS2V5VmFsdWUSDwoHc3NvVXNlchgQIAEoCBIY", + "ChBvbmxpbmVBY2Nlc3NPbmx5GBEgASgIEhwKFG1hc3RlclBhc3N3b3JkRXhw", + "aXJ5GBIgASgFEhkKEXR3b0ZhY3RvclJlcXVpcmVkGBMgASgIEhYKDmRpc2Fs", + "bG93RXhwb3J0GBQgASgIEhUKDXJlc3RyaWN0RmlsZXMYFSABKAgSGgoScmVz", + "dHJpY3RBbGxTaGFyaW5nGBYgASgIEhcKD3Jlc3RyaWN0U2hhcmluZxgXIAEo", + "CBIiChpyZXN0cmljdFNoYXJpbmdJbmNvbWluZ0FsbBgYIAEoCBIpCiFyZXN0", + "cmljdFNoYXJpbmdJbmNvbWluZ0VudGVycHJpc2UYGSABKAgSEwoLbG9nb3V0", + "VGltZXIYGiABKAMSFwoPcGVyc2lzdGVudExvZ2luGBsgASgIEhwKFGlwRGlz", + "YWJsZUF1dG9BcHByb3ZlGBwgASgIEiQKHHNoYXJlRGF0YUtleVdpdGhFY2NQ", + "dWJsaWNLZXkYHSABKAgSJwofc2hhcmVEYXRhS2V5V2l0aERldmljZVB1Ymxp", + "Y0tleRgeIAEoCBIaChJSZWNvcmRUeXBlc0NvdW50ZXIYHyABKAUSJAocUmVj", + "b3JkVHlwZXNFbnRlcnByaXNlQ291bnRlchggIAEoBRIaChJyZWNvcmRUeXBl", + "c0VuYWJsZWQYISABKAgSHAoUY2FuTWFuYWdlUmVjb3JkVHlwZXMYIiABKAgS", + "HQoVcmVjb3JkVHlwZXNQQU1Db3VudGVyGCMgASgFEhoKEmxvZ291dFRpbWVy", + "TWludXRlcxgkIAEoBRIgChhzZWN1cml0eUtleXNOb1VzZXJWZXJpZnkYJSAB", + "KAgSNgoIY2hhbm5lbHMYJiADKA4yJC5BdXRoZW50aWNhdGlvbi5Ud29GYWN0", + "b3JDaGFubmVsVHlwZSImCghLZXlWYWx1ZRILCgNrZXkYASABKAkSDQoFdmFs", + "dWUYAiABKAkiLQoPS2V5VmFsdWVCb29sZWFuEgsKA2tleRgBIAEoCRINCgV2", + "YWx1ZRgCIAEoCCIqCgxLZXlWYWx1ZUxvbmcSCwoDa2V5GAEgASgJEg0KBXZh", + "bHVlGAIgASgDIj0KBlJlc3VsdBISCgpyZXN1bHRDb2RlGAEgASgJEg8KB21l", + "c3NhZ2UYAiABKAkSDgoGcmVzdWx0GAMgASgJIsIBCgxFbmZvcmNlbWVudHMS", + "KQoHc3RyaW5ncxgBIAMoCzIYLkFjY291bnRTdW1tYXJ5LktleVZhbHVlEjEK", + "CGJvb2xlYW5zGAIgAygLMh8uQWNjb3VudFN1bW1hcnkuS2V5VmFsdWVCb29s", + "ZWFuEisKBWxvbmdzGAMgAygLMhwuQWNjb3VudFN1bW1hcnkuS2V5VmFsdWVM", + "b25nEicKBWpzb25zGAQgAygLMhguQWNjb3VudFN1bW1hcnkuS2V5VmFsdWUi", + "PAoWTWlzc2luZ0FjY291bnRTaGFyZUtleRIPCgdyb2xlX2lkGAEgASgDEhEK", + "CXB1YmxpY0tleRgCIAEoDCJ1CgxQYXNzd29yZFJ1bGUSEAoIcnVsZVR5cGUY", + "ASABKAkSDwoHcGF0dGVybhgCIAEoCRINCgVtYXRjaBgDIAEoCBIPCgdtaW5p", + "bXVtGAQgASgFEhMKC2Rlc2NyaXB0aW9uGAUgASgJEg0KBXZhbHVlGAYgASgJ", + "IpcBCgtTZWN1cml0eUtleRIQCghkZXZpY2VJZBgBIAEoAxISCgpkZXZpY2VO", + "YW1lGAIgASgJEhEKCWRhdGVBZGRlZBgDIAEoAxIPCgdpc1ZhbGlkGAQgASgI", + "Ej4KEmRldmljZVJlZ2lzdHJhdGlvbhgFIAEoCzIiLkFjY291bnRTdW1tYXJ5", + "LkRldmljZVJlZ2lzdHJhdGlvbiJ5ChJEZXZpY2VSZWdpc3RyYXRpb24SEQoJ", + "a2V5SGFuZGxlGAEgASgJEhEKCXB1YmxpY0tleRgCIAEoDBIXCg9hdHRlc3Rh", + "dGlvbkNlcnQYAyABKAkSDwoHY291bnRlchgEIAEoAxITCgtjb21wcm9taXNl", + "ZBgFIAEoCCJrCgVHcm91cBINCgVhZG1pbhgBIAEoCBIdChVncm91cFZlcmlm", + "aWNhdGlvbkNvZGUYAiABKAkSNAoNYWRtaW5pc3RyYXRvchgEIAEoCzIdLkFj", + "Y291bnRTdW1tYXJ5LkFkbWluaXN0cmF0b3IiwAEKDUFkbWluaXN0cmF0b3IS", + "EQoJZmlyc3ROYW1lGAEgASgJEhAKCGxhc3ROYW1lGAIgASgJEg0KBWVtYWls", + "GAMgASgJEhwKFGN1cnJlbnROdW1iZXJPZlVzZXJzGAQgASgFEhUKDW51bWJl", + "ck9mVXNlcnMYBSABKAUSGAoQc3Vic2NyaXB0aW9uQ29kZRgHIAEoCRIWCg5l", + "eHBpcmF0aW9uRGF0ZRgIIAEoCRIUCgxwdXJjaGFzZURhdGUYCSABKAlCKgoY", + "Y29tLmtlZXBlcnNlY3VyaXR5LnByb3RvQg5BY2NvdW50U3VtbWFyeWIGcHJv", + "dG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Authentication.APIRequestReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] { - new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.AccountSummaryRequest), global::AccountSummary.AccountSummaryRequest.Parser, new[]{ "SummaryVersion" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.AccountSummaryElements), global::AccountSummary.AccountSummaryElements.Parser, new[]{ "ClientKey", "Settings", "KeysInfo", "SyncLogs", "IsEnterpriseAdmin", "License", "Group", "Enforcements", "Images", "PersonalLicense", "FixSharedFolderRecords", "Usernames", "Devices" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.AccountSummaryRequest), global::AccountSummary.AccountSummaryRequest.Parser, new[]{ "SummaryVersion", "IncludeRecentActivity" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.AccountSummaryElements), global::AccountSummary.AccountSummaryElements.Parser, new[]{ "ClientKey", "Settings", "KeysInfo", "SyncLogs", "IsEnterpriseAdmin", "License", "Group", "Enforcements", "Images", "PersonalLicense", "FixSharedFolderRecords", "Usernames", "Devices", "IsShareAdmin", "AccountRecovery", "AccountRecoveryPrompt", "MinMasterPasswordLengthNoPrompt", "ForbidKeyType2" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.DeviceInfo), global::AccountSummary.DeviceInfo.Parser, new[]{ "EncryptedDeviceToken", "DeviceName", "DeviceStatus", "DevicePublicKey", "EncryptedDataKeyDoNotUse", "ClientVersion", "Username", "IpAddress", "ApproveRequestTime", "EncryptedDataKeyPresent", "GroupId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.KeysInfo), global::AccountSummary.KeysInfo.Parser, new[]{ "EncryptionParams", "EncryptedDataKey", "DataKeyBackupDate", "UserAuthUid", "EncryptedPrivateKey", "EncryptedEccPrivateKey", "EccPublicKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.SyncLog), global::AccountSummary.SyncLog.Parser, new[]{ "CountryName", "SecondsAgo", "DeviceName", "CountryCode", "DeviceUID", "IpAddress" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.License), global::AccountSummary.License.Parser, new[]{ "SubscriptionCode", "ProductTypeId", "ProductTypeName", "ExpirationDate", "SecondsUntilExpiration", "MaxDevices", "FilePlanType", "BytesUsed", "BytesTotal", "SecondsUntilStorageExpiration", "StorageExpirationDate", "HasAutoRenewableAppstoreSubscription", "AccountType", "UploadsRemaining", "EnterpriseId", "ChatEnabled", "AuditAndReportingEnabled", "BreachWatchFeatureDisable", "AccountUid", "AllowPersonalLicense", "LicensedBy", "Email", "BreachWatchEnabled", "BreachWatchScanned", "BreachWatchExpiration", "BreachWatchDateCreated", "Error" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.License), global::AccountSummary.License.Parser, new[]{ "SubscriptionCode", "ProductTypeId", "ProductTypeName", "ExpirationDate", "SecondsUntilExpiration", "MaxDevices", "FilePlanType", "BytesUsed", "BytesTotal", "SecondsUntilStorageExpiration", "StorageExpirationDate", "HasAutoRenewableAppstoreSubscription", "AccountType", "UploadsRemaining", "EnterpriseId", "ChatEnabled", "AuditAndReportingEnabled", "BreachWatchFeatureDisable", "AccountUid", "AllowPersonalLicense", "LicensedBy", "Email", "BreachWatchEnabled", "BreachWatchScanned", "BreachWatchExpiration", "BreachWatchDateCreated", "Error", "PendingEnterprise" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.AddOn), global::AccountSummary.AddOn.Parser, new[]{ "LicenseKeyId", "Name", "ExpirationDate", "CreatedDate", "IsTrial", "Enabled", "Scanned", "FeatureDisable" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.Settings), global::AccountSummary.Settings.Parser, new[]{ "Audit", "MustPerformAccountShareBy", "ShareAccountTo", "Rules", "PasswordRulesIntro", "AutoBackupDays", "Theme", "Channel", "ChannelValue", "RsaConfigured", "EmailVerified", "MasterPasswordLastModified", "AccountFolderKey", "SecurityKeys", "KeyValues", "SsoUser", "OnlineAccessOnly", "MasterPasswordExpiry", "TwoFactorRequired", "DisallowExport", "RestrictFiles", "RestrictAllSharing", "RestrictSharing", "RestrictSharingIncomingAll", "RestrictSharingIncomingEnterprise", "LogoutTimer", "PersistentLogin", "IpDisableAutoApprove", "ShareDataKeyWithEccPublicKey", "ShareDataKeyWithDevicePublicKey", "RecordTypesCounter", "RecordTypesEnterpriseCounter", "RecordTypesEnabled", "CanManageRecordTypes" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.Settings), global::AccountSummary.Settings.Parser, new[]{ "Audit", "MustPerformAccountShareBy", "ShareAccountTo", "Rules", "PasswordRulesIntro", "AutoBackupDays", "Theme", "Channel", "ChannelValue", "RsaConfigured", "EmailVerified", "MasterPasswordLastModified", "AccountFolderKey", "SecurityKeys", "KeyValues", "SsoUser", "OnlineAccessOnly", "MasterPasswordExpiry", "TwoFactorRequired", "DisallowExport", "RestrictFiles", "RestrictAllSharing", "RestrictSharing", "RestrictSharingIncomingAll", "RestrictSharingIncomingEnterprise", "LogoutTimer", "PersistentLogin", "IpDisableAutoApprove", "ShareDataKeyWithEccPublicKey", "ShareDataKeyWithDevicePublicKey", "RecordTypesCounter", "RecordTypesEnterpriseCounter", "RecordTypesEnabled", "CanManageRecordTypes", "RecordTypesPAMCounter", "LogoutTimerMinutes", "SecurityKeysNoUserVerify", "Channels" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.KeyValue), global::AccountSummary.KeyValue.Parser, new[]{ "Key", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.KeyValueBoolean), global::AccountSummary.KeyValueBoolean.Parser, new[]{ "Key", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::AccountSummary.KeyValueLong), global::AccountSummary.KeyValueLong.Parser, new[]{ "Key", "Value" }, null, null, null, null), @@ -151,23 +159,32 @@ static AccountSummaryReflection() { } #region Messages - public sealed partial class AccountSummaryRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AccountSummaryRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AccountSummaryRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AccountSummaryRequest() { OnConstruction(); } @@ -175,12 +192,15 @@ public AccountSummaryRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AccountSummaryRequest(AccountSummaryRequest other) : this() { summaryVersion_ = other.summaryVersion_; + includeRecentActivity_ = other.includeRecentActivity_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AccountSummaryRequest Clone() { return new AccountSummaryRequest(this); } @@ -189,6 +209,7 @@ public AccountSummaryRequest Clone() { public const int SummaryVersionFieldNumber = 1; private int summaryVersion_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int SummaryVersion { get { return summaryVersion_; } set { @@ -196,12 +217,26 @@ public int SummaryVersion { } } + /// Field number for the "includeRecentActivity" field. + public const int IncludeRecentActivityFieldNumber = 2; + private bool includeRecentActivity_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeRecentActivity { + get { return includeRecentActivity_; } + set { + includeRecentActivity_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AccountSummaryRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AccountSummaryRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -210,13 +245,16 @@ public bool Equals(AccountSummaryRequest other) { return true; } if (SummaryVersion != other.SummaryVersion) return false; + if (IncludeRecentActivity != other.IncludeRecentActivity) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SummaryVersion != 0) hash ^= SummaryVersion.GetHashCode(); + if (IncludeRecentActivity != false) hash ^= IncludeRecentActivity.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -224,27 +262,59 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SummaryVersion != 0) { output.WriteRawTag(8); output.WriteInt32(SummaryVersion); } + if (IncludeRecentActivity != false) { + output.WriteRawTag(16); + output.WriteBool(IncludeRecentActivity); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SummaryVersion != 0) { + output.WriteRawTag(8); + output.WriteInt32(SummaryVersion); + } + if (IncludeRecentActivity != false) { + output.WriteRawTag(16); + output.WriteBool(IncludeRecentActivity); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SummaryVersion != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(SummaryVersion); } + if (IncludeRecentActivity != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -252,6 +322,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AccountSummaryRequest other) { if (other == null) { return; @@ -259,14 +330,25 @@ public void MergeFrom(AccountSummaryRequest other) { if (other.SummaryVersion != 0) { SummaryVersion = other.SummaryVersion; } + if (other.IncludeRecentActivity != false) { + IncludeRecentActivity = other.IncludeRecentActivity; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -274,29 +356,70 @@ public void MergeFrom(pb::CodedInputStream input) { SummaryVersion = input.ReadInt32(); break; } + case 16: { + IncludeRecentActivity = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SummaryVersion = input.ReadInt32(); + break; + } + case 16: { + IncludeRecentActivity = input.ReadBool(); + break; + } } } } + #endif } - public sealed partial class AccountSummaryElements : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AccountSummaryElements : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AccountSummaryElements()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AccountSummaryElements() { OnConstruction(); } @@ -304,6 +427,7 @@ public AccountSummaryElements() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AccountSummaryElements(AccountSummaryElements other) : this() { clientKey_ = other.clientKey_; settings_ = other.settings_ != null ? other.settings_.Clone() : null; @@ -318,10 +442,16 @@ public AccountSummaryElements(AccountSummaryElements other) : this() { fixSharedFolderRecords_ = other.fixSharedFolderRecords_; usernames_ = other.usernames_.Clone(); devices_ = other.devices_.Clone(); + isShareAdmin_ = other.isShareAdmin_; + accountRecovery_ = other.accountRecovery_; + accountRecoveryPrompt_ = other.accountRecoveryPrompt_; + minMasterPasswordLengthNoPrompt_ = other.minMasterPasswordLengthNoPrompt_; + forbidKeyType2_ = other.forbidKeyType2_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AccountSummaryElements Clone() { return new AccountSummaryElements(this); } @@ -330,6 +460,7 @@ public AccountSummaryElements Clone() { public const int ClientKeyFieldNumber = 1; private pb::ByteString clientKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString ClientKey { get { return clientKey_; } set { @@ -341,6 +472,7 @@ public AccountSummaryElements Clone() { public const int SettingsFieldNumber = 2; private global::AccountSummary.Settings settings_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.Settings Settings { get { return settings_; } set { @@ -352,6 +484,7 @@ public AccountSummaryElements Clone() { public const int KeysInfoFieldNumber = 3; private global::AccountSummary.KeysInfo keysInfo_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.KeysInfo KeysInfo { get { return keysInfo_; } set { @@ -365,6 +498,7 @@ public AccountSummaryElements Clone() { = pb::FieldCodec.ForMessage(34, global::AccountSummary.SyncLog.Parser); private readonly pbc::RepeatedField syncLogs_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SyncLogs { get { return syncLogs_; } } @@ -373,6 +507,7 @@ public AccountSummaryElements Clone() { public const int IsEnterpriseAdminFieldNumber = 5; private bool isEnterpriseAdmin_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsEnterpriseAdmin { get { return isEnterpriseAdmin_; } set { @@ -384,6 +519,7 @@ public bool IsEnterpriseAdmin { public const int LicenseFieldNumber = 6; private global::AccountSummary.License license_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.License License { get { return license_; } set { @@ -395,6 +531,7 @@ public bool IsEnterpriseAdmin { public const int GroupFieldNumber = 7; private global::AccountSummary.Group group_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.Group Group { get { return group_; } set { @@ -406,6 +543,7 @@ public bool IsEnterpriseAdmin { public const int EnforcementsFieldNumber = 8; private global::AccountSummary.Enforcements enforcements_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.Enforcements Enforcements { get { return enforcements_; } set { @@ -419,6 +557,7 @@ public bool IsEnterpriseAdmin { = pb::FieldCodec.ForMessage(74, global::AccountSummary.KeyValue.Parser); private readonly pbc::RepeatedField images_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Images { get { return images_; } } @@ -427,6 +566,7 @@ public bool IsEnterpriseAdmin { public const int PersonalLicenseFieldNumber = 10; private global::AccountSummary.License personalLicense_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.License PersonalLicense { get { return personalLicense_; } set { @@ -438,6 +578,7 @@ public bool IsEnterpriseAdmin { public const int FixSharedFolderRecordsFieldNumber = 11; private bool fixSharedFolderRecords_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool FixSharedFolderRecords { get { return fixSharedFolderRecords_; } set { @@ -451,6 +592,7 @@ public bool FixSharedFolderRecords { = pb::FieldCodec.ForString(98); private readonly pbc::RepeatedField usernames_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Usernames { get { return usernames_; } } @@ -461,16 +603,85 @@ public bool FixSharedFolderRecords { = pb::FieldCodec.ForMessage(106, global::AccountSummary.DeviceInfo.Parser); private readonly pbc::RepeatedField devices_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Devices { get { return devices_; } } + /// Field number for the "isShareAdmin" field. + public const int IsShareAdminFieldNumber = 14; + private bool isShareAdmin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShareAdmin { + get { return isShareAdmin_; } + set { + isShareAdmin_ = value; + } + } + + /// Field number for the "accountRecovery" field. + public const int AccountRecoveryFieldNumber = 15; + private bool accountRecovery_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AccountRecovery { + get { return accountRecovery_; } + set { + accountRecovery_ = value; + } + } + + /// Field number for the "accountRecoveryPrompt" field. + public const int AccountRecoveryPromptFieldNumber = 16; + private bool accountRecoveryPrompt_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AccountRecoveryPrompt { + get { return accountRecoveryPrompt_; } + set { + accountRecoveryPrompt_ = value; + } + } + + /// Field number for the "minMasterPasswordLengthNoPrompt" field. + public const int MinMasterPasswordLengthNoPromptFieldNumber = 17; + private int minMasterPasswordLengthNoPrompt_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MinMasterPasswordLengthNoPrompt { + get { return minMasterPasswordLengthNoPrompt_; } + set { + minMasterPasswordLengthNoPrompt_ = value; + } + } + + /// Field number for the "forbidKeyType2" field. + public const int ForbidKeyType2FieldNumber = 18; + private bool forbidKeyType2_; + /// + /// If true, we will not accept RSA-encryped data from clients, although we + /// may continue to send previously-RSA-encrypted data to them. If false, + /// clients must continue to send RSA-encrypted keys in all the places where + /// we used to assume RSA. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ForbidKeyType2 { + get { return forbidKeyType2_; } + set { + forbidKeyType2_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AccountSummaryElements); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AccountSummaryElements other) { if (ReferenceEquals(other, null)) { return false; @@ -491,10 +702,16 @@ public bool Equals(AccountSummaryElements other) { if (FixSharedFolderRecords != other.FixSharedFolderRecords) return false; if(!usernames_.Equals(other.usernames_)) return false; if(!devices_.Equals(other.devices_)) return false; + if (IsShareAdmin != other.IsShareAdmin) return false; + if (AccountRecovery != other.AccountRecovery) return false; + if (AccountRecoveryPrompt != other.AccountRecoveryPrompt) return false; + if (MinMasterPasswordLengthNoPrompt != other.MinMasterPasswordLengthNoPrompt) return false; + if (ForbidKeyType2 != other.ForbidKeyType2) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ClientKey.Length != 0) hash ^= ClientKey.GetHashCode(); @@ -510,6 +727,11 @@ public override int GetHashCode() { if (FixSharedFolderRecords != false) hash ^= FixSharedFolderRecords.GetHashCode(); hash ^= usernames_.GetHashCode(); hash ^= devices_.GetHashCode(); + if (IsShareAdmin != false) hash ^= IsShareAdmin.GetHashCode(); + if (AccountRecovery != false) hash ^= AccountRecovery.GetHashCode(); + if (AccountRecoveryPrompt != false) hash ^= AccountRecoveryPrompt.GetHashCode(); + if (MinMasterPasswordLengthNoPrompt != 0) hash ^= MinMasterPasswordLengthNoPrompt.GetHashCode(); + if (ForbidKeyType2 != false) hash ^= ForbidKeyType2.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -517,12 +739,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (ClientKey.Length != 0) { output.WriteRawTag(10); output.WriteBytes(ClientKey); @@ -563,12 +790,104 @@ public void WriteTo(pb::CodedOutputStream output) { } usernames_.WriteTo(output, _repeated_usernames_codec); devices_.WriteTo(output, _repeated_devices_codec); + if (IsShareAdmin != false) { + output.WriteRawTag(112); + output.WriteBool(IsShareAdmin); + } + if (AccountRecovery != false) { + output.WriteRawTag(120); + output.WriteBool(AccountRecovery); + } + if (AccountRecoveryPrompt != false) { + output.WriteRawTag(128, 1); + output.WriteBool(AccountRecoveryPrompt); + } + if (MinMasterPasswordLengthNoPrompt != 0) { + output.WriteRawTag(136, 1); + output.WriteInt32(MinMasterPasswordLengthNoPrompt); + } + if (ForbidKeyType2 != false) { + output.WriteRawTag(144, 1); + output.WriteBool(ForbidKeyType2); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ClientKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ClientKey); + } + if (settings_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Settings); + } + if (keysInfo_ != null) { + output.WriteRawTag(26); + output.WriteMessage(KeysInfo); + } + syncLogs_.WriteTo(ref output, _repeated_syncLogs_codec); + if (IsEnterpriseAdmin != false) { + output.WriteRawTag(40); + output.WriteBool(IsEnterpriseAdmin); + } + if (license_ != null) { + output.WriteRawTag(50); + output.WriteMessage(License); + } + if (group_ != null) { + output.WriteRawTag(58); + output.WriteMessage(Group); + } + if (enforcements_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Enforcements); + } + images_.WriteTo(ref output, _repeated_images_codec); + if (personalLicense_ != null) { + output.WriteRawTag(82); + output.WriteMessage(PersonalLicense); + } + if (FixSharedFolderRecords != false) { + output.WriteRawTag(88); + output.WriteBool(FixSharedFolderRecords); + } + usernames_.WriteTo(ref output, _repeated_usernames_codec); + devices_.WriteTo(ref output, _repeated_devices_codec); + if (IsShareAdmin != false) { + output.WriteRawTag(112); + output.WriteBool(IsShareAdmin); + } + if (AccountRecovery != false) { + output.WriteRawTag(120); + output.WriteBool(AccountRecovery); + } + if (AccountRecoveryPrompt != false) { + output.WriteRawTag(128, 1); + output.WriteBool(AccountRecoveryPrompt); + } + if (MinMasterPasswordLengthNoPrompt != 0) { + output.WriteRawTag(136, 1); + output.WriteInt32(MinMasterPasswordLengthNoPrompt); + } + if (ForbidKeyType2 != false) { + output.WriteRawTag(144, 1); + output.WriteBool(ForbidKeyType2); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ClientKey.Length != 0) { @@ -602,6 +921,21 @@ public int CalculateSize() { } size += usernames_.CalculateSize(_repeated_usernames_codec); size += devices_.CalculateSize(_repeated_devices_codec); + if (IsShareAdmin != false) { + size += 1 + 1; + } + if (AccountRecovery != false) { + size += 1 + 1; + } + if (AccountRecoveryPrompt != false) { + size += 2 + 1; + } + if (MinMasterPasswordLengthNoPrompt != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(MinMasterPasswordLengthNoPrompt); + } + if (ForbidKeyType2 != false) { + size += 2 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -609,6 +943,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AccountSummaryElements other) { if (other == null) { return; @@ -662,14 +997,37 @@ public void MergeFrom(AccountSummaryElements other) { } usernames_.Add(other.usernames_); devices_.Add(other.devices_); + if (other.IsShareAdmin != false) { + IsShareAdmin = other.IsShareAdmin; + } + if (other.AccountRecovery != false) { + AccountRecovery = other.AccountRecovery; + } + if (other.AccountRecoveryPrompt != false) { + AccountRecoveryPrompt = other.AccountRecoveryPrompt; + } + if (other.MinMasterPasswordLengthNoPrompt != 0) { + MinMasterPasswordLengthNoPrompt = other.MinMasterPasswordLengthNoPrompt; + } + if (other.ForbidKeyType2 != false) { + ForbidKeyType2 = other.ForbidKeyType2; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -743,29 +1101,168 @@ public void MergeFrom(pb::CodedInputStream input) { devices_.AddEntriesFrom(input, _repeated_devices_codec); break; } + case 112: { + IsShareAdmin = input.ReadBool(); + break; + } + case 120: { + AccountRecovery = input.ReadBool(); + break; + } + case 128: { + AccountRecoveryPrompt = input.ReadBool(); + break; + } + case 136: { + MinMasterPasswordLengthNoPrompt = input.ReadInt32(); + break; + } + case 144: { + ForbidKeyType2 = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ClientKey = input.ReadBytes(); + break; + } + case 18: { + if (settings_ == null) { + Settings = new global::AccountSummary.Settings(); + } + input.ReadMessage(Settings); + break; + } + case 26: { + if (keysInfo_ == null) { + KeysInfo = new global::AccountSummary.KeysInfo(); + } + input.ReadMessage(KeysInfo); + break; + } + case 34: { + syncLogs_.AddEntriesFrom(ref input, _repeated_syncLogs_codec); + break; + } + case 40: { + IsEnterpriseAdmin = input.ReadBool(); + break; + } + case 50: { + if (license_ == null) { + License = new global::AccountSummary.License(); + } + input.ReadMessage(License); + break; + } + case 58: { + if (group_ == null) { + Group = new global::AccountSummary.Group(); + } + input.ReadMessage(Group); + break; + } + case 66: { + if (enforcements_ == null) { + Enforcements = new global::AccountSummary.Enforcements(); + } + input.ReadMessage(Enforcements); + break; + } + case 74: { + images_.AddEntriesFrom(ref input, _repeated_images_codec); + break; + } + case 82: { + if (personalLicense_ == null) { + PersonalLicense = new global::AccountSummary.License(); + } + input.ReadMessage(PersonalLicense); + break; + } + case 88: { + FixSharedFolderRecords = input.ReadBool(); + break; + } + case 98: { + usernames_.AddEntriesFrom(ref input, _repeated_usernames_codec); + break; + } + case 106: { + devices_.AddEntriesFrom(ref input, _repeated_devices_codec); + break; + } + case 112: { + IsShareAdmin = input.ReadBool(); + break; + } + case 120: { + AccountRecovery = input.ReadBool(); + break; + } + case 128: { + AccountRecoveryPrompt = input.ReadBool(); + break; + } + case 136: { + MinMasterPasswordLengthNoPrompt = input.ReadInt32(); + break; + } + case 144: { + ForbidKeyType2 = input.ReadBool(); + break; + } } } } + #endif } - public sealed partial class DeviceInfo : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceInfo() { OnConstruction(); } @@ -773,6 +1270,7 @@ public DeviceInfo() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceInfo(DeviceInfo other) : this() { encryptedDeviceToken_ = other.encryptedDeviceToken_; deviceName_ = other.deviceName_; @@ -789,6 +1287,7 @@ public DeviceInfo(DeviceInfo other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceInfo Clone() { return new DeviceInfo(this); } @@ -797,6 +1296,7 @@ public DeviceInfo Clone() { public const int EncryptedDeviceTokenFieldNumber = 1; private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -808,6 +1308,7 @@ public DeviceInfo Clone() { public const int DeviceNameFieldNumber = 2; private string deviceName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DeviceName { get { return deviceName_; } set { @@ -819,6 +1320,7 @@ public string DeviceName { public const int DeviceStatusFieldNumber = 3; private global::Authentication.DeviceStatus deviceStatus_ = global::Authentication.DeviceStatus.DeviceNeedsApproval; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Authentication.DeviceStatus DeviceStatus { get { return deviceStatus_; } set { @@ -830,6 +1332,7 @@ public string DeviceName { public const int DevicePublicKeyFieldNumber = 4; private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString DevicePublicKey { get { return devicePublicKey_; } set { @@ -841,6 +1344,7 @@ public string DeviceName { public const int EncryptedDataKeyDoNotUseFieldNumber = 5; private pb::ByteString encryptedDataKeyDoNotUse_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDataKeyDoNotUse { get { return encryptedDataKeyDoNotUse_; } set { @@ -852,6 +1356,7 @@ public string DeviceName { public const int ClientVersionFieldNumber = 6; private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ClientVersion { get { return clientVersion_; } set { @@ -863,6 +1368,7 @@ public string ClientVersion { public const int UsernameFieldNumber = 7; private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Username { get { return username_; } set { @@ -874,6 +1380,7 @@ public string Username { public const int IpAddressFieldNumber = 8; private string ipAddress_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string IpAddress { get { return ipAddress_; } set { @@ -885,6 +1392,7 @@ public string IpAddress { public const int ApproveRequestTimeFieldNumber = 9; private long approveRequestTime_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long ApproveRequestTime { get { return approveRequestTime_; } set { @@ -896,6 +1404,7 @@ public long ApproveRequestTime { public const int EncryptedDataKeyPresentFieldNumber = 10; private bool encryptedDataKeyPresent_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool EncryptedDataKeyPresent { get { return encryptedDataKeyPresent_; } set { @@ -907,6 +1416,7 @@ public bool EncryptedDataKeyPresent { public const int GroupIdFieldNumber = 11; private long groupId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long GroupId { get { return groupId_; } set { @@ -915,11 +1425,13 @@ public long GroupId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as DeviceInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(DeviceInfo other) { if (ReferenceEquals(other, null)) { return false; @@ -942,6 +1454,7 @@ public bool Equals(DeviceInfo other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); @@ -962,12 +1475,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedDeviceToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedDeviceToken); @@ -1015,10 +1533,66 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (DeviceStatus != global::Authentication.DeviceStatus.DeviceNeedsApproval) { + output.WriteRawTag(24); + output.WriteEnum((int) DeviceStatus); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } + if (EncryptedDataKeyDoNotUse.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedDataKeyDoNotUse); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ClientVersion); + } + if (Username.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Username); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(66); + output.WriteString(IpAddress); + } + if (ApproveRequestTime != 0L) { + output.WriteRawTag(72); + output.WriteInt64(ApproveRequestTime); + } + if (EncryptedDataKeyPresent != false) { + output.WriteRawTag(80); + output.WriteBool(EncryptedDataKeyPresent); + } + if (GroupId != 0L) { + output.WriteRawTag(88); + output.WriteInt64(GroupId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { int size = 0; if (EncryptedDeviceToken.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); @@ -1060,6 +1634,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(DeviceInfo other) { if (other == null) { return; @@ -1101,10 +1676,18 @@ public void MergeFrom(DeviceInfo other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1154,27 +1737,100 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + case 24: { + DeviceStatus = (global::Authentication.DeviceStatus) input.ReadEnum(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); + break; + } + case 42: { + EncryptedDataKeyDoNotUse = input.ReadBytes(); + break; + } + case 50: { + ClientVersion = input.ReadString(); + break; + } + case 58: { + Username = input.ReadString(); + break; + } + case 66: { + IpAddress = input.ReadString(); + break; + } + case 72: { + ApproveRequestTime = input.ReadInt64(); + break; + } + case 80: { + EncryptedDataKeyPresent = input.ReadBool(); + break; + } + case 88: { + GroupId = input.ReadInt64(); + break; + } + } + } } + #endif } - public sealed partial class KeysInfo : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KeysInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeysInfo()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeysInfo() { OnConstruction(); } @@ -1182,6 +1838,7 @@ public KeysInfo() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeysInfo(KeysInfo other) : this() { encryptionParams_ = other.encryptionParams_; encryptedDataKey_ = other.encryptedDataKey_; @@ -1194,6 +1851,7 @@ public KeysInfo(KeysInfo other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeysInfo Clone() { return new KeysInfo(this); } @@ -1202,6 +1860,7 @@ public KeysInfo Clone() { public const int EncryptionParamsFieldNumber = 1; private pb::ByteString encryptionParams_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptionParams { get { return encryptionParams_; } set { @@ -1213,6 +1872,7 @@ public KeysInfo Clone() { public const int EncryptedDataKeyFieldNumber = 2; private pb::ByteString encryptedDataKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDataKey { get { return encryptedDataKey_; } set { @@ -1224,6 +1884,7 @@ public KeysInfo Clone() { public const int DataKeyBackupDateFieldNumber = 3; private double dataKeyBackupDate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public double DataKeyBackupDate { get { return dataKeyBackupDate_; } set { @@ -1235,6 +1896,7 @@ public double DataKeyBackupDate { public const int UserAuthUidFieldNumber = 4; private pb::ByteString userAuthUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString UserAuthUid { get { return userAuthUid_; } set { @@ -1246,6 +1908,7 @@ public double DataKeyBackupDate { public const int EncryptedPrivateKeyFieldNumber = 5; private pb::ByteString encryptedPrivateKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedPrivateKey { get { return encryptedPrivateKey_; } set { @@ -1257,6 +1920,7 @@ public double DataKeyBackupDate { public const int EncryptedEccPrivateKeyFieldNumber = 6; private pb::ByteString encryptedEccPrivateKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedEccPrivateKey { get { return encryptedEccPrivateKey_; } set { @@ -1268,6 +1932,7 @@ public double DataKeyBackupDate { public const int EccPublicKeyFieldNumber = 7; private pb::ByteString eccPublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EccPublicKey { get { return eccPublicKey_; } set { @@ -1276,11 +1941,13 @@ public double DataKeyBackupDate { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as KeysInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(KeysInfo other) { if (ReferenceEquals(other, null)) { return false; @@ -1299,6 +1966,7 @@ public bool Equals(KeysInfo other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptionParams.Length != 0) hash ^= EncryptionParams.GetHashCode(); @@ -1315,12 +1983,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptionParams.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptionParams); @@ -1352,9 +2025,49 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptionParams.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptionParams); + } + if (EncryptedDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDataKey); + } + if (DataKeyBackupDate != 0D) { + output.WriteRawTag(25); + output.WriteDouble(DataKeyBackupDate); + } + if (UserAuthUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(UserAuthUid); + } + if (EncryptedPrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(EncryptedPrivateKey); + } + if (EncryptedEccPrivateKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedEccPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(EccPublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptionParams.Length != 0) { @@ -1385,6 +2098,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(KeysInfo other) { if (other == null) { return; @@ -1414,10 +2128,18 @@ public void MergeFrom(KeysInfo other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1451,27 +2173,84 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptionParams = input.ReadBytes(); + break; + } + case 18: { + EncryptedDataKey = input.ReadBytes(); + break; + } + case 25: { + DataKeyBackupDate = input.ReadDouble(); + break; + } + case 34: { + UserAuthUid = input.ReadBytes(); + break; + } + case 42: { + EncryptedPrivateKey = input.ReadBytes(); + break; + } + case 50: { + EncryptedEccPrivateKey = input.ReadBytes(); + break; + } + case 58: { + EccPublicKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class SyncLog : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SyncLog : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SyncLog()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SyncLog() { OnConstruction(); } @@ -1479,6 +2258,7 @@ public SyncLog() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SyncLog(SyncLog other) : this() { countryName_ = other.countryName_; secondsAgo_ = other.secondsAgo_; @@ -1490,6 +2270,7 @@ public SyncLog(SyncLog other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SyncLog Clone() { return new SyncLog(this); } @@ -1498,6 +2279,7 @@ public SyncLog Clone() { public const int CountryNameFieldNumber = 1; private string countryName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string CountryName { get { return countryName_; } set { @@ -1509,6 +2291,7 @@ public string CountryName { public const int SecondsAgoFieldNumber = 2; private long secondsAgo_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long SecondsAgo { get { return secondsAgo_; } set { @@ -1520,6 +2303,7 @@ public long SecondsAgo { public const int DeviceNameFieldNumber = 3; private string deviceName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DeviceName { get { return deviceName_; } set { @@ -1531,6 +2315,7 @@ public string DeviceName { public const int CountryCodeFieldNumber = 4; private string countryCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string CountryCode { get { return countryCode_; } set { @@ -1542,6 +2327,7 @@ public string CountryCode { public const int DeviceUIDFieldNumber = 5; private pb::ByteString deviceUID_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString DeviceUID { get { return deviceUID_; } set { @@ -1553,6 +2339,7 @@ public string CountryCode { public const int IpAddressFieldNumber = 6; private string ipAddress_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string IpAddress { get { return ipAddress_; } set { @@ -1561,11 +2348,13 @@ public string IpAddress { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SyncLog); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SyncLog other) { if (ReferenceEquals(other, null)) { return false; @@ -1583,6 +2372,7 @@ public bool Equals(SyncLog other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (CountryName.Length != 0) hash ^= CountryName.GetHashCode(); @@ -1598,12 +2388,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (CountryName.Length != 0) { output.WriteRawTag(10); output.WriteString(CountryName); @@ -1631,9 +2426,45 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CountryName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(CountryName); + } + if (SecondsAgo != 0L) { + output.WriteRawTag(16); + output.WriteInt64(SecondsAgo); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(DeviceName); + } + if (CountryCode.Length != 0) { + output.WriteRawTag(34); + output.WriteString(CountryCode); + } + if (DeviceUID.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(DeviceUID); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(50); + output.WriteString(IpAddress); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (CountryName.Length != 0) { @@ -1661,6 +2492,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SyncLog other) { if (other == null) { return; @@ -1687,10 +2519,18 @@ public void MergeFrom(SyncLog other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1720,27 +2560,80 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + CountryName = input.ReadString(); + break; + } + case 16: { + SecondsAgo = input.ReadInt64(); + break; + } + case 26: { + DeviceName = input.ReadString(); + break; + } + case 34: { + CountryCode = input.ReadString(); + break; + } + case 42: { + DeviceUID = input.ReadBytes(); + break; + } + case 50: { + IpAddress = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class License : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class License : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new License()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public License() { OnConstruction(); } @@ -1748,6 +2641,7 @@ public License() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public License(License other) : this() { subscriptionCode_ = other.subscriptionCode_; productTypeId_ = other.productTypeId_; @@ -1776,10 +2670,12 @@ public License(License other) : this() { breachWatchExpiration_ = other.breachWatchExpiration_; breachWatchDateCreated_ = other.breachWatchDateCreated_; error_ = other.error_ != null ? other.error_.Clone() : null; + pendingEnterprise_ = other.pendingEnterprise_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public License Clone() { return new License(this); } @@ -1788,6 +2684,7 @@ public License Clone() { public const int SubscriptionCodeFieldNumber = 1; private string subscriptionCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SubscriptionCode { get { return subscriptionCode_; } set { @@ -1799,6 +2696,7 @@ public string SubscriptionCode { public const int ProductTypeIdFieldNumber = 2; private int productTypeId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int ProductTypeId { get { return productTypeId_; } set { @@ -1810,6 +2708,7 @@ public int ProductTypeId { public const int ProductTypeNameFieldNumber = 3; private string productTypeName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ProductTypeName { get { return productTypeName_; } set { @@ -1821,6 +2720,7 @@ public string ProductTypeName { public const int ExpirationDateFieldNumber = 4; private string expirationDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ExpirationDate { get { return expirationDate_; } set { @@ -1832,6 +2732,7 @@ public string ExpirationDate { public const int SecondsUntilExpirationFieldNumber = 5; private long secondsUntilExpiration_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long SecondsUntilExpiration { get { return secondsUntilExpiration_; } set { @@ -1843,6 +2744,7 @@ public long SecondsUntilExpiration { public const int MaxDevicesFieldNumber = 6; private int maxDevices_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int MaxDevices { get { return maxDevices_; } set { @@ -1854,6 +2756,7 @@ public int MaxDevices { public const int FilePlanTypeFieldNumber = 7; private int filePlanType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int FilePlanType { get { return filePlanType_; } set { @@ -1865,6 +2768,7 @@ public int FilePlanType { public const int BytesUsedFieldNumber = 8; private long bytesUsed_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long BytesUsed { get { return bytesUsed_; } set { @@ -1876,6 +2780,7 @@ public long BytesUsed { public const int BytesTotalFieldNumber = 9; private long bytesTotal_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long BytesTotal { get { return bytesTotal_; } set { @@ -1887,6 +2792,7 @@ public long BytesTotal { public const int SecondsUntilStorageExpirationFieldNumber = 10; private long secondsUntilStorageExpiration_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long SecondsUntilStorageExpiration { get { return secondsUntilStorageExpiration_; } set { @@ -1898,6 +2804,7 @@ public long SecondsUntilStorageExpiration { public const int StorageExpirationDateFieldNumber = 11; private string storageExpirationDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string StorageExpirationDate { get { return storageExpirationDate_; } set { @@ -1909,6 +2816,7 @@ public string StorageExpirationDate { public const int HasAutoRenewableAppstoreSubscriptionFieldNumber = 12; private bool hasAutoRenewableAppstoreSubscription_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool HasAutoRenewableAppstoreSubscription { get { return hasAutoRenewableAppstoreSubscription_; } set { @@ -1920,6 +2828,7 @@ public bool HasAutoRenewableAppstoreSubscription { public const int AccountTypeFieldNumber = 13; private int accountType_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int AccountType { get { return accountType_; } set { @@ -1931,6 +2840,7 @@ public int AccountType { public const int UploadsRemainingFieldNumber = 14; private int uploadsRemaining_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int UploadsRemaining { get { return uploadsRemaining_; } set { @@ -1942,6 +2852,7 @@ public int UploadsRemaining { public const int EnterpriseIdFieldNumber = 15; private int enterpriseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int EnterpriseId { get { return enterpriseId_; } set { @@ -1953,6 +2864,7 @@ public int EnterpriseId { public const int ChatEnabledFieldNumber = 16; private bool chatEnabled_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ChatEnabled { get { return chatEnabled_; } set { @@ -1964,6 +2876,7 @@ public bool ChatEnabled { public const int AuditAndReportingEnabledFieldNumber = 17; private bool auditAndReportingEnabled_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool AuditAndReportingEnabled { get { return auditAndReportingEnabled_; } set { @@ -1975,6 +2888,7 @@ public bool AuditAndReportingEnabled { public const int BreachWatchFeatureDisableFieldNumber = 18; private bool breachWatchFeatureDisable_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool BreachWatchFeatureDisable { get { return breachWatchFeatureDisable_; } set { @@ -1986,6 +2900,7 @@ public bool BreachWatchFeatureDisable { public const int AccountUidFieldNumber = 19; private pb::ByteString accountUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AccountUid { get { return accountUid_; } set { @@ -1997,6 +2912,7 @@ public bool BreachWatchFeatureDisable { public const int AllowPersonalLicenseFieldNumber = 20; private bool allowPersonalLicense_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool AllowPersonalLicense { get { return allowPersonalLicense_; } set { @@ -2008,6 +2924,7 @@ public bool AllowPersonalLicense { public const int LicensedByFieldNumber = 21; private string licensedBy_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string LicensedBy { get { return licensedBy_; } set { @@ -2019,6 +2936,7 @@ public string LicensedBy { public const int EmailFieldNumber = 22; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -2030,6 +2948,7 @@ public string Email { public const int BreachWatchEnabledFieldNumber = 23; private bool breachWatchEnabled_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool BreachWatchEnabled { get { return breachWatchEnabled_; } set { @@ -2041,6 +2960,7 @@ public bool BreachWatchEnabled { public const int BreachWatchScannedFieldNumber = 24; private bool breachWatchScanned_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool BreachWatchScanned { get { return breachWatchScanned_; } set { @@ -2052,6 +2972,7 @@ public bool BreachWatchScanned { public const int BreachWatchExpirationFieldNumber = 25; private long breachWatchExpiration_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long BreachWatchExpiration { get { return breachWatchExpiration_; } set { @@ -2063,6 +2984,7 @@ public long BreachWatchExpiration { public const int BreachWatchDateCreatedFieldNumber = 26; private long breachWatchDateCreated_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long BreachWatchDateCreated { get { return breachWatchDateCreated_; } set { @@ -2073,10 +2995,8 @@ public long BreachWatchDateCreated { /// Field number for the "error" field. public const int ErrorFieldNumber = 27; private global::AccountSummary.Result error_; - /// - ///repeated AddOn addOns = 28; - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.Result Error { get { return error_; } set { @@ -2084,12 +3004,29 @@ public long BreachWatchDateCreated { } } + /// Field number for the "pendingEnterprise" field. + public const int PendingEnterpriseFieldNumber = 33; + private bool pendingEnterprise_; + /// + ///repeated AddOn addOns = 28; + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as License); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool PendingEnterprise { + get { return pendingEnterprise_; } + set { + pendingEnterprise_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as License); + } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(License other) { if (ReferenceEquals(other, null)) { return false; @@ -2124,10 +3061,12 @@ public bool Equals(License other) { if (BreachWatchExpiration != other.BreachWatchExpiration) return false; if (BreachWatchDateCreated != other.BreachWatchDateCreated) return false; if (!object.Equals(Error, other.Error)) return false; + if (PendingEnterprise != other.PendingEnterprise) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SubscriptionCode.Length != 0) hash ^= SubscriptionCode.GetHashCode(); @@ -2157,6 +3096,7 @@ public override int GetHashCode() { if (BreachWatchExpiration != 0L) hash ^= BreachWatchExpiration.GetHashCode(); if (BreachWatchDateCreated != 0L) hash ^= BreachWatchDateCreated.GetHashCode(); if (error_ != null) hash ^= Error.GetHashCode(); + if (PendingEnterprise != false) hash ^= PendingEnterprise.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2164,12 +3104,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SubscriptionCode.Length != 0) { output.WriteRawTag(10); output.WriteString(SubscriptionCode); @@ -2278,12 +3223,140 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(218, 1); output.WriteMessage(Error); } + if (PendingEnterprise != false) { + output.WriteRawTag(136, 2); + output.WriteBool(PendingEnterprise); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SubscriptionCode.Length != 0) { + output.WriteRawTag(10); + output.WriteString(SubscriptionCode); + } + if (ProductTypeId != 0) { + output.WriteRawTag(16); + output.WriteInt32(ProductTypeId); + } + if (ProductTypeName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ProductTypeName); + } + if (ExpirationDate.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ExpirationDate); + } + if (SecondsUntilExpiration != 0L) { + output.WriteRawTag(40); + output.WriteInt64(SecondsUntilExpiration); + } + if (MaxDevices != 0) { + output.WriteRawTag(48); + output.WriteInt32(MaxDevices); + } + if (FilePlanType != 0) { + output.WriteRawTag(56); + output.WriteInt32(FilePlanType); + } + if (BytesUsed != 0L) { + output.WriteRawTag(64); + output.WriteInt64(BytesUsed); + } + if (BytesTotal != 0L) { + output.WriteRawTag(72); + output.WriteInt64(BytesTotal); + } + if (SecondsUntilStorageExpiration != 0L) { + output.WriteRawTag(80); + output.WriteInt64(SecondsUntilStorageExpiration); + } + if (StorageExpirationDate.Length != 0) { + output.WriteRawTag(90); + output.WriteString(StorageExpirationDate); + } + if (HasAutoRenewableAppstoreSubscription != false) { + output.WriteRawTag(96); + output.WriteBool(HasAutoRenewableAppstoreSubscription); + } + if (AccountType != 0) { + output.WriteRawTag(104); + output.WriteInt32(AccountType); + } + if (UploadsRemaining != 0) { + output.WriteRawTag(112); + output.WriteInt32(UploadsRemaining); + } + if (EnterpriseId != 0) { + output.WriteRawTag(120); + output.WriteInt32(EnterpriseId); + } + if (ChatEnabled != false) { + output.WriteRawTag(128, 1); + output.WriteBool(ChatEnabled); + } + if (AuditAndReportingEnabled != false) { + output.WriteRawTag(136, 1); + output.WriteBool(AuditAndReportingEnabled); + } + if (BreachWatchFeatureDisable != false) { + output.WriteRawTag(144, 1); + output.WriteBool(BreachWatchFeatureDisable); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(154, 1); + output.WriteBytes(AccountUid); + } + if (AllowPersonalLicense != false) { + output.WriteRawTag(160, 1); + output.WriteBool(AllowPersonalLicense); + } + if (LicensedBy.Length != 0) { + output.WriteRawTag(170, 1); + output.WriteString(LicensedBy); + } + if (Email.Length != 0) { + output.WriteRawTag(178, 1); + output.WriteString(Email); + } + if (BreachWatchEnabled != false) { + output.WriteRawTag(184, 1); + output.WriteBool(BreachWatchEnabled); + } + if (BreachWatchScanned != false) { + output.WriteRawTag(192, 1); + output.WriteBool(BreachWatchScanned); + } + if (BreachWatchExpiration != 0L) { + output.WriteRawTag(200, 1); + output.WriteInt64(BreachWatchExpiration); + } + if (BreachWatchDateCreated != 0L) { + output.WriteRawTag(208, 1); + output.WriteInt64(BreachWatchDateCreated); + } + if (error_ != null) { + output.WriteRawTag(218, 1); + output.WriteMessage(Error); + } + if (PendingEnterprise != false) { + output.WriteRawTag(136, 2); + output.WriteBool(PendingEnterprise); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SubscriptionCode.Length != 0) { @@ -2367,6 +3440,9 @@ public int CalculateSize() { if (error_ != null) { size += 2 + pb::CodedOutputStream.ComputeMessageSize(Error); } + if (PendingEnterprise != false) { + size += 2 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2374,6 +3450,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(License other) { if (other == null) { return; @@ -2462,14 +3539,25 @@ public void MergeFrom(License other) { } Error.MergeFrom(other.Error); } + if (other.PendingEnterprise != false) { + PendingEnterprise = other.PendingEnterprise; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2584,29 +3672,177 @@ public void MergeFrom(pb::CodedInputStream input) { input.ReadMessage(Error); break; } + case 264: { + PendingEnterprise = input.ReadBool(); + break; + } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SubscriptionCode = input.ReadString(); + break; + } + case 16: { + ProductTypeId = input.ReadInt32(); + break; + } + case 26: { + ProductTypeName = input.ReadString(); + break; + } + case 34: { + ExpirationDate = input.ReadString(); + break; + } + case 40: { + SecondsUntilExpiration = input.ReadInt64(); + break; + } + case 48: { + MaxDevices = input.ReadInt32(); + break; + } + case 56: { + FilePlanType = input.ReadInt32(); + break; + } + case 64: { + BytesUsed = input.ReadInt64(); + break; + } + case 72: { + BytesTotal = input.ReadInt64(); + break; + } + case 80: { + SecondsUntilStorageExpiration = input.ReadInt64(); + break; + } + case 90: { + StorageExpirationDate = input.ReadString(); + break; + } + case 96: { + HasAutoRenewableAppstoreSubscription = input.ReadBool(); + break; + } + case 104: { + AccountType = input.ReadInt32(); + break; + } + case 112: { + UploadsRemaining = input.ReadInt32(); + break; + } + case 120: { + EnterpriseId = input.ReadInt32(); + break; + } + case 128: { + ChatEnabled = input.ReadBool(); + break; + } + case 136: { + AuditAndReportingEnabled = input.ReadBool(); + break; + } + case 144: { + BreachWatchFeatureDisable = input.ReadBool(); + break; + } + case 154: { + AccountUid = input.ReadBytes(); + break; + } + case 160: { + AllowPersonalLicense = input.ReadBool(); + break; + } + case 170: { + LicensedBy = input.ReadString(); + break; + } + case 178: { + Email = input.ReadString(); + break; + } + case 184: { + BreachWatchEnabled = input.ReadBool(); + break; + } + case 192: { + BreachWatchScanned = input.ReadBool(); + break; + } + case 200: { + BreachWatchExpiration = input.ReadInt64(); + break; + } + case 208: { + BreachWatchDateCreated = input.ReadInt64(); + break; + } + case 218: { + if (error_ == null) { + Error = new global::AccountSummary.Result(); + } + input.ReadMessage(Error); + break; + } + case 264: { + PendingEnterprise = input.ReadBool(); + break; + } + } + } + } + #endif + } - public sealed partial class AddOn : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AddOn : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddOn()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AddOn() { OnConstruction(); } @@ -2614,6 +3850,7 @@ public AddOn() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AddOn(AddOn other) : this() { licenseKeyId_ = other.licenseKeyId_; name_ = other.name_; @@ -2627,6 +3864,7 @@ public AddOn(AddOn other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AddOn Clone() { return new AddOn(this); } @@ -2635,6 +3873,7 @@ public AddOn Clone() { public const int LicenseKeyIdFieldNumber = 1; private int licenseKeyId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int LicenseKeyId { get { return licenseKeyId_; } set { @@ -2646,6 +3885,7 @@ public int LicenseKeyId { public const int NameFieldNumber = 2; private string name_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -2657,6 +3897,7 @@ public string Name { public const int ExpirationDateFieldNumber = 3; private long expirationDate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long ExpirationDate { get { return expirationDate_; } set { @@ -2668,6 +3909,7 @@ public long ExpirationDate { public const int CreatedDateFieldNumber = 4; private long createdDate_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long CreatedDate { get { return createdDate_; } set { @@ -2679,6 +3921,7 @@ public long CreatedDate { public const int IsTrialFieldNumber = 5; private bool isTrial_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsTrial { get { return isTrial_; } set { @@ -2690,6 +3933,7 @@ public bool IsTrial { public const int EnabledFieldNumber = 6; private bool enabled_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Enabled { get { return enabled_; } set { @@ -2701,6 +3945,7 @@ public bool Enabled { public const int ScannedFieldNumber = 7; private bool scanned_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Scanned { get { return scanned_; } set { @@ -2712,6 +3957,7 @@ public bool Scanned { public const int FeatureDisableFieldNumber = 8; private bool featureDisable_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool FeatureDisable { get { return featureDisable_; } set { @@ -2720,11 +3966,13 @@ public bool FeatureDisable { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AddOn); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AddOn other) { if (ReferenceEquals(other, null)) { return false; @@ -2744,6 +3992,7 @@ public bool Equals(AddOn other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (LicenseKeyId != 0) hash ^= LicenseKeyId.GetHashCode(); @@ -2761,12 +4010,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (LicenseKeyId != 0) { output.WriteRawTag(8); output.WriteInt32(LicenseKeyId); @@ -2802,9 +4056,53 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (LicenseKeyId != 0) { + output.WriteRawTag(8); + output.WriteInt32(LicenseKeyId); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (ExpirationDate != 0L) { + output.WriteRawTag(24); + output.WriteInt64(ExpirationDate); + } + if (CreatedDate != 0L) { + output.WriteRawTag(32); + output.WriteInt64(CreatedDate); + } + if (IsTrial != false) { + output.WriteRawTag(40); + output.WriteBool(IsTrial); + } + if (Enabled != false) { + output.WriteRawTag(48); + output.WriteBool(Enabled); + } + if (Scanned != false) { + output.WriteRawTag(56); + output.WriteBool(Scanned); + } + if (FeatureDisable != false) { + output.WriteRawTag(64); + output.WriteBool(FeatureDisable); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (LicenseKeyId != 0) { @@ -2838,6 +4136,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AddOn other) { if (other == null) { return; @@ -2870,10 +4169,18 @@ public void MergeFrom(AddOn other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2911,27 +4218,88 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + LicenseKeyId = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + ExpirationDate = input.ReadInt64(); + break; + } + case 32: { + CreatedDate = input.ReadInt64(); + break; + } + case 40: { + IsTrial = input.ReadBool(); + break; + } + case 48: { + Enabled = input.ReadBool(); + break; + } + case 56: { + Scanned = input.ReadBool(); + break; + } + case 64: { + FeatureDisable = input.ReadBool(); + break; + } + } + } + } + #endif + } - public sealed partial class Settings : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Settings : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Settings()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Settings() { OnConstruction(); } @@ -2939,6 +4307,7 @@ public Settings() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Settings(Settings other) : this() { audit_ = other.audit_; mustPerformAccountShareBy_ = other.mustPerformAccountShareBy_; @@ -2974,10 +4343,15 @@ public Settings(Settings other) : this() { recordTypesEnterpriseCounter_ = other.recordTypesEnterpriseCounter_; recordTypesEnabled_ = other.recordTypesEnabled_; canManageRecordTypes_ = other.canManageRecordTypes_; + recordTypesPAMCounter_ = other.recordTypesPAMCounter_; + logoutTimerMinutes_ = other.logoutTimerMinutes_; + securityKeysNoUserVerify_ = other.securityKeysNoUserVerify_; + channels_ = other.channels_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Settings Clone() { return new Settings(this); } @@ -2986,6 +4360,7 @@ public Settings Clone() { public const int AuditFieldNumber = 1; private bool audit_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Audit { get { return audit_; } set { @@ -2997,6 +4372,7 @@ public bool Audit { public const int MustPerformAccountShareByFieldNumber = 2; private long mustPerformAccountShareBy_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long MustPerformAccountShareBy { get { return mustPerformAccountShareBy_; } set { @@ -3010,6 +4386,7 @@ public long MustPerformAccountShareBy { = pb::FieldCodec.ForMessage(26, global::AccountSummary.MissingAccountShareKey.Parser); private readonly pbc::RepeatedField shareAccountTo_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField ShareAccountTo { get { return shareAccountTo_; } } @@ -3020,6 +4397,7 @@ public long MustPerformAccountShareBy { = pb::FieldCodec.ForMessage(34, global::AccountSummary.PasswordRule.Parser); private readonly pbc::RepeatedField rules_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Rules { get { return rules_; } } @@ -3028,6 +4406,7 @@ public long MustPerformAccountShareBy { public const int PasswordRulesIntroFieldNumber = 5; private string passwordRulesIntro_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string PasswordRulesIntro { get { return passwordRulesIntro_; } set { @@ -3039,6 +4418,7 @@ public string PasswordRulesIntro { public const int AutoBackupDaysFieldNumber = 6; private int autoBackupDays_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int AutoBackupDays { get { return autoBackupDays_; } set { @@ -3050,6 +4430,7 @@ public int AutoBackupDays { public const int ThemeFieldNumber = 7; private string theme_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Theme { get { return theme_; } set { @@ -3061,6 +4442,7 @@ public string Theme { public const int ChannelFieldNumber = 8; private string channel_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Channel { get { return channel_; } set { @@ -3072,6 +4454,7 @@ public string Channel { public const int ChannelValueFieldNumber = 9; private string channelValue_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ChannelValue { get { return channelValue_; } set { @@ -3083,6 +4466,7 @@ public string ChannelValue { public const int RsaConfiguredFieldNumber = 10; private bool rsaConfigured_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RsaConfigured { get { return rsaConfigured_; } set { @@ -3094,6 +4478,7 @@ public bool RsaConfigured { public const int EmailVerifiedFieldNumber = 11; private bool emailVerified_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool EmailVerified { get { return emailVerified_; } set { @@ -3105,6 +4490,7 @@ public bool EmailVerified { public const int MasterPasswordLastModifiedFieldNumber = 12; private double masterPasswordLastModified_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public double MasterPasswordLastModified { get { return masterPasswordLastModified_; } set { @@ -3116,6 +4502,7 @@ public double MasterPasswordLastModified { public const int AccountFolderKeyFieldNumber = 13; private pb::ByteString accountFolderKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AccountFolderKey { get { return accountFolderKey_; } set { @@ -3129,6 +4516,7 @@ public double MasterPasswordLastModified { = pb::FieldCodec.ForMessage(114, global::AccountSummary.SecurityKey.Parser); private readonly pbc::RepeatedField securityKeys_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SecurityKeys { get { return securityKeys_; } } @@ -3139,9 +4527,10 @@ public double MasterPasswordLastModified { = pb::FieldCodec.ForMessage(122, global::AccountSummary.KeyValue.Parser); private readonly pbc::RepeatedField keyValues_ = new pbc::RepeatedField(); /// - /////// ????? + /////// ????? /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField KeyValues { get { return keyValues_; } } @@ -3150,6 +4539,7 @@ public double MasterPasswordLastModified { public const int SsoUserFieldNumber = 16; private bool ssoUser_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool SsoUser { get { return ssoUser_; } set { @@ -3164,6 +4554,7 @@ public bool SsoUser { /// could be in "keyValues" /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool OnlineAccessOnly { get { return onlineAccessOnly_; } set { @@ -3175,6 +4566,7 @@ public bool OnlineAccessOnly { public const int MasterPasswordExpiryFieldNumber = 18; private int masterPasswordExpiry_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int MasterPasswordExpiry { get { return masterPasswordExpiry_; } set { @@ -3186,6 +4578,7 @@ public int MasterPasswordExpiry { public const int TwoFactorRequiredFieldNumber = 19; private bool twoFactorRequired_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool TwoFactorRequired { get { return twoFactorRequired_; } set { @@ -3197,6 +4590,7 @@ public bool TwoFactorRequired { public const int DisallowExportFieldNumber = 20; private bool disallowExport_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool DisallowExport { get { return disallowExport_; } set { @@ -3208,6 +4602,7 @@ public bool DisallowExport { public const int RestrictFilesFieldNumber = 21; private bool restrictFiles_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RestrictFiles { get { return restrictFiles_; } set { @@ -3219,6 +4614,7 @@ public bool RestrictFiles { public const int RestrictAllSharingFieldNumber = 22; private bool restrictAllSharing_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RestrictAllSharing { get { return restrictAllSharing_; } set { @@ -3230,6 +4626,7 @@ public bool RestrictAllSharing { public const int RestrictSharingFieldNumber = 23; private bool restrictSharing_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RestrictSharing { get { return restrictSharing_; } set { @@ -3244,6 +4641,7 @@ public bool RestrictSharing { /// json response field is "restrict_sharing_incoming_all" /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RestrictSharingIncomingAll { get { return restrictSharingIncomingAll_; } set { @@ -3258,6 +4656,7 @@ public bool RestrictSharingIncomingAll { /// json response field is "restrict_sharing_incoming_enterprise" /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RestrictSharingIncomingEnterprise { get { return restrictSharingIncomingEnterprise_; } set { @@ -3269,6 +4668,7 @@ public bool RestrictSharingIncomingEnterprise { public const int LogoutTimerFieldNumber = 26; private long logoutTimer_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long LogoutTimer { get { return logoutTimer_; } set { @@ -3280,6 +4680,7 @@ public long LogoutTimer { public const int PersistentLoginFieldNumber = 27; private bool persistentLogin_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool PersistentLogin { get { return persistentLogin_; } set { @@ -3291,6 +4692,7 @@ public bool PersistentLogin { public const int IpDisableAutoApproveFieldNumber = 28; private bool ipDisableAutoApprove_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IpDisableAutoApprove { get { return ipDisableAutoApprove_; } set { @@ -3302,6 +4704,7 @@ public bool IpDisableAutoApprove { public const int ShareDataKeyWithEccPublicKeyFieldNumber = 29; private bool shareDataKeyWithEccPublicKey_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ShareDataKeyWithEccPublicKey { get { return shareDataKeyWithEccPublicKey_; } set { @@ -3313,6 +4716,7 @@ public bool ShareDataKeyWithEccPublicKey { public const int ShareDataKeyWithDevicePublicKeyFieldNumber = 30; private bool shareDataKeyWithDevicePublicKey_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ShareDataKeyWithDevicePublicKey { get { return shareDataKeyWithDevicePublicKey_; } set { @@ -3324,6 +4728,7 @@ public bool ShareDataKeyWithDevicePublicKey { public const int RecordTypesCounterFieldNumber = 31; private int recordTypesCounter_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int RecordTypesCounter { get { return recordTypesCounter_; } set { @@ -3335,6 +4740,7 @@ public int RecordTypesCounter { public const int RecordTypesEnterpriseCounterFieldNumber = 32; private int recordTypesEnterpriseCounter_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int RecordTypesEnterpriseCounter { get { return recordTypesEnterpriseCounter_; } set { @@ -3346,6 +4752,7 @@ public int RecordTypesEnterpriseCounter { public const int RecordTypesEnabledFieldNumber = 33; private bool recordTypesEnabled_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool RecordTypesEnabled { get { return recordTypesEnabled_; } set { @@ -3357,6 +4764,7 @@ public bool RecordTypesEnabled { public const int CanManageRecordTypesFieldNumber = 34; private bool canManageRecordTypes_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool CanManageRecordTypes { get { return canManageRecordTypes_; } set { @@ -3364,12 +4772,61 @@ public bool CanManageRecordTypes { } } + /// Field number for the "recordTypesPAMCounter" field. + public const int RecordTypesPAMCounterFieldNumber = 35; + private int recordTypesPAMCounter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RecordTypesPAMCounter { + get { return recordTypesPAMCounter_; } + set { + recordTypesPAMCounter_ = value; + } + } + + /// Field number for the "logoutTimerMinutes" field. + public const int LogoutTimerMinutesFieldNumber = 36; + private int logoutTimerMinutes_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int LogoutTimerMinutes { + get { return logoutTimerMinutes_; } + set { + logoutTimerMinutes_ = value; + } + } + + /// Field number for the "securityKeysNoUserVerify" field. + public const int SecurityKeysNoUserVerifyFieldNumber = 37; + private bool securityKeysNoUserVerify_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool SecurityKeysNoUserVerify { + get { return securityKeysNoUserVerify_; } + set { + securityKeysNoUserVerify_ = value; + } + } + + /// Field number for the "channels" field. + public const int ChannelsFieldNumber = 38; + private static readonly pb::FieldCodec _repeated_channels_codec + = pb::FieldCodec.ForEnum(306, x => (int) x, x => (global::Authentication.TwoFactorChannelType) x); + private readonly pbc::RepeatedField channels_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Channels { + get { return channels_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Settings); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Settings other) { if (ReferenceEquals(other, null)) { return false; @@ -3411,10 +4868,15 @@ public bool Equals(Settings other) { if (RecordTypesEnterpriseCounter != other.RecordTypesEnterpriseCounter) return false; if (RecordTypesEnabled != other.RecordTypesEnabled) return false; if (CanManageRecordTypes != other.CanManageRecordTypes) return false; + if (RecordTypesPAMCounter != other.RecordTypesPAMCounter) return false; + if (LogoutTimerMinutes != other.LogoutTimerMinutes) return false; + if (SecurityKeysNoUserVerify != other.SecurityKeysNoUserVerify) return false; + if(!channels_.Equals(other.channels_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Audit != false) hash ^= Audit.GetHashCode(); @@ -3451,19 +4913,175 @@ public override int GetHashCode() { if (RecordTypesEnterpriseCounter != 0) hash ^= RecordTypesEnterpriseCounter.GetHashCode(); if (RecordTypesEnabled != false) hash ^= RecordTypesEnabled.GetHashCode(); if (CanManageRecordTypes != false) hash ^= CanManageRecordTypes.GetHashCode(); + if (RecordTypesPAMCounter != 0) hash ^= RecordTypesPAMCounter.GetHashCode(); + if (LogoutTimerMinutes != 0) hash ^= LogoutTimerMinutes.GetHashCode(); + if (SecurityKeysNoUserVerify != false) hash ^= SecurityKeysNoUserVerify.GetHashCode(); + hash ^= channels_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Audit != false) { + output.WriteRawTag(8); + output.WriteBool(Audit); + } + if (MustPerformAccountShareBy != 0L) { + output.WriteRawTag(16); + output.WriteInt64(MustPerformAccountShareBy); + } + shareAccountTo_.WriteTo(output, _repeated_shareAccountTo_codec); + rules_.WriteTo(output, _repeated_rules_codec); + if (PasswordRulesIntro.Length != 0) { + output.WriteRawTag(42); + output.WriteString(PasswordRulesIntro); + } + if (AutoBackupDays != 0) { + output.WriteRawTag(48); + output.WriteInt32(AutoBackupDays); + } + if (Theme.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Theme); + } + if (Channel.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Channel); + } + if (ChannelValue.Length != 0) { + output.WriteRawTag(74); + output.WriteString(ChannelValue); + } + if (RsaConfigured != false) { + output.WriteRawTag(80); + output.WriteBool(RsaConfigured); + } + if (EmailVerified != false) { + output.WriteRawTag(88); + output.WriteBool(EmailVerified); + } + if (MasterPasswordLastModified != 0D) { + output.WriteRawTag(97); + output.WriteDouble(MasterPasswordLastModified); + } + if (AccountFolderKey.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(AccountFolderKey); + } + securityKeys_.WriteTo(output, _repeated_securityKeys_codec); + keyValues_.WriteTo(output, _repeated_keyValues_codec); + if (SsoUser != false) { + output.WriteRawTag(128, 1); + output.WriteBool(SsoUser); + } + if (OnlineAccessOnly != false) { + output.WriteRawTag(136, 1); + output.WriteBool(OnlineAccessOnly); + } + if (MasterPasswordExpiry != 0) { + output.WriteRawTag(144, 1); + output.WriteInt32(MasterPasswordExpiry); + } + if (TwoFactorRequired != false) { + output.WriteRawTag(152, 1); + output.WriteBool(TwoFactorRequired); + } + if (DisallowExport != false) { + output.WriteRawTag(160, 1); + output.WriteBool(DisallowExport); + } + if (RestrictFiles != false) { + output.WriteRawTag(168, 1); + output.WriteBool(RestrictFiles); + } + if (RestrictAllSharing != false) { + output.WriteRawTag(176, 1); + output.WriteBool(RestrictAllSharing); + } + if (RestrictSharing != false) { + output.WriteRawTag(184, 1); + output.WriteBool(RestrictSharing); + } + if (RestrictSharingIncomingAll != false) { + output.WriteRawTag(192, 1); + output.WriteBool(RestrictSharingIncomingAll); + } + if (RestrictSharingIncomingEnterprise != false) { + output.WriteRawTag(200, 1); + output.WriteBool(RestrictSharingIncomingEnterprise); + } + if (LogoutTimer != 0L) { + output.WriteRawTag(208, 1); + output.WriteInt64(LogoutTimer); + } + if (PersistentLogin != false) { + output.WriteRawTag(216, 1); + output.WriteBool(PersistentLogin); + } + if (IpDisableAutoApprove != false) { + output.WriteRawTag(224, 1); + output.WriteBool(IpDisableAutoApprove); + } + if (ShareDataKeyWithEccPublicKey != false) { + output.WriteRawTag(232, 1); + output.WriteBool(ShareDataKeyWithEccPublicKey); + } + if (ShareDataKeyWithDevicePublicKey != false) { + output.WriteRawTag(240, 1); + output.WriteBool(ShareDataKeyWithDevicePublicKey); + } + if (RecordTypesCounter != 0) { + output.WriteRawTag(248, 1); + output.WriteInt32(RecordTypesCounter); + } + if (RecordTypesEnterpriseCounter != 0) { + output.WriteRawTag(128, 2); + output.WriteInt32(RecordTypesEnterpriseCounter); + } + if (RecordTypesEnabled != false) { + output.WriteRawTag(136, 2); + output.WriteBool(RecordTypesEnabled); + } + if (CanManageRecordTypes != false) { + output.WriteRawTag(144, 2); + output.WriteBool(CanManageRecordTypes); + } + if (RecordTypesPAMCounter != 0) { + output.WriteRawTag(152, 2); + output.WriteInt32(RecordTypesPAMCounter); + } + if (LogoutTimerMinutes != 0) { + output.WriteRawTag(160, 2); + output.WriteInt32(LogoutTimerMinutes); + } + if (SecurityKeysNoUserVerify != false) { + output.WriteRawTag(168, 2); + output.WriteBool(SecurityKeysNoUserVerify); + } + channels_.WriteTo(output, _repeated_channels_codec); if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); + _unknownFields.WriteTo(output); } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Audit != false) { output.WriteRawTag(8); output.WriteBool(Audit); @@ -3472,8 +5090,8 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(16); output.WriteInt64(MustPerformAccountShareBy); } - shareAccountTo_.WriteTo(output, _repeated_shareAccountTo_codec); - rules_.WriteTo(output, _repeated_rules_codec); + shareAccountTo_.WriteTo(ref output, _repeated_shareAccountTo_codec); + rules_.WriteTo(ref output, _repeated_rules_codec); if (PasswordRulesIntro.Length != 0) { output.WriteRawTag(42); output.WriteString(PasswordRulesIntro); @@ -3510,8 +5128,8 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(106); output.WriteBytes(AccountFolderKey); } - securityKeys_.WriteTo(output, _repeated_securityKeys_codec); - keyValues_.WriteTo(output, _repeated_keyValues_codec); + securityKeys_.WriteTo(ref output, _repeated_securityKeys_codec); + keyValues_.WriteTo(ref output, _repeated_keyValues_codec); if (SsoUser != false) { output.WriteRawTag(128, 1); output.WriteBool(SsoUser); @@ -3588,12 +5206,27 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(144, 2); output.WriteBool(CanManageRecordTypes); } + if (RecordTypesPAMCounter != 0) { + output.WriteRawTag(152, 2); + output.WriteInt32(RecordTypesPAMCounter); + } + if (LogoutTimerMinutes != 0) { + output.WriteRawTag(160, 2); + output.WriteInt32(LogoutTimerMinutes); + } + if (SecurityKeysNoUserVerify != false) { + output.WriteRawTag(168, 2); + output.WriteBool(SecurityKeysNoUserVerify); + } + channels_.WriteTo(ref output, _repeated_channels_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Audit != false) { @@ -3690,6 +5323,16 @@ public int CalculateSize() { if (CanManageRecordTypes != false) { size += 2 + 1; } + if (RecordTypesPAMCounter != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(RecordTypesPAMCounter); + } + if (LogoutTimerMinutes != 0) { + size += 2 + pb::CodedOutputStream.ComputeInt32Size(LogoutTimerMinutes); + } + if (SecurityKeysNoUserVerify != false) { + size += 2 + 1; + } + size += channels_.CalculateSize(_repeated_channels_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3697,6 +5340,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Settings other) { if (other == null) { return; @@ -3795,14 +5439,32 @@ public void MergeFrom(Settings other) { if (other.CanManageRecordTypes != false) { CanManageRecordTypes = other.CanManageRecordTypes; } + if (other.RecordTypesPAMCounter != 0) { + RecordTypesPAMCounter = other.RecordTypesPAMCounter; + } + if (other.LogoutTimerMinutes != 0) { + LogoutTimerMinutes = other.LogoutTimerMinutes; + } + if (other.SecurityKeysNoUserVerify != false) { + SecurityKeysNoUserVerify = other.SecurityKeysNoUserVerify; + } + channels_.Add(other.channels_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3942,29 +5604,228 @@ public void MergeFrom(pb::CodedInputStream input) { CanManageRecordTypes = input.ReadBool(); break; } + case 280: { + RecordTypesPAMCounter = input.ReadInt32(); + break; + } + case 288: { + LogoutTimerMinutes = input.ReadInt32(); + break; + } + case 296: { + SecurityKeysNoUserVerify = input.ReadBool(); + break; + } + case 306: + case 304: { + channels_.AddEntriesFrom(input, _repeated_channels_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Audit = input.ReadBool(); + break; + } + case 16: { + MustPerformAccountShareBy = input.ReadInt64(); + break; + } + case 26: { + shareAccountTo_.AddEntriesFrom(ref input, _repeated_shareAccountTo_codec); + break; + } + case 34: { + rules_.AddEntriesFrom(ref input, _repeated_rules_codec); + break; + } + case 42: { + PasswordRulesIntro = input.ReadString(); + break; + } + case 48: { + AutoBackupDays = input.ReadInt32(); + break; + } + case 58: { + Theme = input.ReadString(); + break; + } + case 66: { + Channel = input.ReadString(); + break; + } + case 74: { + ChannelValue = input.ReadString(); + break; + } + case 80: { + RsaConfigured = input.ReadBool(); + break; + } + case 88: { + EmailVerified = input.ReadBool(); + break; + } + case 97: { + MasterPasswordLastModified = input.ReadDouble(); + break; + } + case 106: { + AccountFolderKey = input.ReadBytes(); + break; + } + case 114: { + securityKeys_.AddEntriesFrom(ref input, _repeated_securityKeys_codec); + break; + } + case 122: { + keyValues_.AddEntriesFrom(ref input, _repeated_keyValues_codec); + break; + } + case 128: { + SsoUser = input.ReadBool(); + break; + } + case 136: { + OnlineAccessOnly = input.ReadBool(); + break; + } + case 144: { + MasterPasswordExpiry = input.ReadInt32(); + break; + } + case 152: { + TwoFactorRequired = input.ReadBool(); + break; + } + case 160: { + DisallowExport = input.ReadBool(); + break; + } + case 168: { + RestrictFiles = input.ReadBool(); + break; + } + case 176: { + RestrictAllSharing = input.ReadBool(); + break; + } + case 184: { + RestrictSharing = input.ReadBool(); + break; + } + case 192: { + RestrictSharingIncomingAll = input.ReadBool(); + break; + } + case 200: { + RestrictSharingIncomingEnterprise = input.ReadBool(); + break; + } + case 208: { + LogoutTimer = input.ReadInt64(); + break; + } + case 216: { + PersistentLogin = input.ReadBool(); + break; + } + case 224: { + IpDisableAutoApprove = input.ReadBool(); + break; + } + case 232: { + ShareDataKeyWithEccPublicKey = input.ReadBool(); + break; + } + case 240: { + ShareDataKeyWithDevicePublicKey = input.ReadBool(); + break; + } + case 248: { + RecordTypesCounter = input.ReadInt32(); + break; + } + case 256: { + RecordTypesEnterpriseCounter = input.ReadInt32(); + break; + } + case 264: { + RecordTypesEnabled = input.ReadBool(); + break; + } + case 272: { + CanManageRecordTypes = input.ReadBool(); + break; + } + case 280: { + RecordTypesPAMCounter = input.ReadInt32(); + break; + } + case 288: { + LogoutTimerMinutes = input.ReadInt32(); + break; + } + case 296: { + SecurityKeysNoUserVerify = input.ReadBool(); + break; + } + case 306: + case 304: { + channels_.AddEntriesFrom(ref input, _repeated_channels_codec); + break; + } } } } + #endif } - public sealed partial class KeyValue : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KeyValue : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeyValue()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValue() { OnConstruction(); } @@ -3972,6 +5833,7 @@ public KeyValue() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValue(KeyValue other) : this() { key_ = other.key_; value_ = other.value_; @@ -3979,6 +5841,7 @@ public KeyValue(KeyValue other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValue Clone() { return new KeyValue(this); } @@ -3987,6 +5850,7 @@ public KeyValue Clone() { public const int KeyFieldNumber = 1; private string key_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Key { get { return key_; } set { @@ -3998,6 +5862,7 @@ public string Key { public const int ValueFieldNumber = 2; private string value_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Value { get { return value_; } set { @@ -4006,11 +5871,13 @@ public string Value { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as KeyValue); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(KeyValue other) { if (ReferenceEquals(other, null)) { return false; @@ -4024,6 +5891,7 @@ public bool Equals(KeyValue other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Key.Length != 0) hash ^= Key.GetHashCode(); @@ -4035,12 +5903,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Key.Length != 0) { output.WriteRawTag(10); output.WriteString(Key); @@ -4052,9 +5925,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (Value.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Key.Length != 0) { @@ -4070,6 +5963,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(KeyValue other) { if (other == null) { return; @@ -4077,19 +5971,54 @@ public void MergeFrom(KeyValue other) { if (other.Key.Length != 0) { Key = other.Key; } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 18: { + Value = input.ReadString(); + break; + } + } } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { Key = input.ReadString(); @@ -4102,26 +6031,36 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - public sealed partial class KeyValueBoolean : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KeyValueBoolean : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeyValueBoolean()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValueBoolean() { OnConstruction(); } @@ -4129,6 +6068,7 @@ public KeyValueBoolean() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValueBoolean(KeyValueBoolean other) : this() { key_ = other.key_; value_ = other.value_; @@ -4136,6 +6076,7 @@ public KeyValueBoolean(KeyValueBoolean other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValueBoolean Clone() { return new KeyValueBoolean(this); } @@ -4144,6 +6085,7 @@ public KeyValueBoolean Clone() { public const int KeyFieldNumber = 1; private string key_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Key { get { return key_; } set { @@ -4155,6 +6097,7 @@ public string Key { public const int ValueFieldNumber = 2; private bool value_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Value { get { return value_; } set { @@ -4163,11 +6106,13 @@ public bool Value { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as KeyValueBoolean); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(KeyValueBoolean other) { if (ReferenceEquals(other, null)) { return false; @@ -4181,6 +6126,7 @@ public bool Equals(KeyValueBoolean other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Key.Length != 0) hash ^= Key.GetHashCode(); @@ -4192,12 +6138,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Key.Length != 0) { output.WriteRawTag(10); output.WriteString(Key); @@ -4209,9 +6160,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (Value != false) { + output.WriteRawTag(16); + output.WriteBool(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Key.Length != 0) { @@ -4227,6 +6198,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(KeyValueBoolean other) { if (other == null) { return; @@ -4241,10 +6213,18 @@ public void MergeFrom(KeyValueBoolean other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4258,27 +6238,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 16: { + Value = input.ReadBool(); + break; + } + } + } } + #endif } - public sealed partial class KeyValueLong : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KeyValueLong : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KeyValueLong()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValueLong() { OnConstruction(); } @@ -4286,6 +6303,7 @@ public KeyValueLong() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValueLong(KeyValueLong other) : this() { key_ = other.key_; value_ = other.value_; @@ -4293,6 +6311,7 @@ public KeyValueLong(KeyValueLong other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KeyValueLong Clone() { return new KeyValueLong(this); } @@ -4301,6 +6320,7 @@ public KeyValueLong Clone() { public const int KeyFieldNumber = 1; private string key_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Key { get { return key_; } set { @@ -4312,6 +6332,7 @@ public string Key { public const int ValueFieldNumber = 2; private long value_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Value { get { return value_; } set { @@ -4320,11 +6341,13 @@ public long Value { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as KeyValueLong); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(KeyValueLong other) { if (ReferenceEquals(other, null)) { return false; @@ -4338,6 +6361,7 @@ public bool Equals(KeyValueLong other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Key.Length != 0) hash ^= Key.GetHashCode(); @@ -4349,12 +6373,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Key.Length != 0) { output.WriteRawTag(10); output.WriteString(Key); @@ -4366,9 +6395,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Key); + } + if (Value != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Key.Length != 0) { @@ -4384,6 +6433,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(KeyValueLong other) { if (other == null) { return; @@ -4398,10 +6448,18 @@ public void MergeFrom(KeyValueLong other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4415,27 +6473,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadString(); + break; + } + case 16: { + Value = input.ReadInt64(); + break; + } + } + } } + #endif } - public sealed partial class Result : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Result : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Result()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Result() { OnConstruction(); } @@ -4443,6 +6538,7 @@ public Result() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Result(Result other) : this() { resultCode_ = other.resultCode_; message_ = other.message_; @@ -4451,6 +6547,7 @@ public Result(Result other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Result Clone() { return new Result(this); } @@ -4459,6 +6556,7 @@ public Result Clone() { public const int ResultCodeFieldNumber = 1; private string resultCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ResultCode { get { return resultCode_; } set { @@ -4470,6 +6568,7 @@ public string ResultCode { public const int MessageFieldNumber = 2; private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Message { get { return message_; } set { @@ -4481,6 +6580,7 @@ public string Message { public const int Result_FieldNumber = 3; private string result_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Result_ { get { return result_; } set { @@ -4489,11 +6589,13 @@ public string Result_ { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Result); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Result other) { if (ReferenceEquals(other, null)) { return false; @@ -4508,6 +6610,7 @@ public bool Equals(Result other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ResultCode.Length != 0) hash ^= ResultCode.GetHashCode(); @@ -4520,12 +6623,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (ResultCode.Length != 0) { output.WriteRawTag(10); output.WriteString(ResultCode); @@ -4541,9 +6649,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ResultCode.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ResultCode); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (Result_.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Result_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ResultCode.Length != 0) { @@ -4562,6 +6694,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Result other) { if (other == null) { return; @@ -4579,10 +6712,18 @@ public void MergeFrom(Result other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4600,27 +6741,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ResultCode = input.ReadString(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + case 26: { + Result_ = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class Enforcements : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Enforcements : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Enforcements()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Enforcements() { OnConstruction(); } @@ -4628,6 +6810,7 @@ public Enforcements() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Enforcements(Enforcements other) : this() { strings_ = other.strings_.Clone(); booleans_ = other.booleans_.Clone(); @@ -4637,6 +6820,7 @@ public Enforcements(Enforcements other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Enforcements Clone() { return new Enforcements(this); } @@ -4647,6 +6831,7 @@ public Enforcements Clone() { = pb::FieldCodec.ForMessage(10, global::AccountSummary.KeyValue.Parser); private readonly pbc::RepeatedField strings_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Strings { get { return strings_; } } @@ -4657,6 +6842,7 @@ public Enforcements Clone() { = pb::FieldCodec.ForMessage(18, global::AccountSummary.KeyValueBoolean.Parser); private readonly pbc::RepeatedField booleans_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Booleans { get { return booleans_; } } @@ -4667,6 +6853,7 @@ public Enforcements Clone() { = pb::FieldCodec.ForMessage(26, global::AccountSummary.KeyValueLong.Parser); private readonly pbc::RepeatedField longs_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Longs { get { return longs_; } } @@ -4677,16 +6864,19 @@ public Enforcements Clone() { = pb::FieldCodec.ForMessage(34, global::AccountSummary.KeyValue.Parser); private readonly pbc::RepeatedField jsons_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Jsons { get { return jsons_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Enforcements); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Enforcements other) { if (ReferenceEquals(other, null)) { return false; @@ -4702,6 +6892,7 @@ public bool Equals(Enforcements other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= strings_.GetHashCode(); @@ -4715,12 +6906,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else strings_.WriteTo(output, _repeated_strings_codec); booleans_.WriteTo(output, _repeated_booleans_codec); longs_.WriteTo(output, _repeated_longs_codec); @@ -4728,9 +6924,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + strings_.WriteTo(ref output, _repeated_strings_codec); + booleans_.WriteTo(ref output, _repeated_booleans_codec); + longs_.WriteTo(ref output, _repeated_longs_codec); + jsons_.WriteTo(ref output, _repeated_jsons_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += strings_.CalculateSize(_repeated_strings_codec); @@ -4744,6 +6956,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Enforcements other) { if (other == null) { return; @@ -4756,10 +6969,18 @@ public void MergeFrom(Enforcements other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4781,27 +7002,72 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + strings_.AddEntriesFrom(ref input, _repeated_strings_codec); + break; + } + case 18: { + booleans_.AddEntriesFrom(ref input, _repeated_booleans_codec); + break; + } + case 26: { + longs_.AddEntriesFrom(ref input, _repeated_longs_codec); + break; + } + case 34: { + jsons_.AddEntriesFrom(ref input, _repeated_jsons_codec); + break; + } + } + } } + #endif } - public sealed partial class MissingAccountShareKey : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MissingAccountShareKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MissingAccountShareKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[13]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MissingAccountShareKey() { OnConstruction(); } @@ -4809,6 +7075,7 @@ public MissingAccountShareKey() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MissingAccountShareKey(MissingAccountShareKey other) : this() { roleId_ = other.roleId_; publicKey_ = other.publicKey_; @@ -4816,6 +7083,7 @@ public MissingAccountShareKey(MissingAccountShareKey other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public MissingAccountShareKey Clone() { return new MissingAccountShareKey(this); } @@ -4824,6 +7092,7 @@ public MissingAccountShareKey Clone() { public const int RoleIdFieldNumber = 1; private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long RoleId { get { return roleId_; } set { @@ -4835,6 +7104,7 @@ public long RoleId { public const int PublicKeyFieldNumber = 2; private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString PublicKey { get { return publicKey_; } set { @@ -4843,11 +7113,13 @@ public long RoleId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as MissingAccountShareKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(MissingAccountShareKey other) { if (ReferenceEquals(other, null)) { return false; @@ -4861,6 +7133,7 @@ public bool Equals(MissingAccountShareKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RoleId != 0L) hash ^= RoleId.GetHashCode(); @@ -4872,12 +7145,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RoleId != 0L) { output.WriteRawTag(8); output.WriteInt64(RoleId); @@ -4889,9 +7167,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RoleId != 0L) { @@ -4907,6 +7205,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(MissingAccountShareKey other) { if (other == null) { return; @@ -4921,10 +7220,18 @@ public void MergeFrom(MissingAccountShareKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4938,27 +7245,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + PublicKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class PasswordRule : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PasswordRule : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PasswordRule()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[14]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PasswordRule() { OnConstruction(); } @@ -4966,6 +7310,7 @@ public PasswordRule() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PasswordRule(PasswordRule other) : this() { ruleType_ = other.ruleType_; pattern_ = other.pattern_; @@ -4977,6 +7322,7 @@ public PasswordRule(PasswordRule other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PasswordRule Clone() { return new PasswordRule(this); } @@ -4985,6 +7331,7 @@ public PasswordRule Clone() { public const int RuleTypeFieldNumber = 1; private string ruleType_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string RuleType { get { return ruleType_; } set { @@ -4996,6 +7343,7 @@ public string RuleType { public const int PatternFieldNumber = 2; private string pattern_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Pattern { get { return pattern_; } set { @@ -5007,6 +7355,7 @@ public string Pattern { public const int MatchFieldNumber = 3; private bool match_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Match { get { return match_; } set { @@ -5018,6 +7367,7 @@ public bool Match { public const int MinimumFieldNumber = 4; private int minimum_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int Minimum { get { return minimum_; } set { @@ -5029,6 +7379,7 @@ public int Minimum { public const int DescriptionFieldNumber = 5; private string description_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Description { get { return description_; } set { @@ -5040,6 +7391,7 @@ public string Description { public const int ValueFieldNumber = 6; private string value_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Value { get { return value_; } set { @@ -5048,11 +7400,13 @@ public string Value { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as PasswordRule); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(PasswordRule other) { if (ReferenceEquals(other, null)) { return false; @@ -5070,6 +7424,7 @@ public bool Equals(PasswordRule other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RuleType.Length != 0) hash ^= RuleType.GetHashCode(); @@ -5085,12 +7440,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RuleType.Length != 0) { output.WriteRawTag(10); output.WriteString(RuleType); @@ -5118,9 +7478,45 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RuleType.Length != 0) { + output.WriteRawTag(10); + output.WriteString(RuleType); + } + if (Pattern.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Pattern); + } + if (Match != false) { + output.WriteRawTag(24); + output.WriteBool(Match); + } + if (Minimum != 0) { + output.WriteRawTag(32); + output.WriteInt32(Minimum); + } + if (Description.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Description); + } + if (Value.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RuleType.Length != 0) { @@ -5148,6 +7544,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(PasswordRule other) { if (other == null) { return; @@ -5170,16 +7567,67 @@ public void MergeFrom(PasswordRule other) { if (other.Value.Length != 0) { Value = other.Value; } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RuleType = input.ReadString(); + break; + } + case 18: { + Pattern = input.ReadString(); + break; + } + case 24: { + Match = input.ReadBool(); + break; + } + case 32: { + Minimum = input.ReadInt32(); + break; + } + case 42: { + Description = input.ReadString(); + break; + } + case 50: { + Value = input.ReadString(); + break; + } + } + } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { RuleType = input.ReadString(); @@ -5208,26 +7656,36 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - public sealed partial class SecurityKey : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SecurityKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SecurityKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[15]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SecurityKey() { OnConstruction(); } @@ -5235,6 +7693,7 @@ public SecurityKey() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SecurityKey(SecurityKey other) : this() { deviceId_ = other.deviceId_; deviceName_ = other.deviceName_; @@ -5245,6 +7704,7 @@ public SecurityKey(SecurityKey other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SecurityKey Clone() { return new SecurityKey(this); } @@ -5253,6 +7713,7 @@ public SecurityKey Clone() { public const int DeviceIdFieldNumber = 1; private long deviceId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long DeviceId { get { return deviceId_; } set { @@ -5264,6 +7725,7 @@ public long DeviceId { public const int DeviceNameFieldNumber = 2; private string deviceName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string DeviceName { get { return deviceName_; } set { @@ -5275,6 +7737,7 @@ public string DeviceName { public const int DateAddedFieldNumber = 3; private long dateAdded_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long DateAdded { get { return dateAdded_; } set { @@ -5286,6 +7749,7 @@ public long DateAdded { public const int IsValidFieldNumber = 4; private bool isValid_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsValid { get { return isValid_; } set { @@ -5297,6 +7761,7 @@ public bool IsValid { public const int DeviceRegistrationFieldNumber = 5; private global::AccountSummary.DeviceRegistration deviceRegistration_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.DeviceRegistration DeviceRegistration { get { return deviceRegistration_; } set { @@ -5305,11 +7770,13 @@ public bool IsValid { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SecurityKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SecurityKey other) { if (ReferenceEquals(other, null)) { return false; @@ -5326,6 +7793,7 @@ public bool Equals(SecurityKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (DeviceId != 0L) hash ^= DeviceId.GetHashCode(); @@ -5340,12 +7808,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (DeviceId != 0L) { output.WriteRawTag(8); output.WriteInt64(DeviceId); @@ -5369,9 +7842,41 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DeviceId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DeviceId); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(DeviceName); + } + if (DateAdded != 0L) { + output.WriteRawTag(24); + output.WriteInt64(DateAdded); + } + if (IsValid != false) { + output.WriteRawTag(32); + output.WriteBool(IsValid); + } + if (deviceRegistration_ != null) { + output.WriteRawTag(42); + output.WriteMessage(DeviceRegistration); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (DeviceId != 0L) { @@ -5396,6 +7901,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SecurityKey other) { if (other == null) { return; @@ -5422,10 +7928,18 @@ public void MergeFrom(SecurityKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5454,27 +7968,79 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + DeviceId = input.ReadInt64(); + break; + } + case 18: { + DeviceName = input.ReadString(); + break; + } + case 24: { + DateAdded = input.ReadInt64(); + break; + } + case 32: { + IsValid = input.ReadBool(); + break; + } + case 42: { + if (deviceRegistration_ == null) { + DeviceRegistration = new global::AccountSummary.DeviceRegistration(); + } + input.ReadMessage(DeviceRegistration); + break; + } + } + } } + #endif } - public sealed partial class DeviceRegistration : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceRegistration : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceRegistration()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[16]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceRegistration() { OnConstruction(); } @@ -5482,6 +8048,7 @@ public DeviceRegistration() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceRegistration(DeviceRegistration other) : this() { keyHandle_ = other.keyHandle_; publicKey_ = other.publicKey_; @@ -5492,6 +8059,7 @@ public DeviceRegistration(DeviceRegistration other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DeviceRegistration Clone() { return new DeviceRegistration(this); } @@ -5500,6 +8068,7 @@ public DeviceRegistration Clone() { public const int KeyHandleFieldNumber = 1; private string keyHandle_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string KeyHandle { get { return keyHandle_; } set { @@ -5511,6 +8080,7 @@ public string KeyHandle { public const int PublicKeyFieldNumber = 2; private pb::ByteString publicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString PublicKey { get { return publicKey_; } set { @@ -5522,6 +8092,7 @@ public string KeyHandle { public const int AttestationCertFieldNumber = 3; private string attestationCert_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string AttestationCert { get { return attestationCert_; } set { @@ -5533,6 +8104,7 @@ public string AttestationCert { public const int CounterFieldNumber = 4; private long counter_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Counter { get { return counter_; } set { @@ -5544,6 +8116,7 @@ public long Counter { public const int CompromisedFieldNumber = 5; private bool compromised_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Compromised { get { return compromised_; } set { @@ -5552,11 +8125,13 @@ public bool Compromised { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as DeviceRegistration); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(DeviceRegistration other) { if (ReferenceEquals(other, null)) { return false; @@ -5573,6 +8148,7 @@ public bool Equals(DeviceRegistration other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (KeyHandle.Length != 0) hash ^= KeyHandle.GetHashCode(); @@ -5587,12 +8163,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (KeyHandle.Length != 0) { output.WriteRawTag(10); output.WriteString(KeyHandle); @@ -5616,9 +8197,41 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (KeyHandle.Length != 0) { + output.WriteRawTag(10); + output.WriteString(KeyHandle); + } + if (PublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(PublicKey); + } + if (AttestationCert.Length != 0) { + output.WriteRawTag(26); + output.WriteString(AttestationCert); + } + if (Counter != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Counter); + } + if (Compromised != false) { + output.WriteRawTag(40); + output.WriteBool(Compromised); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (KeyHandle.Length != 0) { @@ -5643,6 +8256,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(DeviceRegistration other) { if (other == null) { return; @@ -5666,10 +8280,18 @@ public void MergeFrom(DeviceRegistration other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5695,27 +8317,76 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + KeyHandle = input.ReadString(); + break; + } + case 18: { + PublicKey = input.ReadBytes(); + break; + } + case 26: { + AttestationCert = input.ReadString(); + break; + } + case 32: { + Counter = input.ReadInt64(); + break; + } + case 40: { + Compromised = input.ReadBool(); + break; + } + } + } } + #endif } - public sealed partial class Group : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Group : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Group()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[17]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Group() { OnConstruction(); } @@ -5723,6 +8394,7 @@ public Group() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Group(Group other) : this() { admin_ = other.admin_; groupVerificationCode_ = other.groupVerificationCode_; @@ -5731,6 +8403,7 @@ public Group(Group other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Group Clone() { return new Group(this); } @@ -5739,6 +8412,7 @@ public Group Clone() { public const int AdminFieldNumber = 1; private bool admin_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Admin { get { return admin_; } set { @@ -5750,6 +8424,7 @@ public bool Admin { public const int GroupVerificationCodeFieldNumber = 2; private string groupVerificationCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string GroupVerificationCode { get { return groupVerificationCode_; } set { @@ -5764,6 +8439,7 @@ public string GroupVerificationCode { /// repeated KeyValue groupSettings = 3; ///// ? /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::AccountSummary.Administrator Administrator { get { return administrator_; } set { @@ -5772,11 +8448,13 @@ public string GroupVerificationCode { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Group); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Group other) { if (ReferenceEquals(other, null)) { return false; @@ -5791,6 +8469,7 @@ public bool Equals(Group other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Admin != false) hash ^= Admin.GetHashCode(); @@ -5803,12 +8482,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Admin != false) { output.WriteRawTag(8); output.WriteBool(Admin); @@ -5824,9 +8508,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Admin != false) { + output.WriteRawTag(8); + output.WriteBool(Admin); + } + if (GroupVerificationCode.Length != 0) { + output.WriteRawTag(18); + output.WriteString(GroupVerificationCode); + } + if (administrator_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Administrator); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Admin != false) { @@ -5845,6 +8553,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Group other) { if (other == null) { return; @@ -5865,10 +8574,18 @@ public void MergeFrom(Group other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -5889,27 +8606,71 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Admin = input.ReadBool(); + break; + } + case 18: { + GroupVerificationCode = input.ReadString(); + break; + } + case 34: { + if (administrator_ == null) { + Administrator = new global::AccountSummary.Administrator(); + } + input.ReadMessage(Administrator); + break; + } + } + } } + #endif } - public sealed partial class Administrator : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Administrator : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Administrator()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::AccountSummary.AccountSummaryReflection.Descriptor.MessageTypes[18]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Administrator() { OnConstruction(); } @@ -5917,6 +8678,7 @@ public Administrator() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Administrator(Administrator other) : this() { firstName_ = other.firstName_; lastName_ = other.lastName_; @@ -5930,6 +8692,7 @@ public Administrator(Administrator other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public Administrator Clone() { return new Administrator(this); } @@ -5938,6 +8701,7 @@ public Administrator Clone() { public const int FirstNameFieldNumber = 1; private string firstName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string FirstName { get { return firstName_; } set { @@ -5949,6 +8713,7 @@ public string FirstName { public const int LastNameFieldNumber = 2; private string lastName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string LastName { get { return lastName_; } set { @@ -5960,6 +8725,7 @@ public string LastName { public const int EmailFieldNumber = 3; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -5971,6 +8737,7 @@ public string Email { public const int CurrentNumberOfUsersFieldNumber = 4; private int currentNumberOfUsers_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CurrentNumberOfUsers { get { return currentNumberOfUsers_; } set { @@ -5982,6 +8749,7 @@ public int CurrentNumberOfUsers { public const int NumberOfUsersFieldNumber = 5; private int numberOfUsers_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int NumberOfUsers { get { return numberOfUsers_; } set { @@ -5996,6 +8764,7 @@ public int NumberOfUsers { /// int32 numberOfDevices = 6; /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SubscriptionCode { get { return subscriptionCode_; } set { @@ -6007,6 +8776,7 @@ public string SubscriptionCode { public const int ExpirationDateFieldNumber = 8; private string expirationDate_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ExpirationDate { get { return expirationDate_; } set { @@ -6021,6 +8791,7 @@ public string ExpirationDate { /// string total = 10; /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string PurchaseDate { get { return purchaseDate_; } set { @@ -6029,11 +8800,13 @@ public string PurchaseDate { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as Administrator); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(Administrator other) { if (ReferenceEquals(other, null)) { return false; @@ -6053,6 +8826,7 @@ public bool Equals(Administrator other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (FirstName.Length != 0) hash ^= FirstName.GetHashCode(); @@ -6070,12 +8844,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (FirstName.Length != 0) { output.WriteRawTag(10); output.WriteString(FirstName); @@ -6111,9 +8890,53 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FirstName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(FirstName); + } + if (LastName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(LastName); + } + if (Email.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Email); + } + if (CurrentNumberOfUsers != 0) { + output.WriteRawTag(32); + output.WriteInt32(CurrentNumberOfUsers); + } + if (NumberOfUsers != 0) { + output.WriteRawTag(40); + output.WriteInt32(NumberOfUsers); + } + if (SubscriptionCode.Length != 0) { + output.WriteRawTag(58); + output.WriteString(SubscriptionCode); + } + if (ExpirationDate.Length != 0) { + output.WriteRawTag(66); + output.WriteString(ExpirationDate); + } + if (PurchaseDate.Length != 0) { + output.WriteRawTag(74); + output.WriteString(PurchaseDate); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (FirstName.Length != 0) { @@ -6147,6 +8970,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(Administrator other) { if (other == null) { return; @@ -6179,10 +9003,18 @@ public void MergeFrom(Administrator other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -6220,7 +9052,59 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FirstName = input.ReadString(); + break; + } + case 18: { + LastName = input.ReadString(); + break; + } + case 26: { + Email = input.ReadString(); + break; + } + case 32: { + CurrentNumberOfUsers = input.ReadInt32(); + break; + } + case 40: { + NumberOfUsers = input.ReadInt32(); + break; + } + case 58: { + SubscriptionCode = input.ReadString(); + break; + } + case 66: { + ExpirationDate = input.ReadString(); + break; + } + case 74: { + PurchaseDate = input.ReadString(); + break; + } + } + } } + #endif } diff --git a/KeeperSdk/proto/BI.cs b/KeeperSdk/proto/BI.cs new file mode 100644 index 0000000..e7471b2 --- /dev/null +++ b/KeeperSdk/proto/BI.cs @@ -0,0 +1,10498 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: BI.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace BI { + + /// Holder for reflection information generated from BI.proto + public static partial class BIReflection { + + #region Descriptor + /// File descriptor for BI.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static BIReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CghCSS5wcm90bxICQkkiZgobVmFsaWRhdGVTZXNzaW9uVG9rZW5SZXF1ZXN0", + "Eh0KFWVuY3J5cHRlZFNlc3Npb25Ub2tlbhgBIAEoDBIcChRyZXR1cm5NY0Vu", + "dGVycGlzZUlkcxgCIAEoCBIKCgJpcBgDIAEoCSLaAgocVmFsaWRhdGVTZXNz", + "aW9uVG9rZW5SZXNwb25zZRIQCgh1c2VybmFtZRgBIAEoCRIOCgZ1c2VySWQY", + "AiABKAUSGAoQZW50ZXJwcmlzZVVzZXJJZBgDIAEoAxI3CgZzdGF0dXMYBCAB", + "KA4yJy5CSS5WYWxpZGF0ZVNlc3Npb25Ub2tlblJlc3BvbnNlLlN0YXR1cxIV", + "Cg1zdGF0dXNNZXNzYWdlGAUgASgJEhcKD21jRW50ZXJwcmlzZUlkcxgGIAMo", + "BRIYChBoYXNNU1BQZXJtaXNzaW9uGAcgASgIEh4KFmRlbGV0ZWRNY0VudGVy", + "cHJpc2VJZHMYCCADKAUiWwoGU3RhdHVzEgkKBVZBTElEEAASDQoJTk9UX1ZB", + "TElEEAESCwoHRVhQSVJFRBACEg4KCklQX0JMT0NLRUQQAxIaChZJTlZBTElE", + "X0NMSUVOVF9WRVJTSU9OEAQiGwoZU3Vic2NyaXB0aW9uU3RhdHVzUmVxdWVz", + "dCKmAwoaU3Vic2NyaXB0aW9uU3RhdHVzUmVzcG9uc2USJAoLYXV0b1JlbmV3", + "YWwYASABKAsyDy5CSS5BdXRvUmVuZXdhbBIvChRjdXJyZW50UGF5bWVudE1l", + "dGhvZBgCIAEoCzIRLkJJLlBheW1lbnRNZXRob2QSFAoMY2hlY2tvdXRMaW5r", + "GAMgASgJEhkKEWxpY2Vuc2VDcmVhdGVEYXRlGAQgASgDEhUKDWlzRGlzdHJp", + "YnV0b3IYBSABKAgSEwoLaXNMZWdhY3lNc3AYBiABKAgSJgoMbGljZW5zZVN0", + "YXRzGAggAygLMhAuQkkuTGljZW5zZVN0YXRzEjUKDmdyYWRpZW50U3RhdHVz", + "GAkgASgOMh0uQkkuR3JhZGllbnRJbnRlZ3JhdGlvblN0YXR1cxIXCg9oaWRl", + "VHJpYWxCYW5uZXIYCiABKAgSHAoUZ3JhZGllbnRMYXN0U3luY0RhdGUYCyAB", + "KAkSHAoUZ3JhZGllbnROZXh0U3luY0RhdGUYDCABKAkSIAoYaXNHcmFkaWVu", + "dE1hcHBpbmdQZW5kaW5nGA0gASgIItcBCgxMaWNlbnNlU3RhdHMSIwoEdHlw", + "ZRgBIAEoDjIVLkJJLkxpY2Vuc2VTdGF0cy5UeXBlEhEKCWF2YWlsYWJsZRgC", + "IAEoBRIMCgR1c2VkGAMgASgFIoABCgRUeXBlEhgKFExJQ0VOU0VfU1RBVF9V", + "TktOT1dOEAASDAoITVNQX0JBU0UQARIPCgtNQ19CVVNJTkVTUxACEhQKEE1D", + "X0JVU0lORVNTX1BMVVMQAxIRCg1NQ19FTlRFUlBSSVNFEAQSFgoSTUNfRU5U", + "RVJQUklTRV9QTFVTEAUiQAoLQXV0b1JlbmV3YWwSDgoGbmV4dE9uGAEgASgD", + "EhAKCGRheXNMZWZ0GAIgASgFEg8KB2lzVHJpYWwYAyABKAgihAQKDVBheW1l", + "bnRNZXRob2QSJAoEdHlwZRgBIAEoDjIWLkJJLlBheW1lbnRNZXRob2QuVHlw", + "ZRIkCgRjYXJkGAIgASgLMhYuQkkuUGF5bWVudE1ldGhvZC5DYXJkEiQKBHNl", + "cGEYAyABKAsyFi5CSS5QYXltZW50TWV0aG9kLlNlcGESKAoGcGF5cGFsGAQg", + "ASgLMhguQkkuUGF5bWVudE1ldGhvZC5QYXlwYWwSFQoNZmFpbGVkQmlsbGlu", + "ZxgFIAEoCBIoCgZ2ZW5kb3IYBiABKAsyGC5CSS5QYXltZW50TWV0aG9kLlZl", + "bmRvchI2Cg1wdXJjaGFzZU9yZGVyGAcgASgLMh8uQkkuUGF5bWVudE1ldGhv", + "ZC5QdXJjaGFzZU9yZGVyGiQKBENhcmQSDQoFbGFzdDQYASABKAkSDQoFYnJh", + "bmQYAiABKAkaJgoEU2VwYRINCgVsYXN0NBgBIAEoCRIPCgdjb3VudHJ5GAIg", + "ASgJGggKBlBheXBhbBoWCgZWZW5kb3ISDAoEbmFtZRgBIAEoCRodCg1QdXJj", + "aGFzZU9yZGVyEgwKBG5hbWUYASABKAkiTwoEVHlwZRIICgRDQVJEEAASCAoE", + "U0VQQRABEgoKBlBBWVBBTBACEggKBE5PTkUQAxIKCgZWRU5ET1IQBBIRCg1Q", + "VVJDSEFTRU9SREVSEAUiHwodU3Vic2NyaXB0aW9uTXNwUHJpY2luZ1JlcXVl", + "c3QiXAoeU3Vic2NyaXB0aW9uTXNwUHJpY2luZ1Jlc3BvbnNlEhkKBmFkZG9u", + "cxgCIAMoCzIJLkJJLkFkZG9uEh8KCWZpbGVQbGFucxgDIAMoCzIMLkJJLkZp", + "bGVQbGFuIh4KHFN1YnNjcmlwdGlvbk1jUHJpY2luZ1JlcXVlc3QifAodU3Vi", + "c2NyaXB0aW9uTWNQcmljaW5nUmVzcG9uc2USHwoJYmFzZVBsYW5zGAEgAygL", + "MgwuQkkuQmFzZVBsYW4SGQoGYWRkb25zGAIgAygLMgkuQkkuQWRkb24SHwoJ", + "ZmlsZVBsYW5zGAMgAygLMgwuQkkuRmlsZVBsYW4iLgoIQmFzZVBsYW4SCgoC", + "aWQYASABKAUSFgoEY29zdBgCIAEoCzIILkJJLkNvc3QiQwoFQWRkb24SCgoC", + "aWQYASABKAUSFgoEY29zdBgCIAEoCzIILkJJLkNvc3QSFgoOYW1vdW50Q29u", + "c3VtZWQYAyABKAMiLgoIRmlsZVBsYW4SCgoCaWQYASABKAUSFgoEY29zdBgC", + "IAEoCzIILkJJLkNvc3QiqwEKBENvc3QSDgoGYW1vdW50GAMgASgBEiUKCWFt", + "b3VudFBlchgEIAEoDjISLkJJLkNvc3QuQW1vdW50UGVyEh4KCGN1cnJlbmN5", + "GAUgASgOMgwuQkkuQ3VycmVuY3kiTAoJQW1vdW50UGVyEgsKB1VOS05PV04Q", + "ABIJCgVNT05USBABEg4KClVTRVJfTU9OVEgQAhIXChNVU0VSX0NPTlNVTUVE", + "X01PTlRIEAMiPQoUSW52b2ljZVNlYXJjaFJlcXVlc3QSDAoEc2l6ZRgBIAEo", + "BRIXCg9zdGFydGluZ0FmdGVySWQYAiABKAUiNgoVSW52b2ljZVNlYXJjaFJl", + "c3BvbnNlEh0KCGludm9pY2VzGAEgAygLMgsuQkkuSW52b2ljZSK+AgoHSW52", + "b2ljZRIKCgJpZBgBIAEoBRIVCg1pbnZvaWNlTnVtYmVyGAIgASgJEhMKC2lu", + "dm9pY2VEYXRlGAMgASgDEhQKDGxpY2Vuc2VDb3VudBgEIAEoBRIjCgl0b3Rh", + "bENvc3QYBSABKAsyEC5CSS5JbnZvaWNlLkNvc3QSJQoLaW52b2ljZVR5cGUY", + "BiABKA4yEC5CSS5JbnZvaWNlLlR5cGUaNgoEQ29zdBIOCgZhbW91bnQYASAB", + "KAESHgoIY3VycmVuY3kYAiABKA4yDC5CSS5DdXJyZW5jeSJhCgRUeXBlEgsK", + "B1VOS05PV04QABIHCgNORVcQARILCgdSRU5FV0FMEAISCwoHVVBHUkFERRAD", + "EgsKB1JFU1RPUkUQBBIPCgtBU1NPQ0lBVElPThAFEgsKB09WRVJBR0UQBiIv", + "ChZJbnZvaWNlRG93bmxvYWRSZXF1ZXN0EhUKDWludm9pY2VOdW1iZXIYASAB", + "KAkiOQoXSW52b2ljZURvd25sb2FkUmVzcG9uc2USDAoEbGluaxgBIAEoCRIQ", + "CghmaWxlTmFtZRgCIAEoCSI8Ch1SZXBvcnRpbmdEYWlseVNuYXBzaG90UmVx", + "dWVzdBINCgVtb250aBgBIAEoBRIMCgR5ZWFyGAIgASgFInYKHlJlcG9ydGlu", + "Z0RhaWx5U25hcHNob3RSZXNwb25zZRIjCgdyZWNvcmRzGAEgAygLMhIuQkku", + "U25hcHNob3RSZWNvcmQSLwoNbWNFbnRlcnByaXNlcxgCIAMoCzIYLkJJLlNu", + "YXBzaG90TWNFbnRlcnByaXNlItcBCg5TbmFwc2hvdFJlY29yZBIMCgRkYXRl", + "GAEgASgDEhYKDm1jRW50ZXJwcmlzZUlkGAIgASgFEhcKD21heExpY2Vuc2VD", + "b3VudBgEIAEoBRIZChFtYXhGaWxlUGxhblR5cGVJZBgFIAEoBRIVCg1tYXhC", + "YXNlUGxhbklkGAYgASgFEigKBmFkZG9ucxgHIAMoCzIYLkJJLlNuYXBzaG90", + "UmVjb3JkLkFkZG9uGioKBUFkZG9uEhIKCm1heEFkZG9uSWQYASABKAUSDQoF", + "dW5pdHMYAiABKAMiMAoUU25hcHNob3RNY0VudGVycHJpc2USCgoCaWQYASAB", + "KAUSDAoEbmFtZRgCIAEoCSIWChRNYXBwaW5nQWRkb25zUmVxdWVzdCJcChVN", + "YXBwaW5nQWRkb25zUmVzcG9uc2USHwoGYWRkb25zGAEgAygLMg8uQkkuTWFw", + "cGluZ0l0ZW0SIgoJZmlsZVBsYW5zGAIgAygLMg8uQkkuTWFwcGluZ0l0ZW0i", + "JwoLTWFwcGluZ0l0ZW0SCgoCaWQYASABKAUSDAoEbmFtZRgCIAEoCSIxChpH", + "cmFkaWVudFZhbGlkYXRlS2V5UmVxdWVzdBITCgtncmFkaWVudEtleRgBIAEo", + "CSI/ChtHcmFkaWVudFZhbGlkYXRlS2V5UmVzcG9uc2USDwoHc3VjY2VzcxgB", + "IAEoCBIPCgdtZXNzYWdlGAIgASgJIkQKE0dyYWRpZW50U2F2ZVJlcXVlc3QS", + "EwoLZ3JhZGllbnRLZXkYASABKAkSGAoQZW50ZXJwcmlzZVVzZXJJZBgCIAEo", + "AyJnChRHcmFkaWVudFNhdmVSZXNwb25zZRIPCgdzdWNjZXNzGAEgASgIEi0K", + "BnN0YXR1cxgCIAEoDjIdLkJJLkdyYWRpZW50SW50ZWdyYXRpb25TdGF0dXMS", + "DwoHbWVzc2FnZRgDIAEoCSIxChVHcmFkaWVudFJlbW92ZVJlcXVlc3QSGAoQ", + "ZW50ZXJwcmlzZVVzZXJJZBgBIAEoAyI6ChZHcmFkaWVudFJlbW92ZVJlc3Bv", + "bnNlEg8KB3N1Y2Nlc3MYASABKAgSDwoHbWVzc2FnZRgCIAEoCSIvChNHcmFk", + "aWVudFN5bmNSZXF1ZXN0EhgKEGVudGVycHJpc2VVc2VySWQYASABKAMiZwoU", + "R3JhZGllbnRTeW5jUmVzcG9uc2USDwoHc3VjY2VzcxgBIAEoCBItCgZzdGF0", + "dXMYAiABKA4yHS5CSS5HcmFkaWVudEludGVncmF0aW9uU3RhdHVzEg8KB21l", + "c3NhZ2UYAyABKAkqRAoIQ3VycmVuY3kSCwoHVU5LTk9XThAAEgcKA1VTRBAB", + "EgcKA0dCUBACEgcKA0pQWRADEgcKA0VVUhAEEgcKA0FVRBAFKlMKGUdyYWRp", + "ZW50SW50ZWdyYXRpb25TdGF0dXMSEAoMTk9UQ09OTkVDVEVEEAASCwoHUEVO", + "RElORxABEg0KCUNPTk5FQ1RFRBACEggKBE5PTkUQA0IeChhjb20ua2VlcGVy", + "c2VjdXJpdHkucHJvdG9CAkJJYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::BI.Currency), typeof(global::BI.GradientIntegrationStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::BI.ValidateSessionTokenRequest), global::BI.ValidateSessionTokenRequest.Parser, new[]{ "EncryptedSessionToken", "ReturnMcEnterpiseIds", "Ip" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.ValidateSessionTokenResponse), global::BI.ValidateSessionTokenResponse.Parser, new[]{ "Username", "UserId", "EnterpriseUserId", "Status", "StatusMessage", "McEnterpriseIds", "HasMSPPermission", "DeletedMcEnterpriseIds" }, null, new[]{ typeof(global::BI.ValidateSessionTokenResponse.Types.Status) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SubscriptionStatusRequest), global::BI.SubscriptionStatusRequest.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SubscriptionStatusResponse), global::BI.SubscriptionStatusResponse.Parser, new[]{ "AutoRenewal", "CurrentPaymentMethod", "CheckoutLink", "LicenseCreateDate", "IsDistributor", "IsLegacyMsp", "LicenseStats", "GradientStatus", "HideTrialBanner", "GradientLastSyncDate", "GradientNextSyncDate", "IsGradientMappingPending" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.LicenseStats), global::BI.LicenseStats.Parser, new[]{ "Type", "Available", "Used" }, null, new[]{ typeof(global::BI.LicenseStats.Types.Type) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.AutoRenewal), global::BI.AutoRenewal.Parser, new[]{ "NextOn", "DaysLeft", "IsTrial" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.PaymentMethod), global::BI.PaymentMethod.Parser, new[]{ "Type", "Card", "Sepa", "Paypal", "FailedBilling", "Vendor", "PurchaseOrder" }, null, new[]{ typeof(global::BI.PaymentMethod.Types.Type) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::BI.PaymentMethod.Types.Card), global::BI.PaymentMethod.Types.Card.Parser, new[]{ "Last4", "Brand" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.PaymentMethod.Types.Sepa), global::BI.PaymentMethod.Types.Sepa.Parser, new[]{ "Last4", "Country" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.PaymentMethod.Types.Paypal), global::BI.PaymentMethod.Types.Paypal.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.PaymentMethod.Types.Vendor), global::BI.PaymentMethod.Types.Vendor.Parser, new[]{ "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.PaymentMethod.Types.PurchaseOrder), global::BI.PaymentMethod.Types.PurchaseOrder.Parser, new[]{ "Name" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SubscriptionMspPricingRequest), global::BI.SubscriptionMspPricingRequest.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SubscriptionMspPricingResponse), global::BI.SubscriptionMspPricingResponse.Parser, new[]{ "Addons", "FilePlans" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SubscriptionMcPricingRequest), global::BI.SubscriptionMcPricingRequest.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SubscriptionMcPricingResponse), global::BI.SubscriptionMcPricingResponse.Parser, new[]{ "BasePlans", "Addons", "FilePlans" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.BasePlan), global::BI.BasePlan.Parser, new[]{ "Id", "Cost" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.Addon), global::BI.Addon.Parser, new[]{ "Id", "Cost", "AmountConsumed" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.FilePlan), global::BI.FilePlan.Parser, new[]{ "Id", "Cost" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.Cost), global::BI.Cost.Parser, new[]{ "Amount", "AmountPer", "Currency" }, null, new[]{ typeof(global::BI.Cost.Types.AmountPer) }, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.InvoiceSearchRequest), global::BI.InvoiceSearchRequest.Parser, new[]{ "Size", "StartingAfterId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.InvoiceSearchResponse), global::BI.InvoiceSearchResponse.Parser, new[]{ "Invoices" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.Invoice), global::BI.Invoice.Parser, new[]{ "Id", "InvoiceNumber", "InvoiceDate", "LicenseCount", "TotalCost", "InvoiceType" }, null, new[]{ typeof(global::BI.Invoice.Types.Type) }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::BI.Invoice.Types.Cost), global::BI.Invoice.Types.Cost.Parser, new[]{ "Amount", "Currency" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.InvoiceDownloadRequest), global::BI.InvoiceDownloadRequest.Parser, new[]{ "InvoiceNumber" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.InvoiceDownloadResponse), global::BI.InvoiceDownloadResponse.Parser, new[]{ "Link", "FileName" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.ReportingDailySnapshotRequest), global::BI.ReportingDailySnapshotRequest.Parser, new[]{ "Month", "Year" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.ReportingDailySnapshotResponse), global::BI.ReportingDailySnapshotResponse.Parser, new[]{ "Records", "McEnterprises" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SnapshotRecord), global::BI.SnapshotRecord.Parser, new[]{ "Date", "McEnterpriseId", "MaxLicenseCount", "MaxFilePlanTypeId", "MaxBasePlanId", "Addons" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::BI.SnapshotRecord.Types.Addon), global::BI.SnapshotRecord.Types.Addon.Parser, new[]{ "MaxAddonId", "Units" }, null, null, null, null)}), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.SnapshotMcEnterprise), global::BI.SnapshotMcEnterprise.Parser, new[]{ "Id", "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.MappingAddonsRequest), global::BI.MappingAddonsRequest.Parser, null, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.MappingAddonsResponse), global::BI.MappingAddonsResponse.Parser, new[]{ "Addons", "FilePlans" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.MappingItem), global::BI.MappingItem.Parser, new[]{ "Id", "Name" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientValidateKeyRequest), global::BI.GradientValidateKeyRequest.Parser, new[]{ "GradientKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientValidateKeyResponse), global::BI.GradientValidateKeyResponse.Parser, new[]{ "Success", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientSaveRequest), global::BI.GradientSaveRequest.Parser, new[]{ "GradientKey", "EnterpriseUserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientSaveResponse), global::BI.GradientSaveResponse.Parser, new[]{ "Success", "Status", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientRemoveRequest), global::BI.GradientRemoveRequest.Parser, new[]{ "EnterpriseUserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientRemoveResponse), global::BI.GradientRemoveResponse.Parser, new[]{ "Success", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientSyncRequest), global::BI.GradientSyncRequest.Parser, new[]{ "EnterpriseUserId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::BI.GradientSyncResponse), global::BI.GradientSyncResponse.Parser, new[]{ "Success", "Status", "Message" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum Currency { + [pbr::OriginalName("UNKNOWN")] Unknown = 0, + [pbr::OriginalName("USD")] Usd = 1, + [pbr::OriginalName("GBP")] Gbp = 2, + [pbr::OriginalName("JPY")] Jpy = 3, + [pbr::OriginalName("EUR")] Eur = 4, + [pbr::OriginalName("AUD")] Aud = 5, + } + + public enum GradientIntegrationStatus { + [pbr::OriginalName("NOTCONNECTED")] Notconnected = 0, + [pbr::OriginalName("PENDING")] Pending = 1, + [pbr::OriginalName("CONNECTED")] Connected = 2, + [pbr::OriginalName("NONE")] None = 3, + } + + #endregion + + #region Messages + public sealed partial class ValidateSessionTokenRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateSessionTokenRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateSessionTokenRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateSessionTokenRequest(ValidateSessionTokenRequest other) : this() { + encryptedSessionToken_ = other.encryptedSessionToken_; + returnMcEnterpiseIds_ = other.returnMcEnterpiseIds_; + ip_ = other.ip_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateSessionTokenRequest Clone() { + return new ValidateSessionTokenRequest(this); + } + + /// Field number for the "encryptedSessionToken" field. + public const int EncryptedSessionTokenFieldNumber = 1; + private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedSessionToken { + get { return encryptedSessionToken_; } + set { + encryptedSessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "returnMcEnterpiseIds" field. + public const int ReturnMcEnterpiseIdsFieldNumber = 2; + private bool returnMcEnterpiseIds_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ReturnMcEnterpiseIds { + get { return returnMcEnterpiseIds_; } + set { + returnMcEnterpiseIds_ = value; + } + } + + /// Field number for the "ip" field. + public const int IpFieldNumber = 3; + private string ip_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Ip { + get { return ip_; } + set { + ip_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ValidateSessionTokenRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ValidateSessionTokenRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedSessionToken != other.EncryptedSessionToken) return false; + if (ReturnMcEnterpiseIds != other.ReturnMcEnterpiseIds) return false; + if (Ip != other.Ip) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); + if (ReturnMcEnterpiseIds != false) hash ^= ReturnMcEnterpiseIds.GetHashCode(); + if (Ip.Length != 0) hash ^= Ip.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } + if (ReturnMcEnterpiseIds != false) { + output.WriteRawTag(16); + output.WriteBool(ReturnMcEnterpiseIds); + } + if (Ip.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Ip); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } + if (ReturnMcEnterpiseIds != false) { + output.WriteRawTag(16); + output.WriteBool(ReturnMcEnterpiseIds); + } + if (Ip.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Ip); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedSessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + } + if (ReturnMcEnterpiseIds != false) { + size += 1 + 1; + } + if (Ip.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Ip); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ValidateSessionTokenRequest other) { + if (other == null) { + return; + } + if (other.EncryptedSessionToken.Length != 0) { + EncryptedSessionToken = other.EncryptedSessionToken; + } + if (other.ReturnMcEnterpiseIds != false) { + ReturnMcEnterpiseIds = other.ReturnMcEnterpiseIds; + } + if (other.Ip.Length != 0) { + Ip = other.Ip; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 16: { + ReturnMcEnterpiseIds = input.ReadBool(); + break; + } + case 26: { + Ip = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 16: { + ReturnMcEnterpiseIds = input.ReadBool(); + break; + } + case 26: { + Ip = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class ValidateSessionTokenResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidateSessionTokenResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateSessionTokenResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateSessionTokenResponse(ValidateSessionTokenResponse other) : this() { + username_ = other.username_; + userId_ = other.userId_; + enterpriseUserId_ = other.enterpriseUserId_; + status_ = other.status_; + statusMessage_ = other.statusMessage_; + mcEnterpriseIds_ = other.mcEnterpriseIds_.Clone(); + hasMSPPermission_ = other.hasMSPPermission_; + deletedMcEnterpriseIds_ = other.deletedMcEnterpriseIds_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidateSessionTokenResponse Clone() { + return new ValidateSessionTokenResponse(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 2; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 3; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 4; + private global::BI.ValidateSessionTokenResponse.Types.Status status_ = global::BI.ValidateSessionTokenResponse.Types.Status.Valid; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.ValidateSessionTokenResponse.Types.Status Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "statusMessage" field. + public const int StatusMessageFieldNumber = 5; + private string statusMessage_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StatusMessage { + get { return statusMessage_; } + set { + statusMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mcEnterpriseIds" field. + public const int McEnterpriseIdsFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_mcEnterpriseIds_codec + = pb::FieldCodec.ForInt32(50); + private readonly pbc::RepeatedField mcEnterpriseIds_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField McEnterpriseIds { + get { return mcEnterpriseIds_; } + } + + /// Field number for the "hasMSPPermission" field. + public const int HasMSPPermissionFieldNumber = 7; + private bool hasMSPPermission_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMSPPermission { + get { return hasMSPPermission_; } + set { + hasMSPPermission_ = value; + } + } + + /// Field number for the "deletedMcEnterpriseIds" field. + public const int DeletedMcEnterpriseIdsFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_deletedMcEnterpriseIds_codec + = pb::FieldCodec.ForInt32(66); + private readonly pbc::RepeatedField deletedMcEnterpriseIds_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DeletedMcEnterpriseIds { + get { return deletedMcEnterpriseIds_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ValidateSessionTokenResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ValidateSessionTokenResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (UserId != other.UserId) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Status != other.Status) return false; + if (StatusMessage != other.StatusMessage) return false; + if(!mcEnterpriseIds_.Equals(other.mcEnterpriseIds_)) return false; + if (HasMSPPermission != other.HasMSPPermission) return false; + if(!deletedMcEnterpriseIds_.Equals(other.deletedMcEnterpriseIds_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Status != global::BI.ValidateSessionTokenResponse.Types.Status.Valid) hash ^= Status.GetHashCode(); + if (StatusMessage.Length != 0) hash ^= StatusMessage.GetHashCode(); + hash ^= mcEnterpriseIds_.GetHashCode(); + if (HasMSPPermission != false) hash ^= HasMSPPermission.GetHashCode(); + hash ^= deletedMcEnterpriseIds_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteInt32(UserId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::BI.ValidateSessionTokenResponse.Types.Status.Valid) { + output.WriteRawTag(32); + output.WriteEnum((int) Status); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + mcEnterpriseIds_.WriteTo(output, _repeated_mcEnterpriseIds_codec); + if (HasMSPPermission != false) { + output.WriteRawTag(56); + output.WriteBool(HasMSPPermission); + } + deletedMcEnterpriseIds_.WriteTo(output, _repeated_deletedMcEnterpriseIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteInt32(UserId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::BI.ValidateSessionTokenResponse.Types.Status.Valid) { + output.WriteRawTag(32); + output.WriteEnum((int) Status); + } + if (StatusMessage.Length != 0) { + output.WriteRawTag(42); + output.WriteString(StatusMessage); + } + mcEnterpriseIds_.WriteTo(ref output, _repeated_mcEnterpriseIds_codec); + if (HasMSPPermission != false) { + output.WriteRawTag(56); + output.WriteBool(HasMSPPermission); + } + deletedMcEnterpriseIds_.WriteTo(ref output, _repeated_deletedMcEnterpriseIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Status != global::BI.ValidateSessionTokenResponse.Types.Status.Valid) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (StatusMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StatusMessage); + } + size += mcEnterpriseIds_.CalculateSize(_repeated_mcEnterpriseIds_codec); + if (HasMSPPermission != false) { + size += 1 + 1; + } + size += deletedMcEnterpriseIds_.CalculateSize(_repeated_deletedMcEnterpriseIds_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ValidateSessionTokenResponse other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Status != global::BI.ValidateSessionTokenResponse.Types.Status.Valid) { + Status = other.Status; + } + if (other.StatusMessage.Length != 0) { + StatusMessage = other.StatusMessage; + } + mcEnterpriseIds_.Add(other.mcEnterpriseIds_); + if (other.HasMSPPermission != false) { + HasMSPPermission = other.HasMSPPermission; + } + deletedMcEnterpriseIds_.Add(other.deletedMcEnterpriseIds_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 16: { + UserId = input.ReadInt32(); + break; + } + case 24: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 32: { + Status = (global::BI.ValidateSessionTokenResponse.Types.Status) input.ReadEnum(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 50: + case 48: { + mcEnterpriseIds_.AddEntriesFrom(input, _repeated_mcEnterpriseIds_codec); + break; + } + case 56: { + HasMSPPermission = input.ReadBool(); + break; + } + case 66: + case 64: { + deletedMcEnterpriseIds_.AddEntriesFrom(input, _repeated_deletedMcEnterpriseIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 16: { + UserId = input.ReadInt32(); + break; + } + case 24: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 32: { + Status = (global::BI.ValidateSessionTokenResponse.Types.Status) input.ReadEnum(); + break; + } + case 42: { + StatusMessage = input.ReadString(); + break; + } + case 50: + case 48: { + mcEnterpriseIds_.AddEntriesFrom(ref input, _repeated_mcEnterpriseIds_codec); + break; + } + case 56: { + HasMSPPermission = input.ReadBool(); + break; + } + case 66: + case 64: { + deletedMcEnterpriseIds_.AddEntriesFrom(ref input, _repeated_deletedMcEnterpriseIds_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the ValidateSessionTokenResponse message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum Status { + [pbr::OriginalName("VALID")] Valid = 0, + [pbr::OriginalName("NOT_VALID")] NotValid = 1, + [pbr::OriginalName("EXPIRED")] Expired = 2, + [pbr::OriginalName("IP_BLOCKED")] IpBlocked = 3, + [pbr::OriginalName("INVALID_CLIENT_VERSION")] InvalidClientVersion = 4, + } + + } + #endregion + + } + + /// + /// -- POST: /bi_api/v2/console/subscription/status gzgb + /// + public sealed partial class SubscriptionStatusRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubscriptionStatusRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionStatusRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionStatusRequest(SubscriptionStatusRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionStatusRequest Clone() { + return new SubscriptionStatusRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SubscriptionStatusRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SubscriptionStatusRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SubscriptionStatusRequest other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class SubscriptionStatusResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubscriptionStatusResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionStatusResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionStatusResponse(SubscriptionStatusResponse other) : this() { + autoRenewal_ = other.autoRenewal_ != null ? other.autoRenewal_.Clone() : null; + currentPaymentMethod_ = other.currentPaymentMethod_ != null ? other.currentPaymentMethod_.Clone() : null; + checkoutLink_ = other.checkoutLink_; + licenseCreateDate_ = other.licenseCreateDate_; + isDistributor_ = other.isDistributor_; + isLegacyMsp_ = other.isLegacyMsp_; + licenseStats_ = other.licenseStats_.Clone(); + gradientStatus_ = other.gradientStatus_; + hideTrialBanner_ = other.hideTrialBanner_; + gradientLastSyncDate_ = other.gradientLastSyncDate_; + gradientNextSyncDate_ = other.gradientNextSyncDate_; + isGradientMappingPending_ = other.isGradientMappingPending_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionStatusResponse Clone() { + return new SubscriptionStatusResponse(this); + } + + /// Field number for the "autoRenewal" field. + public const int AutoRenewalFieldNumber = 1; + private global::BI.AutoRenewal autoRenewal_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.AutoRenewal AutoRenewal { + get { return autoRenewal_; } + set { + autoRenewal_ = value; + } + } + + /// Field number for the "currentPaymentMethod" field. + public const int CurrentPaymentMethodFieldNumber = 2; + private global::BI.PaymentMethod currentPaymentMethod_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod CurrentPaymentMethod { + get { return currentPaymentMethod_; } + set { + currentPaymentMethod_ = value; + } + } + + /// Field number for the "checkoutLink" field. + public const int CheckoutLinkFieldNumber = 3; + private string checkoutLink_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CheckoutLink { + get { return checkoutLink_; } + set { + checkoutLink_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "licenseCreateDate" field. + public const int LicenseCreateDateFieldNumber = 4; + private long licenseCreateDate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LicenseCreateDate { + get { return licenseCreateDate_; } + set { + licenseCreateDate_ = value; + } + } + + /// Field number for the "isDistributor" field. + public const int IsDistributorFieldNumber = 5; + private bool isDistributor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsDistributor { + get { return isDistributor_; } + set { + isDistributor_ = value; + } + } + + /// Field number for the "isLegacyMsp" field. + public const int IsLegacyMspFieldNumber = 6; + private bool isLegacyMsp_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsLegacyMsp { + get { return isLegacyMsp_; } + set { + isLegacyMsp_ = value; + } + } + + /// Field number for the "licenseStats" field. + public const int LicenseStatsFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_licenseStats_codec + = pb::FieldCodec.ForMessage(66, global::BI.LicenseStats.Parser); + private readonly pbc::RepeatedField licenseStats_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LicenseStats { + get { return licenseStats_; } + } + + /// Field number for the "gradientStatus" field. + public const int GradientStatusFieldNumber = 9; + private global::BI.GradientIntegrationStatus gradientStatus_ = global::BI.GradientIntegrationStatus.Notconnected; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.GradientIntegrationStatus GradientStatus { + get { return gradientStatus_; } + set { + gradientStatus_ = value; + } + } + + /// Field number for the "hideTrialBanner" field. + public const int HideTrialBannerFieldNumber = 10; + private bool hideTrialBanner_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HideTrialBanner { + get { return hideTrialBanner_; } + set { + hideTrialBanner_ = value; + } + } + + /// Field number for the "gradientLastSyncDate" field. + public const int GradientLastSyncDateFieldNumber = 11; + private string gradientLastSyncDate_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GradientLastSyncDate { + get { return gradientLastSyncDate_; } + set { + gradientLastSyncDate_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "gradientNextSyncDate" field. + public const int GradientNextSyncDateFieldNumber = 12; + private string gradientNextSyncDate_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GradientNextSyncDate { + get { return gradientNextSyncDate_; } + set { + gradientNextSyncDate_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "isGradientMappingPending" field. + public const int IsGradientMappingPendingFieldNumber = 13; + private bool isGradientMappingPending_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsGradientMappingPending { + get { return isGradientMappingPending_; } + set { + isGradientMappingPending_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SubscriptionStatusResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SubscriptionStatusResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(AutoRenewal, other.AutoRenewal)) return false; + if (!object.Equals(CurrentPaymentMethod, other.CurrentPaymentMethod)) return false; + if (CheckoutLink != other.CheckoutLink) return false; + if (LicenseCreateDate != other.LicenseCreateDate) return false; + if (IsDistributor != other.IsDistributor) return false; + if (IsLegacyMsp != other.IsLegacyMsp) return false; + if(!licenseStats_.Equals(other.licenseStats_)) return false; + if (GradientStatus != other.GradientStatus) return false; + if (HideTrialBanner != other.HideTrialBanner) return false; + if (GradientLastSyncDate != other.GradientLastSyncDate) return false; + if (GradientNextSyncDate != other.GradientNextSyncDate) return false; + if (IsGradientMappingPending != other.IsGradientMappingPending) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (autoRenewal_ != null) hash ^= AutoRenewal.GetHashCode(); + if (currentPaymentMethod_ != null) hash ^= CurrentPaymentMethod.GetHashCode(); + if (CheckoutLink.Length != 0) hash ^= CheckoutLink.GetHashCode(); + if (LicenseCreateDate != 0L) hash ^= LicenseCreateDate.GetHashCode(); + if (IsDistributor != false) hash ^= IsDistributor.GetHashCode(); + if (IsLegacyMsp != false) hash ^= IsLegacyMsp.GetHashCode(); + hash ^= licenseStats_.GetHashCode(); + if (GradientStatus != global::BI.GradientIntegrationStatus.Notconnected) hash ^= GradientStatus.GetHashCode(); + if (HideTrialBanner != false) hash ^= HideTrialBanner.GetHashCode(); + if (GradientLastSyncDate.Length != 0) hash ^= GradientLastSyncDate.GetHashCode(); + if (GradientNextSyncDate.Length != 0) hash ^= GradientNextSyncDate.GetHashCode(); + if (IsGradientMappingPending != false) hash ^= IsGradientMappingPending.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (autoRenewal_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AutoRenewal); + } + if (currentPaymentMethod_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CurrentPaymentMethod); + } + if (CheckoutLink.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CheckoutLink); + } + if (LicenseCreateDate != 0L) { + output.WriteRawTag(32); + output.WriteInt64(LicenseCreateDate); + } + if (IsDistributor != false) { + output.WriteRawTag(40); + output.WriteBool(IsDistributor); + } + if (IsLegacyMsp != false) { + output.WriteRawTag(48); + output.WriteBool(IsLegacyMsp); + } + licenseStats_.WriteTo(output, _repeated_licenseStats_codec); + if (GradientStatus != global::BI.GradientIntegrationStatus.Notconnected) { + output.WriteRawTag(72); + output.WriteEnum((int) GradientStatus); + } + if (HideTrialBanner != false) { + output.WriteRawTag(80); + output.WriteBool(HideTrialBanner); + } + if (GradientLastSyncDate.Length != 0) { + output.WriteRawTag(90); + output.WriteString(GradientLastSyncDate); + } + if (GradientNextSyncDate.Length != 0) { + output.WriteRawTag(98); + output.WriteString(GradientNextSyncDate); + } + if (IsGradientMappingPending != false) { + output.WriteRawTag(104); + output.WriteBool(IsGradientMappingPending); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (autoRenewal_ != null) { + output.WriteRawTag(10); + output.WriteMessage(AutoRenewal); + } + if (currentPaymentMethod_ != null) { + output.WriteRawTag(18); + output.WriteMessage(CurrentPaymentMethod); + } + if (CheckoutLink.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CheckoutLink); + } + if (LicenseCreateDate != 0L) { + output.WriteRawTag(32); + output.WriteInt64(LicenseCreateDate); + } + if (IsDistributor != false) { + output.WriteRawTag(40); + output.WriteBool(IsDistributor); + } + if (IsLegacyMsp != false) { + output.WriteRawTag(48); + output.WriteBool(IsLegacyMsp); + } + licenseStats_.WriteTo(ref output, _repeated_licenseStats_codec); + if (GradientStatus != global::BI.GradientIntegrationStatus.Notconnected) { + output.WriteRawTag(72); + output.WriteEnum((int) GradientStatus); + } + if (HideTrialBanner != false) { + output.WriteRawTag(80); + output.WriteBool(HideTrialBanner); + } + if (GradientLastSyncDate.Length != 0) { + output.WriteRawTag(90); + output.WriteString(GradientLastSyncDate); + } + if (GradientNextSyncDate.Length != 0) { + output.WriteRawTag(98); + output.WriteString(GradientNextSyncDate); + } + if (IsGradientMappingPending != false) { + output.WriteRawTag(104); + output.WriteBool(IsGradientMappingPending); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (autoRenewal_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(AutoRenewal); + } + if (currentPaymentMethod_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(CurrentPaymentMethod); + } + if (CheckoutLink.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CheckoutLink); + } + if (LicenseCreateDate != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LicenseCreateDate); + } + if (IsDistributor != false) { + size += 1 + 1; + } + if (IsLegacyMsp != false) { + size += 1 + 1; + } + size += licenseStats_.CalculateSize(_repeated_licenseStats_codec); + if (GradientStatus != global::BI.GradientIntegrationStatus.Notconnected) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) GradientStatus); + } + if (HideTrialBanner != false) { + size += 1 + 1; + } + if (GradientLastSyncDate.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GradientLastSyncDate); + } + if (GradientNextSyncDate.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GradientNextSyncDate); + } + if (IsGradientMappingPending != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SubscriptionStatusResponse other) { + if (other == null) { + return; + } + if (other.autoRenewal_ != null) { + if (autoRenewal_ == null) { + AutoRenewal = new global::BI.AutoRenewal(); + } + AutoRenewal.MergeFrom(other.AutoRenewal); + } + if (other.currentPaymentMethod_ != null) { + if (currentPaymentMethod_ == null) { + CurrentPaymentMethod = new global::BI.PaymentMethod(); + } + CurrentPaymentMethod.MergeFrom(other.CurrentPaymentMethod); + } + if (other.CheckoutLink.Length != 0) { + CheckoutLink = other.CheckoutLink; + } + if (other.LicenseCreateDate != 0L) { + LicenseCreateDate = other.LicenseCreateDate; + } + if (other.IsDistributor != false) { + IsDistributor = other.IsDistributor; + } + if (other.IsLegacyMsp != false) { + IsLegacyMsp = other.IsLegacyMsp; + } + licenseStats_.Add(other.licenseStats_); + if (other.GradientStatus != global::BI.GradientIntegrationStatus.Notconnected) { + GradientStatus = other.GradientStatus; + } + if (other.HideTrialBanner != false) { + HideTrialBanner = other.HideTrialBanner; + } + if (other.GradientLastSyncDate.Length != 0) { + GradientLastSyncDate = other.GradientLastSyncDate; + } + if (other.GradientNextSyncDate.Length != 0) { + GradientNextSyncDate = other.GradientNextSyncDate; + } + if (other.IsGradientMappingPending != false) { + IsGradientMappingPending = other.IsGradientMappingPending; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (autoRenewal_ == null) { + AutoRenewal = new global::BI.AutoRenewal(); + } + input.ReadMessage(AutoRenewal); + break; + } + case 18: { + if (currentPaymentMethod_ == null) { + CurrentPaymentMethod = new global::BI.PaymentMethod(); + } + input.ReadMessage(CurrentPaymentMethod); + break; + } + case 26: { + CheckoutLink = input.ReadString(); + break; + } + case 32: { + LicenseCreateDate = input.ReadInt64(); + break; + } + case 40: { + IsDistributor = input.ReadBool(); + break; + } + case 48: { + IsLegacyMsp = input.ReadBool(); + break; + } + case 66: { + licenseStats_.AddEntriesFrom(input, _repeated_licenseStats_codec); + break; + } + case 72: { + GradientStatus = (global::BI.GradientIntegrationStatus) input.ReadEnum(); + break; + } + case 80: { + HideTrialBanner = input.ReadBool(); + break; + } + case 90: { + GradientLastSyncDate = input.ReadString(); + break; + } + case 98: { + GradientNextSyncDate = input.ReadString(); + break; + } + case 104: { + IsGradientMappingPending = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (autoRenewal_ == null) { + AutoRenewal = new global::BI.AutoRenewal(); + } + input.ReadMessage(AutoRenewal); + break; + } + case 18: { + if (currentPaymentMethod_ == null) { + CurrentPaymentMethod = new global::BI.PaymentMethod(); + } + input.ReadMessage(CurrentPaymentMethod); + break; + } + case 26: { + CheckoutLink = input.ReadString(); + break; + } + case 32: { + LicenseCreateDate = input.ReadInt64(); + break; + } + case 40: { + IsDistributor = input.ReadBool(); + break; + } + case 48: { + IsLegacyMsp = input.ReadBool(); + break; + } + case 66: { + licenseStats_.AddEntriesFrom(ref input, _repeated_licenseStats_codec); + break; + } + case 72: { + GradientStatus = (global::BI.GradientIntegrationStatus) input.ReadEnum(); + break; + } + case 80: { + HideTrialBanner = input.ReadBool(); + break; + } + case 90: { + GradientLastSyncDate = input.ReadString(); + break; + } + case 98: { + GradientNextSyncDate = input.ReadString(); + break; + } + case 104: { + IsGradientMappingPending = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + public sealed partial class LicenseStats : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LicenseStats()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicenseStats() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicenseStats(LicenseStats other) : this() { + type_ = other.type_; + available_ = other.available_; + used_ = other.used_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicenseStats Clone() { + return new LicenseStats(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private global::BI.LicenseStats.Types.Type type_ = global::BI.LicenseStats.Types.Type.LicenseStatUnknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.LicenseStats.Types.Type Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "available" field. + public const int AvailableFieldNumber = 2; + private int available_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Available { + get { return available_; } + set { + available_ = value; + } + } + + /// Field number for the "used" field. + public const int UsedFieldNumber = 3; + private int used_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Used { + get { return used_; } + set { + used_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LicenseStats); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LicenseStats other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Available != other.Available) return false; + if (Used != other.Used) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type != global::BI.LicenseStats.Types.Type.LicenseStatUnknown) hash ^= Type.GetHashCode(); + if (Available != 0) hash ^= Available.GetHashCode(); + if (Used != 0) hash ^= Used.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type != global::BI.LicenseStats.Types.Type.LicenseStatUnknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (Available != 0) { + output.WriteRawTag(16); + output.WriteInt32(Available); + } + if (Used != 0) { + output.WriteRawTag(24); + output.WriteInt32(Used); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type != global::BI.LicenseStats.Types.Type.LicenseStatUnknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (Available != 0) { + output.WriteRawTag(16); + output.WriteInt32(Available); + } + if (Used != 0) { + output.WriteRawTag(24); + output.WriteInt32(Used); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type != global::BI.LicenseStats.Types.Type.LicenseStatUnknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (Available != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Available); + } + if (Used != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Used); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LicenseStats other) { + if (other == null) { + return; + } + if (other.Type != global::BI.LicenseStats.Types.Type.LicenseStatUnknown) { + Type = other.Type; + } + if (other.Available != 0) { + Available = other.Available; + } + if (other.Used != 0) { + Used = other.Used; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Type = (global::BI.LicenseStats.Types.Type) input.ReadEnum(); + break; + } + case 16: { + Available = input.ReadInt32(); + break; + } + case 24: { + Used = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Type = (global::BI.LicenseStats.Types.Type) input.ReadEnum(); + break; + } + case 16: { + Available = input.ReadInt32(); + break; + } + case 24: { + Used = input.ReadInt32(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the LicenseStats message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum Type { + [pbr::OriginalName("LICENSE_STAT_UNKNOWN")] LicenseStatUnknown = 0, + [pbr::OriginalName("MSP_BASE")] MspBase = 1, + [pbr::OriginalName("MC_BUSINESS")] McBusiness = 2, + [pbr::OriginalName("MC_BUSINESS_PLUS")] McBusinessPlus = 3, + [pbr::OriginalName("MC_ENTERPRISE")] McEnterprise = 4, + [pbr::OriginalName("MC_ENTERPRISE_PLUS")] McEnterprisePlus = 5, + } + + } + #endregion + + } + + public sealed partial class AutoRenewal : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AutoRenewal()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AutoRenewal() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AutoRenewal(AutoRenewal other) : this() { + nextOn_ = other.nextOn_; + daysLeft_ = other.daysLeft_; + isTrial_ = other.isTrial_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AutoRenewal Clone() { + return new AutoRenewal(this); + } + + /// Field number for the "nextOn" field. + public const int NextOnFieldNumber = 1; + private long nextOn_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NextOn { + get { return nextOn_; } + set { + nextOn_ = value; + } + } + + /// Field number for the "daysLeft" field. + public const int DaysLeftFieldNumber = 2; + private int daysLeft_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int DaysLeft { + get { return daysLeft_; } + set { + daysLeft_ = value; + } + } + + /// Field number for the "isTrial" field. + public const int IsTrialFieldNumber = 3; + private bool isTrial_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsTrial { + get { return isTrial_; } + set { + isTrial_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AutoRenewal); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AutoRenewal other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NextOn != other.NextOn) return false; + if (DaysLeft != other.DaysLeft) return false; + if (IsTrial != other.IsTrial) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NextOn != 0L) hash ^= NextOn.GetHashCode(); + if (DaysLeft != 0) hash ^= DaysLeft.GetHashCode(); + if (IsTrial != false) hash ^= IsTrial.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NextOn != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NextOn); + } + if (DaysLeft != 0) { + output.WriteRawTag(16); + output.WriteInt32(DaysLeft); + } + if (IsTrial != false) { + output.WriteRawTag(24); + output.WriteBool(IsTrial); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NextOn != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NextOn); + } + if (DaysLeft != 0) { + output.WriteRawTag(16); + output.WriteInt32(DaysLeft); + } + if (IsTrial != false) { + output.WriteRawTag(24); + output.WriteBool(IsTrial); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NextOn != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NextOn); + } + if (DaysLeft != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(DaysLeft); + } + if (IsTrial != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AutoRenewal other) { + if (other == null) { + return; + } + if (other.NextOn != 0L) { + NextOn = other.NextOn; + } + if (other.DaysLeft != 0) { + DaysLeft = other.DaysLeft; + } + if (other.IsTrial != false) { + IsTrial = other.IsTrial; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NextOn = input.ReadInt64(); + break; + } + case 16: { + DaysLeft = input.ReadInt32(); + break; + } + case 24: { + IsTrial = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NextOn = input.ReadInt64(); + break; + } + case 16: { + DaysLeft = input.ReadInt32(); + break; + } + case 24: { + IsTrial = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + public sealed partial class PaymentMethod : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PaymentMethod()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PaymentMethod() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PaymentMethod(PaymentMethod other) : this() { + type_ = other.type_; + card_ = other.card_ != null ? other.card_.Clone() : null; + sepa_ = other.sepa_ != null ? other.sepa_.Clone() : null; + paypal_ = other.paypal_ != null ? other.paypal_.Clone() : null; + failedBilling_ = other.failedBilling_; + vendor_ = other.vendor_ != null ? other.vendor_.Clone() : null; + purchaseOrder_ = other.purchaseOrder_ != null ? other.purchaseOrder_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PaymentMethod Clone() { + return new PaymentMethod(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private global::BI.PaymentMethod.Types.Type type_ = global::BI.PaymentMethod.Types.Type.Card; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod.Types.Type Type { + get { return type_; } + set { + type_ = value; + } + } + + /// Field number for the "card" field. + public const int CardFieldNumber = 2; + private global::BI.PaymentMethod.Types.Card card_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod.Types.Card Card { + get { return card_; } + set { + card_ = value; + } + } + + /// Field number for the "sepa" field. + public const int SepaFieldNumber = 3; + private global::BI.PaymentMethod.Types.Sepa sepa_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod.Types.Sepa Sepa { + get { return sepa_; } + set { + sepa_ = value; + } + } + + /// Field number for the "paypal" field. + public const int PaypalFieldNumber = 4; + private global::BI.PaymentMethod.Types.Paypal paypal_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod.Types.Paypal Paypal { + get { return paypal_; } + set { + paypal_ = value; + } + } + + /// Field number for the "failedBilling" field. + public const int FailedBillingFieldNumber = 5; + private bool failedBilling_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FailedBilling { + get { return failedBilling_; } + set { + failedBilling_ = value; + } + } + + /// Field number for the "vendor" field. + public const int VendorFieldNumber = 6; + private global::BI.PaymentMethod.Types.Vendor vendor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod.Types.Vendor Vendor { + get { return vendor_; } + set { + vendor_ = value; + } + } + + /// Field number for the "purchaseOrder" field. + public const int PurchaseOrderFieldNumber = 7; + private global::BI.PaymentMethod.Types.PurchaseOrder purchaseOrder_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.PaymentMethod.Types.PurchaseOrder PurchaseOrder { + get { return purchaseOrder_; } + set { + purchaseOrder_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PaymentMethod); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PaymentMethod other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (!object.Equals(Card, other.Card)) return false; + if (!object.Equals(Sepa, other.Sepa)) return false; + if (!object.Equals(Paypal, other.Paypal)) return false; + if (FailedBilling != other.FailedBilling) return false; + if (!object.Equals(Vendor, other.Vendor)) return false; + if (!object.Equals(PurchaseOrder, other.PurchaseOrder)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type != global::BI.PaymentMethod.Types.Type.Card) hash ^= Type.GetHashCode(); + if (card_ != null) hash ^= Card.GetHashCode(); + if (sepa_ != null) hash ^= Sepa.GetHashCode(); + if (paypal_ != null) hash ^= Paypal.GetHashCode(); + if (FailedBilling != false) hash ^= FailedBilling.GetHashCode(); + if (vendor_ != null) hash ^= Vendor.GetHashCode(); + if (purchaseOrder_ != null) hash ^= PurchaseOrder.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type != global::BI.PaymentMethod.Types.Type.Card) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (card_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Card); + } + if (sepa_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Sepa); + } + if (paypal_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Paypal); + } + if (FailedBilling != false) { + output.WriteRawTag(40); + output.WriteBool(FailedBilling); + } + if (vendor_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Vendor); + } + if (purchaseOrder_ != null) { + output.WriteRawTag(58); + output.WriteMessage(PurchaseOrder); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type != global::BI.PaymentMethod.Types.Type.Card) { + output.WriteRawTag(8); + output.WriteEnum((int) Type); + } + if (card_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Card); + } + if (sepa_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Sepa); + } + if (paypal_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Paypal); + } + if (FailedBilling != false) { + output.WriteRawTag(40); + output.WriteBool(FailedBilling); + } + if (vendor_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Vendor); + } + if (purchaseOrder_ != null) { + output.WriteRawTag(58); + output.WriteMessage(PurchaseOrder); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type != global::BI.PaymentMethod.Types.Type.Card) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); + } + if (card_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Card); + } + if (sepa_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Sepa); + } + if (paypal_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Paypal); + } + if (FailedBilling != false) { + size += 1 + 1; + } + if (vendor_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Vendor); + } + if (purchaseOrder_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(PurchaseOrder); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PaymentMethod other) { + if (other == null) { + return; + } + if (other.Type != global::BI.PaymentMethod.Types.Type.Card) { + Type = other.Type; + } + if (other.card_ != null) { + if (card_ == null) { + Card = new global::BI.PaymentMethod.Types.Card(); + } + Card.MergeFrom(other.Card); + } + if (other.sepa_ != null) { + if (sepa_ == null) { + Sepa = new global::BI.PaymentMethod.Types.Sepa(); + } + Sepa.MergeFrom(other.Sepa); + } + if (other.paypal_ != null) { + if (paypal_ == null) { + Paypal = new global::BI.PaymentMethod.Types.Paypal(); + } + Paypal.MergeFrom(other.Paypal); + } + if (other.FailedBilling != false) { + FailedBilling = other.FailedBilling; + } + if (other.vendor_ != null) { + if (vendor_ == null) { + Vendor = new global::BI.PaymentMethod.Types.Vendor(); + } + Vendor.MergeFrom(other.Vendor); + } + if (other.purchaseOrder_ != null) { + if (purchaseOrder_ == null) { + PurchaseOrder = new global::BI.PaymentMethod.Types.PurchaseOrder(); + } + PurchaseOrder.MergeFrom(other.PurchaseOrder); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Type = (global::BI.PaymentMethod.Types.Type) input.ReadEnum(); + break; + } + case 18: { + if (card_ == null) { + Card = new global::BI.PaymentMethod.Types.Card(); + } + input.ReadMessage(Card); + break; + } + case 26: { + if (sepa_ == null) { + Sepa = new global::BI.PaymentMethod.Types.Sepa(); + } + input.ReadMessage(Sepa); + break; + } + case 34: { + if (paypal_ == null) { + Paypal = new global::BI.PaymentMethod.Types.Paypal(); + } + input.ReadMessage(Paypal); + break; + } + case 40: { + FailedBilling = input.ReadBool(); + break; + } + case 50: { + if (vendor_ == null) { + Vendor = new global::BI.PaymentMethod.Types.Vendor(); + } + input.ReadMessage(Vendor); + break; + } + case 58: { + if (purchaseOrder_ == null) { + PurchaseOrder = new global::BI.PaymentMethod.Types.PurchaseOrder(); + } + input.ReadMessage(PurchaseOrder); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Type = (global::BI.PaymentMethod.Types.Type) input.ReadEnum(); + break; + } + case 18: { + if (card_ == null) { + Card = new global::BI.PaymentMethod.Types.Card(); + } + input.ReadMessage(Card); + break; + } + case 26: { + if (sepa_ == null) { + Sepa = new global::BI.PaymentMethod.Types.Sepa(); + } + input.ReadMessage(Sepa); + break; + } + case 34: { + if (paypal_ == null) { + Paypal = new global::BI.PaymentMethod.Types.Paypal(); + } + input.ReadMessage(Paypal); + break; + } + case 40: { + FailedBilling = input.ReadBool(); + break; + } + case 50: { + if (vendor_ == null) { + Vendor = new global::BI.PaymentMethod.Types.Vendor(); + } + input.ReadMessage(Vendor); + break; + } + case 58: { + if (purchaseOrder_ == null) { + PurchaseOrder = new global::BI.PaymentMethod.Types.PurchaseOrder(); + } + input.ReadMessage(PurchaseOrder); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the PaymentMethod message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum Type { + [pbr::OriginalName("CARD")] Card = 0, + [pbr::OriginalName("SEPA")] Sepa = 1, + [pbr::OriginalName("PAYPAL")] Paypal = 2, + [pbr::OriginalName("NONE")] None = 3, + [pbr::OriginalName("VENDOR")] Vendor = 4, + [pbr::OriginalName("PURCHASEORDER")] Purchaseorder = 5, + } + + public sealed partial class Card : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Card()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.PaymentMethod.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Card() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Card(Card other) : this() { + last4_ = other.last4_; + brand_ = other.brand_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Card Clone() { + return new Card(this); + } + + /// Field number for the "last4" field. + public const int Last4FieldNumber = 1; + private string last4_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Last4 { + get { return last4_; } + set { + last4_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "brand" field. + public const int BrandFieldNumber = 2; + private string brand_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Brand { + get { return brand_; } + set { + brand_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Card); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Card other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Last4 != other.Last4) return false; + if (Brand != other.Brand) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Last4.Length != 0) hash ^= Last4.GetHashCode(); + if (Brand.Length != 0) hash ^= Brand.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Last4.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Last4); + } + if (Brand.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Brand); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Last4.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Last4); + } + if (Brand.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Brand); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Last4.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Last4); + } + if (Brand.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Brand); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Card other) { + if (other == null) { + return; + } + if (other.Last4.Length != 0) { + Last4 = other.Last4; + } + if (other.Brand.Length != 0) { + Brand = other.Brand; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Last4 = input.ReadString(); + break; + } + case 18: { + Brand = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Last4 = input.ReadString(); + break; + } + case 18: { + Brand = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class Sepa : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Sepa()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.PaymentMethod.Descriptor.NestedTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Sepa() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Sepa(Sepa other) : this() { + last4_ = other.last4_; + country_ = other.country_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Sepa Clone() { + return new Sepa(this); + } + + /// Field number for the "last4" field. + public const int Last4FieldNumber = 1; + private string last4_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Last4 { + get { return last4_; } + set { + last4_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "country" field. + public const int CountryFieldNumber = 2; + private string country_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Country { + get { return country_; } + set { + country_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Sepa); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Sepa other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Last4 != other.Last4) return false; + if (Country != other.Country) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Last4.Length != 0) hash ^= Last4.GetHashCode(); + if (Country.Length != 0) hash ^= Country.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Last4.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Last4); + } + if (Country.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Country); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Last4.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Last4); + } + if (Country.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Country); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Last4.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Last4); + } + if (Country.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Country); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Sepa other) { + if (other == null) { + return; + } + if (other.Last4.Length != 0) { + Last4 = other.Last4; + } + if (other.Country.Length != 0) { + Country = other.Country; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Last4 = input.ReadString(); + break; + } + case 18: { + Country = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Last4 = input.ReadString(); + break; + } + case 18: { + Country = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class Paypal : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Paypal()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.PaymentMethod.Descriptor.NestedTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Paypal() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Paypal(Paypal other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Paypal Clone() { + return new Paypal(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Paypal); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Paypal other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Paypal other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class Vendor : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Vendor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.PaymentMethod.Descriptor.NestedTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Vendor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Vendor(Vendor other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Vendor Clone() { + return new Vendor(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Vendor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Vendor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Vendor other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class PurchaseOrder : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PurchaseOrder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.PaymentMethod.Descriptor.NestedTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PurchaseOrder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PurchaseOrder(PurchaseOrder other) : this() { + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PurchaseOrder Clone() { + return new PurchaseOrder(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PurchaseOrder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PurchaseOrder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PurchaseOrder other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// -- POST: /bi_api/v2/console/subscription/mc_pricing + /// + public sealed partial class SubscriptionMspPricingRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubscriptionMspPricingRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMspPricingRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMspPricingRequest(SubscriptionMspPricingRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMspPricingRequest Clone() { + return new SubscriptionMspPricingRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SubscriptionMspPricingRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SubscriptionMspPricingRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SubscriptionMspPricingRequest other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class SubscriptionMspPricingResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubscriptionMspPricingResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMspPricingResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMspPricingResponse(SubscriptionMspPricingResponse other) : this() { + addons_ = other.addons_.Clone(); + filePlans_ = other.filePlans_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMspPricingResponse Clone() { + return new SubscriptionMspPricingResponse(this); + } + + /// Field number for the "addons" field. + public const int AddonsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_addons_codec + = pb::FieldCodec.ForMessage(18, global::BI.Addon.Parser); + private readonly pbc::RepeatedField addons_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Addons { + get { return addons_; } + } + + /// Field number for the "filePlans" field. + public const int FilePlansFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_filePlans_codec + = pb::FieldCodec.ForMessage(26, global::BI.FilePlan.Parser); + private readonly pbc::RepeatedField filePlans_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FilePlans { + get { return filePlans_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SubscriptionMspPricingResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SubscriptionMspPricingResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!addons_.Equals(other.addons_)) return false; + if(!filePlans_.Equals(other.filePlans_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= addons_.GetHashCode(); + hash ^= filePlans_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + addons_.WriteTo(output, _repeated_addons_codec); + filePlans_.WriteTo(output, _repeated_filePlans_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + addons_.WriteTo(ref output, _repeated_addons_codec); + filePlans_.WriteTo(ref output, _repeated_filePlans_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += addons_.CalculateSize(_repeated_addons_codec); + size += filePlans_.CalculateSize(_repeated_filePlans_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SubscriptionMspPricingResponse other) { + if (other == null) { + return; + } + addons_.Add(other.addons_); + filePlans_.Add(other.filePlans_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 18: { + addons_.AddEntriesFrom(input, _repeated_addons_codec); + break; + } + case 26: { + filePlans_.AddEntriesFrom(input, _repeated_filePlans_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + addons_.AddEntriesFrom(ref input, _repeated_addons_codec); + break; + } + case 26: { + filePlans_.AddEntriesFrom(ref input, _repeated_filePlans_codec); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/console/subscription/mc_pricing + /// + public sealed partial class SubscriptionMcPricingRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubscriptionMcPricingRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMcPricingRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMcPricingRequest(SubscriptionMcPricingRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMcPricingRequest Clone() { + return new SubscriptionMcPricingRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SubscriptionMcPricingRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SubscriptionMcPricingRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SubscriptionMcPricingRequest other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class SubscriptionMcPricingResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SubscriptionMcPricingResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMcPricingResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMcPricingResponse(SubscriptionMcPricingResponse other) : this() { + basePlans_ = other.basePlans_.Clone(); + addons_ = other.addons_.Clone(); + filePlans_ = other.filePlans_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SubscriptionMcPricingResponse Clone() { + return new SubscriptionMcPricingResponse(this); + } + + /// Field number for the "basePlans" field. + public const int BasePlansFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_basePlans_codec + = pb::FieldCodec.ForMessage(10, global::BI.BasePlan.Parser); + private readonly pbc::RepeatedField basePlans_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField BasePlans { + get { return basePlans_; } + } + + /// Field number for the "addons" field. + public const int AddonsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_addons_codec + = pb::FieldCodec.ForMessage(18, global::BI.Addon.Parser); + private readonly pbc::RepeatedField addons_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Addons { + get { return addons_; } + } + + /// Field number for the "filePlans" field. + public const int FilePlansFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_filePlans_codec + = pb::FieldCodec.ForMessage(26, global::BI.FilePlan.Parser); + private readonly pbc::RepeatedField filePlans_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FilePlans { + get { return filePlans_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SubscriptionMcPricingResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SubscriptionMcPricingResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!basePlans_.Equals(other.basePlans_)) return false; + if(!addons_.Equals(other.addons_)) return false; + if(!filePlans_.Equals(other.filePlans_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= basePlans_.GetHashCode(); + hash ^= addons_.GetHashCode(); + hash ^= filePlans_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + basePlans_.WriteTo(output, _repeated_basePlans_codec); + addons_.WriteTo(output, _repeated_addons_codec); + filePlans_.WriteTo(output, _repeated_filePlans_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + basePlans_.WriteTo(ref output, _repeated_basePlans_codec); + addons_.WriteTo(ref output, _repeated_addons_codec); + filePlans_.WriteTo(ref output, _repeated_filePlans_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += basePlans_.CalculateSize(_repeated_basePlans_codec); + size += addons_.CalculateSize(_repeated_addons_codec); + size += filePlans_.CalculateSize(_repeated_filePlans_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SubscriptionMcPricingResponse other) { + if (other == null) { + return; + } + basePlans_.Add(other.basePlans_); + addons_.Add(other.addons_); + filePlans_.Add(other.filePlans_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + basePlans_.AddEntriesFrom(input, _repeated_basePlans_codec); + break; + } + case 18: { + addons_.AddEntriesFrom(input, _repeated_addons_codec); + break; + } + case 26: { + filePlans_.AddEntriesFrom(input, _repeated_filePlans_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + basePlans_.AddEntriesFrom(ref input, _repeated_basePlans_codec); + break; + } + case 18: { + addons_.AddEntriesFrom(ref input, _repeated_addons_codec); + break; + } + case 26: { + filePlans_.AddEntriesFrom(ref input, _repeated_filePlans_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class BasePlan : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BasePlan()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BasePlan() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BasePlan(BasePlan other) : this() { + id_ = other.id_; + cost_ = other.cost_ != null ? other.cost_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BasePlan Clone() { + return new BasePlan(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "cost" field. + public const int CostFieldNumber = 2; + private global::BI.Cost cost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Cost Cost { + get { return cost_; } + set { + cost_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BasePlan); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BasePlan other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!object.Equals(Cost, other.Cost)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (cost_ != null) hash ^= Cost.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (cost_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Cost); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (cost_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Cost); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (cost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Cost); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BasePlan other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.cost_ != null) { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + Cost.MergeFrom(other.Cost); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + input.ReadMessage(Cost); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + input.ReadMessage(Cost); + break; + } + } + } + } + #endif + + } + + public sealed partial class Addon : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Addon()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Addon() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Addon(Addon other) : this() { + id_ = other.id_; + cost_ = other.cost_ != null ? other.cost_.Clone() : null; + amountConsumed_ = other.amountConsumed_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Addon Clone() { + return new Addon(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "cost" field. + public const int CostFieldNumber = 2; + private global::BI.Cost cost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Cost Cost { + get { return cost_; } + set { + cost_ = value; + } + } + + /// Field number for the "amountConsumed" field. + public const int AmountConsumedFieldNumber = 3; + private long amountConsumed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AmountConsumed { + get { return amountConsumed_; } + set { + amountConsumed_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Addon); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Addon other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!object.Equals(Cost, other.Cost)) return false; + if (AmountConsumed != other.AmountConsumed) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (cost_ != null) hash ^= Cost.GetHashCode(); + if (AmountConsumed != 0L) hash ^= AmountConsumed.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (cost_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Cost); + } + if (AmountConsumed != 0L) { + output.WriteRawTag(24); + output.WriteInt64(AmountConsumed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (cost_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Cost); + } + if (AmountConsumed != 0L) { + output.WriteRawTag(24); + output.WriteInt64(AmountConsumed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (cost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Cost); + } + if (AmountConsumed != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AmountConsumed); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Addon other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.cost_ != null) { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + Cost.MergeFrom(other.Cost); + } + if (other.AmountConsumed != 0L) { + AmountConsumed = other.AmountConsumed; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + input.ReadMessage(Cost); + break; + } + case 24: { + AmountConsumed = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + input.ReadMessage(Cost); + break; + } + case 24: { + AmountConsumed = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class FilePlan : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FilePlan()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilePlan() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilePlan(FilePlan other) : this() { + id_ = other.id_; + cost_ = other.cost_ != null ? other.cost_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilePlan Clone() { + return new FilePlan(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "cost" field. + public const int CostFieldNumber = 2; + private global::BI.Cost cost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Cost Cost { + get { return cost_; } + set { + cost_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FilePlan); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FilePlan other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (!object.Equals(Cost, other.Cost)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (cost_ != null) hash ^= Cost.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (cost_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Cost); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (cost_ != null) { + output.WriteRawTag(18); + output.WriteMessage(Cost); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (cost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Cost); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FilePlan other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.cost_ != null) { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + Cost.MergeFrom(other.Cost); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + input.ReadMessage(Cost); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + if (cost_ == null) { + Cost = new global::BI.Cost(); + } + input.ReadMessage(Cost); + break; + } + } + } + } + #endif + + } + + public sealed partial class Cost : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Cost()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Cost() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Cost(Cost other) : this() { + amount_ = other.amount_; + amountPer_ = other.amountPer_; + currency_ = other.currency_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Cost Clone() { + return new Cost(this); + } + + /// Field number for the "amount" field. + public const int AmountFieldNumber = 3; + private double amount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Amount { + get { return amount_; } + set { + amount_ = value; + } + } + + /// Field number for the "amountPer" field. + public const int AmountPerFieldNumber = 4; + private global::BI.Cost.Types.AmountPer amountPer_ = global::BI.Cost.Types.AmountPer.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Cost.Types.AmountPer AmountPer { + get { return amountPer_; } + set { + amountPer_ = value; + } + } + + /// Field number for the "currency" field. + public const int CurrencyFieldNumber = 5; + private global::BI.Currency currency_ = global::BI.Currency.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Currency Currency { + get { return currency_; } + set { + currency_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Cost); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Cost other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Amount, other.Amount)) return false; + if (AmountPer != other.AmountPer) return false; + if (Currency != other.Currency) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Amount != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Amount); + if (AmountPer != global::BI.Cost.Types.AmountPer.Unknown) hash ^= AmountPer.GetHashCode(); + if (Currency != global::BI.Currency.Unknown) hash ^= Currency.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Amount != 0D) { + output.WriteRawTag(25); + output.WriteDouble(Amount); + } + if (AmountPer != global::BI.Cost.Types.AmountPer.Unknown) { + output.WriteRawTag(32); + output.WriteEnum((int) AmountPer); + } + if (Currency != global::BI.Currency.Unknown) { + output.WriteRawTag(40); + output.WriteEnum((int) Currency); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Amount != 0D) { + output.WriteRawTag(25); + output.WriteDouble(Amount); + } + if (AmountPer != global::BI.Cost.Types.AmountPer.Unknown) { + output.WriteRawTag(32); + output.WriteEnum((int) AmountPer); + } + if (Currency != global::BI.Currency.Unknown) { + output.WriteRawTag(40); + output.WriteEnum((int) Currency); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Amount != 0D) { + size += 1 + 8; + } + if (AmountPer != global::BI.Cost.Types.AmountPer.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) AmountPer); + } + if (Currency != global::BI.Currency.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Currency); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Cost other) { + if (other == null) { + return; + } + if (other.Amount != 0D) { + Amount = other.Amount; + } + if (other.AmountPer != global::BI.Cost.Types.AmountPer.Unknown) { + AmountPer = other.AmountPer; + } + if (other.Currency != global::BI.Currency.Unknown) { + Currency = other.Currency; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 25: { + Amount = input.ReadDouble(); + break; + } + case 32: { + AmountPer = (global::BI.Cost.Types.AmountPer) input.ReadEnum(); + break; + } + case 40: { + Currency = (global::BI.Currency) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 25: { + Amount = input.ReadDouble(); + break; + } + case 32: { + AmountPer = (global::BI.Cost.Types.AmountPer) input.ReadEnum(); + break; + } + case 40: { + Currency = (global::BI.Currency) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Cost message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum AmountPer { + [pbr::OriginalName("UNKNOWN")] Unknown = 0, + [pbr::OriginalName("MONTH")] Month = 1, + [pbr::OriginalName("USER_MONTH")] UserMonth = 2, + [pbr::OriginalName("USER_CONSUMED_MONTH")] UserConsumedMonth = 3, + } + + } + #endregion + + } + + /// + /// -- POST: /bi_api/v2/console/invoice/search + /// + public sealed partial class InvoiceSearchRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InvoiceSearchRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceSearchRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceSearchRequest(InvoiceSearchRequest other) : this() { + size_ = other.size_; + startingAfterId_ = other.startingAfterId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceSearchRequest Clone() { + return new InvoiceSearchRequest(this); + } + + /// Field number for the "size" field. + public const int SizeFieldNumber = 1; + private int size_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Size { + get { return size_; } + set { + size_ = value; + } + } + + /// Field number for the "startingAfterId" field. + public const int StartingAfterIdFieldNumber = 2; + private int startingAfterId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int StartingAfterId { + get { return startingAfterId_; } + set { + startingAfterId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InvoiceSearchRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InvoiceSearchRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Size != other.Size) return false; + if (StartingAfterId != other.StartingAfterId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Size != 0) hash ^= Size.GetHashCode(); + if (StartingAfterId != 0) hash ^= StartingAfterId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Size != 0) { + output.WriteRawTag(8); + output.WriteInt32(Size); + } + if (StartingAfterId != 0) { + output.WriteRawTag(16); + output.WriteInt32(StartingAfterId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Size != 0) { + output.WriteRawTag(8); + output.WriteInt32(Size); + } + if (StartingAfterId != 0) { + output.WriteRawTag(16); + output.WriteInt32(StartingAfterId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Size != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Size); + } + if (StartingAfterId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(StartingAfterId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InvoiceSearchRequest other) { + if (other == null) { + return; + } + if (other.Size != 0) { + Size = other.Size; + } + if (other.StartingAfterId != 0) { + StartingAfterId = other.StartingAfterId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Size = input.ReadInt32(); + break; + } + case 16: { + StartingAfterId = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Size = input.ReadInt32(); + break; + } + case 16: { + StartingAfterId = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + public sealed partial class InvoiceSearchResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InvoiceSearchResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceSearchResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceSearchResponse(InvoiceSearchResponse other) : this() { + invoices_ = other.invoices_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceSearchResponse Clone() { + return new InvoiceSearchResponse(this); + } + + /// Field number for the "invoices" field. + public const int InvoicesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_invoices_codec + = pb::FieldCodec.ForMessage(10, global::BI.Invoice.Parser); + private readonly pbc::RepeatedField invoices_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Invoices { + get { return invoices_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InvoiceSearchResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InvoiceSearchResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!invoices_.Equals(other.invoices_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= invoices_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + invoices_.WriteTo(output, _repeated_invoices_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + invoices_.WriteTo(ref output, _repeated_invoices_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += invoices_.CalculateSize(_repeated_invoices_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InvoiceSearchResponse other) { + if (other == null) { + return; + } + invoices_.Add(other.invoices_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + invoices_.AddEntriesFrom(input, _repeated_invoices_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + invoices_.AddEntriesFrom(ref input, _repeated_invoices_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class Invoice : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Invoice()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Invoice() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Invoice(Invoice other) : this() { + id_ = other.id_; + invoiceNumber_ = other.invoiceNumber_; + invoiceDate_ = other.invoiceDate_; + licenseCount_ = other.licenseCount_; + totalCost_ = other.totalCost_ != null ? other.totalCost_.Clone() : null; + invoiceType_ = other.invoiceType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Invoice Clone() { + return new Invoice(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "invoiceNumber" field. + public const int InvoiceNumberFieldNumber = 2; + private string invoiceNumber_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InvoiceNumber { + get { return invoiceNumber_; } + set { + invoiceNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "invoiceDate" field. + public const int InvoiceDateFieldNumber = 3; + private long invoiceDate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long InvoiceDate { + get { return invoiceDate_; } + set { + invoiceDate_ = value; + } + } + + /// Field number for the "licenseCount" field. + public const int LicenseCountFieldNumber = 4; + private int licenseCount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int LicenseCount { + get { return licenseCount_; } + set { + licenseCount_ = value; + } + } + + /// Field number for the "totalCost" field. + public const int TotalCostFieldNumber = 5; + private global::BI.Invoice.Types.Cost totalCost_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Invoice.Types.Cost TotalCost { + get { return totalCost_; } + set { + totalCost_ = value; + } + } + + /// Field number for the "invoiceType" field. + public const int InvoiceTypeFieldNumber = 6; + private global::BI.Invoice.Types.Type invoiceType_ = global::BI.Invoice.Types.Type.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Invoice.Types.Type InvoiceType { + get { return invoiceType_; } + set { + invoiceType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Invoice); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Invoice other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (InvoiceNumber != other.InvoiceNumber) return false; + if (InvoiceDate != other.InvoiceDate) return false; + if (LicenseCount != other.LicenseCount) return false; + if (!object.Equals(TotalCost, other.TotalCost)) return false; + if (InvoiceType != other.InvoiceType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (InvoiceNumber.Length != 0) hash ^= InvoiceNumber.GetHashCode(); + if (InvoiceDate != 0L) hash ^= InvoiceDate.GetHashCode(); + if (LicenseCount != 0) hash ^= LicenseCount.GetHashCode(); + if (totalCost_ != null) hash ^= TotalCost.GetHashCode(); + if (InvoiceType != global::BI.Invoice.Types.Type.Unknown) hash ^= InvoiceType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (InvoiceNumber.Length != 0) { + output.WriteRawTag(18); + output.WriteString(InvoiceNumber); + } + if (InvoiceDate != 0L) { + output.WriteRawTag(24); + output.WriteInt64(InvoiceDate); + } + if (LicenseCount != 0) { + output.WriteRawTag(32); + output.WriteInt32(LicenseCount); + } + if (totalCost_ != null) { + output.WriteRawTag(42); + output.WriteMessage(TotalCost); + } + if (InvoiceType != global::BI.Invoice.Types.Type.Unknown) { + output.WriteRawTag(48); + output.WriteEnum((int) InvoiceType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (InvoiceNumber.Length != 0) { + output.WriteRawTag(18); + output.WriteString(InvoiceNumber); + } + if (InvoiceDate != 0L) { + output.WriteRawTag(24); + output.WriteInt64(InvoiceDate); + } + if (LicenseCount != 0) { + output.WriteRawTag(32); + output.WriteInt32(LicenseCount); + } + if (totalCost_ != null) { + output.WriteRawTag(42); + output.WriteMessage(TotalCost); + } + if (InvoiceType != global::BI.Invoice.Types.Type.Unknown) { + output.WriteRawTag(48); + output.WriteEnum((int) InvoiceType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (InvoiceNumber.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InvoiceNumber); + } + if (InvoiceDate != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(InvoiceDate); + } + if (LicenseCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(LicenseCount); + } + if (totalCost_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TotalCost); + } + if (InvoiceType != global::BI.Invoice.Types.Type.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) InvoiceType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Invoice other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.InvoiceNumber.Length != 0) { + InvoiceNumber = other.InvoiceNumber; + } + if (other.InvoiceDate != 0L) { + InvoiceDate = other.InvoiceDate; + } + if (other.LicenseCount != 0) { + LicenseCount = other.LicenseCount; + } + if (other.totalCost_ != null) { + if (totalCost_ == null) { + TotalCost = new global::BI.Invoice.Types.Cost(); + } + TotalCost.MergeFrom(other.TotalCost); + } + if (other.InvoiceType != global::BI.Invoice.Types.Type.Unknown) { + InvoiceType = other.InvoiceType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + InvoiceNumber = input.ReadString(); + break; + } + case 24: { + InvoiceDate = input.ReadInt64(); + break; + } + case 32: { + LicenseCount = input.ReadInt32(); + break; + } + case 42: { + if (totalCost_ == null) { + TotalCost = new global::BI.Invoice.Types.Cost(); + } + input.ReadMessage(TotalCost); + break; + } + case 48: { + InvoiceType = (global::BI.Invoice.Types.Type) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + InvoiceNumber = input.ReadString(); + break; + } + case 24: { + InvoiceDate = input.ReadInt64(); + break; + } + case 32: { + LicenseCount = input.ReadInt32(); + break; + } + case 42: { + if (totalCost_ == null) { + TotalCost = new global::BI.Invoice.Types.Cost(); + } + input.ReadMessage(TotalCost); + break; + } + case 48: { + InvoiceType = (global::BI.Invoice.Types.Type) input.ReadEnum(); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the Invoice message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public enum Type { + [pbr::OriginalName("UNKNOWN")] Unknown = 0, + [pbr::OriginalName("NEW")] New = 1, + [pbr::OriginalName("RENEWAL")] Renewal = 2, + [pbr::OriginalName("UPGRADE")] Upgrade = 3, + [pbr::OriginalName("RESTORE")] Restore = 4, + [pbr::OriginalName("ASSOCIATION")] Association = 5, + [pbr::OriginalName("OVERAGE")] Overage = 6, + } + + public sealed partial class Cost : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Cost()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.Invoice.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Cost() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Cost(Cost other) : this() { + amount_ = other.amount_; + currency_ = other.currency_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Cost Clone() { + return new Cost(this); + } + + /// Field number for the "amount" field. + public const int AmountFieldNumber = 1; + private double amount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public double Amount { + get { return amount_; } + set { + amount_ = value; + } + } + + /// Field number for the "currency" field. + public const int CurrencyFieldNumber = 2; + private global::BI.Currency currency_ = global::BI.Currency.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.Currency Currency { + get { return currency_; } + set { + currency_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Cost); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Cost other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.Equals(Amount, other.Amount)) return false; + if (Currency != other.Currency) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Amount != 0D) hash ^= pbc::ProtobufEqualityComparers.BitwiseDoubleEqualityComparer.GetHashCode(Amount); + if (Currency != global::BI.Currency.Unknown) hash ^= Currency.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Amount != 0D) { + output.WriteRawTag(9); + output.WriteDouble(Amount); + } + if (Currency != global::BI.Currency.Unknown) { + output.WriteRawTag(16); + output.WriteEnum((int) Currency); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Amount != 0D) { + output.WriteRawTag(9); + output.WriteDouble(Amount); + } + if (Currency != global::BI.Currency.Unknown) { + output.WriteRawTag(16); + output.WriteEnum((int) Currency); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Amount != 0D) { + size += 1 + 8; + } + if (Currency != global::BI.Currency.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Currency); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Cost other) { + if (other == null) { + return; + } + if (other.Amount != 0D) { + Amount = other.Amount; + } + if (other.Currency != global::BI.Currency.Unknown) { + Currency = other.Currency; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 9: { + Amount = input.ReadDouble(); + break; + } + case 16: { + Currency = (global::BI.Currency) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 9: { + Amount = input.ReadDouble(); + break; + } + case 16: { + Currency = (global::BI.Currency) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + /// + /// -- POST: /bi_api/v2/console/invoice/download + /// + public sealed partial class InvoiceDownloadRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InvoiceDownloadRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceDownloadRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceDownloadRequest(InvoiceDownloadRequest other) : this() { + invoiceNumber_ = other.invoiceNumber_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceDownloadRequest Clone() { + return new InvoiceDownloadRequest(this); + } + + /// Field number for the "invoiceNumber" field. + public const int InvoiceNumberFieldNumber = 1; + private string invoiceNumber_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InvoiceNumber { + get { return invoiceNumber_; } + set { + invoiceNumber_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InvoiceDownloadRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InvoiceDownloadRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (InvoiceNumber != other.InvoiceNumber) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (InvoiceNumber.Length != 0) hash ^= InvoiceNumber.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (InvoiceNumber.Length != 0) { + output.WriteRawTag(10); + output.WriteString(InvoiceNumber); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (InvoiceNumber.Length != 0) { + output.WriteRawTag(10); + output.WriteString(InvoiceNumber); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (InvoiceNumber.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InvoiceNumber); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InvoiceDownloadRequest other) { + if (other == null) { + return; + } + if (other.InvoiceNumber.Length != 0) { + InvoiceNumber = other.InvoiceNumber; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + InvoiceNumber = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + InvoiceNumber = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class InvoiceDownloadResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new InvoiceDownloadResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceDownloadResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceDownloadResponse(InvoiceDownloadResponse other) : this() { + link_ = other.link_; + fileName_ = other.fileName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public InvoiceDownloadResponse Clone() { + return new InvoiceDownloadResponse(this); + } + + /// Field number for the "link" field. + public const int LinkFieldNumber = 1; + private string link_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Link { + get { return link_; } + set { + link_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fileName" field. + public const int FileNameFieldNumber = 2; + private string fileName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FileName { + get { return fileName_; } + set { + fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as InvoiceDownloadResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(InvoiceDownloadResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Link != other.Link) return false; + if (FileName != other.FileName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Link.Length != 0) hash ^= Link.GetHashCode(); + if (FileName.Length != 0) hash ^= FileName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Link.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Link); + } + if (FileName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FileName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Link.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Link); + } + if (FileName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FileName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Link.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Link); + } + if (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(InvoiceDownloadResponse other) { + if (other == null) { + return; + } + if (other.Link.Length != 0) { + Link = other.Link; + } + if (other.FileName.Length != 0) { + FileName = other.FileName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Link = input.ReadString(); + break; + } + case 18: { + FileName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Link = input.ReadString(); + break; + } + case 18: { + FileName = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/console/reporting/daily_snapshot + /// + public sealed partial class ReportingDailySnapshotRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReportingDailySnapshotRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportingDailySnapshotRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportingDailySnapshotRequest(ReportingDailySnapshotRequest other) : this() { + month_ = other.month_; + year_ = other.year_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportingDailySnapshotRequest Clone() { + return new ReportingDailySnapshotRequest(this); + } + + /// Field number for the "month" field. + public const int MonthFieldNumber = 1; + private int month_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Month { + get { return month_; } + set { + month_ = value; + } + } + + /// Field number for the "year" field. + public const int YearFieldNumber = 2; + private int year_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Year { + get { return year_; } + set { + year_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReportingDailySnapshotRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReportingDailySnapshotRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Month != other.Month) return false; + if (Year != other.Year) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Month != 0) hash ^= Month.GetHashCode(); + if (Year != 0) hash ^= Year.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Month != 0) { + output.WriteRawTag(8); + output.WriteInt32(Month); + } + if (Year != 0) { + output.WriteRawTag(16); + output.WriteInt32(Year); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Month != 0) { + output.WriteRawTag(8); + output.WriteInt32(Month); + } + if (Year != 0) { + output.WriteRawTag(16); + output.WriteInt32(Year); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Month != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Month); + } + if (Year != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Year); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReportingDailySnapshotRequest other) { + if (other == null) { + return; + } + if (other.Month != 0) { + Month = other.Month; + } + if (other.Year != 0) { + Year = other.Year; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Month = input.ReadInt32(); + break; + } + case 16: { + Year = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Month = input.ReadInt32(); + break; + } + case 16: { + Year = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + public sealed partial class ReportingDailySnapshotResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReportingDailySnapshotResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportingDailySnapshotResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportingDailySnapshotResponse(ReportingDailySnapshotResponse other) : this() { + records_ = other.records_.Clone(); + mcEnterprises_ = other.mcEnterprises_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportingDailySnapshotResponse Clone() { + return new ReportingDailySnapshotResponse(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::BI.SnapshotRecord.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "mcEnterprises" field. + public const int McEnterprisesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_mcEnterprises_codec + = pb::FieldCodec.ForMessage(18, global::BI.SnapshotMcEnterprise.Parser); + private readonly pbc::RepeatedField mcEnterprises_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField McEnterprises { + get { return mcEnterprises_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReportingDailySnapshotResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReportingDailySnapshotResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + if(!mcEnterprises_.Equals(other.mcEnterprises_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + hash ^= mcEnterprises_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + mcEnterprises_.WriteTo(output, _repeated_mcEnterprises_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + mcEnterprises_.WriteTo(ref output, _repeated_mcEnterprises_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + size += mcEnterprises_.CalculateSize(_repeated_mcEnterprises_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReportingDailySnapshotResponse other) { + if (other == null) { + return; + } + records_.Add(other.records_); + mcEnterprises_.Add(other.mcEnterprises_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 18: { + mcEnterprises_.AddEntriesFrom(input, _repeated_mcEnterprises_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 18: { + mcEnterprises_.AddEntriesFrom(ref input, _repeated_mcEnterprises_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class SnapshotRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SnapshotRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SnapshotRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SnapshotRecord(SnapshotRecord other) : this() { + date_ = other.date_; + mcEnterpriseId_ = other.mcEnterpriseId_; + maxLicenseCount_ = other.maxLicenseCount_; + maxFilePlanTypeId_ = other.maxFilePlanTypeId_; + maxBasePlanId_ = other.maxBasePlanId_; + addons_ = other.addons_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SnapshotRecord Clone() { + return new SnapshotRecord(this); + } + + /// Field number for the "date" field. + public const int DateFieldNumber = 1; + private long date_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Date { + get { return date_; } + set { + date_ = value; + } + } + + /// Field number for the "mcEnterpriseId" field. + public const int McEnterpriseIdFieldNumber = 2; + private int mcEnterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int McEnterpriseId { + get { return mcEnterpriseId_; } + set { + mcEnterpriseId_ = value; + } + } + + /// Field number for the "maxLicenseCount" field. + public const int MaxLicenseCountFieldNumber = 4; + private int maxLicenseCount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxLicenseCount { + get { return maxLicenseCount_; } + set { + maxLicenseCount_ = value; + } + } + + /// Field number for the "maxFilePlanTypeId" field. + public const int MaxFilePlanTypeIdFieldNumber = 5; + private int maxFilePlanTypeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxFilePlanTypeId { + get { return maxFilePlanTypeId_; } + set { + maxFilePlanTypeId_ = value; + } + } + + /// Field number for the "maxBasePlanId" field. + public const int MaxBasePlanIdFieldNumber = 6; + private int maxBasePlanId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxBasePlanId { + get { return maxBasePlanId_; } + set { + maxBasePlanId_ = value; + } + } + + /// Field number for the "addons" field. + public const int AddonsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_addons_codec + = pb::FieldCodec.ForMessage(58, global::BI.SnapshotRecord.Types.Addon.Parser); + private readonly pbc::RepeatedField addons_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Addons { + get { return addons_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SnapshotRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SnapshotRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Date != other.Date) return false; + if (McEnterpriseId != other.McEnterpriseId) return false; + if (MaxLicenseCount != other.MaxLicenseCount) return false; + if (MaxFilePlanTypeId != other.MaxFilePlanTypeId) return false; + if (MaxBasePlanId != other.MaxBasePlanId) return false; + if(!addons_.Equals(other.addons_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Date != 0L) hash ^= Date.GetHashCode(); + if (McEnterpriseId != 0) hash ^= McEnterpriseId.GetHashCode(); + if (MaxLicenseCount != 0) hash ^= MaxLicenseCount.GetHashCode(); + if (MaxFilePlanTypeId != 0) hash ^= MaxFilePlanTypeId.GetHashCode(); + if (MaxBasePlanId != 0) hash ^= MaxBasePlanId.GetHashCode(); + hash ^= addons_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Date != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Date); + } + if (McEnterpriseId != 0) { + output.WriteRawTag(16); + output.WriteInt32(McEnterpriseId); + } + if (MaxLicenseCount != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxLicenseCount); + } + if (MaxFilePlanTypeId != 0) { + output.WriteRawTag(40); + output.WriteInt32(MaxFilePlanTypeId); + } + if (MaxBasePlanId != 0) { + output.WriteRawTag(48); + output.WriteInt32(MaxBasePlanId); + } + addons_.WriteTo(output, _repeated_addons_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Date != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Date); + } + if (McEnterpriseId != 0) { + output.WriteRawTag(16); + output.WriteInt32(McEnterpriseId); + } + if (MaxLicenseCount != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxLicenseCount); + } + if (MaxFilePlanTypeId != 0) { + output.WriteRawTag(40); + output.WriteInt32(MaxFilePlanTypeId); + } + if (MaxBasePlanId != 0) { + output.WriteRawTag(48); + output.WriteInt32(MaxBasePlanId); + } + addons_.WriteTo(ref output, _repeated_addons_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Date != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Date); + } + if (McEnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(McEnterpriseId); + } + if (MaxLicenseCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxLicenseCount); + } + if (MaxFilePlanTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxFilePlanTypeId); + } + if (MaxBasePlanId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxBasePlanId); + } + size += addons_.CalculateSize(_repeated_addons_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SnapshotRecord other) { + if (other == null) { + return; + } + if (other.Date != 0L) { + Date = other.Date; + } + if (other.McEnterpriseId != 0) { + McEnterpriseId = other.McEnterpriseId; + } + if (other.MaxLicenseCount != 0) { + MaxLicenseCount = other.MaxLicenseCount; + } + if (other.MaxFilePlanTypeId != 0) { + MaxFilePlanTypeId = other.MaxFilePlanTypeId; + } + if (other.MaxBasePlanId != 0) { + MaxBasePlanId = other.MaxBasePlanId; + } + addons_.Add(other.addons_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Date = input.ReadInt64(); + break; + } + case 16: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 32: { + MaxLicenseCount = input.ReadInt32(); + break; + } + case 40: { + MaxFilePlanTypeId = input.ReadInt32(); + break; + } + case 48: { + MaxBasePlanId = input.ReadInt32(); + break; + } + case 58: { + addons_.AddEntriesFrom(input, _repeated_addons_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Date = input.ReadInt64(); + break; + } + case 16: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 32: { + MaxLicenseCount = input.ReadInt32(); + break; + } + case 40: { + MaxFilePlanTypeId = input.ReadInt32(); + break; + } + case 48: { + MaxBasePlanId = input.ReadInt32(); + break; + } + case 58: { + addons_.AddEntriesFrom(ref input, _repeated_addons_codec); + break; + } + } + } + } + #endif + + #region Nested types + /// Container for nested types declared in the SnapshotRecord message type. + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static partial class Types { + public sealed partial class Addon : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Addon()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.SnapshotRecord.Descriptor.NestedTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Addon() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Addon(Addon other) : this() { + maxAddonId_ = other.maxAddonId_; + units_ = other.units_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Addon Clone() { + return new Addon(this); + } + + /// Field number for the "maxAddonId" field. + public const int MaxAddonIdFieldNumber = 1; + private int maxAddonId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxAddonId { + get { return maxAddonId_; } + set { + maxAddonId_ = value; + } + } + + /// Field number for the "units" field. + public const int UnitsFieldNumber = 2; + private long units_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Units { + get { return units_; } + set { + units_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Addon); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Addon other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MaxAddonId != other.MaxAddonId) return false; + if (Units != other.Units) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (MaxAddonId != 0) hash ^= MaxAddonId.GetHashCode(); + if (Units != 0L) hash ^= Units.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (MaxAddonId != 0) { + output.WriteRawTag(8); + output.WriteInt32(MaxAddonId); + } + if (Units != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Units); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MaxAddonId != 0) { + output.WriteRawTag(8); + output.WriteInt32(MaxAddonId); + } + if (Units != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Units); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (MaxAddonId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxAddonId); + } + if (Units != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Units); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Addon other) { + if (other == null) { + return; + } + if (other.MaxAddonId != 0) { + MaxAddonId = other.MaxAddonId; + } + if (other.Units != 0L) { + Units = other.Units; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + MaxAddonId = input.ReadInt32(); + break; + } + case 16: { + Units = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MaxAddonId = input.ReadInt32(); + break; + } + case 16: { + Units = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + } + #endregion + + } + + public sealed partial class SnapshotMcEnterprise : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SnapshotMcEnterprise()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SnapshotMcEnterprise() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SnapshotMcEnterprise(SnapshotMcEnterprise other) : this() { + id_ = other.id_; + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SnapshotMcEnterprise Clone() { + return new SnapshotMcEnterprise(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SnapshotMcEnterprise); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SnapshotMcEnterprise other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SnapshotMcEnterprise other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/enterprise_console/mapping/addons + /// + public sealed partial class MappingAddonsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MappingAddonsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[24]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingAddonsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingAddonsRequest(MappingAddonsRequest other) : this() { + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingAddonsRequest Clone() { + return new MappingAddonsRequest(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MappingAddonsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MappingAddonsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MappingAddonsRequest other) { + if (other == null) { + return; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + } + } + } + #endif + + } + + public sealed partial class MappingAddonsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MappingAddonsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[25]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingAddonsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingAddonsResponse(MappingAddonsResponse other) : this() { + addons_ = other.addons_.Clone(); + filePlans_ = other.filePlans_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingAddonsResponse Clone() { + return new MappingAddonsResponse(this); + } + + /// Field number for the "addons" field. + public const int AddonsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_addons_codec + = pb::FieldCodec.ForMessage(10, global::BI.MappingItem.Parser); + private readonly pbc::RepeatedField addons_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Addons { + get { return addons_; } + } + + /// Field number for the "filePlans" field. + public const int FilePlansFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_filePlans_codec + = pb::FieldCodec.ForMessage(18, global::BI.MappingItem.Parser); + private readonly pbc::RepeatedField filePlans_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FilePlans { + get { return filePlans_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MappingAddonsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MappingAddonsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!addons_.Equals(other.addons_)) return false; + if(!filePlans_.Equals(other.filePlans_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= addons_.GetHashCode(); + hash ^= filePlans_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + addons_.WriteTo(output, _repeated_addons_codec); + filePlans_.WriteTo(output, _repeated_filePlans_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + addons_.WriteTo(ref output, _repeated_addons_codec); + filePlans_.WriteTo(ref output, _repeated_filePlans_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += addons_.CalculateSize(_repeated_addons_codec); + size += filePlans_.CalculateSize(_repeated_filePlans_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MappingAddonsResponse other) { + if (other == null) { + return; + } + addons_.Add(other.addons_); + filePlans_.Add(other.filePlans_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + addons_.AddEntriesFrom(input, _repeated_addons_codec); + break; + } + case 18: { + filePlans_.AddEntriesFrom(input, _repeated_filePlans_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + addons_.AddEntriesFrom(ref input, _repeated_addons_codec); + break; + } + case 18: { + filePlans_.AddEntriesFrom(ref input, _repeated_filePlans_codec); + break; + } + } + } + } + #endif + + } + + public sealed partial class MappingItem : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MappingItem()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[26]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingItem() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingItem(MappingItem other) : this() { + id_ = other.id_; + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MappingItem Clone() { + return new MappingItem(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MappingItem); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MappingItem other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MappingItem other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/enterprise_console/gradient/validate-key + /// + public sealed partial class GradientValidateKeyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientValidateKeyRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[27]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientValidateKeyRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientValidateKeyRequest(GradientValidateKeyRequest other) : this() { + gradientKey_ = other.gradientKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientValidateKeyRequest Clone() { + return new GradientValidateKeyRequest(this); + } + + /// Field number for the "gradientKey" field. + public const int GradientKeyFieldNumber = 1; + private string gradientKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GradientKey { + get { return gradientKey_; } + set { + gradientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientValidateKeyRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientValidateKeyRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (GradientKey != other.GradientKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (GradientKey.Length != 0) hash ^= GradientKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (GradientKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GradientKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (GradientKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GradientKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (GradientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GradientKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientValidateKeyRequest other) { + if (other == null) { + return; + } + if (other.GradientKey.Length != 0) { + GradientKey = other.GradientKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + GradientKey = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + GradientKey = input.ReadString(); + break; + } + } + } + } + #endif + + } + + public sealed partial class GradientValidateKeyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientValidateKeyResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[28]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientValidateKeyResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientValidateKeyResponse(GradientValidateKeyResponse other) : this() { + success_ = other.success_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientValidateKeyResponse Clone() { + return new GradientValidateKeyResponse(this); + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 1; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientValidateKeyResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientValidateKeyResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Success != other.Success) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Success != false) hash ^= Success.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Success != false) { + size += 1 + 1; + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientValidateKeyResponse other) { + if (other == null) { + return; + } + if (other.Success != false) { + Success = other.Success; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/enterprise_console/gradient/save + /// + public sealed partial class GradientSaveRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientSaveRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[29]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSaveRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSaveRequest(GradientSaveRequest other) : this() { + gradientKey_ = other.gradientKey_; + enterpriseUserId_ = other.enterpriseUserId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSaveRequest Clone() { + return new GradientSaveRequest(this); + } + + /// Field number for the "gradientKey" field. + public const int GradientKeyFieldNumber = 1; + private string gradientKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string GradientKey { + get { return gradientKey_; } + set { + gradientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientSaveRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientSaveRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (GradientKey != other.GradientKey) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (GradientKey.Length != 0) hash ^= GradientKey.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (GradientKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GradientKey); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (GradientKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(GradientKey); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (GradientKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(GradientKey); + } + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientSaveRequest other) { + if (other == null) { + return; + } + if (other.GradientKey.Length != 0) { + GradientKey = other.GradientKey; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + GradientKey = input.ReadString(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + GradientKey = input.ReadString(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class GradientSaveResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientSaveResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[30]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSaveResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSaveResponse(GradientSaveResponse other) : this() { + success_ = other.success_; + status_ = other.status_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSaveResponse Clone() { + return new GradientSaveResponse(this); + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 1; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::BI.GradientIntegrationStatus status_ = global::BI.GradientIntegrationStatus.Notconnected; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.GradientIntegrationStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientSaveResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientSaveResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Success != other.Success) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Success != false) hash ^= Success.GetHashCode(); + if (Status != global::BI.GradientIntegrationStatus.Notconnected) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Status != global::BI.GradientIntegrationStatus.Notconnected) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Status != global::BI.GradientIntegrationStatus.Notconnected) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Success != false) { + size += 1 + 1; + } + if (Status != global::BI.GradientIntegrationStatus.Notconnected) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientSaveResponse other) { + if (other == null) { + return; + } + if (other.Success != false) { + Success = other.Success; + } + if (other.Status != global::BI.GradientIntegrationStatus.Notconnected) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 16: { + Status = (global::BI.GradientIntegrationStatus) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 16: { + Status = (global::BI.GradientIntegrationStatus) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/enterprise_console/gradient/remove + /// + public sealed partial class GradientRemoveRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientRemoveRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[31]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientRemoveRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientRemoveRequest(GradientRemoveRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientRemoveRequest Clone() { + return new GradientRemoveRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientRemoveRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientRemoveRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientRemoveRequest other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class GradientRemoveResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientRemoveResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[32]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientRemoveResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientRemoveResponse(GradientRemoveResponse other) : this() { + success_ = other.success_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientRemoveResponse Clone() { + return new GradientRemoveResponse(this); + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 1; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientRemoveResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientRemoveResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Success != other.Success) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Success != false) hash ^= Success.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Success != false) { + size += 1 + 1; + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientRemoveResponse other) { + if (other == null) { + return; + } + if (other.Success != false) { + Success = other.Success; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + /// -- POST: /bi_api/v2/enterprise_console/gradient/sync + /// + public sealed partial class GradientSyncRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientSyncRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[33]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSyncRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSyncRequest(GradientSyncRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSyncRequest Clone() { + return new GradientSyncRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientSyncRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientSyncRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientSyncRequest other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + public sealed partial class GradientSyncResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GradientSyncResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::BI.BIReflection.Descriptor.MessageTypes[34]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSyncResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSyncResponse(GradientSyncResponse other) : this() { + success_ = other.success_; + status_ = other.status_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GradientSyncResponse Clone() { + return new GradientSyncResponse(this); + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 1; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::BI.GradientIntegrationStatus status_ = global::BI.GradientIntegrationStatus.Notconnected; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::BI.GradientIntegrationStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GradientSyncResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GradientSyncResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Success != other.Success) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Success != false) hash ^= Success.GetHashCode(); + if (Status != global::BI.GradientIntegrationStatus.Notconnected) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Status != global::BI.GradientIntegrationStatus.Notconnected) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Status != global::BI.GradientIntegrationStatus.Notconnected) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Success != false) { + size += 1 + 1; + } + if (Status != global::BI.GradientIntegrationStatus.Notconnected) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GradientSyncResponse other) { + if (other == null) { + return; + } + if (other.Success != false) { + Success = other.Success; + } + if (other.Status != global::BI.GradientIntegrationStatus.Notconnected) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 16: { + Status = (global::BI.GradientIntegrationStatus) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 16: { + Status = (global::BI.GradientIntegrationStatus) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/KeeperSdk/proto/Breachwatch.cs b/KeeperSdk/proto/Breachwatch.cs index c021765..8876d01 100644 --- a/KeeperSdk/proto/Breachwatch.cs +++ b/KeeperSdk/proto/Breachwatch.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: breachwatch.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -112,23 +112,32 @@ public enum BreachWatchInfoType { #endregion #region Messages - public sealed partial class BreachWatchRecordRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchRecordRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchRecordRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchRecordRequest() { OnConstruction(); } @@ -136,6 +145,7 @@ public BreachWatchRecordRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchRecordRequest(BreachWatchRecordRequest other) : this() { recordUid_ = other.recordUid_; encryptedData_ = other.encryptedData_; @@ -145,6 +155,7 @@ public BreachWatchRecordRequest(BreachWatchRecordRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchRecordRequest Clone() { return new BreachWatchRecordRequest(this); } @@ -153,6 +164,7 @@ public BreachWatchRecordRequest Clone() { public const int RecordUidFieldNumber = 1; private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RecordUid { get { return recordUid_; } set { @@ -164,6 +176,7 @@ public BreachWatchRecordRequest Clone() { public const int EncryptedDataFieldNumber = 2; private pb::ByteString encryptedData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedData { get { return encryptedData_; } set { @@ -175,6 +188,7 @@ public BreachWatchRecordRequest Clone() { public const int BreachWatchInfoTypeFieldNumber = 3; private global::BreachWatch.BreachWatchInfoType breachWatchInfoType_ = global::BreachWatch.BreachWatchInfoType.Record; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::BreachWatch.BreachWatchInfoType BreachWatchInfoType { get { return breachWatchInfoType_; } set { @@ -186,6 +200,7 @@ public BreachWatchRecordRequest Clone() { public const int UpdateUserWhoScannedFieldNumber = 4; private bool updateUserWhoScanned_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool UpdateUserWhoScanned { get { return updateUserWhoScanned_; } set { @@ -194,11 +209,13 @@ public bool UpdateUserWhoScanned { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchRecordRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchRecordRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -214,6 +231,7 @@ public bool Equals(BreachWatchRecordRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); @@ -227,12 +245,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RecordUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(RecordUid); @@ -252,9 +275,37 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (BreachWatchInfoType != global::BreachWatch.BreachWatchInfoType.Record) { + output.WriteRawTag(24); + output.WriteEnum((int) BreachWatchInfoType); + } + if (UpdateUserWhoScanned != false) { + output.WriteRawTag(32); + output.WriteBool(UpdateUserWhoScanned); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RecordUid.Length != 0) { @@ -276,6 +327,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchRecordRequest other) { if (other == null) { return; @@ -296,10 +348,18 @@ public void MergeFrom(BreachWatchRecordRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -321,27 +381,72 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + case 24: { + BreachWatchInfoType = (global::BreachWatch.BreachWatchInfoType) input.ReadEnum(); + break; + } + case 32: { + UpdateUserWhoScanned = input.ReadBool(); + break; + } + } + } + } + #endif + } - public sealed partial class BreachWatchUpdateRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchUpdateRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchUpdateRequest() { OnConstruction(); } @@ -349,6 +454,7 @@ public BreachWatchUpdateRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchUpdateRequest(BreachWatchUpdateRequest other) : this() { breachWatchRecordRequest_ = other.breachWatchRecordRequest_.Clone(); encryptedData_ = other.encryptedData_; @@ -356,6 +462,7 @@ public BreachWatchUpdateRequest(BreachWatchUpdateRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchUpdateRequest Clone() { return new BreachWatchUpdateRequest(this); } @@ -366,6 +473,7 @@ public BreachWatchUpdateRequest Clone() { = pb::FieldCodec.ForMessage(10, global::BreachWatch.BreachWatchRecordRequest.Parser); private readonly pbc::RepeatedField breachWatchRecordRequest_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField BreachWatchRecordRequest { get { return breachWatchRecordRequest_; } } @@ -374,6 +482,7 @@ public BreachWatchUpdateRequest Clone() { public const int EncryptedDataFieldNumber = 2; private pb::ByteString encryptedData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedData { get { return encryptedData_; } set { @@ -382,11 +491,13 @@ public BreachWatchUpdateRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchUpdateRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchUpdateRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -400,6 +511,7 @@ public bool Equals(BreachWatchUpdateRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= breachWatchRecordRequest_.GetHashCode(); @@ -411,12 +523,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else breachWatchRecordRequest_.WriteTo(output, _repeated_breachWatchRecordRequest_codec); if (EncryptedData.Length != 0) { output.WriteRawTag(18); @@ -425,9 +542,26 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + breachWatchRecordRequest_.WriteTo(ref output, _repeated_breachWatchRecordRequest_codec); + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += breachWatchRecordRequest_.CalculateSize(_repeated_breachWatchRecordRequest_codec); @@ -441,6 +575,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchUpdateRequest other) { if (other == null) { return; @@ -453,10 +588,18 @@ public void MergeFrom(BreachWatchUpdateRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -470,27 +613,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + breachWatchRecordRequest_.AddEntriesFrom(ref input, _repeated_breachWatchRecordRequest_codec); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class BreachWatchRecordStatus : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchRecordStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchRecordStatus()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchRecordStatus() { OnConstruction(); } @@ -498,6 +678,7 @@ public BreachWatchRecordStatus() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchRecordStatus(BreachWatchRecordStatus other) : this() { recordUid_ = other.recordUid_; status_ = other.status_; @@ -506,6 +687,7 @@ public BreachWatchRecordStatus(BreachWatchRecordStatus other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchRecordStatus Clone() { return new BreachWatchRecordStatus(this); } @@ -514,6 +696,7 @@ public BreachWatchRecordStatus Clone() { public const int RecordUidFieldNumber = 1; private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RecordUid { get { return recordUid_; } set { @@ -525,6 +708,7 @@ public BreachWatchRecordStatus Clone() { public const int StatusFieldNumber = 2; private string status_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Status { get { return status_; } set { @@ -536,6 +720,7 @@ public string Status { public const int ReasonFieldNumber = 3; private string reason_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Reason { get { return reason_; } set { @@ -544,11 +729,13 @@ public string Reason { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchRecordStatus); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchRecordStatus other) { if (ReferenceEquals(other, null)) { return false; @@ -563,6 +750,7 @@ public bool Equals(BreachWatchRecordStatus other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); @@ -575,12 +763,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RecordUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(RecordUid); @@ -596,9 +789,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (Reason.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Reason); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RecordUid.Length != 0) { @@ -617,6 +834,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchRecordStatus other) { if (other == null) { return; @@ -634,10 +852,18 @@ public void MergeFrom(BreachWatchRecordStatus other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -655,27 +881,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + case 26: { + Reason = input.ReadString(); + break; + } + } + } + } + #endif + } - public sealed partial class BreachWatchUpdateResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchUpdateResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchUpdateResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchUpdateResponse() { OnConstruction(); } @@ -683,12 +950,14 @@ public BreachWatchUpdateResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchUpdateResponse(BreachWatchUpdateResponse other) : this() { breachWatchRecordStatus_ = other.breachWatchRecordStatus_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchUpdateResponse Clone() { return new BreachWatchUpdateResponse(this); } @@ -699,16 +968,19 @@ public BreachWatchUpdateResponse Clone() { = pb::FieldCodec.ForMessage(10, global::BreachWatch.BreachWatchRecordStatus.Parser); private readonly pbc::RepeatedField breachWatchRecordStatus_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField BreachWatchRecordStatus { get { return breachWatchRecordStatus_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchUpdateResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchUpdateResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -721,6 +993,7 @@ public bool Equals(BreachWatchUpdateResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= breachWatchRecordStatus_.GetHashCode(); @@ -731,19 +1004,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else breachWatchRecordStatus_.WriteTo(output, _repeated_breachWatchRecordStatus_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + breachWatchRecordStatus_.WriteTo(ref output, _repeated_breachWatchRecordStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += breachWatchRecordStatus_.CalculateSize(_repeated_breachWatchRecordStatus_codec); @@ -754,6 +1045,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchUpdateResponse other) { if (other == null) { return; @@ -763,10 +1055,18 @@ public void MergeFrom(BreachWatchUpdateResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -776,27 +1076,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + breachWatchRecordStatus_.AddEntriesFrom(ref input, _repeated_breachWatchRecordStatus_codec); + break; + } + } + } } + #endif } - public sealed partial class BreachWatchTokenRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchTokenRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchTokenRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchTokenRequest() { OnConstruction(); } @@ -804,12 +1137,14 @@ public BreachWatchTokenRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchTokenRequest(BreachWatchTokenRequest other) : this() { breachWatchToken_ = other.breachWatchToken_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchTokenRequest Clone() { return new BreachWatchTokenRequest(this); } @@ -818,6 +1153,7 @@ public BreachWatchTokenRequest Clone() { public const int BreachWatchTokenFieldNumber = 1; private pb::ByteString breachWatchToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString BreachWatchToken { get { return breachWatchToken_; } set { @@ -826,11 +1162,13 @@ public BreachWatchTokenRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchTokenRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchTokenRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -843,6 +1181,7 @@ public bool Equals(BreachWatchTokenRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (BreachWatchToken.Length != 0) hash ^= BreachWatchToken.GetHashCode(); @@ -853,12 +1192,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (BreachWatchToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(BreachWatchToken); @@ -866,9 +1210,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (BreachWatchToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(BreachWatchToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (BreachWatchToken.Length != 0) { @@ -881,6 +1241,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchTokenRequest other) { if (other == null) { return; @@ -892,10 +1253,18 @@ public void MergeFrom(BreachWatchTokenRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -905,27 +1274,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + BreachWatchToken = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class BreachWatchTokenResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchTokenResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchTokenResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchTokenResponse() { OnConstruction(); } @@ -933,6 +1335,7 @@ public BreachWatchTokenResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchTokenResponse(BreachWatchTokenResponse other) : this() { breachWatchToken_ = other.breachWatchToken_; clientEncrypted_ = other.clientEncrypted_; @@ -940,6 +1343,7 @@ public BreachWatchTokenResponse(BreachWatchTokenResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchTokenResponse Clone() { return new BreachWatchTokenResponse(this); } @@ -948,6 +1352,7 @@ public BreachWatchTokenResponse Clone() { public const int BreachWatchTokenFieldNumber = 1; private pb::ByteString breachWatchToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString BreachWatchToken { get { return breachWatchToken_; } set { @@ -959,6 +1364,7 @@ public BreachWatchTokenResponse Clone() { public const int ClientEncryptedFieldNumber = 2; private bool clientEncrypted_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ClientEncrypted { get { return clientEncrypted_; } set { @@ -967,11 +1373,13 @@ public bool ClientEncrypted { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchTokenResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchTokenResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -985,6 +1393,7 @@ public bool Equals(BreachWatchTokenResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (BreachWatchToken.Length != 0) hash ^= BreachWatchToken.GetHashCode(); @@ -996,12 +1405,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (BreachWatchToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(BreachWatchToken); @@ -1013,9 +1427,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (BreachWatchToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(BreachWatchToken); + } + if (ClientEncrypted != false) { + output.WriteRawTag(16); + output.WriteBool(ClientEncrypted); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (BreachWatchToken.Length != 0) { @@ -1031,6 +1465,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchTokenResponse other) { if (other == null) { return; @@ -1045,10 +1480,18 @@ public void MergeFrom(BreachWatchTokenResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1062,27 +1505,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + BreachWatchToken = input.ReadBytes(); + break; + } + case 16: { + ClientEncrypted = input.ReadBool(); + break; + } + } + } } + #endif } - public sealed partial class AnonymizedTokenResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AnonymizedTokenResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AnonymizedTokenResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AnonymizedTokenResponse() { OnConstruction(); } @@ -1090,6 +1570,7 @@ public AnonymizedTokenResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AnonymizedTokenResponse(AnonymizedTokenResponse other) : this() { domainToken_ = other.domainToken_; emailToken_ = other.emailToken_; @@ -1098,6 +1579,7 @@ public AnonymizedTokenResponse(AnonymizedTokenResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public AnonymizedTokenResponse Clone() { return new AnonymizedTokenResponse(this); } @@ -1106,6 +1588,7 @@ public AnonymizedTokenResponse Clone() { public const int DomainTokenFieldNumber = 1; private pb::ByteString domainToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString DomainToken { get { return domainToken_; } set { @@ -1117,6 +1600,7 @@ public AnonymizedTokenResponse Clone() { public const int EmailTokenFieldNumber = 2; private pb::ByteString emailToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EmailToken { get { return emailToken_; } set { @@ -1128,6 +1612,7 @@ public AnonymizedTokenResponse Clone() { public const int PasswordTokenFieldNumber = 3; private pb::ByteString passwordToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString PasswordToken { get { return passwordToken_; } set { @@ -1136,11 +1621,13 @@ public AnonymizedTokenResponse Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as AnonymizedTokenResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(AnonymizedTokenResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -1155,6 +1642,7 @@ public bool Equals(AnonymizedTokenResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (DomainToken.Length != 0) hash ^= DomainToken.GetHashCode(); @@ -1167,12 +1655,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (DomainToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(DomainToken); @@ -1188,9 +1681,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DomainToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(DomainToken); + } + if (EmailToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EmailToken); + } + if (PasswordToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(PasswordToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (DomainToken.Length != 0) { @@ -1209,6 +1726,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(AnonymizedTokenResponse other) { if (other == null) { return; @@ -1226,10 +1744,18 @@ public void MergeFrom(AnonymizedTokenResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1247,27 +1773,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + DomainToken = input.ReadBytes(); + break; + } + case 18: { + EmailToken = input.ReadBytes(); + break; + } + case 26: { + PasswordToken = input.ReadBytes(); + break; + } + } + } + } + #endif + } - public sealed partial class HashCheck : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class HashCheck : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new HashCheck()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public HashCheck() { OnConstruction(); } @@ -1275,6 +1842,7 @@ public HashCheck() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public HashCheck(HashCheck other) : this() { hash1_ = other.hash1_; euid_ = other.euid_; @@ -1282,6 +1850,7 @@ public HashCheck(HashCheck other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public HashCheck Clone() { return new HashCheck(this); } @@ -1293,6 +1862,7 @@ public HashCheck Clone() { /// if supplied, check this hash /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Hash1 { get { return hash1_; } set { @@ -1307,6 +1877,7 @@ public HashCheck Clone() { /// if supplied, check this euid - if hash is also supplied, update the hash for this euid /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Euid { get { return euid_; } set { @@ -1315,11 +1886,13 @@ public HashCheck Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as HashCheck); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(HashCheck other) { if (ReferenceEquals(other, null)) { return false; @@ -1333,6 +1906,7 @@ public bool Equals(HashCheck other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Hash1.Length != 0) hash ^= Hash1.GetHashCode(); @@ -1344,12 +1918,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Hash1.Length != 0) { output.WriteRawTag(10); output.WriteBytes(Hash1); @@ -1361,9 +1940,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Hash1.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Hash1); + } + if (Euid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Euid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Hash1.Length != 0) { @@ -1379,6 +1978,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(HashCheck other) { if (other == null) { return; @@ -1386,19 +1986,54 @@ public void MergeFrom(HashCheck other) { if (other.Hash1.Length != 0) { Hash1 = other.Hash1; } - if (other.Euid.Length != 0) { - Euid = other.Euid; + if (other.Euid.Length != 0) { + Euid = other.Euid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Hash1 = input.ReadBytes(); + break; + } + case 18: { + Euid = input.ReadBytes(); + break; + } + } } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { Hash1 = input.ReadBytes(); @@ -1411,26 +2046,36 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - public sealed partial class BreachWatchStatusRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchStatusRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchStatusRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchStatusRequest() { OnConstruction(); } @@ -1438,6 +2083,7 @@ public BreachWatchStatusRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchStatusRequest(BreachWatchStatusRequest other) : this() { anonymizedToken_ = other.anonymizedToken_; hashCheck_ = other.hashCheck_.Clone(); @@ -1446,6 +2092,7 @@ public BreachWatchStatusRequest(BreachWatchStatusRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchStatusRequest Clone() { return new BreachWatchStatusRequest(this); } @@ -1454,6 +2101,7 @@ public BreachWatchStatusRequest Clone() { public const int AnonymizedTokenFieldNumber = 1; private pb::ByteString anonymizedToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString AnonymizedToken { get { return anonymizedToken_; } set { @@ -1467,6 +2115,7 @@ public BreachWatchStatusRequest Clone() { = pb::FieldCodec.ForMessage(18, global::BreachWatch.HashCheck.Parser); private readonly pbc::RepeatedField hashCheck_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField HashCheck { get { return hashCheck_; } } @@ -1477,16 +2126,19 @@ public BreachWatchStatusRequest Clone() { = pb::FieldCodec.ForBytes(26); private readonly pbc::RepeatedField removedEuid_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField RemovedEuid { get { return removedEuid_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchStatusRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchStatusRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1501,6 +2153,7 @@ public bool Equals(BreachWatchStatusRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (AnonymizedToken.Length != 0) hash ^= AnonymizedToken.GetHashCode(); @@ -1513,12 +2166,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (AnonymizedToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(AnonymizedToken); @@ -1528,9 +2186,27 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AnonymizedToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AnonymizedToken); + } + hashCheck_.WriteTo(ref output, _repeated_hashCheck_codec); + removedEuid_.WriteTo(ref output, _repeated_removedEuid_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (AnonymizedToken.Length != 0) { @@ -1545,6 +2221,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchStatusRequest other) { if (other == null) { return; @@ -1558,10 +2235,18 @@ public void MergeFrom(BreachWatchStatusRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1579,27 +2264,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AnonymizedToken = input.ReadBytes(); + break; + } + case 18: { + hashCheck_.AddEntriesFrom(ref input, _repeated_hashCheck_codec); + break; + } + case 26: { + removedEuid_.AddEntriesFrom(ref input, _repeated_removedEuid_codec); + break; + } + } + } } + #endif } - public sealed partial class HashStatus : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class HashStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new HashStatus()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public HashStatus() { OnConstruction(); } @@ -1607,6 +2333,7 @@ public HashStatus() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public HashStatus(HashStatus other) : this() { hash1_ = other.hash1_; euid_ = other.euid_; @@ -1615,6 +2342,7 @@ public HashStatus(HashStatus other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public HashStatus Clone() { return new HashStatus(this); } @@ -1626,6 +2354,7 @@ public HashStatus Clone() { /// if supplied a uid is supplied for this hash /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Hash1 { get { return hash1_; } set { @@ -1640,6 +2369,7 @@ public HashStatus Clone() { /// if not supplied, this hash is not being tracked /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Euid { get { return euid_; } set { @@ -1651,6 +2381,7 @@ public HashStatus Clone() { public const int BreachDetectedFieldNumber = 3; private bool breachDetected_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool BreachDetected { get { return breachDetected_; } set { @@ -1659,11 +2390,13 @@ public bool BreachDetected { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as HashStatus); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(HashStatus other) { if (ReferenceEquals(other, null)) { return false; @@ -1678,6 +2411,7 @@ public bool Equals(HashStatus other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Hash1.Length != 0) hash ^= Hash1.GetHashCode(); @@ -1690,12 +2424,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Hash1.Length != 0) { output.WriteRawTag(10); output.WriteBytes(Hash1); @@ -1711,9 +2450,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Hash1.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Hash1); + } + if (Euid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Euid); + } + if (BreachDetected != false) { + output.WriteRawTag(24); + output.WriteBool(BreachDetected); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Hash1.Length != 0) { @@ -1732,6 +2495,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(HashStatus other) { if (other == null) { return; @@ -1749,10 +2513,18 @@ public void MergeFrom(HashStatus other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1770,27 +2542,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Hash1 = input.ReadBytes(); + break; + } + case 18: { + Euid = input.ReadBytes(); + break; + } + case 24: { + BreachDetected = input.ReadBool(); + break; + } + } + } } + #endif } - public sealed partial class BreachWatchStatusResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchStatusResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchStatusResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchStatusResponse() { OnConstruction(); } @@ -1798,12 +2611,14 @@ public BreachWatchStatusResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchStatusResponse(BreachWatchStatusResponse other) : this() { hashStatus_ = other.hashStatus_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachWatchStatusResponse Clone() { return new BreachWatchStatusResponse(this); } @@ -1814,16 +2629,19 @@ public BreachWatchStatusResponse Clone() { = pb::FieldCodec.ForMessage(18, global::BreachWatch.HashStatus.Parser); private readonly pbc::RepeatedField hashStatus_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField HashStatus { get { return hashStatus_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachWatchStatusResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachWatchStatusResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -1836,6 +2654,7 @@ public bool Equals(BreachWatchStatusResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= hashStatus_.GetHashCode(); @@ -1846,19 +2665,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else hashStatus_.WriteTo(output, _repeated_hashStatus_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + hashStatus_.WriteTo(ref output, _repeated_hashStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += hashStatus_.CalculateSize(_repeated_hashStatus_codec); @@ -1869,6 +2706,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachWatchStatusResponse other) { if (other == null) { return; @@ -1878,10 +2716,18 @@ public void MergeFrom(BreachWatchStatusResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1891,27 +2737,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 18: { + hashStatus_.AddEntriesFrom(ref input, _repeated_hashStatus_codec); + break; + } + } + } } + #endif } - public sealed partial class EnterprisePublicKeyResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterprisePublicKeyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterprisePublicKeyResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterprisePublicKeyResponse() { OnConstruction(); } @@ -1919,6 +2798,7 @@ public EnterprisePublicKeyResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterprisePublicKeyResponse(EnterprisePublicKeyResponse other) : this() { enterprisePublicKey_ = other.enterprisePublicKey_; enterpriseECCPublicKey_ = other.enterpriseECCPublicKey_; @@ -1926,6 +2806,7 @@ public EnterprisePublicKeyResponse(EnterprisePublicKeyResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterprisePublicKeyResponse Clone() { return new EnterprisePublicKeyResponse(this); } @@ -1934,6 +2815,7 @@ public EnterprisePublicKeyResponse Clone() { public const int EnterprisePublicKeyFieldNumber = 1; private pb::ByteString enterprisePublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EnterprisePublicKey { get { return enterprisePublicKey_; } set { @@ -1945,6 +2827,7 @@ public EnterprisePublicKeyResponse Clone() { public const int EnterpriseECCPublicKeyFieldNumber = 2; private pb::ByteString enterpriseECCPublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EnterpriseECCPublicKey { get { return enterpriseECCPublicKey_; } set { @@ -1953,11 +2836,13 @@ public EnterprisePublicKeyResponse Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EnterprisePublicKeyResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EnterprisePublicKeyResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -1971,6 +2856,7 @@ public bool Equals(EnterprisePublicKeyResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EnterprisePublicKey.Length != 0) hash ^= EnterprisePublicKey.GetHashCode(); @@ -1982,12 +2868,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EnterprisePublicKey.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EnterprisePublicKey); @@ -1999,9 +2890,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterprisePublicKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EnterprisePublicKey); + } + if (EnterpriseECCPublicKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EnterpriseECCPublicKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EnterprisePublicKey.Length != 0) { @@ -2017,6 +2928,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EnterprisePublicKeyResponse other) { if (other == null) { return; @@ -2031,10 +2943,18 @@ public void MergeFrom(EnterprisePublicKeyResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2048,27 +2968,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EnterprisePublicKey = input.ReadBytes(); + break; + } + case 18: { + EnterpriseECCPublicKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class FreeScanRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FreeScanRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FreeScanRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreeScanRequest() { OnConstruction(); } @@ -2076,12 +3033,14 @@ public FreeScanRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreeScanRequest(FreeScanRequest other) : this() { hashedEmail_ = other.hashedEmail_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreeScanRequest Clone() { return new FreeScanRequest(this); } @@ -2090,6 +3049,7 @@ public FreeScanRequest Clone() { public const int HashedEmailFieldNumber = 1; private pb::ByteString hashedEmail_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString HashedEmail { get { return hashedEmail_; } set { @@ -2098,11 +3058,13 @@ public FreeScanRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FreeScanRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FreeScanRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2115,6 +3077,7 @@ public bool Equals(FreeScanRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (HashedEmail.Length != 0) hash ^= HashedEmail.GetHashCode(); @@ -2125,12 +3088,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (HashedEmail.Length != 0) { output.WriteRawTag(10); output.WriteBytes(HashedEmail); @@ -2138,9 +3106,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HashedEmail.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(HashedEmail); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (HashedEmail.Length != 0) { @@ -2153,6 +3137,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(FreeScanRequest other) { if (other == null) { return; @@ -2164,10 +3149,18 @@ public void MergeFrom(FreeScanRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2177,27 +3170,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + HashedEmail = input.ReadBytes(); + break; + } + } + } + } + #endif + } - public sealed partial class FreeScanResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FreeScanResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FreeScanResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[13]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreeScanResponse() { OnConstruction(); } @@ -2205,6 +3231,7 @@ public FreeScanResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreeScanResponse(FreeScanResponse other) : this() { emailBreaches_ = other.emailBreaches_; passwordBreaches_ = other.passwordBreaches_; @@ -2212,6 +3239,7 @@ public FreeScanResponse(FreeScanResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreeScanResponse Clone() { return new FreeScanResponse(this); } @@ -2220,6 +3248,7 @@ public FreeScanResponse Clone() { public const int EmailBreachesFieldNumber = 1; private int emailBreaches_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int EmailBreaches { get { return emailBreaches_; } set { @@ -2231,6 +3260,7 @@ public int EmailBreaches { public const int PasswordBreachesFieldNumber = 2; private int passwordBreaches_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int PasswordBreaches { get { return passwordBreaches_; } set { @@ -2239,11 +3269,13 @@ public int PasswordBreaches { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FreeScanResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FreeScanResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -2257,6 +3289,7 @@ public bool Equals(FreeScanResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EmailBreaches != 0) hash ^= EmailBreaches.GetHashCode(); @@ -2268,12 +3301,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EmailBreaches != 0) { output.WriteRawTag(8); output.WriteInt32(EmailBreaches); @@ -2285,9 +3323,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EmailBreaches != 0) { + output.WriteRawTag(8); + output.WriteInt32(EmailBreaches); + } + if (PasswordBreaches != 0) { + output.WriteRawTag(16); + output.WriteInt32(PasswordBreaches); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EmailBreaches != 0) { @@ -2303,6 +3361,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(FreeScanResponse other) { if (other == null) { return; @@ -2317,10 +3376,18 @@ public void MergeFrom(FreeScanResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2334,27 +3401,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EmailBreaches = input.ReadInt32(); + break; + } + case 16: { + PasswordBreaches = input.ReadInt32(); + break; + } + } + } } + #endif } - public sealed partial class PaidUserRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PaidUserRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PaidUserRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[14]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PaidUserRequest() { OnConstruction(); } @@ -2362,12 +3466,14 @@ public PaidUserRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PaidUserRequest(PaidUserRequest other) : this() { email_ = other.email_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PaidUserRequest Clone() { return new PaidUserRequest(this); } @@ -2376,6 +3482,7 @@ public PaidUserRequest Clone() { public const int EmailFieldNumber = 1; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -2384,11 +3491,13 @@ public string Email { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as PaidUserRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(PaidUserRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2401,6 +3510,7 @@ public bool Equals(PaidUserRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Email.Length != 0) hash ^= Email.GetHashCode(); @@ -2411,12 +3521,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Email.Length != 0) { output.WriteRawTag(10); output.WriteString(Email); @@ -2424,9 +3539,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Email.Length != 0) { @@ -2439,6 +3570,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(PaidUserRequest other) { if (other == null) { return; @@ -2450,10 +3582,18 @@ public void MergeFrom(PaidUserRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2463,27 +3603,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Email = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class PaidUserResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PaidUserResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PaidUserResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[15]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PaidUserResponse() { OnConstruction(); } @@ -2491,12 +3664,14 @@ public PaidUserResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PaidUserResponse(PaidUserResponse other) : this() { paidUser_ = other.paidUser_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PaidUserResponse Clone() { return new PaidUserResponse(this); } @@ -2505,6 +3680,7 @@ public PaidUserResponse Clone() { public const int PaidUserFieldNumber = 1; private bool paidUser_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool PaidUser { get { return paidUser_; } set { @@ -2513,11 +3689,13 @@ public bool PaidUser { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as PaidUserResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(PaidUserResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -2530,6 +3708,7 @@ public bool Equals(PaidUserResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (PaidUser != false) hash ^= PaidUser.GetHashCode(); @@ -2540,12 +3719,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (PaidUser != false) { output.WriteRawTag(8); output.WriteBool(PaidUser); @@ -2553,9 +3737,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PaidUser != false) { + output.WriteRawTag(8); + output.WriteBool(PaidUser); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (PaidUser != false) { @@ -2568,23 +3768,55 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(PaidUserResponse other) { if (other == null) { return; } - if (other.PaidUser != false) { - PaidUser = other.PaidUser; + if (other.PaidUser != false) { + PaidUser = other.PaidUser; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + PaidUser = input.ReadBool(); + break; + } + } } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 8: { PaidUser = input.ReadBool(); @@ -2593,26 +3825,36 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - public sealed partial class DetailedScanRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DetailedScanRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DetailedScanRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[16]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DetailedScanRequest() { OnConstruction(); } @@ -2620,12 +3862,14 @@ public DetailedScanRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DetailedScanRequest(DetailedScanRequest other) : this() { email_ = other.email_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public DetailedScanRequest Clone() { return new DetailedScanRequest(this); } @@ -2634,6 +3878,7 @@ public DetailedScanRequest Clone() { public const int EmailFieldNumber = 1; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -2642,11 +3887,13 @@ public string Email { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as DetailedScanRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(DetailedScanRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2659,6 +3906,7 @@ public bool Equals(DetailedScanRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Email.Length != 0) hash ^= Email.GetHashCode(); @@ -2669,12 +3917,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Email.Length != 0) { output.WriteRawTag(10); output.WriteString(Email); @@ -2682,9 +3935,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Email.Length != 0) { @@ -2697,6 +3966,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(DetailedScanRequest other) { if (other == null) { return; @@ -2708,10 +3978,18 @@ public void MergeFrom(DetailedScanRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2721,27 +3999,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Email = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class UseOneTimeTokenRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UseOneTimeTokenRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UseOneTimeTokenRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[17]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UseOneTimeTokenRequest() { OnConstruction(); } @@ -2749,12 +4060,14 @@ public UseOneTimeTokenRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UseOneTimeTokenRequest(UseOneTimeTokenRequest other) : this() { token_ = other.token_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UseOneTimeTokenRequest Clone() { return new UseOneTimeTokenRequest(this); } @@ -2763,6 +4076,7 @@ public UseOneTimeTokenRequest Clone() { public const int TokenFieldNumber = 1; private pb::ByteString token_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Token { get { return token_; } set { @@ -2771,11 +4085,13 @@ public UseOneTimeTokenRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as UseOneTimeTokenRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(UseOneTimeTokenRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2788,6 +4104,7 @@ public bool Equals(UseOneTimeTokenRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Token.Length != 0) hash ^= Token.GetHashCode(); @@ -2798,12 +4115,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Token.Length != 0) { output.WriteRawTag(10); output.WriteBytes(Token); @@ -2811,9 +4133,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Token.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Token); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Token.Length != 0) { @@ -2826,6 +4164,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(UseOneTimeTokenRequest other) { if (other == null) { return; @@ -2837,10 +4176,18 @@ public void MergeFrom(UseOneTimeTokenRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2850,27 +4197,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Token = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class BreachEvent : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachEvent : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachEvent()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[18]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachEvent() { OnConstruction(); } @@ -2878,6 +4258,7 @@ public BreachEvent() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachEvent(BreachEvent other) : this() { site_ = other.site_; email_ = other.email_; @@ -2888,6 +4269,7 @@ public BreachEvent(BreachEvent other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public BreachEvent Clone() { return new BreachEvent(this); } @@ -2896,6 +4278,7 @@ public BreachEvent Clone() { public const int SiteFieldNumber = 1; private string site_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Site { get { return site_; } set { @@ -2907,6 +4290,7 @@ public string Site { public const int EmailFieldNumber = 2; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -2918,6 +4302,7 @@ public string Email { public const int PasswordInBreachFieldNumber = 3; private bool passwordInBreach_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool PasswordInBreach { get { return passwordInBreach_; } set { @@ -2929,6 +4314,7 @@ public bool PasswordInBreach { public const int DateFieldNumber = 4; private string date_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Date { get { return date_; } set { @@ -2940,6 +4326,7 @@ public string Date { public const int DescriptionFieldNumber = 5; private string description_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Description { get { return description_; } set { @@ -2948,11 +4335,13 @@ public string Description { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as BreachEvent); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(BreachEvent other) { if (ReferenceEquals(other, null)) { return false; @@ -2969,6 +4358,7 @@ public bool Equals(BreachEvent other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Site.Length != 0) hash ^= Site.GetHashCode(); @@ -2983,12 +4373,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Site.Length != 0) { output.WriteRawTag(10); output.WriteString(Site); @@ -3012,9 +4407,41 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Site.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Site); + } + if (Email.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Email); + } + if (PasswordInBreach != false) { + output.WriteRawTag(24); + output.WriteBool(PasswordInBreach); + } + if (Date.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Date); + } + if (Description.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Description); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Site.Length != 0) { @@ -3039,6 +4466,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(BreachEvent other) { if (other == null) { return; @@ -3062,10 +4490,18 @@ public void MergeFrom(BreachEvent other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3091,27 +4527,76 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Site = input.ReadString(); + break; + } + case 18: { + Email = input.ReadString(); + break; + } + case 24: { + PasswordInBreach = input.ReadBool(); + break; + } + case 34: { + Date = input.ReadString(); + break; + } + case 42: { + Description = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class UseOneTimeTokenResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UseOneTimeTokenResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UseOneTimeTokenResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[19]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UseOneTimeTokenResponse() { OnConstruction(); } @@ -3119,6 +4604,7 @@ public UseOneTimeTokenResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UseOneTimeTokenResponse(UseOneTimeTokenResponse other) : this() { emailBreaches_ = other.emailBreaches_; passwordBreaches_ = other.passwordBreaches_; @@ -3128,6 +4614,7 @@ public UseOneTimeTokenResponse(UseOneTimeTokenResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UseOneTimeTokenResponse Clone() { return new UseOneTimeTokenResponse(this); } @@ -3136,6 +4623,7 @@ public UseOneTimeTokenResponse Clone() { public const int EmailBreachesFieldNumber = 1; private int emailBreaches_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int EmailBreaches { get { return emailBreaches_; } set { @@ -3147,6 +4635,7 @@ public int EmailBreaches { public const int PasswordBreachesFieldNumber = 2; private int passwordBreaches_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int PasswordBreaches { get { return passwordBreaches_; } set { @@ -3160,6 +4649,7 @@ public int PasswordBreaches { = pb::FieldCodec.ForMessage(26, global::BreachWatch.BreachEvent.Parser); private readonly pbc::RepeatedField breachEvents_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField BreachEvents { get { return breachEvents_; } } @@ -3168,6 +4658,7 @@ public int PasswordBreaches { public const int EmailFieldNumber = 4; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -3176,11 +4667,13 @@ public string Email { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as UseOneTimeTokenResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(UseOneTimeTokenResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -3196,6 +4689,7 @@ public bool Equals(UseOneTimeTokenResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EmailBreaches != 0) hash ^= EmailBreaches.GetHashCode(); @@ -3209,12 +4703,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EmailBreaches != 0) { output.WriteRawTag(8); output.WriteInt32(EmailBreaches); @@ -3231,9 +4730,34 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EmailBreaches != 0) { + output.WriteRawTag(8); + output.WriteInt32(EmailBreaches); + } + if (PasswordBreaches != 0) { + output.WriteRawTag(16); + output.WriteInt32(PasswordBreaches); + } + breachEvents_.WriteTo(ref output, _repeated_breachEvents_codec); + if (Email.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EmailBreaches != 0) { @@ -3253,6 +4777,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(UseOneTimeTokenResponse other) { if (other == null) { return; @@ -3271,10 +4796,18 @@ public void MergeFrom(UseOneTimeTokenResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3296,27 +4829,72 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EmailBreaches = input.ReadInt32(); + break; + } + case 16: { + PasswordBreaches = input.ReadInt32(); + break; + } + case 26: { + breachEvents_.AddEntriesFrom(ref input, _repeated_breachEvents_codec); + break; + } + case 34: { + Email = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class OneTimeUseToken : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class OneTimeUseToken : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new OneTimeUseToken()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[20]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public OneTimeUseToken() { OnConstruction(); } @@ -3324,6 +4902,7 @@ public OneTimeUseToken() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public OneTimeUseToken(OneTimeUseToken other) : this() { email_ = other.email_; pad_ = other.pad_; @@ -3331,6 +4910,7 @@ public OneTimeUseToken(OneTimeUseToken other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public OneTimeUseToken Clone() { return new OneTimeUseToken(this); } @@ -3339,6 +4919,7 @@ public OneTimeUseToken Clone() { public const int EmailFieldNumber = 1; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -3350,6 +4931,7 @@ public string Email { public const int PadFieldNumber = 2; private string pad_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Pad { get { return pad_; } set { @@ -3358,11 +4940,13 @@ public string Pad { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as OneTimeUseToken); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(OneTimeUseToken other) { if (ReferenceEquals(other, null)) { return false; @@ -3376,6 +4960,7 @@ public bool Equals(OneTimeUseToken other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Email.Length != 0) hash ^= Email.GetHashCode(); @@ -3387,12 +4972,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Email.Length != 0) { output.WriteRawTag(10); output.WriteString(Email); @@ -3404,9 +4994,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); + } + if (Pad.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Pad); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Email.Length != 0) { @@ -3422,6 +5032,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(OneTimeUseToken other) { if (other == null) { return; @@ -3436,10 +5047,18 @@ public void MergeFrom(OneTimeUseToken other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3453,27 +5072,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Email = input.ReadString(); + break; + } + case 18: { + Pad = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class FreePasswordScanRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FreePasswordScanRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FreePasswordScanRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[21]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreePasswordScanRequest() { OnConstruction(); } @@ -3481,12 +5137,14 @@ public FreePasswordScanRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreePasswordScanRequest(FreePasswordScanRequest other) : this() { hashedPassword_ = other.hashedPassword_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreePasswordScanRequest Clone() { return new FreePasswordScanRequest(this); } @@ -3495,6 +5153,7 @@ public FreePasswordScanRequest Clone() { public const int HashedPasswordFieldNumber = 1; private pb::ByteString hashedPassword_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString HashedPassword { get { return hashedPassword_; } set { @@ -3503,11 +5162,13 @@ public FreePasswordScanRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FreePasswordScanRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FreePasswordScanRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -3520,6 +5181,7 @@ public bool Equals(FreePasswordScanRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (HashedPassword.Length != 0) hash ^= HashedPassword.GetHashCode(); @@ -3530,12 +5192,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (HashedPassword.Length != 0) { output.WriteRawTag(10); output.WriteBytes(HashedPassword); @@ -3543,9 +5210,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (HashedPassword.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(HashedPassword); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (HashedPassword.Length != 0) { @@ -3558,6 +5241,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(FreePasswordScanRequest other) { if (other == null) { return; @@ -3569,10 +5253,18 @@ public void MergeFrom(FreePasswordScanRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3582,27 +5274,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + HashedPassword = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class FreePasswordScanResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FreePasswordScanResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FreePasswordScanResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::BreachWatch.BreachwatchReflection.Descriptor.MessageTypes[22]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreePasswordScanResponse() { OnConstruction(); } @@ -3610,12 +5335,14 @@ public FreePasswordScanResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreePasswordScanResponse(FreePasswordScanResponse other) : this() { passwordBreaches_ = other.passwordBreaches_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FreePasswordScanResponse Clone() { return new FreePasswordScanResponse(this); } @@ -3624,6 +5351,7 @@ public FreePasswordScanResponse Clone() { public const int PasswordBreachesFieldNumber = 1; private long passwordBreaches_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long PasswordBreaches { get { return passwordBreaches_; } set { @@ -3632,11 +5360,13 @@ public long PasswordBreaches { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FreePasswordScanResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FreePasswordScanResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -3649,6 +5379,7 @@ public bool Equals(FreePasswordScanResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (PasswordBreaches != 0L) hash ^= PasswordBreaches.GetHashCode(); @@ -3659,12 +5390,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (PasswordBreaches != 0L) { output.WriteRawTag(8); output.WriteInt64(PasswordBreaches); @@ -3672,9 +5408,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (PasswordBreaches != 0L) { + output.WriteRawTag(8); + output.WriteInt64(PasswordBreaches); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (PasswordBreaches != 0L) { @@ -3687,6 +5439,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(FreePasswordScanResponse other) { if (other == null) { return; @@ -3698,10 +5451,18 @@ public void MergeFrom(FreePasswordScanResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3711,7 +5472,31 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + PasswordBreaches = input.ReadInt64(); + break; + } + } + } } + #endif } diff --git a/KeeperSdk/proto/Client.cs b/KeeperSdk/proto/Client.cs new file mode 100644 index 0000000..ed057b7 --- /dev/null +++ b/KeeperSdk/proto/Client.cs @@ -0,0 +1,1178 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: client.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Tokens { + + /// Holder for reflection information generated from client.proto + public static partial class ClientReflection { + + #region Descriptor + /// File descriptor for client.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static ClientReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CgxjbGllbnQucHJvdG8SBlRva2VucyJ1ChhCcmVhY2hXYXRjaFVwZGF0ZVJl", + "cXVlc3QSQgoYYnJlYWNoV2F0Y2hSZWNvcmRSZXF1ZXN0GAEgAygLMiAuVG9r", + "ZW5zLkJyZWFjaFdhdGNoUmVjb3JkUmVxdWVzdBIVCg1lbmNyeXB0ZWREYXRh", + "GAIgASgMIpwBChhCcmVhY2hXYXRjaFJlY29yZFJlcXVlc3QSEQoJcmVjb3Jk", + "VWlkGAEgASgMEhUKDWVuY3J5cHRlZERhdGEYAiABKAwSOAoTYnJlYWNoV2F0", + "Y2hJbmZvVHlwZRgDIAEoDjIbLlRva2Vucy5CcmVhY2hXYXRjaEluZm9UeXBl", + "EhwKFHVwZGF0ZVVzZXJXaG9TY2FubmVkGAQgASgIIoEBCg9CcmVhY2hXYXRj", + "aERhdGESJQoJcGFzc3dvcmRzGAEgAygLMhIuVG9rZW5zLkJXUGFzc3dvcmQS", + "IgoGZW1haWxzGAIgAygLMhIuVG9rZW5zLkJXUGFzc3dvcmQSIwoHZG9tYWlu", + "cxgDIAMoCzISLlRva2Vucy5CV1Bhc3N3b3JkIl0KCkJXUGFzc3dvcmQSDQoF", + "dmFsdWUYASABKAkSEAoIcmVzb2x2ZWQYAiABKAQSIAoGc3RhdHVzGAMgASgO", + "MhAuVG9rZW5zLkJXU3RhdHVzEgwKBGV1aWQYBCABKAwqOQoTQnJlYWNoV2F0", + "Y2hJbmZvVHlwZRIKCgZSRUNPUkQQABIWChJBTFRFUk5BVEVfUEFTU1dPUkQQ", + "ASpFCghCV1N0YXR1cxIICgRHT09EEAASCwoHQ0hBTkdFRBABEggKBFdFQUsQ", + "AhIMCghCUkVBQ0hFRBADEgoKBklHTk9SRRAEQiIKGGNvbS5rZWVwZXJzZWN1", + "cml0eS5wcm90b0IGQ2xpZW50YgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Tokens.BreachWatchInfoType), typeof(global::Tokens.BWStatus), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Tokens.BreachWatchUpdateRequest), global::Tokens.BreachWatchUpdateRequest.Parser, new[]{ "BreachWatchRecordRequest", "EncryptedData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tokens.BreachWatchRecordRequest), global::Tokens.BreachWatchRecordRequest.Parser, new[]{ "RecordUid", "EncryptedData", "BreachWatchInfoType", "UpdateUserWhoScanned" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tokens.BreachWatchData), global::Tokens.BreachWatchData.Parser, new[]{ "Passwords", "Emails", "Domains" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Tokens.BWPassword), global::Tokens.BWPassword.Parser, new[]{ "Value", "Resolved", "Status", "Euid" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum BreachWatchInfoType { + /// + /// note: this also is used for master password where the recordUid is blank + /// + [pbr::OriginalName("RECORD")] Record = 0, + /// + /// for any user_auth passwords, including the passwords used through Pythia + /// + [pbr::OriginalName("ALTERNATE_PASSWORD")] AlternatePassword = 1, + } + + public enum BWStatus { + [pbr::OriginalName("GOOD")] Good = 0, + [pbr::OriginalName("CHANGED")] Changed = 1, + [pbr::OriginalName("WEAK")] Weak = 2, + [pbr::OriginalName("BREACHED")] Breached = 3, + [pbr::OriginalName("IGNORE")] Ignore = 4, + } + + #endregion + + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchUpdateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tokens.ClientReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchUpdateRequest(BreachWatchUpdateRequest other) : this() { + breachWatchRecordRequest_ = other.breachWatchRecordRequest_.Clone(); + encryptedData_ = other.encryptedData_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchUpdateRequest Clone() { + return new BreachWatchUpdateRequest(this); + } + + /// Field number for the "breachWatchRecordRequest" field. + public const int BreachWatchRecordRequestFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_breachWatchRecordRequest_codec + = pb::FieldCodec.ForMessage(10, global::Tokens.BreachWatchRecordRequest.Parser); + private readonly pbc::RepeatedField breachWatchRecordRequest_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField BreachWatchRecordRequest { + get { return breachWatchRecordRequest_; } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 2; + private pb::ByteString encryptedData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BreachWatchUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BreachWatchUpdateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!breachWatchRecordRequest_.Equals(other.breachWatchRecordRequest_)) return false; + if (EncryptedData != other.EncryptedData) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= breachWatchRecordRequest_.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + breachWatchRecordRequest_.WriteTo(output, _repeated_breachWatchRecordRequest_codec); + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + breachWatchRecordRequest_.WriteTo(ref output, _repeated_breachWatchRecordRequest_codec); + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += breachWatchRecordRequest_.CalculateSize(_repeated_breachWatchRecordRequest_codec); + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedData); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BreachWatchUpdateRequest other) { + if (other == null) { + return; + } + breachWatchRecordRequest_.Add(other.breachWatchRecordRequest_); + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + breachWatchRecordRequest_.AddEntriesFrom(input, _repeated_breachWatchRecordRequest_codec); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + breachWatchRecordRequest_.AddEntriesFrom(ref input, _repeated_breachWatchRecordRequest_codec); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchRecordRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchRecordRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tokens.ClientReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchRecordRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchRecordRequest(BreachWatchRecordRequest other) : this() { + recordUid_ = other.recordUid_; + encryptedData_ = other.encryptedData_; + breachWatchInfoType_ = other.breachWatchInfoType_; + updateUserWhoScanned_ = other.updateUserWhoScanned_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchRecordRequest Clone() { + return new BreachWatchRecordRequest(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + /// + /// if you store the recordUid as a string this is URLSafeBase64.decode(recordUid) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 2; + private pb::ByteString encryptedData_ = pb::ByteString.Empty; + /// + /// This is a BreachWatchRecordData message encrypted with the record key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "breachWatchInfoType" field. + public const int BreachWatchInfoTypeFieldNumber = 3; + private global::Tokens.BreachWatchInfoType breachWatchInfoType_ = global::Tokens.BreachWatchInfoType.Record; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Tokens.BreachWatchInfoType BreachWatchInfoType { + get { return breachWatchInfoType_; } + set { + breachWatchInfoType_ = value; + } + } + + /// Field number for the "updateUserWhoScanned" field. + public const int UpdateUserWhoScannedFieldNumber = 4; + private bool updateUserWhoScanned_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UpdateUserWhoScanned { + get { return updateUserWhoScanned_; } + set { + updateUserWhoScanned_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BreachWatchRecordRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BreachWatchRecordRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (EncryptedData != other.EncryptedData) return false; + if (BreachWatchInfoType != other.BreachWatchInfoType) return false; + if (UpdateUserWhoScanned != other.UpdateUserWhoScanned) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (BreachWatchInfoType != global::Tokens.BreachWatchInfoType.Record) hash ^= BreachWatchInfoType.GetHashCode(); + if (UpdateUserWhoScanned != false) hash ^= UpdateUserWhoScanned.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (BreachWatchInfoType != global::Tokens.BreachWatchInfoType.Record) { + output.WriteRawTag(24); + output.WriteEnum((int) BreachWatchInfoType); + } + if (UpdateUserWhoScanned != false) { + output.WriteRawTag(32); + output.WriteBool(UpdateUserWhoScanned); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (BreachWatchInfoType != global::Tokens.BreachWatchInfoType.Record) { + output.WriteRawTag(24); + output.WriteEnum((int) BreachWatchInfoType); + } + if (UpdateUserWhoScanned != false) { + output.WriteRawTag(32); + output.WriteBool(UpdateUserWhoScanned); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedData); + } + if (BreachWatchInfoType != global::Tokens.BreachWatchInfoType.Record) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) BreachWatchInfoType); + } + if (UpdateUserWhoScanned != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BreachWatchRecordRequest other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.BreachWatchInfoType != global::Tokens.BreachWatchInfoType.Record) { + BreachWatchInfoType = other.BreachWatchInfoType; + } + if (other.UpdateUserWhoScanned != false) { + UpdateUserWhoScanned = other.UpdateUserWhoScanned; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + case 24: { + BreachWatchInfoType = (global::Tokens.BreachWatchInfoType) input.ReadEnum(); + break; + } + case 32: { + UpdateUserWhoScanned = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + case 24: { + BreachWatchInfoType = (global::Tokens.BreachWatchInfoType) input.ReadEnum(); + break; + } + case 32: { + UpdateUserWhoScanned = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BreachWatchData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BreachWatchData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tokens.ClientReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchData(BreachWatchData other) : this() { + passwords_ = other.passwords_.Clone(); + emails_ = other.emails_.Clone(); + domains_ = other.domains_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BreachWatchData Clone() { + return new BreachWatchData(this); + } + + /// Field number for the "passwords" field. + public const int PasswordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_passwords_codec + = pb::FieldCodec.ForMessage(10, global::Tokens.BWPassword.Parser); + private readonly pbc::RepeatedField passwords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Passwords { + get { return passwords_; } + } + + /// Field number for the "emails" field. + public const int EmailsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_emails_codec + = pb::FieldCodec.ForMessage(18, global::Tokens.BWPassword.Parser); + private readonly pbc::RepeatedField emails_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Emails { + get { return emails_; } + } + + /// Field number for the "domains" field. + public const int DomainsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_domains_codec + = pb::FieldCodec.ForMessage(26, global::Tokens.BWPassword.Parser); + private readonly pbc::RepeatedField domains_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Domains { + get { return domains_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BreachWatchData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BreachWatchData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!passwords_.Equals(other.passwords_)) return false; + if(!emails_.Equals(other.emails_)) return false; + if(!domains_.Equals(other.domains_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= passwords_.GetHashCode(); + hash ^= emails_.GetHashCode(); + hash ^= domains_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + passwords_.WriteTo(output, _repeated_passwords_codec); + emails_.WriteTo(output, _repeated_emails_codec); + domains_.WriteTo(output, _repeated_domains_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + passwords_.WriteTo(ref output, _repeated_passwords_codec); + emails_.WriteTo(ref output, _repeated_emails_codec); + domains_.WriteTo(ref output, _repeated_domains_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += passwords_.CalculateSize(_repeated_passwords_codec); + size += emails_.CalculateSize(_repeated_emails_codec); + size += domains_.CalculateSize(_repeated_domains_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BreachWatchData other) { + if (other == null) { + return; + } + passwords_.Add(other.passwords_); + emails_.Add(other.emails_); + domains_.Add(other.domains_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + passwords_.AddEntriesFrom(input, _repeated_passwords_codec); + break; + } + case 18: { + emails_.AddEntriesFrom(input, _repeated_emails_codec); + break; + } + case 26: { + domains_.AddEntriesFrom(input, _repeated_domains_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + passwords_.AddEntriesFrom(ref input, _repeated_passwords_codec); + break; + } + case 18: { + emails_.AddEntriesFrom(ref input, _repeated_emails_codec); + break; + } + case 26: { + domains_.AddEntriesFrom(ref input, _repeated_domains_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BWPassword : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BWPassword()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Tokens.ClientReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BWPassword() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BWPassword(BWPassword other) : this() { + value_ = other.value_; + resolved_ = other.resolved_; + status_ = other.status_; + euid_ = other.euid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BWPassword Clone() { + return new BWPassword(this); + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 1; + private string value_ = ""; + /// + /// the original password + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "resolved" field. + public const int ResolvedFieldNumber = 2; + private ulong resolved_; + /// + /// time stamp for when it was resolved + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Resolved { + get { return resolved_; } + set { + resolved_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private global::Tokens.BWStatus status_ = global::Tokens.BWStatus.Good; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Tokens.BWStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "euid" field. + public const int EuidFieldNumber = 4; + private pb::ByteString euid_ = pb::ByteString.Empty; + /// + /// if breached this is empty, else this is the value returned by keeperapp after submission + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Euid { + get { return euid_; } + set { + euid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BWPassword); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BWPassword other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Value != other.Value) return false; + if (Resolved != other.Resolved) return false; + if (Status != other.Status) return false; + if (Euid != other.Euid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (Resolved != 0UL) hash ^= Resolved.GetHashCode(); + if (Status != global::Tokens.BWStatus.Good) hash ^= Status.GetHashCode(); + if (Euid.Length != 0) hash ^= Euid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Value.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Value); + } + if (Resolved != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(Resolved); + } + if (Status != global::Tokens.BWStatus.Good) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (Euid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Euid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Value.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Value); + } + if (Resolved != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(Resolved); + } + if (Status != global::Tokens.BWStatus.Good) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (Euid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Euid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (Resolved != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Resolved); + } + if (Status != global::Tokens.BWStatus.Good) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Euid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Euid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BWPassword other) { + if (other == null) { + return; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + if (other.Resolved != 0UL) { + Resolved = other.Resolved; + } + if (other.Status != global::Tokens.BWStatus.Good) { + Status = other.Status; + } + if (other.Euid.Length != 0) { + Euid = other.Euid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Value = input.ReadString(); + break; + } + case 16: { + Resolved = input.ReadUInt64(); + break; + } + case 24: { + Status = (global::Tokens.BWStatus) input.ReadEnum(); + break; + } + case 34: { + Euid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Value = input.ReadString(); + break; + } + case 16: { + Resolved = input.ReadUInt64(); + break; + } + case 24: { + Status = (global::Tokens.BWStatus) input.ReadEnum(); + break; + } + case 34: { + Euid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/KeeperSdk/proto/Enterprise.cs b/KeeperSdk/proto/Enterprise.cs index a046a24..f1a5986 100644 --- a/KeeperSdk/proto/Enterprise.cs +++ b/KeeperSdk/proto/Enterprise.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: enterprise.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -28,205 +28,474 @@ static EnterpriseReflection() { "S2V5UGFpclJlcXVlc3QSGwoTZW50ZXJwcmlzZVB1YmxpY0tleRgBIAEoDBIl", "Ch1lbmNyeXB0ZWRFbnRlcnByaXNlUHJpdmF0ZUtleRgCIAEoDBIkCgdrZXlU", "eXBlGAMgASgOMhMuRW50ZXJwcmlzZS5LZXlUeXBlIicKFEdldFRlYW1NZW1i", - "ZXJSZXF1ZXN0Eg8KB3RlYW1VaWQYASABKAwiVQoORW50ZXJwcmlzZVVzZXIS", + "ZXJSZXF1ZXN0Eg8KB3RlYW1VaWQYASABKAwifQoORW50ZXJwcmlzZVVzZXIS", "GAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxINCgVlbWFpbBgCIAEoCRIaChJl", - "bnRlcnByaXNlVXNlcm5hbWUYAyABKAkiSwoVR2V0VGVhbU1lbWJlclJlc3Bv", - "bnNlEjIKDmVudGVycHJpc2VVc2VyGAEgAygLMhouRW50ZXJwcmlzZS5FbnRl", - "cnByaXNlVXNlciItChFFbnRlcnByaXNlVXNlcklkcxIYChBlbnRlcnByaXNl", - "VXNlcklkGAEgAygDIkIKGUVudGVycHJpc2VQZXJzb25hbEFjY291bnQSDQoF", - "ZW1haWwYASABKAkSFgoOT0JTT0xFVEVfRklFTEQYAiABKAwiUwoXRW5jcnlw", - "dGVkVGVhbUtleVJlcXVlc3QSDwoHdGVhbVVpZBgBIAEoDBIYChBlbmNyeXB0", - "ZWRUZWFtS2V5GAIgASgMEg0KBWZvcmNlGAMgASgIIisKD1JlRW5jcnlwdGVk", - "RGF0YRIKCgJpZBgBIAEoAxIMCgRkYXRhGAIgASgJIj8KElJlRW5jcnlwdGVk", - "Um9sZUtleRIPCgdyb2xlX2lkGAEgASgDEhgKEGVuY3J5cHRlZFJvbGVLZXkY", - "AiABKAwinQIKG05vZGVUb01hbmFnZWRDb21wYW55UmVxdWVzdBIRCgljb21w", - "YW55SWQYASABKAUSKgoFbm9kZXMYAiADKAsyGy5FbnRlcnByaXNlLlJlRW5j", - "cnlwdGVkRGF0YRIqCgVyb2xlcxgDIAMoCzIbLkVudGVycHJpc2UuUmVFbmNy", - "eXB0ZWREYXRhEioKBXVzZXJzGAQgAygLMhsuRW50ZXJwcmlzZS5SZUVuY3J5", - "cHRlZERhdGESMAoIcm9sZUtleXMYBSADKAsyHi5FbnRlcnByaXNlLlJlRW5j", - "cnlwdGVkUm9sZUtleRI1Cgh0ZWFtS2V5cxgGIAMoCzIjLkVudGVycHJpc2Uu", - "RW5jcnlwdGVkVGVhbUtleVJlcXVlc3QiLAoIUm9sZVRlYW0SDwoHcm9sZV9p", - "ZBgBIAEoAxIPCgd0ZWFtVWlkGAIgASgMIjQKCVJvbGVUZWFtcxInCglyb2xl", - "X3RlYW0YASADKAsyFC5FbnRlcnByaXNlLlJvbGVUZWFtIsEDChZFbnRlcnBy", - "aXNlUmVnaXN0cmF0aW9uEhgKEGVuY3J5cHRlZFRyZWVLZXkYASABKAwSFgoO", - "ZW50ZXJwcmlzZU5hbWUYAiABKAkSFAoMcm9vdE5vZGVEYXRhGAMgASgMEhUK", - "DWFkbWluVXNlckRhdGEYBCABKAwSEQoJYWRtaW5OYW1lGAUgASgJEhAKCHJv", - "bGVEYXRhGAYgASgMEjgKCnJzYUtleVBhaXIYByABKAsyJC5FbnRlcnByaXNl", - "LkVudGVycHJpc2VLZXlQYWlyUmVxdWVzdBITCgtudW1iZXJTZWF0cxgIIAEo", - "BRIyCg5lbnRlcnByaXNlVHlwZRgJIAEoDjIaLkVudGVycHJpc2UuRW50ZXJw", - "cmlzZVR5cGUSFQoNcm9sZVB1YmxpY0tleRgKIAEoDBIqCiJyb2xlUHJpdmF0", - "ZUtleUVuY3J5cHRlZFdpdGhSb2xlS2V5GAsgASgMEiMKG3JvbGVLZXlFbmNy", - "eXB0ZWRXaXRoVHJlZUtleRgMIAEoDBI4CgplY2NLZXlQYWlyGA0gASgLMiQu", - "RW50ZXJwcmlzZS5FbnRlcnByaXNlS2V5UGFpclJlcXVlc3QiLgoaRG9tYWlu", - "UGFzc3dvcmRSdWxlc1JlcXVlc3QSEAoIdXNlcm5hbWUYASABKAkiXAoZRG9t", - "YWluUGFzc3dvcmRSdWxlc0ZpZWxkcxIMCgR0eXBlGAEgASgJEg8KB21pbmlt", - "dW0YAiABKAUSDwoHbWF4aW11bRgDIAEoBRIPCgdhbGxvd2VkGAQgASgIIkUK", - "EExvZ2luVG9NY1JlcXVlc3QSFgoObWNFbnRlcnByaXNlSWQYASABKAUSGQoR", - "bWVzc2FnZVNlc3Npb25VaWQYAiABKAwiTAoRTG9naW5Ub01jUmVzcG9uc2US", - "HQoVZW5jcnlwdGVkU2Vzc2lvblRva2VuGAEgASgMEhgKEGVuY3J5cHRlZFRy", - "ZWVLZXkYAiABKAkiZwobRG9tYWluUGFzc3dvcmRSdWxlc1Jlc3BvbnNlEkgK", - "GWRvbWFpblBhc3N3b3JkUnVsZXNGaWVsZHMYASADKAsyJS5FbnRlcnByaXNl", - "LkRvbWFpblBhc3N3b3JkUnVsZXNGaWVsZHMiiAEKGEFwcHJvdmVVc2VyRGV2", - "aWNlUmVxdWVzdBIYChBlbnRlcnByaXNlVXNlcklkGAEgASgDEhwKFGVuY3J5", - "cHRlZERldmljZVRva2VuGAIgASgMEh4KFmVuY3J5cHRlZERldmljZURhdGFL", - "ZXkYAyABKAwSFAoMZGVueUFwcHJvdmFsGAQgASgIInQKGUFwcHJvdmVVc2Vy", - "RGV2aWNlUmVzcG9uc2USGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIcChRl", - "bmNyeXB0ZWREZXZpY2VUb2tlbhgCIAEoDBIOCgZmYWlsZWQYAyABKAgSDwoH", - "bWVzc2FnZRgEIAEoCSJZChlBcHByb3ZlVXNlckRldmljZXNSZXF1ZXN0EjwK", - "DmRldmljZVJlcXVlc3RzGAEgAygLMiQuRW50ZXJwcmlzZS5BcHByb3ZlVXNl", - "ckRldmljZVJlcXVlc3QiXAoaQXBwcm92ZVVzZXJEZXZpY2VzUmVzcG9uc2US", - "PgoPZGV2aWNlUmVzcG9uc2VzGAEgAygLMiUuRW50ZXJwcmlzZS5BcHByb3Zl", - "VXNlckRldmljZVJlc3BvbnNlImIKFUVudGVycHJpc2VVc2VyRGF0YUtleRIY", - "ChBlbnRlcnByaXNlVXNlcklkGAEgASgDEhwKFHVzZXJFbmNyeXB0ZWREYXRh", - "S2V5GAIgASgMEhEKCWtleVR5cGVJZBgDIAEoBSJJChZFbnRlcnByaXNlVXNl", - "ckRhdGFLZXlzEi8KBGtleXMYASADKAsyIS5FbnRlcnByaXNlLkVudGVycHJp", - "c2VVc2VyRGF0YUtleSIyChVFbnRlcnByaXNlRGF0YVJlcXVlc3QSGQoRY29u", - "dGludWF0aW9uVG9rZW4YASABKAwiMAoTU3BlY2lhbFByb3Zpc2lvbmluZxIL", - "CgN1cmwYASABKAkSDAoEbmFtZRgCIAEoCSK3AQoRR2VuZXJhbERhdGFFbnRp", - "dHkSFgoOZW50ZXJwcmlzZU5hbWUYASABKAkSGgoScmVzdHJpY3RWaXNpYmls", - "aXR5GAIgASgIEjwKE3NwZWNpYWxQcm92aXNpb25pbmcYBCABKAsyHy5FbnRl", - "cnByaXNlLlNwZWNpYWxQcm92aXNpb25pbmcSMAoNdXNlclByaXZpbGVnZRgH", - "IAEoCzIZLkVudGVycHJpc2UuVXNlclByaXZpbGVnZSLWAQoETm9kZRIOCgZu", - "b2RlSWQYASABKAMSEAoIcGFyZW50SWQYAiABKAMSEAoIYnJpZGdlSWQYAyAB", - "KAMSDgoGc2NpbUlkGAQgASgDEhEKCWxpY2Vuc2VJZBgFIAEoAxIVCg1lbmNy", - "eXB0ZWREYXRhGAYgASgJEhIKCmR1b0VuYWJsZWQYByABKAgSEgoKcnNhRW5h", - "YmxlZBgIIAEoCBIcChRzc29TZXJ2aWNlUHJvdmlkZXJJZBgJIAEoAxIaChJy", - "ZXN0cmljdFZpc2liaWxpdHkYCiABKAgijgEKBFJvbGUSDgoGcm9sZUlkGAEg", - "ASgDEg4KBm5vZGVJZBgCIAEoAxIVCg1lbmNyeXB0ZWREYXRhGAMgASgJEg8K", - "B2tleVR5cGUYBCABKAkSFAoMdmlzaWJsZUJlbG93GAUgASgIEhYKDm5ld1Vz", - "ZXJJbmhlcml0GAYgASgIEhAKCHJvbGVUeXBlGAcgASgJIrgBCgRVc2VyEhgK", - "EGVudGVycHJpc2VVc2VySWQYASABKAMSDgoGbm9kZUlkGAIgASgDEhUKDWVu", - "Y3J5cHRlZERhdGEYAyABKAkSDwoHa2V5VHlwZRgEIAEoCRIQCgh1c2VybmFt", - "ZRgFIAEoCRIOCgZzdGF0dXMYBiABKAkSDAoEbG9jaxgHIAEoBRIOCgZ1c2Vy", - "SWQYCCABKAUSHgoWYWNjb3VudFNoYXJlRXhwaXJhdGlvbhgJIAEoAyI3CglV", - "c2VyQWxpYXMSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIQCgh1c2VybmFt", - "ZRgCIAEoCSJTCgtNYW5hZ2VkTm9kZRIOCgZyb2xlSWQYASABKAMSFQoNbWFu", - "YWdlZE5vZGVJZBgCIAEoAxIdChVjYXNjYWRlTm9kZU1hbmFnZW1lbnQYAyAB", - "KAgiVAoPVXNlck1hbmFnZWROb2RlEg4KBm5vZGVJZBgBIAEoAxIdChVjYXNj", - "YWRlTm9kZU1hbmFnZW1lbnQYAiABKAgSEgoKcHJpdmlsZWdlcxgDIAMoCSJ3", - "Cg1Vc2VyUHJpdmlsZWdlEjUKEHVzZXJNYW5hZ2VkTm9kZXMYASADKAsyGy5F", - "bnRlcnByaXNlLlVzZXJNYW5hZ2VkTm9kZRIYChBlbnRlcnByaXNlVXNlcklk", - "GAIgASgDEhUKDWVuY3J5cHRlZERhdGEYAyABKAkiNAoIUm9sZVVzZXISDgoG", - "cm9sZUlkGAEgASgDEhgKEGVudGVycHJpc2VVc2VySWQYAiABKAMiTQoNUm9s", - "ZVByaXZpbGVnZRIVCg1tYW5hZ2VkTm9kZUlkGAEgASgDEg4KBnJvbGVJZBgC", - "IAEoAxIVCg1wcml2aWxlZ2VUeXBlGAMgASgJIkkKD1JvbGVFbmZvcmNlbWVu", - "dBIOCgZyb2xlSWQYASABKAMSFwoPZW5mb3JjZW1lbnRUeXBlGAIgASgJEg0K", - "BXZhbHVlGAMgASgJIqkBCgRUZWFtEg8KB3RlYW1VaWQYASABKAwSDAoEbmFt", - "ZRgCIAEoCRIOCgZub2RlSWQYAyABKAMSFAoMcmVzdHJpY3RFZGl0GAQgASgI", - "EhUKDXJlc3RyaWN0U2hhcmUYBSABKAgSFAoMcmVzdHJpY3RWaWV3GAYgASgI", - "EhUKDWVuY3J5cHRlZERhdGEYByABKAkSGAoQZW5jcnlwdGVkVGVhbUtleRgI", - "IAEoCSJHCghUZWFtVXNlchIPCgd0ZWFtVWlkGAEgASgMEhgKEGVudGVycHJp", - "c2VVc2VySWQYAiABKAMSEAoIdXNlclR5cGUYAyABKAki0QEKDk1hbmFnZWRD", - "b21wYW55EhYKDm1jRW50ZXJwcmlzZUlkGAEgASgFEhgKEG1jRW50ZXJwcmlz", - "ZU5hbWUYAiABKAkSEQoJbXNwTm9kZUlkGAMgASgDEhUKDW51bWJlck9mU2Vh", - "dHMYBCABKAUSFQoNbnVtYmVyT2ZVc2VycxgFIAEoBRIRCglwcm9kdWN0SWQY", - "BiABKAkSEQoJaXNFeHBpcmVkGAcgASgIEg8KB3RyZWVLZXkYCCABKAkSFQoN", - "dHJlZV9rZXlfcm9sZRgJIAEoAyJSCgdNU1BQb29sEhEKCXByb2R1Y3RJZBgB", - "IAEoCRINCgVzZWF0cxgCIAEoBRIWCg5hdmFpbGFibGVTZWF0cxgDIAEoBRIN", - "CgVzdGFzaBgEIAEoBSI6CgpNU1BDb250YWN0EhQKDGVudGVycHJpc2VJZBgB", - "IAEoBRIWCg5lbnRlcnByaXNlTmFtZRgCIAEoCSJjCgxMaWNlbnNlQWRkT24S", - "DAoEbmFtZRgBIAEoCRIPCgdlbmFibGVkGAIgASgIEg8KB2lzVHJpYWwYAyAB", - "KAgSEgoKZXhwaXJhdGlvbhgEIAEoAxIPCgdjcmVhdGVkGAUgASgDIq0DCgdM", - "aWNlbnNlEgwKBHBhaWQYASABKAgSFQoNbnVtYmVyT2ZTZWF0cxgCIAEoBRIS", - "CgpleHBpcmF0aW9uGAMgASgDEhQKDGxpY2Vuc2VLZXlJZBgEIAEoBRIVCg1w", - "cm9kdWN0VHlwZUlkGAUgASgFEgwKBG5hbWUYBiABKAkSGwoTZW50ZXJwcmlz", - "ZUxpY2Vuc2VJZBgHIAEoAxIWCg5zZWF0c0FsbG9jYXRlZBgIIAEoBRIUCgxz", - "ZWF0c1BlbmRpbmcYCSABKAUSDAoEdGllchgKIAEoBRIWCg5maWxlUGxhblR5", - "cGVJZBgLIAEoBRIQCghtYXhCeXRlcxgMIAEoAxIZChFzdG9yYWdlRXhwaXJh", - "dGlvbhgNIAEoAxIVCg1saWNlbnNlU3RhdHVzGA4gASgJEiQKB21zcFBvb2wY", - "DyADKAsyEy5FbnRlcnByaXNlLk1TUFBvb2wSKQoJbWFuYWdlZEJ5GBAgASgL", - "MhYuRW50ZXJwcmlzZS5NU1BDb250YWN0EigKBmFkZE9ucxgRIAMoCzIYLkVu", - "dGVycHJpc2UuTGljZW5zZUFkZE9uIm4KBkJyaWRnZRIQCghicmlkZ2VJZBgB", - "IAEoAxIOCgZub2RlSWQYAiABKAMSGAoQd2FuSXBFbmZvcmNlbWVudBgDIAEo", - "CRIYChBsYW5JcEVuZm9yY2VtZW50GAQgASgJEg4KBnN0YXR1cxgFIAEoCSJ0", - "CgRTY2ltEg4KBnNjaW1JZBgBIAEoAxIOCgZub2RlSWQYAiABKAMSDgoGc3Rh", - "dHVzGAMgASgJEhIKCmxhc3RTeW5jZWQYBCABKAMSEgoKcm9sZVByZWZpeBgF", - "IAEoCRIUCgx1bmlxdWVHcm91cHMYBiABKAgiTAoORW1haWxQcm92aXNpb24S", - "CgoCaWQYASABKAUSDgoGbm9kZUlkGAIgASgDEg4KBmRvbWFpbhgDIAEoCRIO", - "CgZtZXRob2QYBCABKAkiUgoKUXVldWVkVGVhbRIPCgd0ZWFtVWlkGAEgASgM", - "EgwKBG5hbWUYAiABKAkSDgoGbm9kZUlkGAMgASgDEhUKDWVuY3J5cHRlZERh", - "dGEYBCABKAkiMAoOUXVldWVkVGVhbVVzZXISDwoHdGVhbVVpZBgBIAEoDBIN", - "CgV1c2VycxgCIAMoAyKRAQoKU3NvU2VydmljZRIcChRzc29TZXJ2aWNlUHJv", - "dmlkZXJJZBgBIAEoAxIOCgZub2RlSWQYAiABKAMSDAoEbmFtZRgDIAEoCRIO", - "CgZzcF91cmwYBCABKAkSFgoOaW52aXRlTmV3VXNlcnMYBSABKAgSDgoGYWN0", - "aXZlGAYgASgIEg8KB2lzQ2xvdWQYByABKAgiMQoQUmVwb3J0RmlsdGVyVXNl", - "chIOCgZ1c2VySWQYASABKAUSDQoFZW1haWwYAiABKAkilwIKHURldmljZVJl", - "cXVlc3RGb3JBZG1pbkFwcHJvdmFsEhAKCGRldmljZUlkGAEgASgDEhgKEGVu", - "dGVycHJpc2VVc2VySWQYAiABKAMSHAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4Y", - "AyABKAwSFwoPZGV2aWNlUHVibGljS2V5GAQgASgMEhIKCmRldmljZU5hbWUY", - "BSABKAkSFQoNY2xpZW50VmVyc2lvbhgGIAEoCRISCgpkZXZpY2VUeXBlGAcg", - "ASgJEgwKBGRhdGUYCCABKAMSEQoJaXBBZGRyZXNzGAkgASgJEhAKCGxvY2F0", - "aW9uGAogASgJEg0KBWVtYWlsGAsgASgJEhIKCmFjY291bnRVaWQYDCABKAwi", - "YAoORW50ZXJwcmlzZURhdGESMAoGZW50aXR5GAEgASgOMiAuRW50ZXJwcmlz", - "ZS5FbnRlcnByaXNlRGF0YUVudGl0eRIOCgZkZWxldGUYAiABKAgSDAoEZGF0", - "YRgDIAMoDCLQAQoWRW50ZXJwcmlzZURhdGFSZXNwb25zZRIZChFjb250aW51", - "YXRpb25Ub2tlbhgBIAEoDBIPCgdoYXNNb3JlGAIgASgIEiwKC2NhY2hlU3Rh", - "dHVzGAMgASgOMhcuRW50ZXJwcmlzZS5DYWNoZVN0YXR1cxIoCgRkYXRhGAQg", - "AygLMhouRW50ZXJwcmlzZS5FbnRlcnByaXNlRGF0YRIyCgtnZW5lcmFsRGF0", - "YRgFIAEoCzIdLkVudGVycHJpc2UuR2VuZXJhbERhdGFFbnRpdHkiKgoNQmFj", - "a3VwUmVxdWVzdBIZChFjb250aW51YXRpb25Ub2tlbhgBIAEoDCKYAQoMQmFj", - "a3VwUmVjb3JkEg4KBnVzZXJJZBgBIAEoBRIRCglyZWNvcmRVaWQYAiABKAwS", - "CwoDa2V5GAMgASgMEioKB2tleVR5cGUYBCABKA4yGS5FbnRlcnByaXNlLkJh", - "Y2t1cEtleVR5cGUSDwoHdmVyc2lvbhgFIAEoBRIMCgRkYXRhGAYgASgMEg0K", - "BWV4dHJhGAcgASgMIi4KCUJhY2t1cEtleRIOCgZ1c2VySWQYASABKAUSEQoJ", - "YmFja3VwS2V5GAIgASgMIvcBCgpCYWNrdXBVc2VyEg4KBnVzZXJJZBgBIAEo", - "BRIQCgh1c2VyTmFtZRgCIAEoCRIPCgdkYXRhS2V5GAMgASgMEjYKC2RhdGFL", - "ZXlUeXBlGAQgASgOMiEuRW50ZXJwcmlzZS5CYWNrdXBVc2VyRGF0YUtleVR5", - "cGUSEgoKcHJpdmF0ZUtleRgFIAEoDBIPCgd0cmVlS2V5GAYgASgMEi4KC3Ry", - "ZWVLZXlUeXBlGAcgASgOMhkuRW50ZXJwcmlzZS5CYWNrdXBLZXlUeXBlEikK", - "CmJhY2t1cEtleXMYCCADKAsyFS5FbnRlcnByaXNlLkJhY2t1cEtleSKeAQoO", - "QmFja3VwUmVzcG9uc2USHwoXZW50ZXJwcmlzZUVjY1ByaXZhdGVLZXkYASAB", - "KAwSJQoFdXNlcnMYAiADKAsyFi5FbnRlcnByaXNlLkJhY2t1cFVzZXISKQoH", - "cmVjb3JkcxgDIAMoCzIYLkVudGVycHJpc2UuQmFja3VwUmVjb3JkEhkKEWNv", - "bnRpbnVhdGlvblRva2VuGAQgASgMIi4KHEdldEVudGVycHJpc2VEYXRhS2V5", - "c1JlcXVlc3QSDgoGcm9sZUlkGAEgAygDIv8BCh1HZXRFbnRlcnByaXNlRGF0", - "YUtleXNSZXNwb25zZRI6ChJyZUVuY3J5cHRlZFJvbGVLZXkYASADKAsyHi5F", - "bnRlcnByaXNlLlJlRW5jcnlwdGVkUm9sZUtleRIkCgdyb2xlS2V5GAIgAygL", - "MhMuRW50ZXJwcmlzZS5Sb2xlS2V5EiIKBm1zcEtleRgDIAEoCzISLkVudGVy", - "cHJpc2UuTXNwS2V5EjIKDmVudGVycHJpc2VLZXlzGAQgASgLMhouRW50ZXJw", - "cmlzZS5FbnRlcnByaXNlS2V5cxIkCgd0cmVlS2V5GAUgASgLMhMuRW50ZXJw", - "cmlzZS5UcmVlS2V5Il4KB1JvbGVLZXkSDgoGcm9sZUlkGAEgASgDEhQKDGVu", - "Y3J5cHRlZEtleRgCIAEoCRItCgdrZXlUeXBlGAMgASgOMhwuRW50ZXJwcmlz", - "ZS5FbmNyeXB0ZWRLZXlUeXBlImQKBk1zcEtleRIbChNlbmNyeXB0ZWRNc3BU", - "cmVlS2V5GAEgASgJEj0KF2VuY3J5cHRlZE1zcFRyZWVLZXlUeXBlGAIgASgO", - "MhwuRW50ZXJwcmlzZS5FbmNyeXB0ZWRLZXlUeXBlInwKDkVudGVycHJpc2VL", - "ZXlzEhQKDHJzYVB1YmxpY0tleRgBIAEoDBIeChZyc2FFbmNyeXB0ZWRQcml2", - "YXRlS2V5GAIgASgMEhQKDGVjY1B1YmxpY0tleRgDIAEoDBIeChZlY2NFbmNy", - "eXB0ZWRQcml2YXRlS2V5GAQgASgMIkgKB1RyZWVLZXkSDwoHdHJlZUtleRgB", - "IAEoCRIsCglrZXlUeXBlSWQYAiABKA4yGS5FbnRlcnByaXNlLkJhY2t1cEtl", - "eVR5cGUiRQoUU2hhcmVkUmVjb3JkUmVzcG9uc2USLQoGZXZlbnRzGAEgAygL", - "Mh0uRW50ZXJwcmlzZS5TaGFyZWRSZWNvcmRFdmVudCJwChFTaGFyZWRSZWNv", - "cmRFdmVudBIRCglyZWNvcmRVaWQYASABKAwSEAoIdXNlck5hbWUYAiABKAkS", - "DwoHY2FuRWRpdBgDIAEoCBISCgpjYW5SZXNoYXJlGAQgASgIEhEKCXNoYXJl", - "RnJvbRgFIAEoBSIuChxTZXRSZXN0cmljdFZpc2liaWxpdHlSZXF1ZXN0Eg4K", - "Bm5vZGVJZBgBIAEoAyobCgdLZXlUeXBlEgcKA1JTQRAAEgcKA0VDQxABKj0K", - "DkVudGVycHJpc2VUeXBlEhcKE0VOVEVSUFJJU0VfU1RBTkRBUkQQABISCg5F", - "TlRFUlBSSVNFX01TUBABKp4DChRFbnRlcnByaXNlRGF0YUVudGl0eRILCgdV", - "TktOT1dOEAASCQoFTk9ERVMQARIJCgVST0xFUxACEgkKBVVTRVJTEAMSCQoF", - "VEVBTVMQBBIOCgpURUFNX1VTRVJTEAUSDgoKUk9MRV9VU0VSUxAGEhMKD1JP", - "TEVfUFJJVklMRUdFUxAHEhUKEVJPTEVfRU5GT1JDRU1FTlRTEAgSDgoKUk9M", - "RV9URUFNUxAJEgwKCExJQ0VOU0VTEAoSEQoNTUFOQUdFRF9OT0RFUxALEhUK", - "EU1BTkFHRURfQ09NUEFOSUVTEAwSCwoHQlJJREdFUxANEgkKBVNDSU1TEA4S", - "EwoPRU1BSUxfUFJPVklTSU9OEA8SEAoMUVVFVUVEX1RFQU1TEBASFQoRUVVF", - "VUVEX1RFQU1fVVNFUlMQERIQCgxTU09fU0VSVklDRVMQEhIXChNSRVBPUlRf", - "RklMVEVSX1VTRVJTEBMSJgoiREVWSUNFU19SRVFVRVNUX0ZPUl9BRE1JTl9B", - "UFBST1ZBTBAUEhAKDFVTRVJfQUxJQVNFUxAVKiIKC0NhY2hlU3RhdHVzEggK", - "BEtFRVAQABIJCgVDTEVBUhABKlMKDUJhY2t1cEtleVR5cGUSCgoGTk9fS0VZ", - "EAASGQoVRU5DUllQVEVEX0JZX0RBVEFfS0VZEAESGwoXRU5DUllQVEVEX0JZ", - "X1BVQkxJQ19LRVkQAio6ChVCYWNrdXBVc2VyRGF0YUtleVR5cGUSBwoDT1dO", - "EAASGAoUU0hBUkVEX1RPX0VOVEVSUFJJU0UQASqBAQoQRW5jcnlwdGVkS2V5", - "VHlwZRINCglLVF9OT19LRVkQABIcChhLVF9FTkNSWVBURURfQllfREFUQV9L", - "RVkQARIeChpLVF9FTkNSWVBURURfQllfUFVCTElDX0tFWRACEiAKHEtUX0VO", - "Q1JZUFRFRF9CWV9EQVRBX0tFWV9HQ00QAyppChJFbnRlcnByaXNlRmxhZ1R5", - "cGUSCwoHSU5WQUxJRBAAEhoKFkFMTE9XX1BFUlNPTkFMX0xJQ0VOU0UQARIY", - "ChRTUEVDSUFMX1BST1ZJU0lPTklORxACEhAKDFJFQ09SRF9UWVBFUxADQiYK", - "GGNvbS5rZWVwZXJzZWN1cml0eS5wcm90b0IKRW50ZXJwcmlzZWIGcHJvdG8z")); + "bnRlcnByaXNlVXNlcm5hbWUYAyABKAkSFAoMaXNTaGFyZUFkbWluGAQgASgI", + "EhAKCHVzZXJuYW1lGAUgASgJIksKFUdldFRlYW1NZW1iZXJSZXNwb25zZRIy", + "Cg5lbnRlcnByaXNlVXNlchgBIAMoCzIaLkVudGVycHJpc2UuRW50ZXJwcmlz", + "ZVVzZXIiLQoRRW50ZXJwcmlzZVVzZXJJZHMSGAoQZW50ZXJwcmlzZVVzZXJJ", + "ZBgBIAMoAyJCChlFbnRlcnByaXNlUGVyc29uYWxBY2NvdW50Eg0KBWVtYWls", + "GAEgASgJEhYKDk9CU09MRVRFX0ZJRUxEGAIgASgMIlMKF0VuY3J5cHRlZFRl", + "YW1LZXlSZXF1ZXN0Eg8KB3RlYW1VaWQYASABKAwSGAoQZW5jcnlwdGVkVGVh", + "bUtleRgCIAEoDBINCgVmb3JjZRgDIAEoCCIrCg9SZUVuY3J5cHRlZERhdGES", + "CgoCaWQYASABKAMSDAoEZGF0YRgCIAEoCSI/ChJSZUVuY3J5cHRlZFJvbGVL", + "ZXkSDwoHcm9sZV9pZBgBIAEoAxIYChBlbmNyeXB0ZWRSb2xlS2V5GAIgASgM", + "Ip0CChtOb2RlVG9NYW5hZ2VkQ29tcGFueVJlcXVlc3QSEQoJY29tcGFueUlk", + "GAEgASgFEioKBW5vZGVzGAIgAygLMhsuRW50ZXJwcmlzZS5SZUVuY3J5cHRl", + "ZERhdGESKgoFcm9sZXMYAyADKAsyGy5FbnRlcnByaXNlLlJlRW5jcnlwdGVk", + "RGF0YRIqCgV1c2VycxgEIAMoCzIbLkVudGVycHJpc2UuUmVFbmNyeXB0ZWRE", + "YXRhEjAKCHJvbGVLZXlzGAUgAygLMh4uRW50ZXJwcmlzZS5SZUVuY3J5cHRl", + "ZFJvbGVLZXkSNQoIdGVhbUtleXMYBiADKAsyIy5FbnRlcnByaXNlLkVuY3J5", + "cHRlZFRlYW1LZXlSZXF1ZXN0IiwKCFJvbGVUZWFtEg8KB3JvbGVfaWQYASAB", + "KAMSDwoHdGVhbVVpZBgCIAEoDCI0CglSb2xlVGVhbXMSJwoJcm9sZV90ZWFt", + "GAEgAygLMhQuRW50ZXJwcmlzZS5Sb2xlVGVhbSJSCg9Sb2xlVXNlckFkZEtl", + "eXMSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIPCgd0cmVlS2V5GAIgASgJ", + "EhQKDHJvbGVBZG1pbktleRgDIAEoCSJUCgtSb2xlVXNlckFkZBIPCgdyb2xl", + "X2lkGAEgASgDEjQKD3JvbGVVc2VyQWRkS2V5cxgCIAMoCzIbLkVudGVycHJp", + "c2UuUm9sZVVzZXJBZGRLZXlzIkQKE1JvbGVVc2Vyc0FkZFJlcXVlc3QSLQoM", + "cm9sZVVzZXJBZGRzGAEgAygLMhcuRW50ZXJwcmlzZS5Sb2xlVXNlckFkZCKA", + "AQoRUm9sZVVzZXJBZGRSZXN1bHQSDgoGcm9sZUlkGAEgASgDEhgKEGVudGVy", + "cHJpc2VVc2VySWQYAiABKAMSMAoGc3RhdHVzGAMgASgOMiAuRW50ZXJwcmlz", + "ZS5Sb2xlVXNlck1vZGlmeVN0YXR1cxIPCgdtZXNzYWdlGAQgASgJIkYKFFJv", + "bGVVc2Vyc0FkZFJlc3BvbnNlEi4KB3Jlc3VsdHMYASADKAsyHS5FbnRlcnBy", + "aXNlLlJvbGVVc2VyQWRkUmVzdWx0IjwKDlJvbGVVc2VyUmVtb3ZlEg8KB3Jv", + "bGVfaWQYASABKAMSGQoRZW50ZXJwcmlzZVVzZXJJZHMYAiADKAMiTQoWUm9s", + "ZVVzZXJzUmVtb3ZlUmVxdWVzdBIzCg9yb2xlVXNlclJlbW92ZXMYASADKAsy", + "Gi5FbnRlcnByaXNlLlJvbGVVc2VyUmVtb3ZlIoMBChRSb2xlVXNlclJlbW92", + "ZVJlc3VsdBIOCgZyb2xlSWQYASABKAMSGAoQZW50ZXJwcmlzZVVzZXJJZBgC", + "IAEoAxIwCgZzdGF0dXMYAyABKA4yIC5FbnRlcnByaXNlLlJvbGVVc2VyTW9k", + "aWZ5U3RhdHVzEg8KB21lc3NhZ2UYBCABKAkiTAoXUm9sZVVzZXJzUmVtb3Zl", + "UmVzcG9uc2USMQoHcmVzdWx0cxgBIAMoCzIgLkVudGVycHJpc2UuUm9sZVVz", + "ZXJSZW1vdmVSZXN1bHQi2wMKFkVudGVycHJpc2VSZWdpc3RyYXRpb24SGAoQ", + "ZW5jcnlwdGVkVHJlZUtleRgBIAEoDBIWCg5lbnRlcnByaXNlTmFtZRgCIAEo", + "CRIUCgxyb290Tm9kZURhdGEYAyABKAwSFQoNYWRtaW5Vc2VyRGF0YRgEIAEo", + "DBIRCglhZG1pbk5hbWUYBSABKAkSEAoIcm9sZURhdGEYBiABKAwSOAoKcnNh", + "S2V5UGFpchgHIAEoCzIkLkVudGVycHJpc2UuRW50ZXJwcmlzZUtleVBhaXJS", + "ZXF1ZXN0EhMKC251bWJlclNlYXRzGAggASgFEjIKDmVudGVycHJpc2VUeXBl", + "GAkgASgOMhouRW50ZXJwcmlzZS5FbnRlcnByaXNlVHlwZRIVCg1yb2xlUHVi", + "bGljS2V5GAogASgMEioKInJvbGVQcml2YXRlS2V5RW5jcnlwdGVkV2l0aFJv", + "bGVLZXkYCyABKAwSIwobcm9sZUtleUVuY3J5cHRlZFdpdGhUcmVlS2V5GAwg", + "ASgMEjgKCmVjY0tleVBhaXIYDSABKAsyJC5FbnRlcnByaXNlLkVudGVycHJp", + "c2VLZXlQYWlyUmVxdWVzdBIYChBhbGxVc2Vyc1JvbGVEYXRhGA4gASgMIkgK", + "GkRvbWFpblBhc3N3b3JkUnVsZXNSZXF1ZXN0EhAKCHVzZXJuYW1lGAEgASgJ", + "EhgKEHZlcmlmaWNhdGlvbkNvZGUYAiABKAkiXAoZRG9tYWluUGFzc3dvcmRS", + "dWxlc0ZpZWxkcxIMCgR0eXBlGAEgASgJEg8KB21pbmltdW0YAiABKAUSDwoH", + "bWF4aW11bRgDIAEoBRIPCgdhbGxvd2VkGAQgASgIIkUKEExvZ2luVG9NY1Jl", + "cXVlc3QSFgoObWNFbnRlcnByaXNlSWQYASABKAUSGQoRbWVzc2FnZVNlc3Np", + "b25VaWQYAiABKAwiTAoRTG9naW5Ub01jUmVzcG9uc2USHQoVZW5jcnlwdGVk", + "U2Vzc2lvblRva2VuGAEgASgMEhgKEGVuY3J5cHRlZFRyZWVLZXkYAiABKAki", + "ZwobRG9tYWluUGFzc3dvcmRSdWxlc1Jlc3BvbnNlEkgKGWRvbWFpblBhc3N3", + "b3JkUnVsZXNGaWVsZHMYASADKAsyJS5FbnRlcnByaXNlLkRvbWFpblBhc3N3", + "b3JkUnVsZXNGaWVsZHMiiAEKGEFwcHJvdmVVc2VyRGV2aWNlUmVxdWVzdBIY", + "ChBlbnRlcnByaXNlVXNlcklkGAEgASgDEhwKFGVuY3J5cHRlZERldmljZVRv", + "a2VuGAIgASgMEh4KFmVuY3J5cHRlZERldmljZURhdGFLZXkYAyABKAwSFAoM", + "ZGVueUFwcHJvdmFsGAQgASgIInQKGUFwcHJvdmVVc2VyRGV2aWNlUmVzcG9u", + "c2USGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIcChRlbmNyeXB0ZWREZXZp", + "Y2VUb2tlbhgCIAEoDBIOCgZmYWlsZWQYAyABKAgSDwoHbWVzc2FnZRgEIAEo", + "CSJZChlBcHByb3ZlVXNlckRldmljZXNSZXF1ZXN0EjwKDmRldmljZVJlcXVl", + "c3RzGAEgAygLMiQuRW50ZXJwcmlzZS5BcHByb3ZlVXNlckRldmljZVJlcXVl", + "c3QiXAoaQXBwcm92ZVVzZXJEZXZpY2VzUmVzcG9uc2USPgoPZGV2aWNlUmVz", + "cG9uc2VzGAEgAygLMiUuRW50ZXJwcmlzZS5BcHByb3ZlVXNlckRldmljZVJl", + "c3BvbnNlIocBChVFbnRlcnByaXNlVXNlckRhdGFLZXkSGAoQZW50ZXJwcmlz", + "ZVVzZXJJZBgBIAEoAxIcChR1c2VyRW5jcnlwdGVkRGF0YUtleRgCIAEoDBIR", + "CglrZXlUeXBlSWQYAyABKAUSDwoHcm9sZUtleRgEIAEoDBISCgpwcml2YXRl", + "S2V5GAUgASgMIkkKFkVudGVycHJpc2VVc2VyRGF0YUtleXMSLwoEa2V5cxgB", + "IAMoCzIhLkVudGVycHJpc2UuRW50ZXJwcmlzZVVzZXJEYXRhS2V5IjIKFUVu", + "dGVycHJpc2VEYXRhUmVxdWVzdBIZChFjb250aW51YXRpb25Ub2tlbhgBIAEo", + "DCIwChNTcGVjaWFsUHJvdmlzaW9uaW5nEgsKA3VybBgBIAEoCRIMCgRuYW1l", + "GAIgASgJIusBChFHZW5lcmFsRGF0YUVudGl0eRIWCg5lbnRlcnByaXNlTmFt", + "ZRgBIAEoCRIaChJyZXN0cmljdFZpc2liaWxpdHkYAiABKAgSPAoTc3BlY2lh", + "bFByb3Zpc2lvbmluZxgEIAEoCzIfLkVudGVycHJpc2UuU3BlY2lhbFByb3Zp", + "c2lvbmluZxIwCg11c2VyUHJpdmlsZWdlGAcgASgLMhkuRW50ZXJwcmlzZS5V", + "c2VyUHJpdmlsZWdlEhMKC2Rpc3RyaWJ1dG9yGAggASgIEh0KFWZvcmJpZEFj", + "Y291bnRUcmFuc2ZlchgJIAEoCCL9AQoETm9kZRIOCgZub2RlSWQYASABKAMS", + "EAoIcGFyZW50SWQYAiABKAMSEAoIYnJpZGdlSWQYAyABKAMSDgoGc2NpbUlk", + "GAQgASgDEhEKCWxpY2Vuc2VJZBgFIAEoAxIVCg1lbmNyeXB0ZWREYXRhGAYg", + "ASgJEhIKCmR1b0VuYWJsZWQYByABKAgSEgoKcnNhRW5hYmxlZBgIIAEoCBIg", + "ChRzc29TZXJ2aWNlUHJvdmlkZXJJZBgJIAEoA0ICGAESGgoScmVzdHJpY3RW", + "aXNpYmlsaXR5GAogASgIEiEKFXNzb1NlcnZpY2VQcm92aWRlcklkcxgLIAMo", + "A0ICEAEijgEKBFJvbGUSDgoGcm9sZUlkGAEgASgDEg4KBm5vZGVJZBgCIAEo", + "AxIVCg1lbmNyeXB0ZWREYXRhGAMgASgJEg8KB2tleVR5cGUYBCABKAkSFAoM", + "dmlzaWJsZUJlbG93GAUgASgIEhYKDm5ld1VzZXJJbmhlcml0GAYgASgIEhAK", + "CHJvbGVUeXBlGAcgASgJIrgCCgRVc2VyEhgKEGVudGVycHJpc2VVc2VySWQY", + "ASABKAMSDgoGbm9kZUlkGAIgASgDEhUKDWVuY3J5cHRlZERhdGEYAyABKAkS", + "DwoHa2V5VHlwZRgEIAEoCRIQCgh1c2VybmFtZRgFIAEoCRIOCgZzdGF0dXMY", + "BiABKAkSDAoEbG9jaxgHIAEoBRIOCgZ1c2VySWQYCCABKAUSHgoWYWNjb3Vu", + "dFNoYXJlRXhwaXJhdGlvbhgJIAEoAxIQCghmdWxsTmFtZRgKIAEoCRIQCghq", + "b2JUaXRsZRgLIAEoCRISCgp0ZmFFbmFibGVkGAwgASgIEkYKGHRyYW5zZmVy", + "QWNjZXB0YW5jZVN0YXR1cxgNIAEoDjIkLkVudGVycHJpc2UuVHJhbnNmZXJB", + "Y2NlcHRhbmNlU3RhdHVzIjcKCVVzZXJBbGlhcxIYChBlbnRlcnByaXNlVXNl", + "cklkGAEgASgDEhAKCHVzZXJuYW1lGAIgASgJIqwBChhDb21wbGlhbmNlUmVw", + "b3J0TWV0YURhdGESEQoJcmVwb3J0VWlkGAEgASgMEg4KBm5vZGVJZBgCIAEo", + "AxISCgpyZXBvcnROYW1lGAMgASgJEhUKDWRhdGVHZW5lcmF0ZWQYBCABKAMS", + "EQoJcnVuQnlOYW1lGAUgASgJEhYKDm51bWJlck9mT3duZXJzGAcgASgFEhcK", + "D251bWJlck9mUmVjb3JkcxgIIAEoBSJTCgtNYW5hZ2VkTm9kZRIOCgZyb2xl", + "SWQYASABKAMSFQoNbWFuYWdlZE5vZGVJZBgCIAEoAxIdChVjYXNjYWRlTm9k", + "ZU1hbmFnZW1lbnQYAyABKAgiVAoPVXNlck1hbmFnZWROb2RlEg4KBm5vZGVJ", + "ZBgBIAEoAxIdChVjYXNjYWRlTm9kZU1hbmFnZW1lbnQYAiABKAgSEgoKcHJp", + "dmlsZWdlcxgDIAMoCSJ3Cg1Vc2VyUHJpdmlsZWdlEjUKEHVzZXJNYW5hZ2Vk", + "Tm9kZXMYASADKAsyGy5FbnRlcnByaXNlLlVzZXJNYW5hZ2VkTm9kZRIYChBl", + "bnRlcnByaXNlVXNlcklkGAIgASgDEhUKDWVuY3J5cHRlZERhdGEYAyABKAki", + "NAoIUm9sZVVzZXISDgoGcm9sZUlkGAEgASgDEhgKEGVudGVycHJpc2VVc2Vy", + "SWQYAiABKAMiTQoNUm9sZVByaXZpbGVnZRIVCg1tYW5hZ2VkTm9kZUlkGAEg", + "ASgDEg4KBnJvbGVJZBgCIAEoAxIVCg1wcml2aWxlZ2VUeXBlGAMgASgJIkkK", + "D1JvbGVFbmZvcmNlbWVudBIOCgZyb2xlSWQYASABKAMSFwoPZW5mb3JjZW1l", + "bnRUeXBlGAIgASgJEg0KBXZhbHVlGAMgASgJIqkBCgRUZWFtEg8KB3RlYW1V", + "aWQYASABKAwSDAoEbmFtZRgCIAEoCRIOCgZub2RlSWQYAyABKAMSFAoMcmVz", + "dHJpY3RFZGl0GAQgASgIEhUKDXJlc3RyaWN0U2hhcmUYBSABKAgSFAoMcmVz", + "dHJpY3RWaWV3GAYgASgIEhUKDWVuY3J5cHRlZERhdGEYByABKAkSGAoQZW5j", + "cnlwdGVkVGVhbUtleRgIIAEoCSJHCghUZWFtVXNlchIPCgd0ZWFtVWlkGAEg", + "ASgMEhgKEGVudGVycHJpc2VVc2VySWQYAiABKAMSEAoIdXNlclR5cGUYAyAB", + "KAkiSwoaR2V0RGlzdHJpYnV0b3JJbmZvUmVzcG9uc2USLQoMZGlzdHJpYnV0", + "b3JzGAEgAygLMhcuRW50ZXJwcmlzZS5EaXN0cmlidXRvciJCCgtEaXN0cmli", + "dXRvchIMCgRuYW1lGAEgASgJEiUKCG1zcEluZm9zGAIgAygLMhMuRW50ZXJw", + "cmlzZS5Nc3BJbmZvIp0CCgdNc3BJbmZvEhQKDGVudGVycHJpc2VJZBgBIAEo", + "BRIWCg5lbnRlcnByaXNlTmFtZRgCIAEoCRIZChFhbGxvY2F0ZWRMaWNlbnNl", + "cxgDIAEoBRIZChFhbGxvd2VkTWNQcm9kdWN0cxgEIAMoCRIVCg1hbGxvd2Vk", + "QWRkT25zGAUgAygJEhcKD21heEZpbGVQbGFuVHlwZRgGIAEoCRI0ChBtYW5h", + "Z2VkQ29tcGFuaWVzGAcgAygLMhouRW50ZXJwcmlzZS5NYW5hZ2VkQ29tcGFu", + "eRIeChZhbGxvd1VubGltaXRlZExpY2Vuc2VzGAggASgIEigKBmFkZE9ucxgJ", + "IAMoCzIYLkVudGVycHJpc2UuTGljZW5zZUFkZE9uIpECCg5NYW5hZ2VkQ29t", + "cGFueRIWCg5tY0VudGVycHJpc2VJZBgBIAEoBRIYChBtY0VudGVycHJpc2VO", + "YW1lGAIgASgJEhEKCW1zcE5vZGVJZBgDIAEoAxIVCg1udW1iZXJPZlNlYXRz", + "GAQgASgFEhUKDW51bWJlck9mVXNlcnMYBSABKAUSEQoJcHJvZHVjdElkGAYg", + "ASgJEhEKCWlzRXhwaXJlZBgHIAEoCBIPCgd0cmVlS2V5GAggASgJEhUKDXRy", + "ZWVfa2V5X3JvbGUYCSABKAMSFAoMZmlsZVBsYW5UeXBlGAogASgJEigKBmFk", + "ZE9ucxgLIAMoCzIYLkVudGVycHJpc2UuTGljZW5zZUFkZE9uIlIKB01TUFBv", + "b2wSEQoJcHJvZHVjdElkGAEgASgJEg0KBXNlYXRzGAIgASgFEhYKDmF2YWls", + "YWJsZVNlYXRzGAMgASgFEg0KBXN0YXNoGAQgASgFIjoKCk1TUENvbnRhY3QS", + "FAoMZW50ZXJwcmlzZUlkGAEgASgFEhYKDmVudGVycHJpc2VOYW1lGAIgASgJ", + "IrsBCgxMaWNlbnNlQWRkT24SDAoEbmFtZRgBIAEoCRIPCgdlbmFibGVkGAIg", + "ASgIEg8KB2lzVHJpYWwYAyABKAgSEgoKZXhwaXJhdGlvbhgEIAEoAxIPCgdj", + "cmVhdGVkGAUgASgDEg0KBXNlYXRzGAYgASgFEhYKDmFjdGl2YXRpb25UaW1l", + "GAcgASgDEhkKEWluY2x1ZGVkSW5Qcm9kdWN0GAggASgIEhQKDGFwaUNhbGxD", + "b3VudBgJIAEoBSJzCglNQ0RlZmF1bHQSEQoJbWNQcm9kdWN0GAEgASgJEg4K", + "BmFkZE9ucxgCIAMoCRIUCgxmaWxlUGxhblR5cGUYAyABKAkSEwoLbWF4TGlj", + "ZW5zZXMYBCABKAUSGAoQZml4ZWRNYXhMaWNlbnNlcxgFIAEoCCLSAQoKTVNQ", + "UGVybWl0cxISCgpyZXN0cmljdGVkGAEgASgIEhoKEm1heEFsbG93ZWRMaWNl", + "bnNlcxgCIAEoBRIZChFhbGxvd2VkTWNQcm9kdWN0cxgDIAMoCRIVCg1hbGxv", + "d2VkQWRkT25zGAQgAygJEhcKD21heEZpbGVQbGFuVHlwZRgFIAEoCRIeChZh", + "bGxvd1VubGltaXRlZExpY2Vuc2VzGAYgASgIEikKCm1jRGVmYXVsdHMYByAD", + "KAsyFS5FbnRlcnByaXNlLk1DRGVmYXVsdCKgBAoHTGljZW5zZRIMCgRwYWlk", + "GAEgASgIEhUKDW51bWJlck9mU2VhdHMYAiABKAUSEgoKZXhwaXJhdGlvbhgD", + "IAEoAxIUCgxsaWNlbnNlS2V5SWQYBCABKAUSFQoNcHJvZHVjdFR5cGVJZBgF", + "IAEoBRIMCgRuYW1lGAYgASgJEhsKE2VudGVycHJpc2VMaWNlbnNlSWQYByAB", + "KAMSFgoOc2VhdHNBbGxvY2F0ZWQYCCABKAUSFAoMc2VhdHNQZW5kaW5nGAkg", + "ASgFEgwKBHRpZXIYCiABKAUSFgoOZmlsZVBsYW5UeXBlSWQYCyABKAUSEAoI", + "bWF4Qnl0ZXMYDCABKAMSGQoRc3RvcmFnZUV4cGlyYXRpb24YDSABKAMSFQoN", + "bGljZW5zZVN0YXR1cxgOIAEoCRIkCgdtc3BQb29sGA8gAygLMhMuRW50ZXJw", + "cmlzZS5NU1BQb29sEikKCW1hbmFnZWRCeRgQIAEoCzIWLkVudGVycHJpc2Uu", + "TVNQQ29udGFjdBIoCgZhZGRPbnMYESADKAsyGC5FbnRlcnByaXNlLkxpY2Vu", + "c2VBZGRPbhIXCg9uZXh0QmlsbGluZ0RhdGUYEiABKAMSFwoPaGFzTVNQTGVn", + "YWN5TG9nGBMgASgIEioKCm1zcFBlcm1pdHMYFCABKAsyFi5FbnRlcnByaXNl", + "Lk1TUFBlcm1pdHMSEwoLZGlzdHJpYnV0b3IYFSABKAgibgoGQnJpZGdlEhAK", + "CGJyaWRnZUlkGAEgASgDEg4KBm5vZGVJZBgCIAEoAxIYChB3YW5JcEVuZm9y", + "Y2VtZW50GAMgASgJEhgKEGxhbklwRW5mb3JjZW1lbnQYBCABKAkSDgoGc3Rh", + "dHVzGAUgASgJInQKBFNjaW0SDgoGc2NpbUlkGAEgASgDEg4KBm5vZGVJZBgC", + "IAEoAxIOCgZzdGF0dXMYAyABKAkSEgoKbGFzdFN5bmNlZBgEIAEoAxISCgpy", + "b2xlUHJlZml4GAUgASgJEhQKDHVuaXF1ZUdyb3VwcxgGIAEoCCJMCg5FbWFp", + "bFByb3Zpc2lvbhIKCgJpZBgBIAEoBRIOCgZub2RlSWQYAiABKAMSDgoGZG9t", + "YWluGAMgASgJEg4KBm1ldGhvZBgEIAEoCSJSCgpRdWV1ZWRUZWFtEg8KB3Rl", + "YW1VaWQYASABKAwSDAoEbmFtZRgCIAEoCRIOCgZub2RlSWQYAyABKAMSFQoN", + "ZW5jcnlwdGVkRGF0YRgEIAEoCSIwCg5RdWV1ZWRUZWFtVXNlchIPCgd0ZWFt", + "VWlkGAEgASgMEg0KBXVzZXJzGAIgAygDIqQBCg5UZWFtc0FkZFJlc3VsdBI0", + "ChFzdWNjZXNzZnVsVGVhbUFkZBgBIAMoCzIZLkVudGVycHJpc2UuVGVhbUFk", + "ZFJlc3VsdBI2ChN1bnN1Y2Nlc3NmdWxUZWFtQWRkGAIgAygLMhkuRW50ZXJw", + "cmlzZS5UZWFtQWRkUmVzdWx0Eg4KBnJlc3VsdBgDIAEoCRIUCgxlcnJvck1l", + "c3NhZ2UYBCABKAkiVQoNVGVhbUFkZFJlc3VsdBIeCgR0ZWFtGAEgASgLMhAu", + "RW50ZXJwcmlzZS5UZWFtEg4KBnJlc3VsdBgCIAEoCRIUCgxlcnJvck1lc3Nh", + "Z2UYAyABKAkikQEKClNzb1NlcnZpY2USHAoUc3NvU2VydmljZVByb3ZpZGVy", + "SWQYASABKAMSDgoGbm9kZUlkGAIgASgDEgwKBG5hbWUYAyABKAkSDgoGc3Bf", + "dXJsGAQgASgJEhYKDmludml0ZU5ld1VzZXJzGAUgASgIEg4KBmFjdGl2ZRgG", + "IAEoCBIPCgdpc0Nsb3VkGAcgASgIIjEKEFJlcG9ydEZpbHRlclVzZXISDgoG", + "dXNlcklkGAEgASgFEg0KBWVtYWlsGAIgASgJIpcCCh1EZXZpY2VSZXF1ZXN0", + "Rm9yQWRtaW5BcHByb3ZhbBIQCghkZXZpY2VJZBgBIAEoAxIYChBlbnRlcnBy", + "aXNlVXNlcklkGAIgASgDEhwKFGVuY3J5cHRlZERldmljZVRva2VuGAMgASgM", + "EhcKD2RldmljZVB1YmxpY0tleRgEIAEoDBISCgpkZXZpY2VOYW1lGAUgASgJ", + "EhUKDWNsaWVudFZlcnNpb24YBiABKAkSEgoKZGV2aWNlVHlwZRgHIAEoCRIM", + "CgRkYXRlGAggASgDEhEKCWlwQWRkcmVzcxgJIAEoCRIQCghsb2NhdGlvbhgK", + "IAEoCRINCgVlbWFpbBgLIAEoCRISCgphY2NvdW50VWlkGAwgASgMImAKDkVu", + "dGVycHJpc2VEYXRhEjAKBmVudGl0eRgBIAEoDjIgLkVudGVycHJpc2UuRW50", + "ZXJwcmlzZURhdGFFbnRpdHkSDgoGZGVsZXRlGAIgASgIEgwKBGRhdGEYAyAD", + "KAwi0AEKFkVudGVycHJpc2VEYXRhUmVzcG9uc2USGQoRY29udGludWF0aW9u", + "VG9rZW4YASABKAwSDwoHaGFzTW9yZRgCIAEoCBIsCgtjYWNoZVN0YXR1cxgD", + "IAEoDjIXLkVudGVycHJpc2UuQ2FjaGVTdGF0dXMSKAoEZGF0YRgEIAMoCzIa", + "LkVudGVycHJpc2UuRW50ZXJwcmlzZURhdGESMgoLZ2VuZXJhbERhdGEYBSAB", + "KAsyHS5FbnRlcnByaXNlLkdlbmVyYWxEYXRhRW50aXR5IioKDUJhY2t1cFJl", + "cXVlc3QSGQoRY29udGludWF0aW9uVG9rZW4YASABKAwimAEKDEJhY2t1cFJl", + "Y29yZBIOCgZ1c2VySWQYASABKAUSEQoJcmVjb3JkVWlkGAIgASgMEgsKA2tl", + "eRgDIAEoDBIqCgdrZXlUeXBlGAQgASgOMhkuRW50ZXJwcmlzZS5CYWNrdXBL", + "ZXlUeXBlEg8KB3ZlcnNpb24YBSABKAUSDAoEZGF0YRgGIAEoDBINCgVleHRy", + "YRgHIAEoDCIuCglCYWNrdXBLZXkSDgoGdXNlcklkGAEgASgFEhEKCWJhY2t1", + "cEtleRgCIAEoDCKNAgoKQmFja3VwVXNlchIOCgZ1c2VySWQYASABKAUSEAoI", + "dXNlck5hbWUYAiABKAkSDwoHZGF0YUtleRgDIAEoDBI2CgtkYXRhS2V5VHlw", + "ZRgEIAEoDjIhLkVudGVycHJpc2UuQmFja3VwVXNlckRhdGFLZXlUeXBlEhIK", + "CnByaXZhdGVLZXkYBSABKAwSDwoHdHJlZUtleRgGIAEoDBIuCgt0cmVlS2V5", + "VHlwZRgHIAEoDjIZLkVudGVycHJpc2UuQmFja3VwS2V5VHlwZRIpCgpiYWNr", + "dXBLZXlzGAggAygLMhUuRW50ZXJwcmlzZS5CYWNrdXBLZXkSFAoMcHJpdmF0", + "ZUVDS2V5GAkgASgMIp4BCg5CYWNrdXBSZXNwb25zZRIfChdlbnRlcnByaXNl", + "RWNjUHJpdmF0ZUtleRgBIAEoDBIlCgV1c2VycxgCIAMoCzIWLkVudGVycHJp", + "c2UuQmFja3VwVXNlchIpCgdyZWNvcmRzGAMgAygLMhguRW50ZXJwcmlzZS5C", + "YWNrdXBSZWNvcmQSGQoRY29udGludWF0aW9uVG9rZW4YBCABKAwiZQoKQmFj", + "a3VwRmlsZRIMCgR1c2VyGAEgASgJEhEKCWJhY2t1cFVpZBgCIAEoDBIQCghm", + "aWxlTmFtZRgDIAEoCRIPCgdjcmVhdGVkGAQgASgDEhMKC2Rvd25sb2FkVXJs", + "GAUgASgJIjgKD0JhY2t1cHNSZXNwb25zZRIlCgVmaWxlcxgBIAMoCzIWLkVu", + "dGVycHJpc2UuQmFja3VwRmlsZSIuChxHZXRFbnRlcnByaXNlRGF0YUtleXNS", + "ZXF1ZXN0Eg4KBnJvbGVJZBgBIAMoAyL/AQodR2V0RW50ZXJwcmlzZURhdGFL", + "ZXlzUmVzcG9uc2USOgoScmVFbmNyeXB0ZWRSb2xlS2V5GAEgAygLMh4uRW50", + "ZXJwcmlzZS5SZUVuY3J5cHRlZFJvbGVLZXkSJAoHcm9sZUtleRgCIAMoCzIT", + "LkVudGVycHJpc2UuUm9sZUtleRIiCgZtc3BLZXkYAyABKAsyEi5FbnRlcnBy", + "aXNlLk1zcEtleRIyCg5lbnRlcnByaXNlS2V5cxgEIAEoCzIaLkVudGVycHJp", + "c2UuRW50ZXJwcmlzZUtleXMSJAoHdHJlZUtleRgFIAEoCzITLkVudGVycHJp", + "c2UuVHJlZUtleSJeCgdSb2xlS2V5Eg4KBnJvbGVJZBgBIAEoAxIUCgxlbmNy", + "eXB0ZWRLZXkYAiABKAkSLQoHa2V5VHlwZRgDIAEoDjIcLkVudGVycHJpc2Uu", + "RW5jcnlwdGVkS2V5VHlwZSJkCgZNc3BLZXkSGwoTZW5jcnlwdGVkTXNwVHJl", + "ZUtleRgBIAEoCRI9ChdlbmNyeXB0ZWRNc3BUcmVlS2V5VHlwZRgCIAEoDjIc", + "LkVudGVycHJpc2UuRW5jcnlwdGVkS2V5VHlwZSJ8Cg5FbnRlcnByaXNlS2V5", + "cxIUCgxyc2FQdWJsaWNLZXkYASABKAwSHgoWcnNhRW5jcnlwdGVkUHJpdmF0", + "ZUtleRgCIAEoDBIUCgxlY2NQdWJsaWNLZXkYAyABKAwSHgoWZWNjRW5jcnlw", + "dGVkUHJpdmF0ZUtleRgEIAEoDCJICgdUcmVlS2V5Eg8KB3RyZWVLZXkYASAB", + "KAkSLAoJa2V5VHlwZUlkGAIgASgOMhkuRW50ZXJwcmlzZS5CYWNrdXBLZXlU", + "eXBlIkUKFFNoYXJlZFJlY29yZFJlc3BvbnNlEi0KBmV2ZW50cxgBIAMoCzId", + "LkVudGVycHJpc2UuU2hhcmVkUmVjb3JkRXZlbnQicAoRU2hhcmVkUmVjb3Jk", + "RXZlbnQSEQoJcmVjb3JkVWlkGAEgASgMEhAKCHVzZXJOYW1lGAIgASgJEg8K", + "B2NhbkVkaXQYAyABKAgSEgoKY2FuUmVzaGFyZRgEIAEoCBIRCglzaGFyZUZy", + "b20YBSABKAUiLgocU2V0UmVzdHJpY3RWaXNpYmlsaXR5UmVxdWVzdBIOCgZu", + "b2RlSWQYASABKAMi0AEKDlVzZXJBZGRSZXF1ZXN0EhgKEGVudGVycHJpc2VV", + "c2VySWQYASABKAMSDgoGbm9kZUlkGAIgASgDEhUKDWVuY3J5cHRlZERhdGEY", + "AyABKAwSLQoHa2V5VHlwZRgEIAEoDjIcLkVudGVycHJpc2UuRW5jcnlwdGVk", + "S2V5VHlwZRIQCghmdWxsTmFtZRgFIAEoCRIQCghqb2JUaXRsZRgGIAEoCRIN", + "CgVlbWFpbBgHIAEoCRIbChNzdXBwcmVzc0VtYWlsSW52aXRlGAggASgIIjoK", + "EVVzZXJVcGRhdGVSZXF1ZXN0EiUKBXVzZXJzGAEgAygLMhYuRW50ZXJwcmlz", + "ZS5Vc2VyVXBkYXRlIq8BCgpVc2VyVXBkYXRlEhgKEGVudGVycHJpc2VVc2Vy", + "SWQYASABKAMSDgoGbm9kZUlkGAIgASgDEhUKDWVuY3J5cHRlZERhdGEYAyAB", + "KAwSLQoHa2V5VHlwZRgEIAEoDjIcLkVudGVycHJpc2UuRW5jcnlwdGVkS2V5", + "VHlwZRIQCghmdWxsTmFtZRgFIAEoCRIQCghqb2JUaXRsZRgGIAEoCRINCgVl", + "bWFpbBgHIAEoCSJBChJVc2VyVXBkYXRlUmVzcG9uc2USKwoFdXNlcnMYASAD", + "KAsyHC5FbnRlcnByaXNlLlVzZXJVcGRhdGVSZXN1bHQiWgoQVXNlclVwZGF0", + "ZVJlc3VsdBIYChBlbnRlcnByaXNlVXNlcklkGAEgASgDEiwKBnN0YXR1cxgC", + "IAEoDjIcLkVudGVycHJpc2UuVXNlclVwZGF0ZVN0YXR1cyJKCh1Db21wbGlh", + "bmNlUmVjb3JkT3duZXJzUmVxdWVzdBIPCgdub2RlSWRzGAEgAygDEhgKEGlu", + "Y2x1ZGVOb25TaGFyZWQYAiABKAgiTwoeQ29tcGxpYW5jZVJlY29yZE93bmVy", + "c1Jlc3BvbnNlEi0KDHJlY29yZE93bmVycxgBIAMoCzIXLkVudGVycHJpc2Uu", + "UmVjb3JkT3duZXIiNwoLUmVjb3JkT3duZXISGAoQZW50ZXJwcmlzZVVzZXJJ", + "ZBgBIAEoAxIOCgZzaGFyZWQYAiABKAgipgEKIFByZWxpbWluYXJ5Q29tcGxp", + "YW5jZURhdGFSZXF1ZXN0EhkKEWVudGVycHJpc2VVc2VySWRzGAEgAygDEhgK", + "EGluY2x1ZGVOb25TaGFyZWQYAiABKAgSGQoRY29udGludWF0aW9uVG9rZW4Y", + "AyABKAwSMgoqaW5jbHVkZVRvdGFsTWF0Y2hpbmdSZWNvcmRzSW5GaXJzdFJl", + "c3BvbnNlGAQgASgIIp8BCiFQcmVsaW1pbmFyeUNvbXBsaWFuY2VEYXRhUmVz", + "cG9uc2USMAoNYXVkaXRVc2VyRGF0YRgBIAMoCzIZLkVudGVycHJpc2UuQXVk", + "aXRVc2VyRGF0YRIZChFjb250aW51YXRpb25Ub2tlbhgCIAEoDBIPCgdoYXNN", + "b3JlGAMgASgIEhwKFHRvdGFsTWF0Y2hpbmdSZWNvcmRzGAQgASgFIksKD0F1", + "ZGl0VXNlclJlY29yZBIRCglyZWNvcmRVaWQYASABKAwSFQoNZW5jcnlwdGVk", + "RGF0YRgCIAEoDBIOCgZzaGFyZWQYAyABKAgijQEKDUF1ZGl0VXNlckRhdGES", + "GAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxI1ChBhdWRpdFVzZXJSZWNvcmRz", + "GAIgAygLMhsuRW50ZXJwcmlzZS5BdWRpdFVzZXJSZWNvcmQSKwoGc3RhdHVz", + "GAMgASgOMhsuRW50ZXJwcmlzZS5BdWRpdFVzZXJTdGF0dXMifwoXQ29tcGxp", + "YW5jZVJlcG9ydEZpbHRlcnMSFAoMcmVjb3JkVGl0bGVzGAEgAygJEhIKCnJl", + "Y29yZFVpZHMYAiADKAwSEQoJam9iVGl0bGVzGAMgAygDEgwKBHVybHMYBCAD", + "KAkSGQoRZW50ZXJwcmlzZVVzZXJJZHMYBSADKAMifwoXQ29tcGxpYW5jZVJl", + "cG9ydFJlcXVlc3QSPAoTY29tcGxpYW5jZVJlcG9ydFJ1bhgBIAEoCzIfLkVu", + "dGVycHJpc2UuQ29tcGxpYW5jZVJlcG9ydFJ1bhISCgpyZXBvcnROYW1lGAIg", + "ASgJEhIKCnNhdmVSZXBvcnQYAyABKAgihQEKE0NvbXBsaWFuY2VSZXBvcnRS", + "dW4STgoXcmVwb3J0Q3JpdGVyaWFBbmRGaWx0ZXIYASABKAsyLS5FbnRlcnBy", + "aXNlLkNvbXBsaWFuY2VSZXBvcnRDcml0ZXJpYUFuZEZpbHRlchINCgV1c2Vy", + "cxgCIAMoAxIPCgdyZWNvcmRzGAMgAygMIvwBCiFDb21wbGlhbmNlUmVwb3J0", + "Q3JpdGVyaWFBbmRGaWx0ZXISDgoGbm9kZUlkGAEgASgDEhMKC2NyaXRlcmlh", + "VWlkGAIgASgMEhQKDGNyaXRlcmlhTmFtZRgDIAEoCRI2Cghjcml0ZXJpYRgE", + "IAEoCzIkLkVudGVycHJpc2UuQ29tcGxpYW5jZVJlcG9ydENyaXRlcmlhEjMK", + "B2ZpbHRlcnMYBSADKAsyIi5FbnRlcnByaXNlLkNvbXBsaWFuY2VSZXBvcnRG", + "aWx0ZXISFAoMbGFzdE1vZGlmaWVkGAYgASgDEhkKEW5vZGVFbmNyeXB0ZWRE", + "YXRhGAcgASgMImIKGENvbXBsaWFuY2VSZXBvcnRDcml0ZXJpYRIRCglqb2JU", + "aXRsZXMYASADKAkSGQoRZW50ZXJwcmlzZVVzZXJJZHMYAiADKAMSGAoQaW5j", + "bHVkZU5vblNoYXJlZBgDIAEoCCJ4ChZDb21wbGlhbmNlUmVwb3J0RmlsdGVy", + "EhQKDHJlY29yZFRpdGxlcxgBIAMoCRISCgpyZWNvcmRVaWRzGAIgAygMEhEK", + "CWpvYlRpdGxlcxgDIAMoCRIMCgR1cmxzGAQgAygJEhMKC3JlY29yZFR5cGVz", + "GAUgAygJIqEFChhDb21wbGlhbmNlUmVwb3J0UmVzcG9uc2USFQoNZGF0ZUdl", + "bmVyYXRlZBgBIAEoAxIVCg1ydW5CeVVzZXJOYW1lGAIgASgJEhIKCnJlcG9y", + "dE5hbWUYAyABKAkSEQoJcmVwb3J0VWlkGAQgASgMEjwKE2NvbXBsaWFuY2VS", + "ZXBvcnRSdW4YBSABKAsyHy5FbnRlcnByaXNlLkNvbXBsaWFuY2VSZXBvcnRS", + "dW4SLQoMdXNlclByb2ZpbGVzGAYgAygLMhcuRW50ZXJwcmlzZS5Vc2VyUHJv", + "ZmlsZRIpCgphdWRpdFRlYW1zGAcgAygLMhUuRW50ZXJwcmlzZS5BdWRpdFRl", + "YW0SLQoMYXVkaXRSZWNvcmRzGAggAygLMhcuRW50ZXJwcmlzZS5BdWRpdFJl", + "Y29yZBIrCgt1c2VyUmVjb3JkcxgJIAMoCzIWLkVudGVycHJpc2UuVXNlclJl", + "Y29yZBI7ChNzaGFyZWRGb2xkZXJSZWNvcmRzGAogAygLMh4uRW50ZXJwcmlz", + "ZS5TaGFyZWRGb2xkZXJSZWNvcmQSNwoRc2hhcmVkRm9sZGVyVXNlcnMYCyAD", + "KAsyHC5FbnRlcnByaXNlLlNoYXJlZEZvbGRlclVzZXISNwoRc2hhcmVkRm9s", + "ZGVyVGVhbXMYDCADKAsyHC5FbnRlcnByaXNlLlNoYXJlZEZvbGRlclRlYW0S", + "MQoOYXVkaXRUZWFtVXNlcnMYDSADKAsyGS5FbnRlcnByaXNlLkF1ZGl0VGVh", + "bVVzZXISKQoKYXVkaXRSb2xlcxgOIAMoCzIVLkVudGVycHJpc2UuQXVkaXRS", + "b2xlEi8KDWxpbmtlZFJlY29yZHMYDyADKAsyGC5FbnRlcnByaXNlLkxpbmtl", + "ZFJlY29yZCKBAQoLQXVkaXRSZWNvcmQSEQoJcmVjb3JkVWlkGAEgASgMEhEK", + "CWF1ZGl0RGF0YRgCIAEoDBIWCg5oYXNBdHRhY2htZW50cxgDIAEoCBIPCgdp", + "blRyYXNoGAQgASgIEhAKCHRyZWVMZWZ0GAUgASgFEhEKCXRyZWVSaWdodBgG", + "IAEoBSKAAgoJQXVkaXRSb2xlEg4KBnJvbGVJZBgBIAEoAxIVCg1lbmNyeXB0", + "ZWREYXRhGAIgASgMEiYKHnJlc3RyaWN0U2hhcmVPdXRzaWRlRW50ZXJwcmlz", + "ZRgDIAEoCBIYChByZXN0cmljdFNoYXJlQWxsGAQgASgIEiIKGnJlc3RyaWN0", + "U2hhcmVPZkF0dGFjaG1lbnRzGAUgASgIEikKIXJlc3RyaWN0TWFza1Bhc3N3", + "b3Jkc1doaWxlRWRpdGluZxgGIAEoCBI7ChNyb2xlTm9kZU1hbmFnZW1lbnRz", + "GAcgAygLMh4uRW50ZXJwcmlzZS5Sb2xlTm9kZU1hbmFnZW1lbnQiXgoSUm9s", + "ZU5vZGVNYW5hZ2VtZW50EhAKCHRyZWVMZWZ0GAEgASgFEhEKCXRyZWVSaWdo", + "dBgCIAEoBRIPCgdjYXNjYWRlGAMgASgIEhIKCnByaXZpbGVnZXMYBCABKAUi", + "awoLVXNlclByb2ZpbGUSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIQCghm", + "dWxsTmFtZRgCIAEoCRIQCghqb2JUaXRsZRgDIAEoCRINCgVlbWFpbBgEIAEo", + "CRIPCgdyb2xlSWRzGAUgAygDIj0KEFJlY29yZFBlcm1pc3Npb24SEQoJcmVj", + "b3JkVWlkGAEgASgMEhYKDnBlcm1pc3Npb25CaXRzGAIgASgFIl8KClVzZXJS", + "ZWNvcmQSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxI3ChFyZWNvcmRQZXJt", + "aXNzaW9ucxgCIAMoCzIcLkVudGVycHJpc2UuUmVjb3JkUGVybWlzc2lvbiJb", + "CglBdWRpdFRlYW0SDwoHdGVhbVVpZBgBIAEoDBIQCgh0ZWFtTmFtZRgCIAEo", + "CRIUCgxyZXN0cmljdEVkaXQYAyABKAgSFQoNcmVzdHJpY3RTaGFyZRgEIAEo", + "CCI7Cg1BdWRpdFRlYW1Vc2VyEg8KB3RlYW1VaWQYASABKAwSGQoRZW50ZXJw", + "cmlzZVVzZXJJZHMYAiADKAMinwEKElNoYXJlZEZvbGRlclJlY29yZBIXCg9z", + "aGFyZWRGb2xkZXJVaWQYASABKAwSNwoRcmVjb3JkUGVybWlzc2lvbnMYAiAD", + "KAsyHC5FbnRlcnByaXNlLlJlY29yZFBlcm1pc3Npb24SNwoRc2hhcmVBZG1p", + "blJlY29yZHMYAyADKAsyHC5FbnRlcnByaXNlLlNoYXJlQWRtaW5SZWNvcmQi", + "TQoQU2hhcmVBZG1pblJlY29yZBIYChBlbnRlcnByaXNlVXNlcklkGAEgASgD", + "Eh8KF3JlY29yZFBlcm1pc3Npb25JbmRleGVzGAIgAygFIkYKEFNoYXJlZEZv", + "bGRlclVzZXISFwoPc2hhcmVkRm9sZGVyVWlkGAEgASgMEhkKEWVudGVycHJp", + "c2VVc2VySWRzGAIgAygDIj0KEFNoYXJlZEZvbGRlclRlYW0SFwoPc2hhcmVk", + "Rm9sZGVyVWlkGAEgASgMEhAKCHRlYW1VaWRzGAIgAygMIi8KGkdldENvbXBs", + "aWFuY2VSZXBvcnRSZXF1ZXN0EhEKCXJlcG9ydFVpZBgBIAEoDCIyChtHZXRD", + "b21wbGlhbmNlUmVwb3J0UmVzcG9uc2USEwoLZG93bmxvYWRVcmwYASABKAki", + "NgofQ29tcGxpYW5jZVJlcG9ydENyaXRlcmlhUmVxdWVzdBITCgtjcml0ZXJp", + "YVVpZBgBIAEoDCI7CiRTYXZlQ29tcGxpYW5jZVJlcG9ydENyaXRlcmlhUmVz", + "cG9uc2USEwoLY3JpdGVyaWFVaWQYASABKAwiNAoMTGlua2VkUmVjb3JkEhAK", + "CG93bmVyVWlkGAEgASgMEhIKCnJlY29yZFVpZHMYAiADKAwiVwoXR2V0U2hh", + "cmluZ0FkbWluc1JlcXVlc3QSFwoPc2hhcmVkRm9sZGVyVWlkGAEgASgMEhEK", + "CXJlY29yZFVpZBgCIAEoDBIQCgh1c2VybmFtZRgDIAEoCSLgAQoOVXNlclBy", + "b2ZpbGVFeHQSDQoFZW1haWwYASABKAkSEAoIZnVsbE5hbWUYAiABKAkSEAoI", + "am9iVGl0bGUYAyABKAkSFAoMaXNNU1BNQ0FkbWluGAQgASgIEhgKEGlzSW5T", + "aGFyZWRGb2xkZXIYBSABKAgSJgoeaXNTaGFyZUFkbWluRm9yUmVxdWVzdGVk", + "T2JqZWN0GAYgASgIEigKIGlzU2hhcmVBZG1pbkZvclNoYXJlZEZvbGRlck93", + "bmVyGAcgASgIEhkKEWhhc0FjY2Vzc1RvT2JqZWN0GAggASgIIk8KGEdldFNo", + "YXJpbmdBZG1pbnNSZXNwb25zZRIzCg91c2VyUHJvZmlsZUV4dHMYASADKAsy", + "Gi5FbnRlcnByaXNlLlVzZXJQcm9maWxlRXh0Il8KHlRlYW1zRW50ZXJwcmlz", + "ZVVzZXJzQWRkUmVxdWVzdBI9CgV0ZWFtcxgBIAMoCzIuLkVudGVycHJpc2Uu", + "VGVhbXNFbnRlcnByaXNlVXNlcnNBZGRUZWFtUmVxdWVzdCJ0CiJUZWFtc0Vu", + "dGVycHJpc2VVc2Vyc0FkZFRlYW1SZXF1ZXN0Eg8KB3RlYW1VaWQYASABKAwS", + "PQoFdXNlcnMYAiADKAsyLi5FbnRlcnByaXNlLlRlYW1zRW50ZXJwcmlzZVVz", + "ZXJzQWRkVXNlclJlcXVlc3QiqwEKIlRlYW1zRW50ZXJwcmlzZVVzZXJzQWRk", + "VXNlclJlcXVlc3QSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIqCgh1c2Vy", + "VHlwZRgCIAEoDjIYLkVudGVycHJpc2UuVGVhbVVzZXJUeXBlEhMKB3RlYW1L", + "ZXkYAyABKAlCAhgBEioKDHR5cGVkVGVhbUtleRgEIAEoCzIULkVudGVycHJp", + "c2UuVHlwZWRLZXkiRgoIVHlwZWRLZXkSCwoDa2V5GAEgASgMEi0KB2tleVR5", + "cGUYAiABKA4yHC5FbnRlcnByaXNlLkVuY3J5cHRlZEtleVR5cGUicwofVGVh", + "bXNFbnRlcnByaXNlVXNlcnNBZGRSZXNwb25zZRI+CgV0ZWFtcxgBIAMoCzIv", + "LkVudGVycHJpc2UuVGVhbXNFbnRlcnByaXNlVXNlcnNBZGRUZWFtUmVzcG9u", + "c2USEAoIcmV2aXNpb24YAiABKAMixAEKI1RlYW1zRW50ZXJwcmlzZVVzZXJz", + "QWRkVGVhbVJlc3BvbnNlEg8KB3RlYW1VaWQYASABKAwSPgoFdXNlcnMYAiAD", + "KAsyLy5FbnRlcnByaXNlLlRlYW1zRW50ZXJwcmlzZVVzZXJzQWRkVXNlclJl", + "c3BvbnNlEg8KB3N1Y2Nlc3MYAyABKAgSDwoHbWVzc2FnZRgEIAEoCRISCgpy", + "ZXN1bHRDb2RlGAUgASgJEhYKDmFkZGl0aW9uYWxJbmZvGAYgASgJIp8BCiNU", + "ZWFtc0VudGVycHJpc2VVc2Vyc0FkZFVzZXJSZXNwb25zZRIYChBlbnRlcnBy", + "aXNlVXNlcklkGAEgASgDEhAKCHJldmlzaW9uGAIgASgDEg8KB3N1Y2Nlc3MY", + "AyABKAgSDwoHbWVzc2FnZRgEIAEoCRISCgpyZXN1bHRDb2RlGAUgASgJEhYK", + "DmFkZGl0aW9uYWxJbmZvGAYgASgJIk0KC0RvbWFpbkFsaWFzEg4KBmRvbWFp", + "bhgBIAEoCRINCgVhbGlhcxgCIAEoCRIOCgZzdGF0dXMYAyABKAUSDwoHbWVz", + "c2FnZRgEIAEoCSJCChJEb21haW5BbGlhc1JlcXVlc3QSLAoLZG9tYWluQWxp", + "YXMYASADKAsyFy5FbnRlcnByaXNlLkRvbWFpbkFsaWFzIkMKE0RvbWFpbkFs", + "aWFzUmVzcG9uc2USLAoLZG9tYWluQWxpYXMYASADKAsyFy5FbnRlcnByaXNl", + "LkRvbWFpbkFsaWFzIm0KH0VudGVycHJpc2VVc2Vyc1Byb3Zpc2lvblJlcXVl", + "c3QSMwoFdXNlcnMYASADKAsyJC5FbnRlcnByaXNlLkVudGVycHJpc2VVc2Vy", + "c1Byb3Zpc2lvbhIVCg1jbGllbnRWZXJzaW9uGAIgASgJIrYDChhFbnRlcnBy", + "aXNlVXNlcnNQcm92aXNpb24SGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEoAxIQ", + "Cgh1c2VybmFtZRgCIAEoCRIOCgZub2RlSWQYAyABKAMSFQoNZW5jcnlwdGVk", + "RGF0YRgEIAEoCRItCgdrZXlUeXBlGAUgASgOMhwuRW50ZXJwcmlzZS5FbmNy", + "eXB0ZWRLZXlUeXBlEhAKCGZ1bGxOYW1lGAYgASgJEhAKCGpvYlRpdGxlGAcg", + "ASgJEh4KFmVudGVycHJpc2VVc2Vyc0RhdGFLZXkYCCABKAwSFAoMYXV0aFZl", + "cmlmaWVyGAkgASgMEhgKEGVuY3J5cHRpb25QYXJhbXMYCiABKAwSFAoMcnNh", + "UHVibGljS2V5GAsgASgMEh4KFnJzYUVuY3J5cHRlZFByaXZhdGVLZXkYDCAB", + "KAwSFAoMZWNjUHVibGljS2V5GA0gASgMEh4KFmVjY0VuY3J5cHRlZFByaXZh", + "dGVLZXkYDiABKAwSHAoUZW5jcnlwdGVkRGV2aWNlVG9rZW4YDyABKAwSGgoS", + "ZW5jcnlwdGVkQ2xpZW50S2V5GBAgASgMIl8KIEVudGVycHJpc2VVc2Vyc1By", + "b3Zpc2lvblJlc3BvbnNlEjsKB3Jlc3VsdHMYASADKAsyKi5FbnRlcnByaXNl", + "LkVudGVycHJpc2VVc2Vyc1Byb3Zpc2lvblJlc3VsdCJxCh5FbnRlcnByaXNl", + "VXNlcnNQcm92aXNpb25SZXN1bHQSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAEo", + "AxIMCgRjb2RlGAIgASgJEg8KB21lc3NhZ2UYAyABKAkSFgoOYWRkaXRpb25h", + "bEluZm8YBCABKAkiYQoZRW50ZXJwcmlzZVVzZXJzQWRkUmVxdWVzdBItCgV1", + "c2VycxgBIAMoCzIeLkVudGVycHJpc2UuRW50ZXJwcmlzZVVzZXJzQWRkEhUK", + "DWNsaWVudFZlcnNpb24YAiABKAkijAIKEkVudGVycHJpc2VVc2Vyc0FkZBIY", + "ChBlbnRlcnByaXNlVXNlcklkGAEgASgDEhAKCHVzZXJuYW1lGAIgASgJEg4K", + "Bm5vZGVJZBgDIAEoAxIVCg1lbmNyeXB0ZWREYXRhGAQgASgJEi0KB2tleVR5", + "cGUYBSABKA4yHC5FbnRlcnByaXNlLkVuY3J5cHRlZEtleVR5cGUSEAoIZnVs", + "bE5hbWUYBiABKAkSEAoIam9iVGl0bGUYByABKAkSGwoTc3VwcHJlc3NFbWFp", + "bEludml0ZRgIIAEoCBIVCg1pbnZpdGVlTG9jYWxlGAkgASgJEgwKBG1vdmUY", + "CiABKAgSDgoGcm9sZUlkGAsgASgDIpsBChpFbnRlcnByaXNlVXNlcnNBZGRS", + "ZXNwb25zZRI1CgdyZXN1bHRzGAEgAygLMiQuRW50ZXJwcmlzZS5FbnRlcnBy", + "aXNlVXNlcnNBZGRSZXN1bHQSDwoHc3VjY2VzcxgCIAEoCBIMCgRjb2RlGAMg", + "ASgJEg8KB21lc3NhZ2UYBCABKAkSFgoOYWRkaXRpb25hbEluZm8YBSABKAki", + "lgEKGEVudGVycHJpc2VVc2Vyc0FkZFJlc3VsdBIYChBlbnRlcnByaXNlVXNl", + "cklkGAEgASgDEg8KB3N1Y2Nlc3MYAiABKAgSGAoQdmVyaWZpY2F0aW9uQ29k", + "ZRgDIAEoCRIMCgRjb2RlGAQgASgJEg8KB21lc3NhZ2UYBSABKAkSFgoOYWRk", + "aXRpb25hbEluZm8YBiABKAkiuQEKF1VwZGF0ZU1TUFBlcm1pdHNSZXF1ZXN0", + "EhcKD21zcEVudGVycHJpc2VJZBgBIAEoBRIaChJtYXhBbGxvd2VkTGljZW5z", + "ZXMYAiABKAUSGQoRYWxsb3dlZE1jUHJvZHVjdHMYAyADKAkSFQoNYWxsb3dl", + "ZEFkZE9ucxgEIAMoCRIXCg9tYXhGaWxlUGxhblR5cGUYBSABKAkSHgoWYWxs", + "b3dVbmxpbWl0ZWRMaWNlbnNlcxgGIAEoCCI5ChxEZWxldGVFbnRlcnByaXNl", + "VXNlcnNSZXF1ZXN0EhkKEWVudGVycHJpc2VVc2VySWRzGAEgAygDIm8KGkRl", + "bGV0ZUVudGVycHJpc2VVc2VyU3RhdHVzEhgKEGVudGVycHJpc2VVc2VySWQY", + "ASABKAMSNwoGc3RhdHVzGAIgASgOMicuRW50ZXJwcmlzZS5EZWxldGVFbnRl", + "cnByaXNlVXNlcnNSZXN1bHQiXQodRGVsZXRlRW50ZXJwcmlzZVVzZXJzUmVz", + "cG9uc2USPAoMZGVsZXRlU3RhdHVzGAEgAygLMiYuRW50ZXJwcmlzZS5EZWxl", + "dGVFbnRlcnByaXNlVXNlclN0YXR1cyJ3ChhDbGVhclNlY3VyaXR5RGF0YVJl", + "cXVlc3QSGAoQZW50ZXJwcmlzZVVzZXJJZBgBIAMoAxIQCghhbGxVc2VycxgC", + "IAEoCBIvCgR0eXBlGAMgASgOMiEuRW50ZXJwcmlzZS5DbGVhclNlY3VyaXR5", + "RGF0YVR5cGUqGwoHS2V5VHlwZRIHCgNSU0EQABIHCgNFQ0MQASrmAQoUUm9s", + "ZVVzZXJNb2RpZnlTdGF0dXMSDwoLUk9MRV9FWElTVFMQABIUChBNSVNTSU5H", + "X1RSRUVfS0VZEAESFAoQTUlTU0lOR19ST0xFX0tFWRACEh4KGklOVkFMSURf", + "RU5URVJQUklTRV9VU0VSX0lEEAMSGwoXUEVORElOR19FTlRFUlBSSVNFX1VT", + "RVIQBBITCg9JTlZBTElEX05PREVfSUQQBRIhCh1NQVlfTk9UX1JFTU9WRV9T", + "RUxGX0ZST01fUk9MRRAGEhwKGE1VU1RfSEFWRV9PTkVfVVNFUl9BRE1JThAH", + "Kj0KDkVudGVycHJpc2VUeXBlEhcKE0VOVEVSUFJJU0VfU1RBTkRBUkQQABIS", + "Cg5FTlRFUlBSSVNFX01TUBABKnMKGFRyYW5zZmVyQWNjZXB0YW5jZVN0YXR1", + "cxINCglVTkRFRklORUQQABIQCgxOT1RfUkVRVUlSRUQQARIQCgxOT1RfQUND", + "RVBURUQQAhIWChJQQVJUSUFMTFlfQUNDRVBURUQQAxIMCghBQ0NFUFRFRBAE", + "KuEDChRFbnRlcnByaXNlRGF0YUVudGl0eRILCgdVTktOT1dOEAASCQoFTk9E", + "RVMQARIJCgVST0xFUxACEgkKBVVTRVJTEAMSCQoFVEVBTVMQBBIOCgpURUFN", + "X1VTRVJTEAUSDgoKUk9MRV9VU0VSUxAGEhMKD1JPTEVfUFJJVklMRUdFUxAH", + "EhUKEVJPTEVfRU5GT1JDRU1FTlRTEAgSDgoKUk9MRV9URUFNUxAJEgwKCExJ", + "Q0VOU0VTEAoSEQoNTUFOQUdFRF9OT0RFUxALEhUKEU1BTkFHRURfQ09NUEFO", + "SUVTEAwSCwoHQlJJREdFUxANEgkKBVNDSU1TEA4SEwoPRU1BSUxfUFJPVklT", + "SU9OEA8SEAoMUVVFVUVEX1RFQU1TEBASFQoRUVVFVUVEX1RFQU1fVVNFUlMQ", + "ERIQCgxTU09fU0VSVklDRVMQEhIXChNSRVBPUlRfRklMVEVSX1VTRVJTEBMS", + "JgoiREVWSUNFU19SRVFVRVNUX0ZPUl9BRE1JTl9BUFBST1ZBTBAUEhAKDFVT", + "RVJfQUxJQVNFUxAVEikKJUNPTVBMSUFOQ0VfUkVQT1JUX0NSSVRFUklBX0FO", + "RF9GSUxURVIQFhIWChJDT01QTElBTkNFX1JFUE9SVFMQFyoiCgtDYWNoZVN0", + "YXR1cxIICgRLRUVQEAASCQoFQ0xFQVIQASqTAQoNQmFja3VwS2V5VHlwZRIK", + "CgZOT19LRVkQABIZChVFTkNSWVBURURfQllfREFUQV9LRVkQARIbChdFTkNS", + "WVBURURfQllfUFVCTElDX0tFWRACEh0KGUVOQ1JZUFRFRF9CWV9EQVRBX0tF", + "WV9HQ00QAxIfChtFTkNSWVBURURfQllfUFVCTElDX0tFWV9FQ0MQBCo6ChVC", + "YWNrdXBVc2VyRGF0YUtleVR5cGUSBwoDT1dOEAASGAoUU0hBUkVEX1RPX0VO", + "VEVSUFJJU0UQASqlAQoQRW5jcnlwdGVkS2V5VHlwZRINCglLVF9OT19LRVkQ", + "ABIcChhLVF9FTkNSWVBURURfQllfREFUQV9LRVkQARIeChpLVF9FTkNSWVBU", + "RURfQllfUFVCTElDX0tFWRACEiAKHEtUX0VOQ1JZUFRFRF9CWV9EQVRBX0tF", + "WV9HQ00QAxIiCh5LVF9FTkNSWVBURURfQllfUFVCTElDX0tFWV9FQ0MQBCrg", + "AQoSRW50ZXJwcmlzZUZsYWdUeXBlEgsKB0lOVkFMSUQQABIaChZBTExPV19Q", + "RVJTT05BTF9MSUNFTlNFEAESGAoUU1BFQ0lBTF9QUk9WSVNJT05JTkcQAhIQ", + "CgxSRUNPUkRfVFlQRVMQAxITCg9TRUNSRVRTX01BTkFHRVIQBBIVChFFTlRF", + "UlBSSVNFX0xPQ0tFRBAFEhUKEUZPUkJJRF9LRVlfVFlQRV8yEAYSFQoRQ09O", + "U09MRV9PTkJPQVJERUQQBxIbChdGT1JCSURfQUNDT1VOVF9UUkFOU0ZFUhAI", + "KkUKEFVzZXJVcGRhdGVTdGF0dXMSEgoOVVNFUl9VUERBVEVfT0sQABIdChlV", + "U0VSX1VQREFURV9BQ0NFU1NfREVOSUVEEAEqSQoPQXVkaXRVc2VyU3RhdHVz", + "EgYKAk9LEAASEQoNQUNDRVNTX0RFTklFRBABEhsKF05PX0xPTkdFUl9JTl9F", + "TlRFUlBSSVNFEAIqMwoMVGVhbVVzZXJUeXBlEggKBFVTRVIQABIJCgVBRE1J", + "ThABEg4KCkFETUlOX09OTFkQAip4Cg1BcHBDbGllbnRUeXBlEgwKCE5PVF9V", + "U0VEEAASCwoHR0VORVJBTBABEiUKIURJU0NPVkVSWV9BTkRfUk9UQVRJT05f", + "Q09OVFJPTExFUhACEhIKDktDTV9DT05UUk9MTEVSEAMSEQoNU0VMRl9ERVNU", + "UlVDVBAEKo8BChtEZWxldGVFbnRlcnByaXNlVXNlcnNSZXN1bHQSCwoHU1VD", + "Q0VTUxAAEhoKFk5PVF9BTl9FTlRFUlBSSVNFX1VTRVIQARIWChJDQU5OT1Rf", + "REVMRVRFX1NFTEYQAhIkCiBCUklER0VfQ0FOTk9UX0RFTEVURV9BQ1RJVkVf", + "VVNFUhADEgkKBUVSUk9SEAQqhwEKFUNsZWFyU2VjdXJpdHlEYXRhVHlwZRIe", + "ChpSRUNBTENVTEFURV9TVU1NQVJZX1JFUE9SVBAAEicKI0ZPUkNFX0NMSUVO", + "VF9DSEVDS19GT1JfTUlTU0lOR19EQVRBEAESJQohRk9SQ0VfQ0xJRU5UX1JF", + "U0VORF9TRUNVUklUWV9EQVRBEAJCJgoYY29tLmtlZXBlcnNlY3VyaXR5LnBy", + "b3RvQgpFbnRlcnByaXNlYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Enterprise.KeyType), typeof(global::Enterprise.EnterpriseType), typeof(global::Enterprise.EnterpriseDataEntity), typeof(global::Enterprise.CacheStatus), typeof(global::Enterprise.BackupKeyType), typeof(global::Enterprise.BackupUserDataKeyType), typeof(global::Enterprise.EncryptedKeyType), typeof(global::Enterprise.EnterpriseFlagType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Enterprise.KeyType), typeof(global::Enterprise.RoleUserModifyStatus), typeof(global::Enterprise.EnterpriseType), typeof(global::Enterprise.TransferAcceptanceStatus), typeof(global::Enterprise.EnterpriseDataEntity), typeof(global::Enterprise.CacheStatus), typeof(global::Enterprise.BackupKeyType), typeof(global::Enterprise.BackupUserDataKeyType), typeof(global::Enterprise.EncryptedKeyType), typeof(global::Enterprise.EnterpriseFlagType), typeof(global::Enterprise.UserUpdateStatus), typeof(global::Enterprise.AuditUserStatus), typeof(global::Enterprise.TeamUserType), typeof(global::Enterprise.AppClientType), typeof(global::Enterprise.DeleteEnterpriseUsersResult), typeof(global::Enterprise.ClearSecurityDataType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseKeyPairRequest), global::Enterprise.EnterpriseKeyPairRequest.Parser, new[]{ "EnterprisePublicKey", "EncryptedEnterprisePrivateKey", "KeyType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetTeamMemberRequest), global::Enterprise.GetTeamMemberRequest.Parser, new[]{ "TeamUid" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUser), global::Enterprise.EnterpriseUser.Parser, new[]{ "EnterpriseUserId", "Email", "EnterpriseUsername" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUser), global::Enterprise.EnterpriseUser.Parser, new[]{ "EnterpriseUserId", "Email", "EnterpriseUsername", "IsShareAdmin", "Username" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetTeamMemberResponse), global::Enterprise.GetTeamMemberResponse.Parser, new[]{ "EnterpriseUser" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUserIds), global::Enterprise.EnterpriseUserIds.Parser, new[]{ "EnterpriseUserId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterprisePersonalAccount), global::Enterprise.EnterprisePersonalAccount.Parser, new[]{ "Email", "OBSOLETEFIELD" }, null, null, null, null), @@ -236,8 +505,17 @@ static EnterpriseReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.NodeToManagedCompanyRequest), global::Enterprise.NodeToManagedCompanyRequest.Parser, new[]{ "CompanyId", "Nodes", "Roles", "Users", "RoleKeys", "TeamKeys" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleTeam), global::Enterprise.RoleTeam.Parser, new[]{ "RoleId", "TeamUid" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleTeams), global::Enterprise.RoleTeams.Parser, new[]{ "RoleTeam" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseRegistration), global::Enterprise.EnterpriseRegistration.Parser, new[]{ "EncryptedTreeKey", "EnterpriseName", "RootNodeData", "AdminUserData", "AdminName", "RoleData", "RsaKeyPair", "NumberSeats", "EnterpriseType", "RolePublicKey", "RolePrivateKeyEncryptedWithRoleKey", "RoleKeyEncryptedWithTreeKey", "EccKeyPair" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DomainPasswordRulesRequest), global::Enterprise.DomainPasswordRulesRequest.Parser, new[]{ "Username" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUserAddKeys), global::Enterprise.RoleUserAddKeys.Parser, new[]{ "EnterpriseUserId", "TreeKey", "RoleAdminKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUserAdd), global::Enterprise.RoleUserAdd.Parser, new[]{ "RoleId", "RoleUserAddKeys" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUsersAddRequest), global::Enterprise.RoleUsersAddRequest.Parser, new[]{ "RoleUserAdds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUserAddResult), global::Enterprise.RoleUserAddResult.Parser, new[]{ "RoleId", "EnterpriseUserId", "Status", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUsersAddResponse), global::Enterprise.RoleUsersAddResponse.Parser, new[]{ "Results" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUserRemove), global::Enterprise.RoleUserRemove.Parser, new[]{ "RoleId", "EnterpriseUserIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUsersRemoveRequest), global::Enterprise.RoleUsersRemoveRequest.Parser, new[]{ "RoleUserRemoves" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUserRemoveResult), global::Enterprise.RoleUserRemoveResult.Parser, new[]{ "RoleId", "EnterpriseUserId", "Status", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleUsersRemoveResponse), global::Enterprise.RoleUsersRemoveResponse.Parser, new[]{ "Results" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseRegistration), global::Enterprise.EnterpriseRegistration.Parser, new[]{ "EncryptedTreeKey", "EnterpriseName", "RootNodeData", "AdminUserData", "AdminName", "RoleData", "RsaKeyPair", "NumberSeats", "EnterpriseType", "RolePublicKey", "RolePrivateKeyEncryptedWithRoleKey", "RoleKeyEncryptedWithTreeKey", "EccKeyPair", "AllUsersRoleData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DomainPasswordRulesRequest), global::Enterprise.DomainPasswordRulesRequest.Parser, new[]{ "Username", "VerificationCode" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DomainPasswordRulesFields), global::Enterprise.DomainPasswordRulesFields.Parser, new[]{ "Type", "Minimum", "Maximum", "Allowed" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.LoginToMcRequest), global::Enterprise.LoginToMcRequest.Parser, new[]{ "McEnterpriseId", "MessageSessionUid" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.LoginToMcResponse), global::Enterprise.LoginToMcResponse.Parser, new[]{ "EncryptedSessionToken", "EncryptedTreeKey" }, null, null, null, null), @@ -246,15 +524,16 @@ static EnterpriseReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ApproveUserDeviceResponse), global::Enterprise.ApproveUserDeviceResponse.Parser, new[]{ "EnterpriseUserId", "EncryptedDeviceToken", "Failed", "Message" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ApproveUserDevicesRequest), global::Enterprise.ApproveUserDevicesRequest.Parser, new[]{ "DeviceRequests" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ApproveUserDevicesResponse), global::Enterprise.ApproveUserDevicesResponse.Parser, new[]{ "DeviceResponses" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUserDataKey), global::Enterprise.EnterpriseUserDataKey.Parser, new[]{ "EnterpriseUserId", "UserEncryptedDataKey", "KeyTypeId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUserDataKey), global::Enterprise.EnterpriseUserDataKey.Parser, new[]{ "EnterpriseUserId", "UserEncryptedDataKey", "KeyTypeId", "RoleKey", "PrivateKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUserDataKeys), global::Enterprise.EnterpriseUserDataKeys.Parser, new[]{ "Keys" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseDataRequest), global::Enterprise.EnterpriseDataRequest.Parser, new[]{ "ContinuationToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SpecialProvisioning), global::Enterprise.SpecialProvisioning.Parser, new[]{ "Url", "Name" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GeneralDataEntity), global::Enterprise.GeneralDataEntity.Parser, new[]{ "EnterpriseName", "RestrictVisibility", "SpecialProvisioning", "UserPrivilege" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Node), global::Enterprise.Node.Parser, new[]{ "NodeId", "ParentId", "BridgeId", "ScimId", "LicenseId", "EncryptedData", "DuoEnabled", "RsaEnabled", "SsoServiceProviderId", "RestrictVisibility" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GeneralDataEntity), global::Enterprise.GeneralDataEntity.Parser, new[]{ "EnterpriseName", "RestrictVisibility", "SpecialProvisioning", "UserPrivilege", "Distributor", "ForbidAccountTransfer" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Node), global::Enterprise.Node.Parser, new[]{ "NodeId", "ParentId", "BridgeId", "ScimId", "LicenseId", "EncryptedData", "DuoEnabled", "RsaEnabled", "SsoServiceProviderId", "RestrictVisibility", "SsoServiceProviderIds" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Role), global::Enterprise.Role.Parser, new[]{ "RoleId", "NodeId", "EncryptedData", "KeyType", "VisibleBelow", "NewUserInherit", "RoleType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.User), global::Enterprise.User.Parser, new[]{ "EnterpriseUserId", "NodeId", "EncryptedData", "KeyType", "Username", "Status", "Lock", "UserId", "AccountShareExpiration" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.User), global::Enterprise.User.Parser, new[]{ "EnterpriseUserId", "NodeId", "EncryptedData", "KeyType", "Username", "Status", "Lock", "UserId", "AccountShareExpiration", "FullName", "JobTitle", "TfaEnabled", "TransferAcceptanceStatus" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserAlias), global::Enterprise.UserAlias.Parser, new[]{ "EnterpriseUserId", "Username" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportMetaData), global::Enterprise.ComplianceReportMetaData.Parser, new[]{ "ReportUid", "NodeId", "ReportName", "DateGenerated", "RunByName", "NumberOfOwners", "NumberOfRecords" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ManagedNode), global::Enterprise.ManagedNode.Parser, new[]{ "RoleId", "ManagedNodeId", "CascadeNodeManagement" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserManagedNode), global::Enterprise.UserManagedNode.Parser, new[]{ "NodeId", "CascadeNodeManagement", "Privileges" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserPrivilege), global::Enterprise.UserPrivilege.Parser, new[]{ "UserManagedNodes", "EnterpriseUserId", "EncryptedData" }, null, null, null, null), @@ -263,16 +542,23 @@ static EnterpriseReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleEnforcement), global::Enterprise.RoleEnforcement.Parser, new[]{ "RoleId", "EnforcementType", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Team), global::Enterprise.Team.Parser, new[]{ "TeamUid", "Name", "NodeId", "RestrictEdit", "RestrictShare", "RestrictView", "EncryptedData", "EncryptedTeamKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamUser), global::Enterprise.TeamUser.Parser, new[]{ "TeamUid", "EnterpriseUserId", "UserType" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ManagedCompany), global::Enterprise.ManagedCompany.Parser, new[]{ "McEnterpriseId", "McEnterpriseName", "MspNodeId", "NumberOfSeats", "NumberOfUsers", "ProductId", "IsExpired", "TreeKey", "TreeKeyRole" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetDistributorInfoResponse), global::Enterprise.GetDistributorInfoResponse.Parser, new[]{ "Distributors" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Distributor), global::Enterprise.Distributor.Parser, new[]{ "Name", "MspInfos" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.MspInfo), global::Enterprise.MspInfo.Parser, new[]{ "EnterpriseId", "EnterpriseName", "AllocatedLicenses", "AllowedMcProducts", "AllowedAddOns", "MaxFilePlanType", "ManagedCompanies", "AllowUnlimitedLicenses", "AddOns" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ManagedCompany), global::Enterprise.ManagedCompany.Parser, new[]{ "McEnterpriseId", "McEnterpriseName", "MspNodeId", "NumberOfSeats", "NumberOfUsers", "ProductId", "IsExpired", "TreeKey", "TreeKeyRole", "FilePlanType", "AddOns" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.MSPPool), global::Enterprise.MSPPool.Parser, new[]{ "ProductId", "Seats", "AvailableSeats", "Stash" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.MSPContact), global::Enterprise.MSPContact.Parser, new[]{ "EnterpriseId", "EnterpriseName" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.LicenseAddOn), global::Enterprise.LicenseAddOn.Parser, new[]{ "Name", "Enabled", "IsTrial", "Expiration", "Created" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.License), global::Enterprise.License.Parser, new[]{ "Paid", "NumberOfSeats", "Expiration", "LicenseKeyId", "ProductTypeId", "Name", "EnterpriseLicenseId", "SeatsAllocated", "SeatsPending", "Tier", "FilePlanTypeId", "MaxBytes", "StorageExpiration", "LicenseStatus", "MspPool", "ManagedBy", "AddOns" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.LicenseAddOn), global::Enterprise.LicenseAddOn.Parser, new[]{ "Name", "Enabled", "IsTrial", "Expiration", "Created", "Seats", "ActivationTime", "IncludedInProduct", "ApiCallCount" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.MCDefault), global::Enterprise.MCDefault.Parser, new[]{ "McProduct", "AddOns", "FilePlanType", "MaxLicenses", "FixedMaxLicenses" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.MSPPermits), global::Enterprise.MSPPermits.Parser, new[]{ "Restricted", "MaxAllowedLicenses", "AllowedMcProducts", "AllowedAddOns", "MaxFilePlanType", "AllowUnlimitedLicenses", "McDefaults" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.License), global::Enterprise.License.Parser, new[]{ "Paid", "NumberOfSeats", "Expiration", "LicenseKeyId", "ProductTypeId", "Name", "EnterpriseLicenseId", "SeatsAllocated", "SeatsPending", "Tier", "FilePlanTypeId", "MaxBytes", "StorageExpiration", "LicenseStatus", "MspPool", "ManagedBy", "AddOns", "NextBillingDate", "HasMSPLegacyLog", "MspPermits", "Distributor" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Bridge), global::Enterprise.Bridge.Parser, new[]{ "BridgeId", "NodeId", "WanIpEnforcement", "LanIpEnforcement", "Status" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.Scim), global::Enterprise.Scim.Parser, new[]{ "ScimId", "NodeId", "Status", "LastSynced", "RolePrefix", "UniqueGroups" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EmailProvision), global::Enterprise.EmailProvision.Parser, new[]{ "Id", "NodeId", "Domain", "Method" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.QueuedTeam), global::Enterprise.QueuedTeam.Parser, new[]{ "TeamUid", "Name", "NodeId", "EncryptedData" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.QueuedTeamUser), global::Enterprise.QueuedTeamUser.Parser, new[]{ "TeamUid", "Users" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsAddResult), global::Enterprise.TeamsAddResult.Parser, new[]{ "SuccessfulTeamAdd", "UnsuccessfulTeamAdd", "Result", "ErrorMessage" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamAddResult), global::Enterprise.TeamAddResult.Parser, new[]{ "Team", "Result", "ErrorMessage" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SsoService), global::Enterprise.SsoService.Parser, new[]{ "SsoServiceProviderId", "NodeId", "Name", "SpUrl", "InviteNewUsers", "Active", "IsCloud" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ReportFilterUser), global::Enterprise.ReportFilterUser.Parser, new[]{ "UserId", "Email" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DeviceRequestForAdminApproval), global::Enterprise.DeviceRequestForAdminApproval.Parser, new[]{ "DeviceId", "EnterpriseUserId", "EncryptedDeviceToken", "DevicePublicKey", "DeviceName", "ClientVersion", "DeviceType", "Date", "IpAddress", "Location", "Email", "AccountUid" }, null, null, null, null), @@ -281,8 +567,10 @@ static EnterpriseReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupRequest), global::Enterprise.BackupRequest.Parser, new[]{ "ContinuationToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupRecord), global::Enterprise.BackupRecord.Parser, new[]{ "UserId", "RecordUid", "Key", "KeyType", "Version", "Data", "Extra" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupKey), global::Enterprise.BackupKey.Parser, new[]{ "UserId", "BackupKey_" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupUser), global::Enterprise.BackupUser.Parser, new[]{ "UserId", "UserName", "DataKey", "DataKeyType", "PrivateKey", "TreeKey", "TreeKeyType", "BackupKeys" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupUser), global::Enterprise.BackupUser.Parser, new[]{ "UserId", "UserName", "DataKey", "DataKeyType", "PrivateKey", "TreeKey", "TreeKeyType", "BackupKeys", "PrivateECKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupResponse), global::Enterprise.BackupResponse.Parser, new[]{ "EnterpriseEccPrivateKey", "Users", "Records", "ContinuationToken" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupFile), global::Enterprise.BackupFile.Parser, new[]{ "User", "BackupUid", "FileName", "Created", "DownloadUrl" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.BackupsResponse), global::Enterprise.BackupsResponse.Parser, new[]{ "Files" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetEnterpriseDataKeysRequest), global::Enterprise.GetEnterpriseDataKeysRequest.Parser, new[]{ "RoleId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetEnterpriseDataKeysResponse), global::Enterprise.GetEnterpriseDataKeysResponse.Parser, new[]{ "ReEncryptedRoleKey", "RoleKey", "MspKey", "EnterpriseKeys", "TreeKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleKey), global::Enterprise.RoleKey.Parser, new[]{ "RoleId", "EncryptedKey", "KeyType" }, null, null, null, null), @@ -291,7 +579,69 @@ static EnterpriseReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TreeKey), global::Enterprise.TreeKey.Parser, new[]{ "TreeKey_", "KeyTypeId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SharedRecordResponse), global::Enterprise.SharedRecordResponse.Parser, new[]{ "Events" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SharedRecordEvent), global::Enterprise.SharedRecordEvent.Parser, new[]{ "RecordUid", "UserName", "CanEdit", "CanReshare", "ShareFrom" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SetRestrictVisibilityRequest), global::Enterprise.SetRestrictVisibilityRequest.Parser, new[]{ "NodeId" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SetRestrictVisibilityRequest), global::Enterprise.SetRestrictVisibilityRequest.Parser, new[]{ "NodeId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserAddRequest), global::Enterprise.UserAddRequest.Parser, new[]{ "EnterpriseUserId", "NodeId", "EncryptedData", "KeyType", "FullName", "JobTitle", "Email", "SuppressEmailInvite" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserUpdateRequest), global::Enterprise.UserUpdateRequest.Parser, new[]{ "Users" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserUpdate), global::Enterprise.UserUpdate.Parser, new[]{ "EnterpriseUserId", "NodeId", "EncryptedData", "KeyType", "FullName", "JobTitle", "Email" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserUpdateResponse), global::Enterprise.UserUpdateResponse.Parser, new[]{ "Users" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserUpdateResult), global::Enterprise.UserUpdateResult.Parser, new[]{ "EnterpriseUserId", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceRecordOwnersRequest), global::Enterprise.ComplianceRecordOwnersRequest.Parser, new[]{ "NodeIds", "IncludeNonShared" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceRecordOwnersResponse), global::Enterprise.ComplianceRecordOwnersResponse.Parser, new[]{ "RecordOwners" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RecordOwner), global::Enterprise.RecordOwner.Parser, new[]{ "EnterpriseUserId", "Shared" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.PreliminaryComplianceDataRequest), global::Enterprise.PreliminaryComplianceDataRequest.Parser, new[]{ "EnterpriseUserIds", "IncludeNonShared", "ContinuationToken", "IncludeTotalMatchingRecordsInFirstResponse" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.PreliminaryComplianceDataResponse), global::Enterprise.PreliminaryComplianceDataResponse.Parser, new[]{ "AuditUserData", "ContinuationToken", "HasMore", "TotalMatchingRecords" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.AuditUserRecord), global::Enterprise.AuditUserRecord.Parser, new[]{ "RecordUid", "EncryptedData", "Shared" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.AuditUserData), global::Enterprise.AuditUserData.Parser, new[]{ "EnterpriseUserId", "AuditUserRecords", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportFilters), global::Enterprise.ComplianceReportFilters.Parser, new[]{ "RecordTitles", "RecordUids", "JobTitles", "Urls", "EnterpriseUserIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportRequest), global::Enterprise.ComplianceReportRequest.Parser, new[]{ "ComplianceReportRun", "ReportName", "SaveReport" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportRun), global::Enterprise.ComplianceReportRun.Parser, new[]{ "ReportCriteriaAndFilter", "Users", "Records" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportCriteriaAndFilter), global::Enterprise.ComplianceReportCriteriaAndFilter.Parser, new[]{ "NodeId", "CriteriaUid", "CriteriaName", "Criteria", "Filters", "LastModified", "NodeEncryptedData" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportCriteria), global::Enterprise.ComplianceReportCriteria.Parser, new[]{ "JobTitles", "EnterpriseUserIds", "IncludeNonShared" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportFilter), global::Enterprise.ComplianceReportFilter.Parser, new[]{ "RecordTitles", "RecordUids", "JobTitles", "Urls", "RecordTypes" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportResponse), global::Enterprise.ComplianceReportResponse.Parser, new[]{ "DateGenerated", "RunByUserName", "ReportName", "ReportUid", "ComplianceReportRun", "UserProfiles", "AuditTeams", "AuditRecords", "UserRecords", "SharedFolderRecords", "SharedFolderUsers", "SharedFolderTeams", "AuditTeamUsers", "AuditRoles", "LinkedRecords" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.AuditRecord), global::Enterprise.AuditRecord.Parser, new[]{ "RecordUid", "AuditData", "HasAttachments", "InTrash", "TreeLeft", "TreeRight" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.AuditRole), global::Enterprise.AuditRole.Parser, new[]{ "RoleId", "EncryptedData", "RestrictShareOutsideEnterprise", "RestrictShareAll", "RestrictShareOfAttachments", "RestrictMaskPasswordsWhileEditing", "RoleNodeManagements" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RoleNodeManagement), global::Enterprise.RoleNodeManagement.Parser, new[]{ "TreeLeft", "TreeRight", "Cascade", "Privileges" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserProfile), global::Enterprise.UserProfile.Parser, new[]{ "EnterpriseUserId", "FullName", "JobTitle", "Email", "RoleIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.RecordPermission), global::Enterprise.RecordPermission.Parser, new[]{ "RecordUid", "PermissionBits" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserRecord), global::Enterprise.UserRecord.Parser, new[]{ "EnterpriseUserId", "RecordPermissions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.AuditTeam), global::Enterprise.AuditTeam.Parser, new[]{ "TeamUid", "TeamName", "RestrictEdit", "RestrictShare" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.AuditTeamUser), global::Enterprise.AuditTeamUser.Parser, new[]{ "TeamUid", "EnterpriseUserIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SharedFolderRecord), global::Enterprise.SharedFolderRecord.Parser, new[]{ "SharedFolderUid", "RecordPermissions", "ShareAdminRecords" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ShareAdminRecord), global::Enterprise.ShareAdminRecord.Parser, new[]{ "EnterpriseUserId", "RecordPermissionIndexes" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SharedFolderUser), global::Enterprise.SharedFolderUser.Parser, new[]{ "SharedFolderUid", "EnterpriseUserIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SharedFolderTeam), global::Enterprise.SharedFolderTeam.Parser, new[]{ "SharedFolderUid", "TeamUids" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetComplianceReportRequest), global::Enterprise.GetComplianceReportRequest.Parser, new[]{ "ReportUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetComplianceReportResponse), global::Enterprise.GetComplianceReportResponse.Parser, new[]{ "DownloadUrl" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ComplianceReportCriteriaRequest), global::Enterprise.ComplianceReportCriteriaRequest.Parser, new[]{ "CriteriaUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.SaveComplianceReportCriteriaResponse), global::Enterprise.SaveComplianceReportCriteriaResponse.Parser, new[]{ "CriteriaUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.LinkedRecord), global::Enterprise.LinkedRecord.Parser, new[]{ "OwnerUid", "RecordUids" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetSharingAdminsRequest), global::Enterprise.GetSharingAdminsRequest.Parser, new[]{ "SharedFolderUid", "RecordUid", "Username" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UserProfileExt), global::Enterprise.UserProfileExt.Parser, new[]{ "Email", "FullName", "JobTitle", "IsMSPMCAdmin", "IsInSharedFolder", "IsShareAdminForRequestedObject", "IsShareAdminForSharedFolderOwner", "HasAccessToObject" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.GetSharingAdminsResponse), global::Enterprise.GetSharingAdminsResponse.Parser, new[]{ "UserProfileExts" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsEnterpriseUsersAddRequest), global::Enterprise.TeamsEnterpriseUsersAddRequest.Parser, new[]{ "Teams" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsEnterpriseUsersAddTeamRequest), global::Enterprise.TeamsEnterpriseUsersAddTeamRequest.Parser, new[]{ "TeamUid", "Users" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsEnterpriseUsersAddUserRequest), global::Enterprise.TeamsEnterpriseUsersAddUserRequest.Parser, new[]{ "EnterpriseUserId", "UserType", "TeamKey", "TypedTeamKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TypedKey), global::Enterprise.TypedKey.Parser, new[]{ "Key", "KeyType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsEnterpriseUsersAddResponse), global::Enterprise.TeamsEnterpriseUsersAddResponse.Parser, new[]{ "Teams", "Revision" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsEnterpriseUsersAddTeamResponse), global::Enterprise.TeamsEnterpriseUsersAddTeamResponse.Parser, new[]{ "TeamUid", "Users", "Success", "Message", "ResultCode", "AdditionalInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.TeamsEnterpriseUsersAddUserResponse), global::Enterprise.TeamsEnterpriseUsersAddUserResponse.Parser, new[]{ "EnterpriseUserId", "Revision", "Success", "Message", "ResultCode", "AdditionalInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DomainAlias), global::Enterprise.DomainAlias.Parser, new[]{ "Domain", "Alias", "Status", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DomainAliasRequest), global::Enterprise.DomainAliasRequest.Parser, new[]{ "DomainAlias" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DomainAliasResponse), global::Enterprise.DomainAliasResponse.Parser, new[]{ "DomainAlias" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersProvisionRequest), global::Enterprise.EnterpriseUsersProvisionRequest.Parser, new[]{ "Users", "ClientVersion" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersProvision), global::Enterprise.EnterpriseUsersProvision.Parser, new[]{ "EnterpriseUserId", "Username", "NodeId", "EncryptedData", "KeyType", "FullName", "JobTitle", "EnterpriseUsersDataKey", "AuthVerifier", "EncryptionParams", "RsaPublicKey", "RsaEncryptedPrivateKey", "EccPublicKey", "EccEncryptedPrivateKey", "EncryptedDeviceToken", "EncryptedClientKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersProvisionResponse), global::Enterprise.EnterpriseUsersProvisionResponse.Parser, new[]{ "Results" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersProvisionResult), global::Enterprise.EnterpriseUsersProvisionResult.Parser, new[]{ "EnterpriseUserId", "Code", "Message", "AdditionalInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersAddRequest), global::Enterprise.EnterpriseUsersAddRequest.Parser, new[]{ "Users", "ClientVersion" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersAdd), global::Enterprise.EnterpriseUsersAdd.Parser, new[]{ "EnterpriseUserId", "Username", "NodeId", "EncryptedData", "KeyType", "FullName", "JobTitle", "SuppressEmailInvite", "InviteeLocale", "Move", "RoleId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersAddResponse), global::Enterprise.EnterpriseUsersAddResponse.Parser, new[]{ "Results", "Success", "Code", "Message", "AdditionalInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.EnterpriseUsersAddResult), global::Enterprise.EnterpriseUsersAddResult.Parser, new[]{ "EnterpriseUserId", "Success", "VerificationCode", "Code", "Message", "AdditionalInfo" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.UpdateMSPPermitsRequest), global::Enterprise.UpdateMSPPermitsRequest.Parser, new[]{ "MspEnterpriseId", "MaxAllowedLicenses", "AllowedMcProducts", "AllowedAddOns", "MaxFilePlanType", "AllowUnlimitedLicenses" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DeleteEnterpriseUsersRequest), global::Enterprise.DeleteEnterpriseUsersRequest.Parser, new[]{ "EnterpriseUserIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DeleteEnterpriseUserStatus), global::Enterprise.DeleteEnterpriseUserStatus.Parser, new[]{ "EnterpriseUserId", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.DeleteEnterpriseUsersResponse), global::Enterprise.DeleteEnterpriseUsersResponse.Parser, new[]{ "DeleteStatus" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Enterprise.ClearSecurityDataRequest), global::Enterprise.ClearSecurityDataRequest.Parser, new[]{ "EnterpriseUserId", "AllUsers", "Type" }, null, null, null, null) })); } #endregion @@ -303,11 +653,42 @@ public enum KeyType { [pbr::OriginalName("ECC")] Ecc = 1, } + public enum RoleUserModifyStatus { + /// + /// the supplied role_id already exists + /// + [pbr::OriginalName("ROLE_EXISTS")] RoleExists = 0, + [pbr::OriginalName("MISSING_TREE_KEY")] MissingTreeKey = 1, + [pbr::OriginalName("MISSING_ROLE_KEY")] MissingRoleKey = 2, + /// + /// the supplied enterprise_user_id does not belong to the same enterprise as the calling user + /// + [pbr::OriginalName("INVALID_ENTERPRISE_USER_ID")] InvalidEnterpriseUserId = 3, + /// + /// cannot add a pending enterprise user to a role + /// + [pbr::OriginalName("PENDING_ENTERPRISE_USER")] PendingEnterpriseUser = 4, + /// + /// the supplied node_id is not valid + /// + [pbr::OriginalName("INVALID_NODE_ID")] InvalidNodeId = 5, + [pbr::OriginalName("MAY_NOT_REMOVE_SELF_FROM_ROLE")] MayNotRemoveSelfFromRole = 6, + [pbr::OriginalName("MUST_HAVE_ONE_USER_ADMIN")] MustHaveOneUserAdmin = 7, + } + public enum EnterpriseType { [pbr::OriginalName("ENTERPRISE_STANDARD")] EnterpriseStandard = 0, [pbr::OriginalName("ENTERPRISE_MSP")] EnterpriseMsp = 1, } + public enum TransferAcceptanceStatus { + [pbr::OriginalName("UNDEFINED")] Undefined = 0, + [pbr::OriginalName("NOT_REQUIRED")] NotRequired = 1, + [pbr::OriginalName("NOT_ACCEPTED")] NotAccepted = 2, + [pbr::OriginalName("PARTIALLY_ACCEPTED")] PartiallyAccepted = 3, + [pbr::OriginalName("ACCEPTED")] Accepted = 4, + } + public enum EnterpriseDataEntity { [pbr::OriginalName("UNKNOWN")] Unknown = 0, [pbr::OriginalName("NODES")] Nodes = 1, @@ -331,6 +712,8 @@ public enum EnterpriseDataEntity { [pbr::OriginalName("REPORT_FILTER_USERS")] ReportFilterUsers = 19, [pbr::OriginalName("DEVICES_REQUEST_FOR_ADMIN_APPROVAL")] DevicesRequestForAdminApproval = 20, [pbr::OriginalName("USER_ALIASES")] UserAliases = 21, + [pbr::OriginalName("COMPLIANCE_REPORT_CRITERIA_AND_FILTER")] ComplianceReportCriteriaAndFilter = 22, + [pbr::OriginalName("COMPLIANCE_REPORTS")] ComplianceReports = 23, } public enum CacheStatus { @@ -342,6 +725,8 @@ public enum BackupKeyType { [pbr::OriginalName("NO_KEY")] NoKey = 0, [pbr::OriginalName("ENCRYPTED_BY_DATA_KEY")] EncryptedByDataKey = 1, [pbr::OriginalName("ENCRYPTED_BY_PUBLIC_KEY")] EncryptedByPublicKey = 2, + [pbr::OriginalName("ENCRYPTED_BY_DATA_KEY_GCM")] EncryptedByDataKeyGcm = 3, + [pbr::OriginalName("ENCRYPTED_BY_PUBLIC_KEY_ECC")] EncryptedByPublicKeyEcc = 4, } public enum BackupUserDataKeyType { @@ -354,6 +739,7 @@ public enum EncryptedKeyType { [pbr::OriginalName("KT_ENCRYPTED_BY_DATA_KEY")] KtEncryptedByDataKey = 1, [pbr::OriginalName("KT_ENCRYPTED_BY_PUBLIC_KEY")] KtEncryptedByPublicKey = 2, [pbr::OriginalName("KT_ENCRYPTED_BY_DATA_KEY_GCM")] KtEncryptedByDataKeyGcm = 3, + [pbr::OriginalName("KT_ENCRYPTED_BY_PUBLIC_KEY_ECC")] KtEncryptedByPublicKeyEcc = 4, } public enum EnterpriseFlagType { @@ -361,28 +747,105 @@ public enum EnterpriseFlagType { [pbr::OriginalName("ALLOW_PERSONAL_LICENSE")] AllowPersonalLicense = 1, [pbr::OriginalName("SPECIAL_PROVISIONING")] SpecialProvisioning = 2, [pbr::OriginalName("RECORD_TYPES")] RecordTypes = 3, + [pbr::OriginalName("SECRETS_MANAGER")] SecretsManager = 4, + [pbr::OriginalName("ENTERPRISE_LOCKED")] EnterpriseLocked = 5, + [pbr::OriginalName("FORBID_KEY_TYPE_2")] ForbidKeyType2 = 6, + [pbr::OriginalName("CONSOLE_ONBOARDED")] ConsoleOnboarded = 7, + [pbr::OriginalName("FORBID_ACCOUNT_TRANSFER")] ForbidAccountTransfer = 8, + } + + public enum UserUpdateStatus { + /// + /// can't use OK because it's already defined in AuditUserStatus + /// + [pbr::OriginalName("USER_UPDATE_OK")] UserUpdateOk = 0, + /// + /// same deal for ACCESS_DENIED + /// + [pbr::OriginalName("USER_UPDATE_ACCESS_DENIED")] UserUpdateAccessDenied = 1, + } + + public enum AuditUserStatus { + [pbr::OriginalName("OK")] Ok = 0, + /// + ///on a node with no privilege + /// + [pbr::OriginalName("ACCESS_DENIED")] AccessDenied = 1, + /// + ///because user isn't in enterprise, i.e. deleted + /// + [pbr::OriginalName("NO_LONGER_IN_ENTERPRISE")] NoLongerInEnterprise = 2, + } + + public enum TeamUserType { + [pbr::OriginalName("USER")] User = 0, + [pbr::OriginalName("ADMIN")] Admin = 1, + [pbr::OriginalName("ADMIN_ONLY")] AdminOnly = 2, + } + + public enum AppClientType { + [pbr::OriginalName("NOT_USED")] NotUsed = 0, + [pbr::OriginalName("GENERAL")] General = 1, + [pbr::OriginalName("DISCOVERY_AND_ROTATION_CONTROLLER")] DiscoveryAndRotationController = 2, + [pbr::OriginalName("KCM_CONTROLLER")] KcmController = 3, + [pbr::OriginalName("SELF_DESTRUCT")] SelfDestruct = 4, + } + + public enum DeleteEnterpriseUsersResult { + [pbr::OriginalName("SUCCESS")] Success = 0, + /// + ///the delete user is not an enterprise user + /// + [pbr::OriginalName("NOT_AN_ENTERPRISE_USER")] NotAnEnterpriseUser = 1, + /// + ///the delete user is the same as the calling user + /// + [pbr::OriginalName("CANNOT_DELETE_SELF")] CannotDeleteSelf = 2, + /// + ///bridge cannot delete active user + /// + [pbr::OriginalName("BRIDGE_CANNOT_DELETE_ACTIVE_USER")] BridgeCannotDeleteActiveUser = 3, + /// + ///unexpected internal error + /// + [pbr::OriginalName("ERROR")] Error = 4, + } + + public enum ClearSecurityDataType { + [pbr::OriginalName("RECALCULATE_SUMMARY_REPORT")] RecalculateSummaryReport = 0, + [pbr::OriginalName("FORCE_CLIENT_CHECK_FOR_MISSING_DATA")] ForceClientCheckForMissingData = 1, + [pbr::OriginalName("FORCE_CLIENT_RESEND_SECURITY_DATA")] ForceClientResendSecurityData = 2, } #endregion #region Messages - public sealed partial class EnterpriseKeyPairRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseKeyPairRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseKeyPairRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseKeyPairRequest() { OnConstruction(); } @@ -390,6 +853,7 @@ public EnterpriseKeyPairRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseKeyPairRequest(EnterpriseKeyPairRequest other) : this() { enterprisePublicKey_ = other.enterprisePublicKey_; encryptedEnterprisePrivateKey_ = other.encryptedEnterprisePrivateKey_; @@ -398,6 +862,7 @@ public EnterpriseKeyPairRequest(EnterpriseKeyPairRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseKeyPairRequest Clone() { return new EnterpriseKeyPairRequest(this); } @@ -406,6 +871,7 @@ public EnterpriseKeyPairRequest Clone() { public const int EnterprisePublicKeyFieldNumber = 1; private pb::ByteString enterprisePublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EnterprisePublicKey { get { return enterprisePublicKey_; } set { @@ -417,6 +883,7 @@ public EnterpriseKeyPairRequest Clone() { public const int EncryptedEnterprisePrivateKeyFieldNumber = 2; private pb::ByteString encryptedEnterprisePrivateKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedEnterprisePrivateKey { get { return encryptedEnterprisePrivateKey_; } set { @@ -428,6 +895,7 @@ public EnterpriseKeyPairRequest Clone() { public const int KeyTypeFieldNumber = 3; private global::Enterprise.KeyType keyType_ = global::Enterprise.KeyType.Rsa; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Enterprise.KeyType KeyType { get { return keyType_; } set { @@ -436,11 +904,13 @@ public EnterpriseKeyPairRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EnterpriseKeyPairRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EnterpriseKeyPairRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -455,6 +925,7 @@ public bool Equals(EnterpriseKeyPairRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EnterprisePublicKey.Length != 0) hash ^= EnterprisePublicKey.GetHashCode(); @@ -467,12 +938,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EnterprisePublicKey.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EnterprisePublicKey); @@ -488,9 +964,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterprisePublicKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EnterprisePublicKey); + } + if (EncryptedEnterprisePrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedEnterprisePrivateKey); + } + if (KeyType != global::Enterprise.KeyType.Rsa) { + output.WriteRawTag(24); + output.WriteEnum((int) KeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EnterprisePublicKey.Length != 0) { @@ -509,6 +1009,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EnterpriseKeyPairRequest other) { if (other == null) { return; @@ -526,10 +1027,18 @@ public void MergeFrom(EnterpriseKeyPairRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -547,27 +1056,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EnterprisePublicKey = input.ReadBytes(); + break; + } + case 18: { + EncryptedEnterprisePrivateKey = input.ReadBytes(); + break; + } + case 24: { + KeyType = (global::Enterprise.KeyType) input.ReadEnum(); + break; + } + } + } } + #endif } - public sealed partial class GetTeamMemberRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetTeamMemberRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetTeamMemberRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GetTeamMemberRequest() { OnConstruction(); } @@ -575,12 +1125,14 @@ public GetTeamMemberRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GetTeamMemberRequest(GetTeamMemberRequest other) : this() { teamUid_ = other.teamUid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GetTeamMemberRequest Clone() { return new GetTeamMemberRequest(this); } @@ -589,6 +1141,7 @@ public GetTeamMemberRequest Clone() { public const int TeamUidFieldNumber = 1; private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString TeamUid { get { return teamUid_; } set { @@ -597,11 +1150,13 @@ public GetTeamMemberRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as GetTeamMemberRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(GetTeamMemberRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -614,6 +1169,7 @@ public bool Equals(GetTeamMemberRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); @@ -624,12 +1180,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (TeamUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(TeamUid); @@ -637,9 +1198,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (TeamUid.Length != 0) { @@ -652,6 +1229,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(GetTeamMemberRequest other) { if (other == null) { return; @@ -663,10 +1241,18 @@ public void MergeFrom(GetTeamMemberRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -676,27 +1262,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class EnterpriseUser : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUser()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseUser() { OnConstruction(); } @@ -704,14 +1323,18 @@ public EnterpriseUser() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseUser(EnterpriseUser other) : this() { enterpriseUserId_ = other.enterpriseUserId_; email_ = other.email_; enterpriseUsername_ = other.enterpriseUsername_; + isShareAdmin_ = other.isShareAdmin_; + username_ = other.username_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseUser Clone() { return new EnterpriseUser(this); } @@ -720,6 +1343,7 @@ public EnterpriseUser Clone() { public const int EnterpriseUserIdFieldNumber = 1; private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long EnterpriseUserId { get { return enterpriseUserId_; } set { @@ -731,6 +1355,7 @@ public long EnterpriseUserId { public const int EmailFieldNumber = 2; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -742,6 +1367,7 @@ public string Email { public const int EnterpriseUsernameFieldNumber = 3; private string enterpriseUsername_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string EnterpriseUsername { get { return enterpriseUsername_; } set { @@ -749,12 +1375,38 @@ public string EnterpriseUsername { } } + /// Field number for the "isShareAdmin" field. + public const int IsShareAdminFieldNumber = 4; + private bool isShareAdmin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShareAdmin { + get { return isShareAdmin_; } + set { + isShareAdmin_ = value; + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 5; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EnterpriseUser); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EnterpriseUser other) { if (ReferenceEquals(other, null)) { return false; @@ -765,15 +1417,20 @@ public bool Equals(EnterpriseUser other) { if (EnterpriseUserId != other.EnterpriseUserId) return false; if (Email != other.Email) return false; if (EnterpriseUsername != other.EnterpriseUsername) return false; + if (IsShareAdmin != other.IsShareAdmin) return false; + if (Username != other.Username) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); if (Email.Length != 0) hash ^= Email.GetHashCode(); if (EnterpriseUsername.Length != 0) hash ^= EnterpriseUsername.GetHashCode(); + if (IsShareAdmin != false) hash ^= IsShareAdmin.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -781,12 +1438,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EnterpriseUserId != 0L) { output.WriteRawTag(8); output.WriteInt64(EnterpriseUserId); @@ -799,12 +1461,52 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(26); output.WriteString(EnterpriseUsername); } + if (IsShareAdmin != false) { + output.WriteRawTag(32); + output.WriteBool(IsShareAdmin); + } + if (Username.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Username); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Email.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Email); + } + if (EnterpriseUsername.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EnterpriseUsername); + } + if (IsShareAdmin != false) { + output.WriteRawTag(32); + output.WriteBool(IsShareAdmin); + } + if (Username.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EnterpriseUserId != 0L) { @@ -816,6 +1518,12 @@ public int CalculateSize() { if (EnterpriseUsername.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseUsername); } + if (IsShareAdmin != false) { + size += 1 + 1; + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -823,6 +1531,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EnterpriseUser other) { if (other == null) { return; @@ -836,14 +1545,28 @@ public void MergeFrom(EnterpriseUser other) { if (other.EnterpriseUsername.Length != 0) { EnterpriseUsername = other.EnterpriseUsername; } + if (other.IsShareAdmin != false) { + IsShareAdmin = other.IsShareAdmin; + } + if (other.Username.Length != 0) { + Username = other.Username; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -859,29 +1582,86 @@ public void MergeFrom(pb::CodedInputStream input) { EnterpriseUsername = input.ReadString(); break; } + case 32: { + IsShareAdmin = input.ReadBool(); + break; + } + case 42: { + Username = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Email = input.ReadString(); + break; + } + case 26: { + EnterpriseUsername = input.ReadString(); + break; + } + case 32: { + IsShareAdmin = input.ReadBool(); + break; + } + case 42: { + Username = input.ReadString(); + break; + } } } } + #endif } - public sealed partial class GetTeamMemberResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetTeamMemberResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetTeamMemberResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GetTeamMemberResponse() { OnConstruction(); } @@ -889,12 +1669,14 @@ public GetTeamMemberResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GetTeamMemberResponse(GetTeamMemberResponse other) : this() { enterpriseUser_ = other.enterpriseUser_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public GetTeamMemberResponse Clone() { return new GetTeamMemberResponse(this); } @@ -905,16 +1687,19 @@ public GetTeamMemberResponse Clone() { = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUser.Parser); private readonly pbc::RepeatedField enterpriseUser_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField EnterpriseUser { get { return enterpriseUser_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as GetTeamMemberResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(GetTeamMemberResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -927,6 +1712,7 @@ public bool Equals(GetTeamMemberResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= enterpriseUser_.GetHashCode(); @@ -937,19 +1723,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else enterpriseUser_.WriteTo(output, _repeated_enterpriseUser_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUser_.WriteTo(ref output, _repeated_enterpriseUser_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += enterpriseUser_.CalculateSize(_repeated_enterpriseUser_codec); @@ -960,6 +1764,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(GetTeamMemberResponse other) { if (other == null) { return; @@ -969,10 +1774,18 @@ public void MergeFrom(GetTeamMemberResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -982,27 +1795,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + enterpriseUser_.AddEntriesFrom(ref input, _repeated_enterpriseUser_codec); + break; + } + } + } } + #endif } - public sealed partial class EnterpriseUserIds : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserIds : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserIds()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseUserIds() { OnConstruction(); } @@ -1010,12 +1856,14 @@ public EnterpriseUserIds() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseUserIds(EnterpriseUserIds other) : this() { enterpriseUserId_ = other.enterpriseUserId_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterpriseUserIds Clone() { return new EnterpriseUserIds(this); } @@ -1026,16 +1874,19 @@ public EnterpriseUserIds Clone() { = pb::FieldCodec.ForInt64(10); private readonly pbc::RepeatedField enterpriseUserId_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField EnterpriseUserId { get { return enterpriseUserId_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EnterpriseUserIds); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EnterpriseUserIds other) { if (ReferenceEquals(other, null)) { return false; @@ -1048,6 +1899,7 @@ public bool Equals(EnterpriseUserIds other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= enterpriseUserId_.GetHashCode(); @@ -1058,19 +1910,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else enterpriseUserId_.WriteTo(output, _repeated_enterpriseUserId_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUserId_.WriteTo(ref output, _repeated_enterpriseUserId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += enterpriseUserId_.CalculateSize(_repeated_enterpriseUserId_codec); @@ -1081,6 +1951,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EnterpriseUserIds other) { if (other == null) { return; @@ -1090,10 +1961,18 @@ public void MergeFrom(EnterpriseUserIds other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1104,27 +1983,61 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + enterpriseUserId_.AddEntriesFrom(ref input, _repeated_enterpriseUserId_codec); + break; + } + } + } } + #endif } - public sealed partial class EnterprisePersonalAccount : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterprisePersonalAccount : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterprisePersonalAccount()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterprisePersonalAccount() { OnConstruction(); } @@ -1132,6 +2045,7 @@ public EnterprisePersonalAccount() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterprisePersonalAccount(EnterprisePersonalAccount other) : this() { email_ = other.email_; oBSOLETEFIELD_ = other.oBSOLETEFIELD_; @@ -1139,6 +2053,7 @@ public EnterprisePersonalAccount(EnterprisePersonalAccount other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EnterprisePersonalAccount Clone() { return new EnterprisePersonalAccount(this); } @@ -1147,6 +2062,7 @@ public EnterprisePersonalAccount Clone() { public const int EmailFieldNumber = 1; private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -1161,6 +2077,7 @@ public string Email { ///DO NOT RE-USE. placeholder for backwards compatability /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString OBSOLETEFIELD { get { return oBSOLETEFIELD_; } set { @@ -1169,11 +2086,13 @@ public string Email { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EnterprisePersonalAccount); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EnterprisePersonalAccount other) { if (ReferenceEquals(other, null)) { return false; @@ -1187,6 +2106,7 @@ public bool Equals(EnterprisePersonalAccount other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Email.Length != 0) hash ^= Email.GetHashCode(); @@ -1198,12 +2118,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Email.Length != 0) { output.WriteRawTag(10); output.WriteString(Email); @@ -1215,24 +2140,45 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Email.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + output.WriteRawTag(10); + output.WriteString(Email); } if (OBSOLETEFIELD.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(OBSOLETEFIELD); + output.WriteRawTag(18); + output.WriteBytes(OBSOLETEFIELD); } if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (OBSOLETEFIELD.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(OBSOLETEFIELD); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EnterprisePersonalAccount other) { if (other == null) { return; @@ -1247,10 +2193,18 @@ public void MergeFrom(EnterprisePersonalAccount other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1264,27 +2218,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Email = input.ReadString(); + break; + } + case 18: { + OBSOLETEFIELD = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class EncryptedTeamKeyRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EncryptedTeamKeyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EncryptedTeamKeyRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EncryptedTeamKeyRequest() { OnConstruction(); } @@ -1292,6 +2283,7 @@ public EncryptedTeamKeyRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EncryptedTeamKeyRequest(EncryptedTeamKeyRequest other) : this() { teamUid_ = other.teamUid_; encryptedTeamKey_ = other.encryptedTeamKey_; @@ -1300,6 +2292,7 @@ public EncryptedTeamKeyRequest(EncryptedTeamKeyRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EncryptedTeamKeyRequest Clone() { return new EncryptedTeamKeyRequest(this); } @@ -1308,6 +2301,7 @@ public EncryptedTeamKeyRequest Clone() { public const int TeamUidFieldNumber = 1; private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString TeamUid { get { return teamUid_; } set { @@ -1319,6 +2313,7 @@ public EncryptedTeamKeyRequest Clone() { public const int EncryptedTeamKeyFieldNumber = 2; private pb::ByteString encryptedTeamKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedTeamKey { get { return encryptedTeamKey_; } set { @@ -1333,6 +2328,7 @@ public EncryptedTeamKeyRequest Clone() { /// if false, existing team key must be null to succeed /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Force { get { return force_; } set { @@ -1341,11 +2337,13 @@ public bool Force { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EncryptedTeamKeyRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EncryptedTeamKeyRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1360,6 +2358,7 @@ public bool Equals(EncryptedTeamKeyRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); @@ -1372,12 +2371,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (TeamUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(TeamUid); @@ -1393,9 +2397,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (EncryptedTeamKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedTeamKey); + } + if (Force != false) { + output.WriteRawTag(24); + output.WriteBool(Force); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (TeamUid.Length != 0) { @@ -1414,6 +2442,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EncryptedTeamKeyRequest other) { if (other == null) { return; @@ -1431,10 +2460,18 @@ public void MergeFrom(EncryptedTeamKeyRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1452,27 +2489,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedTeamKey = input.ReadBytes(); + break; + } + case 24: { + Force = input.ReadBool(); + break; + } + } + } } + #endif } - public sealed partial class ReEncryptedData : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReEncryptedData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReEncryptedData()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ReEncryptedData() { OnConstruction(); } @@ -1480,6 +2558,7 @@ public ReEncryptedData() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ReEncryptedData(ReEncryptedData other) : this() { id_ = other.id_; data_ = other.data_; @@ -1487,6 +2566,7 @@ public ReEncryptedData(ReEncryptedData other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ReEncryptedData Clone() { return new ReEncryptedData(this); } @@ -1495,6 +2575,7 @@ public ReEncryptedData Clone() { public const int IdFieldNumber = 1; private long id_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Id { get { return id_; } set { @@ -1506,6 +2587,7 @@ public long Id { public const int DataFieldNumber = 2; private string data_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Data { get { return data_; } set { @@ -1514,11 +2596,13 @@ public string Data { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ReEncryptedData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ReEncryptedData other) { if (ReferenceEquals(other, null)) { return false; @@ -1532,6 +2616,7 @@ public bool Equals(ReEncryptedData other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Id != 0L) hash ^= Id.GetHashCode(); @@ -1543,12 +2628,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Id != 0L) { output.WriteRawTag(8); output.WriteInt64(Id); @@ -1560,9 +2650,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Id); + } + if (Data.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (Id != 0L) { @@ -1578,6 +2688,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ReEncryptedData other) { if (other == null) { return; @@ -1592,10 +2703,18 @@ public void MergeFrom(ReEncryptedData other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1609,27 +2728,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt64(); + break; + } + case 18: { + Data = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class ReEncryptedRoleKey : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReEncryptedRoleKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReEncryptedRoleKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ReEncryptedRoleKey() { OnConstruction(); } @@ -1637,6 +2793,7 @@ public ReEncryptedRoleKey() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ReEncryptedRoleKey(ReEncryptedRoleKey other) : this() { roleId_ = other.roleId_; encryptedRoleKey_ = other.encryptedRoleKey_; @@ -1644,6 +2801,7 @@ public ReEncryptedRoleKey(ReEncryptedRoleKey other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ReEncryptedRoleKey Clone() { return new ReEncryptedRoleKey(this); } @@ -1652,6 +2810,7 @@ public ReEncryptedRoleKey Clone() { public const int RoleIdFieldNumber = 1; private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long RoleId { get { return roleId_; } set { @@ -1663,6 +2822,7 @@ public long RoleId { public const int EncryptedRoleKeyFieldNumber = 2; private pb::ByteString encryptedRoleKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedRoleKey { get { return encryptedRoleKey_; } set { @@ -1671,11 +2831,13 @@ public long RoleId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ReEncryptedRoleKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ReEncryptedRoleKey other) { if (ReferenceEquals(other, null)) { return false; @@ -1689,6 +2851,7 @@ public bool Equals(ReEncryptedRoleKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RoleId != 0L) hash ^= RoleId.GetHashCode(); @@ -1700,12 +2863,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RoleId != 0L) { output.WriteRawTag(8); output.WriteInt64(RoleId); @@ -1717,9 +2885,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EncryptedRoleKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedRoleKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RoleId != 0L) { @@ -1735,6 +2923,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ReEncryptedRoleKey other) { if (other == null) { return; @@ -1749,10 +2938,18 @@ public void MergeFrom(ReEncryptedRoleKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1766,27 +2963,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + EncryptedRoleKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class NodeToManagedCompanyRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class NodeToManagedCompanyRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new NodeToManagedCompanyRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeToManagedCompanyRequest() { OnConstruction(); } @@ -1794,6 +3028,7 @@ public NodeToManagedCompanyRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeToManagedCompanyRequest(NodeToManagedCompanyRequest other) : this() { companyId_ = other.companyId_; nodes_ = other.nodes_.Clone(); @@ -1805,6 +3040,7 @@ public NodeToManagedCompanyRequest(NodeToManagedCompanyRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public NodeToManagedCompanyRequest Clone() { return new NodeToManagedCompanyRequest(this); } @@ -1813,6 +3049,7 @@ public NodeToManagedCompanyRequest Clone() { public const int CompanyIdFieldNumber = 1; private int companyId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CompanyId { get { return companyId_; } set { @@ -1826,6 +3063,7 @@ public int CompanyId { = pb::FieldCodec.ForMessage(18, global::Enterprise.ReEncryptedData.Parser); private readonly pbc::RepeatedField nodes_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Nodes { get { return nodes_; } } @@ -1836,6 +3074,7 @@ public int CompanyId { = pb::FieldCodec.ForMessage(26, global::Enterprise.ReEncryptedData.Parser); private readonly pbc::RepeatedField roles_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Roles { get { return roles_; } } @@ -1846,6 +3085,7 @@ public int CompanyId { = pb::FieldCodec.ForMessage(34, global::Enterprise.ReEncryptedData.Parser); private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Users { get { return users_; } } @@ -1856,6 +3096,7 @@ public int CompanyId { = pb::FieldCodec.ForMessage(42, global::Enterprise.ReEncryptedRoleKey.Parser); private readonly pbc::RepeatedField roleKeys_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField RoleKeys { get { return roleKeys_; } } @@ -1866,16 +3107,19 @@ public int CompanyId { = pb::FieldCodec.ForMessage(50, global::Enterprise.EncryptedTeamKeyRequest.Parser); private readonly pbc::RepeatedField teamKeys_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField TeamKeys { get { return teamKeys_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as NodeToManagedCompanyRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(NodeToManagedCompanyRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1893,6 +3137,7 @@ public bool Equals(NodeToManagedCompanyRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (CompanyId != 0) hash ^= CompanyId.GetHashCode(); @@ -1908,12 +3153,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (CompanyId != 0) { output.WriteRawTag(8); output.WriteInt32(CompanyId); @@ -1926,9 +3176,30 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CompanyId != 0) { + output.WriteRawTag(8); + output.WriteInt32(CompanyId); + } + nodes_.WriteTo(ref output, _repeated_nodes_codec); + roles_.WriteTo(ref output, _repeated_roles_codec); + users_.WriteTo(ref output, _repeated_users_codec); + roleKeys_.WriteTo(ref output, _repeated_roleKeys_codec); + teamKeys_.WriteTo(ref output, _repeated_teamKeys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (CompanyId != 0) { @@ -1946,6 +3217,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(NodeToManagedCompanyRequest other) { if (other == null) { return; @@ -1962,10 +3234,18 @@ public void MergeFrom(NodeToManagedCompanyRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1995,27 +3275,80 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + CompanyId = input.ReadInt32(); + break; + } + case 18: { + nodes_.AddEntriesFrom(ref input, _repeated_nodes_codec); + break; + } + case 26: { + roles_.AddEntriesFrom(ref input, _repeated_roles_codec); + break; + } + case 34: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + case 42: { + roleKeys_.AddEntriesFrom(ref input, _repeated_roleKeys_codec); + break; + } + case 50: { + teamKeys_.AddEntriesFrom(ref input, _repeated_teamKeys_codec); + break; + } + } + } } + #endif } - public sealed partial class RoleTeam : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleTeam : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleTeam()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RoleTeam() { OnConstruction(); } @@ -2023,6 +3356,7 @@ public RoleTeam() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RoleTeam(RoleTeam other) : this() { roleId_ = other.roleId_; teamUid_ = other.teamUid_; @@ -2030,6 +3364,7 @@ public RoleTeam(RoleTeam other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RoleTeam Clone() { return new RoleTeam(this); } @@ -2038,6 +3373,7 @@ public RoleTeam Clone() { public const int RoleIdFieldNumber = 1; private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long RoleId { get { return roleId_; } set { @@ -2049,6 +3385,7 @@ public long RoleId { public const int TeamUidFieldNumber = 2; private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString TeamUid { get { return teamUid_; } set { @@ -2057,11 +3394,13 @@ public long RoleId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as RoleTeam); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(RoleTeam other) { if (ReferenceEquals(other, null)) { return false; @@ -2075,6 +3414,7 @@ public bool Equals(RoleTeam other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RoleId != 0L) hash ^= RoleId.GetHashCode(); @@ -2086,12 +3426,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RoleId != 0L) { output.WriteRawTag(8); output.WriteInt64(RoleId); @@ -2103,9 +3448,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(TeamUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RoleId != 0L) { @@ -2121,6 +3486,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(RoleTeam other) { if (other == null) { return; @@ -2135,10 +3501,18 @@ public void MergeFrom(RoleTeam other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2152,27 +3526,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + TeamUid = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class RoleTeams : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleTeams : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleTeams()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RoleTeams() { OnConstruction(); } @@ -2180,12 +3591,14 @@ public RoleTeams() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RoleTeams(RoleTeams other) : this() { roleTeam_ = other.roleTeam_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RoleTeams Clone() { return new RoleTeams(this); } @@ -2199,16 +3612,19 @@ public RoleTeams Clone() { /// 100 max /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField RoleTeam { get { return roleTeam_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as RoleTeams); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(RoleTeams other) { if (ReferenceEquals(other, null)) { return false; @@ -2221,6 +3637,7 @@ public bool Equals(RoleTeams other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= roleTeam_.GetHashCode(); @@ -2231,19 +3648,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else roleTeam_.WriteTo(output, _repeated_roleTeam_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + roleTeam_.WriteTo(ref output, _repeated_roleTeam_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += roleTeam_.CalculateSize(_repeated_roleTeam_codec); @@ -2254,6 +3689,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(RoleTeams other) { if (other == null) { return; @@ -2263,10 +3699,18 @@ public void MergeFrom(RoleTeams other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2276,268 +3720,151 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + roleTeam_.AddEntriesFrom(ref input, _repeated_roleTeam_codec); + break; + } + } + } } + #endif } - public sealed partial class EnterpriseRegistration : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseRegistration()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUserAddKeys : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUserAddKeys()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseRegistration() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAddKeys() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseRegistration(EnterpriseRegistration other) : this() { - encryptedTreeKey_ = other.encryptedTreeKey_; - enterpriseName_ = other.enterpriseName_; - rootNodeData_ = other.rootNodeData_; - adminUserData_ = other.adminUserData_; - adminName_ = other.adminName_; - roleData_ = other.roleData_; - rsaKeyPair_ = other.rsaKeyPair_ != null ? other.rsaKeyPair_.Clone() : null; - numberSeats_ = other.numberSeats_; - enterpriseType_ = other.enterpriseType_; - rolePublicKey_ = other.rolePublicKey_; - rolePrivateKeyEncryptedWithRoleKey_ = other.rolePrivateKeyEncryptedWithRoleKey_; - roleKeyEncryptedWithTreeKey_ = other.roleKeyEncryptedWithTreeKey_; - eccKeyPair_ = other.eccKeyPair_ != null ? other.eccKeyPair_.Clone() : null; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAddKeys(RoleUserAddKeys other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + treeKey_ = other.treeKey_; + roleAdminKey_ = other.roleAdminKey_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseRegistration Clone() { - return new EnterpriseRegistration(this); - } - - /// Field number for the "encryptedTreeKey" field. - public const int EncryptedTreeKeyFieldNumber = 1; - private pb::ByteString encryptedTreeKey_ = pb::ByteString.Empty; - /// - /// AES 256 key encrypted with admin's data key - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedTreeKey { - get { return encryptedTreeKey_; } - set { - encryptedTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "enterpriseName" field. - public const int EnterpriseNameFieldNumber = 2; - private string enterpriseName_ = ""; - /// - /// plain text name - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EnterpriseName { - get { return enterpriseName_; } - set { - enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "rootNodeData" field. - public const int RootNodeDataFieldNumber = 3; - private pb::ByteString rootNodeData_ = pb::ByteString.Empty; - /// - /// encrypted node data - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RootNodeData { - get { return rootNodeData_; } - set { - rootNodeData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "adminUserData" field. - public const int AdminUserDataFieldNumber = 4; - private pb::ByteString adminUserData_ = pb::ByteString.Empty; - /// - /// encrypted user data - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AdminUserData { - get { return adminUserData_; } - set { - adminUserData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "adminName" field. - public const int AdminNameFieldNumber = 5; - private string adminName_ = ""; - /// - /// full name of admin - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string AdminName { - get { return adminName_; } - set { - adminName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAddKeys Clone() { + return new RoleUserAddKeys(this); } - /// Field number for the "roleData" field. - public const int RoleDataFieldNumber = 6; - private pb::ByteString roleData_ = pb::ByteString.Empty; - /// - /// encrypted role data for admin role - /// + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RoleData { - get { return roleData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - roleData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; } } - /// Field number for the "rsaKeyPair" field. - public const int RsaKeyPairFieldNumber = 7; - private global::Enterprise.EnterpriseKeyPairRequest rsaKeyPair_; + /// Field number for the "treeKey" field. + public const int TreeKeyFieldNumber = 2; + private string treeKey_ = ""; /// - /// for sharing to the enterprise + ///TODO: is this necessary? we only use it for validation. URLSafe base 64 key encrypted with the user's public key if this role is a role with managed nodes /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EnterpriseKeyPairRequest RsaKeyPair { - get { return rsaKeyPair_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TreeKey { + get { return treeKey_; } set { - rsaKeyPair_ = value; + treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "numberSeats" field. - public const int NumberSeatsFieldNumber = 8; - private int numberSeats_; + /// Field number for the "roleAdminKey" field. + public const int RoleAdminKeyFieldNumber = 3; + private string roleAdminKey_ = ""; /// - /// should this be part of the request? + ///TODO: is this necessary? we only use it for validation. URLSafe base 64 role_key encrypted with the user's public key. cannot add a user to a role that has a key and you are not a member of. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int NumberSeats { - get { return numberSeats_; } - set { - numberSeats_ = value; - } - } - - /// Field number for the "enterpriseType" field. - public const int EnterpriseTypeFieldNumber = 9; - private global::Enterprise.EnterpriseType enterpriseType_ = global::Enterprise.EnterpriseType.EnterpriseStandard; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EnterpriseType EnterpriseType { - get { return enterpriseType_; } - set { - enterpriseType_ = value; - } - } - - /// Field number for the "rolePublicKey" field. - public const int RolePublicKeyFieldNumber = 10; - private pb::ByteString rolePublicKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RolePublicKey { - get { return rolePublicKey_; } - set { - rolePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "rolePrivateKeyEncryptedWithRoleKey" field. - public const int RolePrivateKeyEncryptedWithRoleKeyFieldNumber = 11; - private pb::ByteString rolePrivateKeyEncryptedWithRoleKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RolePrivateKeyEncryptedWithRoleKey { - get { return rolePrivateKeyEncryptedWithRoleKey_; } - set { - rolePrivateKeyEncryptedWithRoleKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "roleKeyEncryptedWithTreeKey" field. - public const int RoleKeyEncryptedWithTreeKeyFieldNumber = 12; - private pb::ByteString roleKeyEncryptedWithTreeKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RoleKeyEncryptedWithTreeKey { - get { return roleKeyEncryptedWithTreeKey_; } - set { - roleKeyEncryptedWithTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "eccKeyPair" field. - public const int EccKeyPairFieldNumber = 13; - private global::Enterprise.EnterpriseKeyPairRequest eccKeyPair_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EnterpriseKeyPairRequest EccKeyPair { - get { return eccKeyPair_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoleAdminKey { + get { return roleAdminKey_; } set { - eccKeyPair_ = value; + roleAdminKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseRegistration); + return Equals(other as RoleUserAddKeys); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseRegistration other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUserAddKeys other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedTreeKey != other.EncryptedTreeKey) return false; - if (EnterpriseName != other.EnterpriseName) return false; - if (RootNodeData != other.RootNodeData) return false; - if (AdminUserData != other.AdminUserData) return false; - if (AdminName != other.AdminName) return false; - if (RoleData != other.RoleData) return false; - if (!object.Equals(RsaKeyPair, other.RsaKeyPair)) return false; - if (NumberSeats != other.NumberSeats) return false; - if (EnterpriseType != other.EnterpriseType) return false; - if (RolePublicKey != other.RolePublicKey) return false; - if (RolePrivateKeyEncryptedWithRoleKey != other.RolePrivateKeyEncryptedWithRoleKey) return false; - if (RoleKeyEncryptedWithTreeKey != other.RoleKeyEncryptedWithTreeKey) return false; - if (!object.Equals(EccKeyPair, other.EccKeyPair)) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (TreeKey != other.TreeKey) return false; + if (RoleAdminKey != other.RoleAdminKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedTreeKey.Length != 0) hash ^= EncryptedTreeKey.GetHashCode(); - if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); - if (RootNodeData.Length != 0) hash ^= RootNodeData.GetHashCode(); - if (AdminUserData.Length != 0) hash ^= AdminUserData.GetHashCode(); - if (AdminName.Length != 0) hash ^= AdminName.GetHashCode(); - if (RoleData.Length != 0) hash ^= RoleData.GetHashCode(); - if (rsaKeyPair_ != null) hash ^= RsaKeyPair.GetHashCode(); - if (NumberSeats != 0) hash ^= NumberSeats.GetHashCode(); - if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) hash ^= EnterpriseType.GetHashCode(); - if (RolePublicKey.Length != 0) hash ^= RolePublicKey.GetHashCode(); - if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) hash ^= RolePrivateKeyEncryptedWithRoleKey.GetHashCode(); - if (RoleKeyEncryptedWithTreeKey.Length != 0) hash ^= RoleKeyEncryptedWithTreeKey.GetHashCode(); - if (eccKeyPair_ != null) hash ^= EccKeyPair.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (TreeKey.Length != 0) hash ^= TreeKey.GetHashCode(); + if (RoleAdminKey.Length != 0) hash ^= RoleAdminKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2545,110 +3872,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedTreeKey.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedTreeKey); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (EnterpriseName.Length != 0) { + if (TreeKey.Length != 0) { output.WriteRawTag(18); - output.WriteString(EnterpriseName); + output.WriteString(TreeKey); } - if (RootNodeData.Length != 0) { + if (RoleAdminKey.Length != 0) { output.WriteRawTag(26); - output.WriteBytes(RootNodeData); + output.WriteString(RoleAdminKey); } - if (AdminUserData.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(AdminUserData); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (AdminName.Length != 0) { - output.WriteRawTag(42); - output.WriteString(AdminName); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (RoleData.Length != 0) { - output.WriteRawTag(50); - output.WriteBytes(RoleData); + if (TreeKey.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TreeKey); } - if (rsaKeyPair_ != null) { - output.WriteRawTag(58); - output.WriteMessage(RsaKeyPair); + if (RoleAdminKey.Length != 0) { + output.WriteRawTag(26); + output.WriteString(RoleAdminKey); } - if (NumberSeats != 0) { - output.WriteRawTag(64); - output.WriteInt32(NumberSeats); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } - if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { - output.WriteRawTag(72); - output.WriteEnum((int) EnterpriseType); + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (RolePublicKey.Length != 0) { - output.WriteRawTag(82); - output.WriteBytes(RolePublicKey); + if (TreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TreeKey); } - if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) { - output.WriteRawTag(90); - output.WriteBytes(RolePrivateKeyEncryptedWithRoleKey); - } - if (RoleKeyEncryptedWithTreeKey.Length != 0) { - output.WriteRawTag(98); - output.WriteBytes(RoleKeyEncryptedWithTreeKey); - } - if (eccKeyPair_ != null) { - output.WriteRawTag(106); - output.WriteMessage(EccKeyPair); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EncryptedTreeKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedTreeKey); - } - if (EnterpriseName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); - } - if (RootNodeData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RootNodeData); - } - if (AdminUserData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AdminUserData); - } - if (AdminName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(AdminName); - } - if (RoleData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleData); - } - if (rsaKeyPair_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(RsaKeyPair); - } - if (NumberSeats != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberSeats); - } - if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnterpriseType); - } - if (RolePublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RolePublicKey); - } - if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RolePrivateKeyEncryptedWithRoleKey); - } - if (RoleKeyEncryptedWithTreeKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleKeyEncryptedWithTreeKey); - } - if (eccKeyPair_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(EccKeyPair); + if (RoleAdminKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleAdminKey); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -2657,196 +3943,184 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseRegistration other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUserAddKeys other) { if (other == null) { return; } - if (other.EncryptedTreeKey.Length != 0) { - EncryptedTreeKey = other.EncryptedTreeKey; - } - if (other.EnterpriseName.Length != 0) { - EnterpriseName = other.EnterpriseName; - } - if (other.RootNodeData.Length != 0) { - RootNodeData = other.RootNodeData; - } - if (other.AdminUserData.Length != 0) { - AdminUserData = other.AdminUserData; - } - if (other.AdminName.Length != 0) { - AdminName = other.AdminName; - } - if (other.RoleData.Length != 0) { - RoleData = other.RoleData; - } - if (other.rsaKeyPair_ != null) { - if (rsaKeyPair_ == null) { - RsaKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); - } - RsaKeyPair.MergeFrom(other.RsaKeyPair); - } - if (other.NumberSeats != 0) { - NumberSeats = other.NumberSeats; - } - if (other.EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { - EnterpriseType = other.EnterpriseType; - } - if (other.RolePublicKey.Length != 0) { - RolePublicKey = other.RolePublicKey; - } - if (other.RolePrivateKeyEncryptedWithRoleKey.Length != 0) { - RolePrivateKeyEncryptedWithRoleKey = other.RolePrivateKeyEncryptedWithRoleKey; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.RoleKeyEncryptedWithTreeKey.Length != 0) { - RoleKeyEncryptedWithTreeKey = other.RoleKeyEncryptedWithTreeKey; + if (other.TreeKey.Length != 0) { + TreeKey = other.TreeKey; } - if (other.eccKeyPair_ != null) { - if (eccKeyPair_ == null) { - EccKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); - } - EccKeyPair.MergeFrom(other.EccKeyPair); + if (other.RoleAdminKey.Length != 0) { + RoleAdminKey = other.RoleAdminKey; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - EncryptedTreeKey = input.ReadBytes(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } case 18: { - EnterpriseName = input.ReadString(); + TreeKey = input.ReadString(); break; } case 26: { - RootNodeData = input.ReadBytes(); - break; - } - case 34: { - AdminUserData = input.ReadBytes(); - break; - } - case 42: { - AdminName = input.ReadString(); - break; - } - case 50: { - RoleData = input.ReadBytes(); - break; - } - case 58: { - if (rsaKeyPair_ == null) { - RsaKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); - } - input.ReadMessage(RsaKeyPair); - break; - } - case 64: { - NumberSeats = input.ReadInt32(); - break; - } - case 72: { - EnterpriseType = (global::Enterprise.EnterpriseType) input.ReadEnum(); + RoleAdminKey = input.ReadString(); break; } - case 82: { - RolePublicKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 90: { - RolePrivateKeyEncryptedWithRoleKey = input.ReadBytes(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } - case 98: { - RoleKeyEncryptedWithTreeKey = input.ReadBytes(); + case 18: { + TreeKey = input.ReadString(); break; } - case 106: { - if (eccKeyPair_ == null) { - EccKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); - } - input.ReadMessage(EccKeyPair); + case 26: { + RoleAdminKey = input.ReadString(); break; } } } } + #endif } - public sealed partial class DomainPasswordRulesRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainPasswordRulesRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUserAdd : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUserAdd()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[13]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAdd() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesRequest(DomainPasswordRulesRequest other) : this() { - username_ = other.username_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAdd(RoleUserAdd other) : this() { + roleId_ = other.roleId_; + roleUserAddKeys_ = other.roleUserAddKeys_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesRequest Clone() { - return new DomainPasswordRulesRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAdd Clone() { + return new RoleUserAdd(this); } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 1; - private string username_ = ""; + /// Field number for the "role_id" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + roleId_ = value; } } + /// Field number for the "roleUserAddKeys" field. + public const int RoleUserAddKeysFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_roleUserAddKeys_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.RoleUserAddKeys.Parser); + private readonly pbc::RepeatedField roleUserAddKeys_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleUserAddKeys { + get { return roleUserAddKeys_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DomainPasswordRulesRequest); + return Equals(other as RoleUserAdd); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DomainPasswordRulesRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUserAdd other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Username != other.Username) return false; + if (RoleId != other.RoleId) return false; + if(!roleUserAddKeys_.Equals(other.roleUserAddKeys_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + hash ^= roleUserAddKeys_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2854,27 +4128,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Username.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Username); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); } + roleUserAddKeys_.WriteTo(output, _repeated_roleUserAddKeys_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + roleUserAddKeys_.WriteTo(ref output, _repeated_roleUserAddKeys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); } + size += roleUserAddKeys_.CalculateSize(_repeated_roleUserAddKeys_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2882,142 +4180,159 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DomainPasswordRulesRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUserAdd other) { if (other == null) { return; } - if (other.Username.Length != 0) { - Username = other.Username; + if (other.RoleId != 0L) { + RoleId = other.RoleId; } + roleUserAddKeys_.Add(other.roleUserAddKeys_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - Username = input.ReadString(); + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + roleUserAddKeys_.AddEntriesFrom(input, _repeated_roleUserAddKeys_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + roleUserAddKeys_.AddEntriesFrom(ref input, _repeated_roleUserAddKeys_codec); break; } } } } + #endif } - public sealed partial class DomainPasswordRulesFields : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainPasswordRulesFields()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUsersAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUsersAddRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[14]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesFields() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersAddRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesFields(DomainPasswordRulesFields other) : this() { - type_ = other.type_; - minimum_ = other.minimum_; - maximum_ = other.maximum_; - allowed_ = other.allowed_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersAddRequest(RoleUsersAddRequest other) : this() { + roleUserAdds_ = other.roleUserAdds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesFields Clone() { - return new DomainPasswordRulesFields(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersAddRequest Clone() { + return new RoleUsersAddRequest(this); } - /// Field number for the "type" field. - public const int TypeFieldNumber = 1; - private string type_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Type { - get { return type_; } - set { - type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "minimum" field. - public const int MinimumFieldNumber = 2; - private int minimum_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Minimum { - get { return minimum_; } - set { - minimum_ = value; - } - } - - /// Field number for the "maximum" field. - public const int MaximumFieldNumber = 3; - private int maximum_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Maximum { - get { return maximum_; } - set { - maximum_ = value; - } - } - - /// Field number for the "allowed" field. - public const int AllowedFieldNumber = 4; - private bool allowed_; + /// Field number for the "roleUserAdds" field. + public const int RoleUserAddsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_roleUserAdds_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.RoleUserAdd.Parser); + private readonly pbc::RepeatedField roleUserAdds_ = new pbc::RepeatedField(); + /// + /// 1000 max + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Allowed { - get { return allowed_; } - set { - allowed_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleUserAdds { + get { return roleUserAdds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DomainPasswordRulesFields); + return Equals(other as RoleUsersAddRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DomainPasswordRulesFields other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUsersAddRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Type != other.Type) return false; - if (Minimum != other.Minimum) return false; - if (Maximum != other.Maximum) return false; - if (Allowed != other.Allowed) return false; + if(!roleUserAdds_.Equals(other.roleUserAdds_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Type.Length != 0) hash ^= Type.GetHashCode(); - if (Minimum != 0) hash ^= Minimum.GetHashCode(); - if (Maximum != 0) hash ^= Maximum.GetHashCode(); - if (Allowed != false) hash ^= Allowed.GetHashCode(); + hash ^= roleUserAdds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3025,48 +4340,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Type.Length != 0) { - output.WriteRawTag(10); - output.WriteString(Type); - } - if (Minimum != 0) { - output.WriteRawTag(16); - output.WriteInt32(Minimum); - } - if (Maximum != 0) { - output.WriteRawTag(24); - output.WriteInt32(Maximum); - } - if (Allowed != false) { - output.WriteRawTag(32); - output.WriteBool(Allowed); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + roleUserAdds_.WriteTo(output, _repeated_roleUserAdds_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + roleUserAdds_.WriteTo(ref output, _repeated_roleUserAdds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Type.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); - } - if (Minimum != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minimum); - } - if (Maximum != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Maximum); - } - if (Allowed != false) { - size += 1 + 1; - } + size += roleUserAdds_.CalculateSize(_repeated_roleUserAdds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3074,135 +4381,191 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DomainPasswordRulesFields other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUsersAddRequest other) { if (other == null) { return; } - if (other.Type.Length != 0) { - Type = other.Type; - } - if (other.Minimum != 0) { - Minimum = other.Minimum; - } - if (other.Maximum != 0) { - Maximum = other.Maximum; - } - if (other.Allowed != false) { - Allowed = other.Allowed; - } + roleUserAdds_.Add(other.roleUserAdds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Type = input.ReadString(); - break; - } - case 16: { - Minimum = input.ReadInt32(); + roleUserAdds_.AddEntriesFrom(input, _repeated_roleUserAdds_codec); break; } - case 24: { - Maximum = input.ReadInt32(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 32: { - Allowed = input.ReadBool(); + case 10: { + roleUserAdds_.AddEntriesFrom(ref input, _repeated_roleUserAdds_codec); break; } } } } + #endif } - public sealed partial class LoginToMcRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginToMcRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUserAddResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUserAddResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[15]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginToMcRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAddResult() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginToMcRequest(LoginToMcRequest other) : this() { - mcEnterpriseId_ = other.mcEnterpriseId_; - messageSessionUid_ = other.messageSessionUid_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAddResult(RoleUserAddResult other) : this() { + roleId_ = other.roleId_; + enterpriseUserId_ = other.enterpriseUserId_; + status_ = other.status_; + message_ = other.message_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginToMcRequest Clone() { - return new LoginToMcRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserAddResult Clone() { + return new RoleUserAddResult(this); } - /// Field number for the "mcEnterpriseId" field. - public const int McEnterpriseIdFieldNumber = 1; - private int mcEnterpriseId_; + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int McEnterpriseId { - get { return mcEnterpriseId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } set { - mcEnterpriseId_ = value; + roleId_ = value; } } - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 2; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private global::Enterprise.RoleUserModifyStatus status_ = global::Enterprise.RoleUserModifyStatus.RoleExists; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.RoleUserModifyStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as LoginToMcRequest); + return Equals(other as RoleUserAddResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(LoginToMcRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUserAddResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (McEnterpriseId != other.McEnterpriseId) return false; - if (MessageSessionUid != other.MessageSessionUid) return false; + if (RoleId != other.RoleId) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (McEnterpriseId != 0) hash ^= McEnterpriseId.GetHashCode(); - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3210,33 +4573,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (McEnterpriseId != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { output.WriteRawTag(8); - output.WriteInt32(McEnterpriseId); + output.WriteInt64(RoleId); } - if (MessageSessionUid.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(MessageSessionUid); + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (McEnterpriseId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(McEnterpriseId); + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); } - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -3245,124 +4655,180 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(LoginToMcRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUserAddResult other) { if (other == null) { return; } - if (other.McEnterpriseId != 0) { - McEnterpriseId = other.McEnterpriseId; + if (other.RoleId != 0L) { + RoleId = other.RoleId; } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - McEnterpriseId = input.ReadInt32(); + RoleId = input.ReadInt64(); break; } - case 18: { - MessageSessionUid = input.ReadBytes(); - break; + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 24: { + Status = (global::Enterprise.RoleUserModifyStatus) input.ReadEnum(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 24: { + Status = (global::Enterprise.RoleUserModifyStatus) input.ReadEnum(); + break; + } + case 34: { + Message = input.ReadString(); + break; } } } } + #endif } - public sealed partial class LoginToMcResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginToMcResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUsersAddResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUsersAddResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[16]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginToMcResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersAddResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginToMcResponse(LoginToMcResponse other) : this() { - encryptedSessionToken_ = other.encryptedSessionToken_; - encryptedTreeKey_ = other.encryptedTreeKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersAddResponse(RoleUsersAddResponse other) : this() { + results_ = other.results_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LoginToMcResponse Clone() { - return new LoginToMcResponse(this); - } - - /// Field number for the "encryptedSessionToken" field. - public const int EncryptedSessionTokenFieldNumber = 1; - private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedSessionToken { - get { return encryptedSessionToken_; } - set { - encryptedSessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersAddResponse Clone() { + return new RoleUsersAddResponse(this); } - /// Field number for the "encryptedTreeKey" field. - public const int EncryptedTreeKeyFieldNumber = 2; - private string encryptedTreeKey_ = ""; - /// - /// MC’s tree key encrypted with MSP’s tree key - /// + /// Field number for the "results" field. + public const int ResultsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_results_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.RoleUserAddResult.Parser); + private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedTreeKey { - get { return encryptedTreeKey_; } - set { - encryptedTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Results { + get { return results_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as LoginToMcResponse); + return Equals(other as RoleUsersAddResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(LoginToMcResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUsersAddResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedSessionToken != other.EncryptedSessionToken) return false; - if (EncryptedTreeKey != other.EncryptedTreeKey) return false; + if(!results_.Equals(other.results_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); - if (EncryptedTreeKey.Length != 0) hash ^= EncryptedTreeKey.GetHashCode(); + hash ^= results_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3370,34 +4836,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedSessionToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EncryptedSessionToken); - } - if (EncryptedTreeKey.Length != 0) { - output.WriteRawTag(18); - output.WriteString(EncryptedTreeKey); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + results_.WriteTo(output, _repeated_results_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + results_.WriteTo(ref output, _repeated_results_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedSessionToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); - } - if (EncryptedTreeKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedTreeKey); - } + size += results_.CalculateSize(_repeated_results_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3405,106 +4877,163 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(LoginToMcResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUsersAddResponse other) { if (other == null) { return; } - if (other.EncryptedSessionToken.Length != 0) { - EncryptedSessionToken = other.EncryptedSessionToken; - } - if (other.EncryptedTreeKey.Length != 0) { - EncryptedTreeKey = other.EncryptedTreeKey; - } + results_.Add(other.results_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - EncryptedSessionToken = input.ReadBytes(); + results_.AddEntriesFrom(input, _repeated_results_codec); break; } - case 18: { - EncryptedTreeKey = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + results_.AddEntriesFrom(ref input, _repeated_results_codec); break; } } } } + #endif } - public sealed partial class DomainPasswordRulesResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainPasswordRulesResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUserRemove : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUserRemove()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[17]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserRemove() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesResponse(DomainPasswordRulesResponse other) : this() { - domainPasswordRulesFields_ = other.domainPasswordRulesFields_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserRemove(RoleUserRemove other) : this() { + roleId_ = other.roleId_; + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DomainPasswordRulesResponse Clone() { - return new DomainPasswordRulesResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserRemove Clone() { + return new RoleUserRemove(this); } - /// Field number for the "domainPasswordRulesFields" field. - public const int DomainPasswordRulesFieldsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_domainPasswordRulesFields_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.DomainPasswordRulesFields.Parser); - private readonly pbc::RepeatedField domainPasswordRulesFields_ = new pbc::RepeatedField(); + /// Field number for the "role_id" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField DomainPasswordRulesFields { - get { return domainPasswordRulesFields_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); + /// + /// 1000 max + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DomainPasswordRulesResponse); + return Equals(other as RoleUserRemove); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DomainPasswordRulesResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUserRemove other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!domainPasswordRulesFields_.Equals(other.domainPasswordRulesFields_)) return false; + if (RoleId != other.RoleId) return false; + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= domainPasswordRulesFields_.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + hash ^= enterpriseUserIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3512,22 +5041,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - domainPasswordRulesFields_.WriteTo(output, _repeated_domainPasswordRulesFields_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += domainPasswordRulesFields_.CalculateSize(_repeated_domainPasswordRulesFields_codec); + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3535,143 +5093,161 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DomainPasswordRulesResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUserRemove other) { if (other == null) { return; } - domainPasswordRulesFields_.Add(other.domainPasswordRulesFields_); + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + enterpriseUserIds_.Add(other.enterpriseUserIds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - domainPasswordRulesFields_.AddEntriesFrom(input, _repeated_domainPasswordRulesFields_codec); + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: + case 16: { + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: + case 16: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); break; } } } } + #endif } - public sealed partial class ApproveUserDeviceRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDeviceRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUsersRemoveRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUsersRemoveRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[18]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDeviceRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersRemoveRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDeviceRequest(ApproveUserDeviceRequest other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - encryptedDeviceToken_ = other.encryptedDeviceToken_; - encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; - denyApproval_ = other.denyApproval_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersRemoveRequest(RoleUsersRemoveRequest other) : this() { + roleUserRemoves_ = other.roleUserRemoves_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDeviceRequest Clone() { - return new ApproveUserDeviceRequest(this); - } - - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } - set { - enterpriseUserId_ = value; - } - } - - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 2; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersRemoveRequest Clone() { + return new RoleUsersRemoveRequest(this); } - /// Field number for the "encryptedDeviceDataKey" field. - public const int EncryptedDeviceDataKeyFieldNumber = 3; - private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + /// Field number for the "roleUserRemoves" field. + public const int RoleUserRemovesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_roleUserRemoves_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.RoleUserRemove.Parser); + private readonly pbc::RepeatedField roleUserRemoves_ = new pbc::RepeatedField(); /// - /// required for cloud sso + /// 100 max /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceDataKey { - get { return encryptedDeviceDataKey_; } - set { - encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "denyApproval" field. - public const int DenyApprovalFieldNumber = 4; - private bool denyApproval_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool DenyApproval { - get { return denyApproval_; } - set { - denyApproval_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleUserRemoves { + get { return roleUserRemoves_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ApproveUserDeviceRequest); + return Equals(other as RoleUsersRemoveRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ApproveUserDeviceRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUsersRemoveRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; - if (DenyApproval != other.DenyApproval) return false; + if(!roleUserRemoves_.Equals(other.roleUserRemoves_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); - if (DenyApproval != false) hash ^= DenyApproval.GetHashCode(); + hash ^= roleUserRemoves_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3679,48 +5255,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); - } - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(EncryptedDeviceToken); - } - if (EncryptedDeviceDataKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(EncryptedDeviceDataKey); - } - if (DenyApproval != false) { - output.WriteRawTag(32); - output.WriteBool(DenyApproval); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + roleUserRemoves_.WriteTo(output, _repeated_roleUserRemoves_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + roleUserRemoves_.WriteTo(ref output, _repeated_roleUserRemoves_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (EncryptedDeviceDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); - } - if (DenyApproval != false) { - size += 1 + 1; - } + size += roleUserRemoves_.CalculateSize(_repeated_roleUserRemoves_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3728,122 +5296,146 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ApproveUserDeviceRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUsersRemoveRequest other) { if (other == null) { return; } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.EncryptedDeviceDataKey.Length != 0) { - EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; - } - if (other.DenyApproval != false) { - DenyApproval = other.DenyApproval; - } + roleUserRemoves_.Add(other.roleUserRemoves_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseUserId = input.ReadInt64(); - break; - } - case 18: { - EncryptedDeviceToken = input.ReadBytes(); + case 10: { + roleUserRemoves_.AddEntriesFrom(input, _repeated_roleUserRemoves_codec); break; } - case 26: { - EncryptedDeviceDataKey = input.ReadBytes(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 32: { - DenyApproval = input.ReadBool(); + case 10: { + roleUserRemoves_.AddEntriesFrom(ref input, _repeated_roleUserRemoves_codec); break; } } } } + #endif } - public sealed partial class ApproveUserDeviceResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDeviceResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUserRemoveResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUserRemoveResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[19]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDeviceResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserRemoveResult() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDeviceResponse(ApproveUserDeviceResponse other) : this() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserRemoveResult(RoleUserRemoveResult other) : this() { + roleId_ = other.roleId_; enterpriseUserId_ = other.enterpriseUserId_; - encryptedDeviceToken_ = other.encryptedDeviceToken_; - failed_ = other.failed_; + status_ = other.status_; message_ = other.message_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDeviceResponse Clone() { - return new ApproveUserDeviceResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUserRemoveResult Clone() { + return new RoleUserRemoveResult(this); } - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } set { - enterpriseUserId_ = value; + roleId_ = value; } } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 2; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; } } - /// Field number for the "failed" field. - public const int FailedFieldNumber = 3; - private bool failed_; + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private global::Enterprise.RoleUserModifyStatus status_ = global::Enterprise.RoleUserModifyStatus.RoleExists; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Failed { - get { return failed_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.RoleUserModifyStatus Status { + get { return status_; } set { - failed_ = value; + status_ = value; } } @@ -3851,6 +5443,7 @@ public bool Failed { public const int MessageFieldNumber = 4; private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Message { get { return message_; } set { @@ -3859,31 +5452,34 @@ public string Message { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ApproveUserDeviceResponse); + return Equals(other as RoleUserRemoveResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ApproveUserDeviceResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUserRemoveResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } + if (RoleId != other.RoleId) return false; if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (Failed != other.Failed) return false; + if (Status != other.Status) return false; if (Message != other.Message) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (Failed != false) hash ^= Failed.GetHashCode(); + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) hash ^= Status.GetHashCode(); if (Message.Length != 0) hash ^= Message.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); @@ -3892,23 +5488,28 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); + output.WriteInt64(RoleId); } - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(EncryptedDeviceToken); + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); } - if (Failed != false) { + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { output.WriteRawTag(24); - output.WriteBool(Failed); + output.WriteEnum((int) Status); } if (Message.Length != 0) { output.WriteRawTag(34); @@ -3917,19 +5518,47 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } if (EnterpriseUserId != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (Failed != false) { - size += 1 + 1; + if (Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); } if (Message.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); @@ -3941,18 +5570,19 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ApproveUserDeviceResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUserRemoveResult other) { if (other == null) { return; } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } if (other.EnterpriseUserId != 0L) { EnterpriseUserId = other.EnterpriseUserId; } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.Failed != false) { - Failed = other.Failed; + if (other.Status != global::Enterprise.RoleUserModifyStatus.RoleExists) { + Status = other.Status; } if (other.Message.Length != 0) { Message = other.Message; @@ -3961,23 +5591,66 @@ public void MergeFrom(ApproveUserDeviceResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { EnterpriseUserId = input.ReadInt64(); break; } - case 18: { - EncryptedDeviceToken = input.ReadBytes(); + case 24: { + Status = (global::Enterprise.RoleUserModifyStatus) input.ReadEnum(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); break; } case 24: { - Failed = input.ReadBool(); + Status = (global::Enterprise.RoleUserModifyStatus) input.ReadEnum(); break; } case 34: { @@ -3987,74 +5660,90 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - public sealed partial class ApproveUserDevicesRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDevicesRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUsersRemoveResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUsersRemoveResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[20]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDevicesRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersRemoveResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDevicesRequest(ApproveUserDevicesRequest other) : this() { - deviceRequests_ = other.deviceRequests_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersRemoveResponse(RoleUsersRemoveResponse other) : this() { + results_ = other.results_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDevicesRequest Clone() { - return new ApproveUserDevicesRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUsersRemoveResponse Clone() { + return new RoleUsersRemoveResponse(this); } - /// Field number for the "deviceRequests" field. - public const int DeviceRequestsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_deviceRequests_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.ApproveUserDeviceRequest.Parser); - private readonly pbc::RepeatedField deviceRequests_ = new pbc::RepeatedField(); + /// Field number for the "results" field. + public const int ResultsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_results_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.RoleUserRemoveResult.Parser); + private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField DeviceRequests { - get { return deviceRequests_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Results { + get { return results_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ApproveUserDevicesRequest); + return Equals(other as RoleUsersRemoveResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ApproveUserDevicesRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUsersRemoveResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!deviceRequests_.Equals(other.deviceRequests_)) return false; + if(!results_.Equals(other.results_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= deviceRequests_.GetHashCode(); + hash ^= results_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4062,22 +5751,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - deviceRequests_.WriteTo(output, _repeated_deviceRequests_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + results_.WriteTo(output, _repeated_results_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + results_.WriteTo(ref output, _repeated_results_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += deviceRequests_.CalculateSize(_repeated_deviceRequests_codec); + size += results_.CalculateSize(_repeated_results_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4085,403 +5792,368 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ApproveUserDevicesRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUsersRemoveResponse other) { if (other == null) { return; } - deviceRequests_.Add(other.deviceRequests_); + results_.Add(other.results_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - deviceRequests_.AddEntriesFrom(input, _repeated_deviceRequests_codec); + results_.AddEntriesFrom(input, _repeated_results_codec); break; } } } + #endif } - } - - public sealed partial class ApproveUserDevicesResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDevicesResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[21]; } - } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDevicesResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDevicesResponse(ApproveUserDevicesResponse other) : this() { - deviceResponses_ = other.deviceResponses_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ApproveUserDevicesResponse Clone() { - return new ApproveUserDevicesResponse(this); - } - - /// Field number for the "deviceResponses" field. - public const int DeviceResponsesFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_deviceResponses_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.ApproveUserDeviceResponse.Parser); - private readonly pbc::RepeatedField deviceResponses_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField DeviceResponses { - get { return deviceResponses_; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as ApproveUserDevicesResponse); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ApproveUserDevicesResponse other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; - } - if(!deviceResponses_.Equals(other.deviceResponses_)) return false; - return Equals(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - hash ^= deviceResponses_.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); - } - return hash; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - deviceResponses_.WriteTo(output, _repeated_deviceResponses_codec); - if (_unknownFields != null) { - _unknownFields.WriteTo(output); - } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - size += deviceResponses_.CalculateSize(_repeated_deviceResponses_codec); - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); - } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ApproveUserDevicesResponse other) { - if (other == null) { - return; - } - deviceResponses_.Add(other.deviceResponses_); - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; case 10: { - deviceResponses_.AddEntriesFrom(input, _repeated_deviceResponses_codec); + results_.AddEntriesFrom(ref input, _repeated_results_codec); break; } } } } + #endif } - public sealed partial class EnterpriseUserDataKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserDataKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseRegistration : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseRegistration()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[22]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[21]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserDataKey() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseRegistration() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserDataKey(EnterpriseUserDataKey other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - userEncryptedDataKey_ = other.userEncryptedDataKey_; - keyTypeId_ = other.keyTypeId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseRegistration(EnterpriseRegistration other) : this() { + encryptedTreeKey_ = other.encryptedTreeKey_; + enterpriseName_ = other.enterpriseName_; + rootNodeData_ = other.rootNodeData_; + adminUserData_ = other.adminUserData_; + adminName_ = other.adminName_; + roleData_ = other.roleData_; + rsaKeyPair_ = other.rsaKeyPair_ != null ? other.rsaKeyPair_.Clone() : null; + numberSeats_ = other.numberSeats_; + enterpriseType_ = other.enterpriseType_; + rolePublicKey_ = other.rolePublicKey_; + rolePrivateKeyEncryptedWithRoleKey_ = other.rolePrivateKeyEncryptedWithRoleKey_; + roleKeyEncryptedWithTreeKey_ = other.roleKeyEncryptedWithTreeKey_; + eccKeyPair_ = other.eccKeyPair_ != null ? other.eccKeyPair_.Clone() : null; + allUsersRoleData_ = other.allUsersRoleData_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserDataKey Clone() { - return new EnterpriseUserDataKey(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseRegistration Clone() { + return new EnterpriseRegistration(this); } - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; + /// Field number for the "encryptedTreeKey" field. + public const int EncryptedTreeKeyFieldNumber = 1; + private pb::ByteString encryptedTreeKey_ = pb::ByteString.Empty; + /// + /// AES 256 key encrypted with admin's data key + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedTreeKey { + get { return encryptedTreeKey_; } set { - enterpriseUserId_ = value; + encryptedTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "userEncryptedDataKey" field. - public const int UserEncryptedDataKeyFieldNumber = 2; - private pb::ByteString userEncryptedDataKey_ = pb::ByteString.Empty; + /// Field number for the "enterpriseName" field. + public const int EnterpriseNameFieldNumber = 2; + private string enterpriseName_ = ""; + /// + /// plain text name + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString UserEncryptedDataKey { - get { return userEncryptedDataKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnterpriseName { + get { return enterpriseName_; } set { - userEncryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "keyTypeId" field. - public const int KeyTypeIdFieldNumber = 3; - private int keyTypeId_; + /// Field number for the "rootNodeData" field. + public const int RootNodeDataFieldNumber = 3; + private pb::ByteString rootNodeData_ = pb::ByteString.Empty; + /// + /// encrypted node data + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int KeyTypeId { - get { return keyTypeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RootNodeData { + get { return rootNodeData_; } set { - keyTypeId_ = value; + rootNodeData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "adminUserData" field. + public const int AdminUserDataFieldNumber = 4; + private pb::ByteString adminUserData_ = pb::ByteString.Empty; + /// + /// encrypted user data + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as EnterpriseUserDataKey); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AdminUserData { + get { return adminUserData_; } + set { + adminUserData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "adminName" field. + public const int AdminNameFieldNumber = 5; + private string adminName_ = ""; + /// + /// full name of admin + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseUserDataKey other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AdminName { + get { return adminName_; } + set { + adminName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (UserEncryptedDataKey != other.UserEncryptedDataKey) return false; - if (KeyTypeId != other.KeyTypeId) return false; - return Equals(_unknownFields, other._unknownFields); } + /// Field number for the "roleData" field. + public const int RoleDataFieldNumber = 6; + private pb::ByteString roleData_ = pb::ByteString.Empty; + /// + /// encrypted role data for admin role + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override int GetHashCode() { - int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (UserEncryptedDataKey.Length != 0) hash ^= UserEncryptedDataKey.GetHashCode(); - if (KeyTypeId != 0) hash ^= KeyTypeId.GetHashCode(); - if (_unknownFields != null) { - hash ^= _unknownFields.GetHashCode(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RoleData { + get { return roleData_; } + set { + roleData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - return hash; } + /// Field number for the "rsaKeyPair" field. + public const int RsaKeyPairFieldNumber = 7; + private global::Enterprise.EnterpriseKeyPairRequest rsaKeyPair_; + /// + /// for sharing to the enterprise + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override string ToString() { - return pb::JsonFormatter.ToDiagnosticString(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EnterpriseKeyPairRequest RsaKeyPair { + get { return rsaKeyPair_; } + set { + rsaKeyPair_ = value; + } } + /// Field number for the "numberSeats" field. + public const int NumberSeatsFieldNumber = 8; + private int numberSeats_; + /// + /// should this be part of the request? + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); - } - if (UserEncryptedDataKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(UserEncryptedDataKey); - } - if (KeyTypeId != 0) { - output.WriteRawTag(24); - output.WriteInt32(KeyTypeId); - } - if (_unknownFields != null) { - _unknownFields.WriteTo(output); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberSeats { + get { return numberSeats_; } + set { + numberSeats_ = value; } } + /// Field number for the "enterpriseType" field. + public const int EnterpriseTypeFieldNumber = 9; + private global::Enterprise.EnterpriseType enterpriseType_ = global::Enterprise.EnterpriseType.EnterpriseStandard; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (UserEncryptedDataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(UserEncryptedDataKey); - } - if (KeyTypeId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(KeyTypeId); - } - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EnterpriseType EnterpriseType { + get { return enterpriseType_; } + set { + enterpriseType_ = value; } - return size; } + /// Field number for the "rolePublicKey" field. + public const int RolePublicKeyFieldNumber = 10; + private pb::ByteString rolePublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseUserDataKey other) { - if (other == null) { - return; - } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.UserEncryptedDataKey.Length != 0) { - UserEncryptedDataKey = other.UserEncryptedDataKey; - } - if (other.KeyTypeId != 0) { - KeyTypeId = other.KeyTypeId; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RolePublicKey { + get { return rolePublicKey_; } + set { + rolePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } + /// Field number for the "rolePrivateKeyEncryptedWithRoleKey" field. + public const int RolePrivateKeyEncryptedWithRoleKeyFieldNumber = 11; + private pb::ByteString rolePrivateKeyEncryptedWithRoleKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - EnterpriseUserId = input.ReadInt64(); - break; - } - case 18: { - UserEncryptedDataKey = input.ReadBytes(); - break; - } - case 24: { - KeyTypeId = input.ReadInt32(); - break; - } - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RolePrivateKeyEncryptedWithRoleKey { + get { return rolePrivateKeyEncryptedWithRoleKey_; } + set { + rolePrivateKeyEncryptedWithRoleKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - } - - public sealed partial class EnterpriseUserDataKeys : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserDataKeys()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[23]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserDataKeys() { - OnConstruction(); - } - - partial void OnConstruction(); - + /// Field number for the "roleKeyEncryptedWithTreeKey" field. + public const int RoleKeyEncryptedWithTreeKeyFieldNumber = 12; + private pb::ByteString roleKeyEncryptedWithTreeKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserDataKeys(EnterpriseUserDataKeys other) : this() { - keys_ = other.keys_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RoleKeyEncryptedWithTreeKey { + get { return roleKeyEncryptedWithTreeKey_; } + set { + roleKeyEncryptedWithTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "eccKeyPair" field. + public const int EccKeyPairFieldNumber = 13; + private global::Enterprise.EnterpriseKeyPairRequest eccKeyPair_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseUserDataKeys Clone() { - return new EnterpriseUserDataKeys(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EnterpriseKeyPairRequest EccKeyPair { + get { return eccKeyPair_; } + set { + eccKeyPair_ = value; + } } - /// Field number for the "keys" field. - public const int KeysFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_keys_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUserDataKey.Parser); - private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + /// Field number for the "allUsersRoleData" field. + public const int AllUsersRoleDataFieldNumber = 14; + private pb::ByteString allUsersRoleData_ = pb::ByteString.Empty; + /// + /// encrypted role data for all_users role + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Keys { - get { return keys_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AllUsersRoleData { + get { return allUsersRoleData_; } + set { + allUsersRoleData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseUserDataKeys); + return Equals(other as EnterpriseRegistration); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseUserDataKeys other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseRegistration other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!keys_.Equals(other.keys_)) return false; + if (EncryptedTreeKey != other.EncryptedTreeKey) return false; + if (EnterpriseName != other.EnterpriseName) return false; + if (RootNodeData != other.RootNodeData) return false; + if (AdminUserData != other.AdminUserData) return false; + if (AdminName != other.AdminName) return false; + if (RoleData != other.RoleData) return false; + if (!object.Equals(RsaKeyPair, other.RsaKeyPair)) return false; + if (NumberSeats != other.NumberSeats) return false; + if (EnterpriseType != other.EnterpriseType) return false; + if (RolePublicKey != other.RolePublicKey) return false; + if (RolePrivateKeyEncryptedWithRoleKey != other.RolePrivateKeyEncryptedWithRoleKey) return false; + if (RoleKeyEncryptedWithTreeKey != other.RoleKeyEncryptedWithTreeKey) return false; + if (!object.Equals(EccKeyPair, other.EccKeyPair)) return false; + if (AllUsersRoleData != other.AllUsersRoleData) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= keys_.GetHashCode(); + if (EncryptedTreeKey.Length != 0) hash ^= EncryptedTreeKey.GetHashCode(); + if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); + if (RootNodeData.Length != 0) hash ^= RootNodeData.GetHashCode(); + if (AdminUserData.Length != 0) hash ^= AdminUserData.GetHashCode(); + if (AdminName.Length != 0) hash ^= AdminName.GetHashCode(); + if (RoleData.Length != 0) hash ^= RoleData.GetHashCode(); + if (rsaKeyPair_ != null) hash ^= RsaKeyPair.GetHashCode(); + if (NumberSeats != 0) hash ^= NumberSeats.GetHashCode(); + if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) hash ^= EnterpriseType.GetHashCode(); + if (RolePublicKey.Length != 0) hash ^= RolePublicKey.GetHashCode(); + if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) hash ^= RolePrivateKeyEncryptedWithRoleKey.GetHashCode(); + if (RoleKeyEncryptedWithTreeKey.Length != 0) hash ^= RoleKeyEncryptedWithTreeKey.GetHashCode(); + if (eccKeyPair_ != null) hash ^= EccKeyPair.GetHashCode(); + if (AllUsersRoleData.Length != 0) hash ^= AllUsersRoleData.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4489,121 +6161,26702 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - keys_.WriteTo(output, _repeated_keys_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedTreeKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedTreeKey); + } + if (EnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnterpriseName); + } + if (RootNodeData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RootNodeData); + } + if (AdminUserData.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(AdminUserData); + } + if (AdminName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(AdminName); + } + if (RoleData.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(RoleData); + } + if (rsaKeyPair_ != null) { + output.WriteRawTag(58); + output.WriteMessage(RsaKeyPair); + } + if (NumberSeats != 0) { + output.WriteRawTag(64); + output.WriteInt32(NumberSeats); + } + if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { + output.WriteRawTag(72); + output.WriteEnum((int) EnterpriseType); + } + if (RolePublicKey.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(RolePublicKey); + } + if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) { + output.WriteRawTag(90); + output.WriteBytes(RolePrivateKeyEncryptedWithRoleKey); + } + if (RoleKeyEncryptedWithTreeKey.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(RoleKeyEncryptedWithTreeKey); + } + if (eccKeyPair_ != null) { + output.WriteRawTag(106); + output.WriteMessage(EccKeyPair); + } + if (AllUsersRoleData.Length != 0) { + output.WriteRawTag(114); + output.WriteBytes(AllUsersRoleData); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - size += keys_.CalculateSize(_repeated_keys_codec); - if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedTreeKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedTreeKey); } - return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseUserDataKeys other) { - if (other == null) { - return; + if (EnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnterpriseName); } - keys_.Add(other.keys_); - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 10: { - keys_.AddEntriesFrom(input, _repeated_keys_codec); - break; - } - } + if (RootNodeData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RootNodeData); } - } - - } - - public sealed partial class EnterpriseDataRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseDataRequest()); + if (AdminUserData.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(AdminUserData); + } + if (AdminName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(AdminName); + } + if (RoleData.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(RoleData); + } + if (rsaKeyPair_ != null) { + output.WriteRawTag(58); + output.WriteMessage(RsaKeyPair); + } + if (NumberSeats != 0) { + output.WriteRawTag(64); + output.WriteInt32(NumberSeats); + } + if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { + output.WriteRawTag(72); + output.WriteEnum((int) EnterpriseType); + } + if (RolePublicKey.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(RolePublicKey); + } + if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) { + output.WriteRawTag(90); + output.WriteBytes(RolePrivateKeyEncryptedWithRoleKey); + } + if (RoleKeyEncryptedWithTreeKey.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(RoleKeyEncryptedWithTreeKey); + } + if (eccKeyPair_ != null) { + output.WriteRawTag(106); + output.WriteMessage(EccKeyPair); + } + if (AllUsersRoleData.Length != 0) { + output.WriteRawTag(114); + output.WriteBytes(AllUsersRoleData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedTreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedTreeKey); + } + if (EnterpriseName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); + } + if (RootNodeData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RootNodeData); + } + if (AdminUserData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AdminUserData); + } + if (AdminName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AdminName); + } + if (RoleData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleData); + } + if (rsaKeyPair_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RsaKeyPair); + } + if (NumberSeats != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberSeats); + } + if (EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EnterpriseType); + } + if (RolePublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RolePublicKey); + } + if (RolePrivateKeyEncryptedWithRoleKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RolePrivateKeyEncryptedWithRoleKey); + } + if (RoleKeyEncryptedWithTreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleKeyEncryptedWithTreeKey); + } + if (eccKeyPair_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EccKeyPair); + } + if (AllUsersRoleData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AllUsersRoleData); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseRegistration other) { + if (other == null) { + return; + } + if (other.EncryptedTreeKey.Length != 0) { + EncryptedTreeKey = other.EncryptedTreeKey; + } + if (other.EnterpriseName.Length != 0) { + EnterpriseName = other.EnterpriseName; + } + if (other.RootNodeData.Length != 0) { + RootNodeData = other.RootNodeData; + } + if (other.AdminUserData.Length != 0) { + AdminUserData = other.AdminUserData; + } + if (other.AdminName.Length != 0) { + AdminName = other.AdminName; + } + if (other.RoleData.Length != 0) { + RoleData = other.RoleData; + } + if (other.rsaKeyPair_ != null) { + if (rsaKeyPair_ == null) { + RsaKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); + } + RsaKeyPair.MergeFrom(other.RsaKeyPair); + } + if (other.NumberSeats != 0) { + NumberSeats = other.NumberSeats; + } + if (other.EnterpriseType != global::Enterprise.EnterpriseType.EnterpriseStandard) { + EnterpriseType = other.EnterpriseType; + } + if (other.RolePublicKey.Length != 0) { + RolePublicKey = other.RolePublicKey; + } + if (other.RolePrivateKeyEncryptedWithRoleKey.Length != 0) { + RolePrivateKeyEncryptedWithRoleKey = other.RolePrivateKeyEncryptedWithRoleKey; + } + if (other.RoleKeyEncryptedWithTreeKey.Length != 0) { + RoleKeyEncryptedWithTreeKey = other.RoleKeyEncryptedWithTreeKey; + } + if (other.eccKeyPair_ != null) { + if (eccKeyPair_ == null) { + EccKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); + } + EccKeyPair.MergeFrom(other.EccKeyPair); + } + if (other.AllUsersRoleData.Length != 0) { + AllUsersRoleData = other.AllUsersRoleData; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedTreeKey = input.ReadBytes(); + break; + } + case 18: { + EnterpriseName = input.ReadString(); + break; + } + case 26: { + RootNodeData = input.ReadBytes(); + break; + } + case 34: { + AdminUserData = input.ReadBytes(); + break; + } + case 42: { + AdminName = input.ReadString(); + break; + } + case 50: { + RoleData = input.ReadBytes(); + break; + } + case 58: { + if (rsaKeyPair_ == null) { + RsaKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); + } + input.ReadMessage(RsaKeyPair); + break; + } + case 64: { + NumberSeats = input.ReadInt32(); + break; + } + case 72: { + EnterpriseType = (global::Enterprise.EnterpriseType) input.ReadEnum(); + break; + } + case 82: { + RolePublicKey = input.ReadBytes(); + break; + } + case 90: { + RolePrivateKeyEncryptedWithRoleKey = input.ReadBytes(); + break; + } + case 98: { + RoleKeyEncryptedWithTreeKey = input.ReadBytes(); + break; + } + case 106: { + if (eccKeyPair_ == null) { + EccKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); + } + input.ReadMessage(EccKeyPair); + break; + } + case 114: { + AllUsersRoleData = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedTreeKey = input.ReadBytes(); + break; + } + case 18: { + EnterpriseName = input.ReadString(); + break; + } + case 26: { + RootNodeData = input.ReadBytes(); + break; + } + case 34: { + AdminUserData = input.ReadBytes(); + break; + } + case 42: { + AdminName = input.ReadString(); + break; + } + case 50: { + RoleData = input.ReadBytes(); + break; + } + case 58: { + if (rsaKeyPair_ == null) { + RsaKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); + } + input.ReadMessage(RsaKeyPair); + break; + } + case 64: { + NumberSeats = input.ReadInt32(); + break; + } + case 72: { + EnterpriseType = (global::Enterprise.EnterpriseType) input.ReadEnum(); + break; + } + case 82: { + RolePublicKey = input.ReadBytes(); + break; + } + case 90: { + RolePrivateKeyEncryptedWithRoleKey = input.ReadBytes(); + break; + } + case 98: { + RoleKeyEncryptedWithTreeKey = input.ReadBytes(); + break; + } + case 106: { + if (eccKeyPair_ == null) { + EccKeyPair = new global::Enterprise.EnterpriseKeyPairRequest(); + } + input.ReadMessage(EccKeyPair); + break; + } + case 114: { + AllUsersRoleData = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DomainPasswordRulesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainPasswordRulesRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesRequest(DomainPasswordRulesRequest other) : this() { + username_ = other.username_; + verificationCode_ = other.verificationCode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesRequest Clone() { + return new DomainPasswordRulesRequest(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 2; + private string verificationCode_ = ""; + /// + ///If supplied and is valid, will use the password rules for the given user's account + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DomainPasswordRulesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DomainPasswordRulesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (VerificationCode != other.VerificationCode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(18); + output.WriteString(VerificationCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(18); + output.WriteString(VerificationCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DomainPasswordRulesRequest other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + VerificationCode = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + VerificationCode = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DomainPasswordRulesFields : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainPasswordRulesFields()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesFields() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesFields(DomainPasswordRulesFields other) : this() { + type_ = other.type_; + minimum_ = other.minimum_; + maximum_ = other.maximum_; + allowed_ = other.allowed_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesFields Clone() { + return new DomainPasswordRulesFields(this); + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 1; + private string type_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Type { + get { return type_; } + set { + type_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "minimum" field. + public const int MinimumFieldNumber = 2; + private int minimum_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Minimum { + get { return minimum_; } + set { + minimum_ = value; + } + } + + /// Field number for the "maximum" field. + public const int MaximumFieldNumber = 3; + private int maximum_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Maximum { + get { return maximum_; } + set { + maximum_ = value; + } + } + + /// Field number for the "allowed" field. + public const int AllowedFieldNumber = 4; + private bool allowed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Allowed { + get { return allowed_; } + set { + allowed_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DomainPasswordRulesFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DomainPasswordRulesFields other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Type != other.Type) return false; + if (Minimum != other.Minimum) return false; + if (Maximum != other.Maximum) return false; + if (Allowed != other.Allowed) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Type.Length != 0) hash ^= Type.GetHashCode(); + if (Minimum != 0) hash ^= Minimum.GetHashCode(); + if (Maximum != 0) hash ^= Maximum.GetHashCode(); + if (Allowed != false) hash ^= Allowed.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (Minimum != 0) { + output.WriteRawTag(16); + output.WriteInt32(Minimum); + } + if (Maximum != 0) { + output.WriteRawTag(24); + output.WriteInt32(Maximum); + } + if (Allowed != false) { + output.WriteRawTag(32); + output.WriteBool(Allowed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Type.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Type); + } + if (Minimum != 0) { + output.WriteRawTag(16); + output.WriteInt32(Minimum); + } + if (Maximum != 0) { + output.WriteRawTag(24); + output.WriteInt32(Maximum); + } + if (Allowed != false) { + output.WriteRawTag(32); + output.WriteBool(Allowed); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Type.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Type); + } + if (Minimum != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Minimum); + } + if (Maximum != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Maximum); + } + if (Allowed != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DomainPasswordRulesFields other) { + if (other == null) { + return; + } + if (other.Type.Length != 0) { + Type = other.Type; + } + if (other.Minimum != 0) { + Minimum = other.Minimum; + } + if (other.Maximum != 0) { + Maximum = other.Maximum; + } + if (other.Allowed != false) { + Allowed = other.Allowed; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + Minimum = input.ReadInt32(); + break; + } + case 24: { + Maximum = input.ReadInt32(); + break; + } + case 32: { + Allowed = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Type = input.ReadString(); + break; + } + case 16: { + Minimum = input.ReadInt32(); + break; + } + case 24: { + Maximum = input.ReadInt32(); + break; + } + case 32: { + Allowed = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LoginToMcRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginToMcRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[24]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginToMcRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginToMcRequest(LoginToMcRequest other) : this() { + mcEnterpriseId_ = other.mcEnterpriseId_; + messageSessionUid_ = other.messageSessionUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginToMcRequest Clone() { + return new LoginToMcRequest(this); + } + + /// Field number for the "mcEnterpriseId" field. + public const int McEnterpriseIdFieldNumber = 1; + private int mcEnterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int McEnterpriseId { + get { return mcEnterpriseId_; } + set { + mcEnterpriseId_ = value; + } + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 2; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LoginToMcRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LoginToMcRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (McEnterpriseId != other.McEnterpriseId) return false; + if (MessageSessionUid != other.MessageSessionUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (McEnterpriseId != 0) hash ^= McEnterpriseId.GetHashCode(); + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (McEnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(McEnterpriseId); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(MessageSessionUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (McEnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(McEnterpriseId); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(MessageSessionUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (McEnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(McEnterpriseId); + } + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LoginToMcRequest other) { + if (other == null) { + return; + } + if (other.McEnterpriseId != 0) { + McEnterpriseId = other.McEnterpriseId; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 18: { + MessageSessionUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 18: { + MessageSessionUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LoginToMcResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LoginToMcResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[25]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginToMcResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginToMcResponse(LoginToMcResponse other) : this() { + encryptedSessionToken_ = other.encryptedSessionToken_; + encryptedTreeKey_ = other.encryptedTreeKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LoginToMcResponse Clone() { + return new LoginToMcResponse(this); + } + + /// Field number for the "encryptedSessionToken" field. + public const int EncryptedSessionTokenFieldNumber = 1; + private pb::ByteString encryptedSessionToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedSessionToken { + get { return encryptedSessionToken_; } + set { + encryptedSessionToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedTreeKey" field. + public const int EncryptedTreeKeyFieldNumber = 2; + private string encryptedTreeKey_ = ""; + /// + /// MC's tree key encrypted with MSP's tree key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedTreeKey { + get { return encryptedTreeKey_; } + set { + encryptedTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LoginToMcResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LoginToMcResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedSessionToken != other.EncryptedSessionToken) return false; + if (EncryptedTreeKey != other.EncryptedTreeKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedSessionToken.Length != 0) hash ^= EncryptedSessionToken.GetHashCode(); + if (EncryptedTreeKey.Length != 0) hash ^= EncryptedTreeKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } + if (EncryptedTreeKey.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EncryptedTreeKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedSessionToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedSessionToken); + } + if (EncryptedTreeKey.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EncryptedTreeKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedSessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + } + if (EncryptedTreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedTreeKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LoginToMcResponse other) { + if (other == null) { + return; + } + if (other.EncryptedSessionToken.Length != 0) { + EncryptedSessionToken = other.EncryptedSessionToken; + } + if (other.EncryptedTreeKey.Length != 0) { + EncryptedTreeKey = other.EncryptedTreeKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedTreeKey = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 18: { + EncryptedTreeKey = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DomainPasswordRulesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainPasswordRulesResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[26]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesResponse(DomainPasswordRulesResponse other) : this() { + domainPasswordRulesFields_ = other.domainPasswordRulesFields_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainPasswordRulesResponse Clone() { + return new DomainPasswordRulesResponse(this); + } + + /// Field number for the "domainPasswordRulesFields" field. + public const int DomainPasswordRulesFieldsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_domainPasswordRulesFields_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.DomainPasswordRulesFields.Parser); + private readonly pbc::RepeatedField domainPasswordRulesFields_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DomainPasswordRulesFields { + get { return domainPasswordRulesFields_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DomainPasswordRulesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DomainPasswordRulesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!domainPasswordRulesFields_.Equals(other.domainPasswordRulesFields_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= domainPasswordRulesFields_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + domainPasswordRulesFields_.WriteTo(output, _repeated_domainPasswordRulesFields_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + domainPasswordRulesFields_.WriteTo(ref output, _repeated_domainPasswordRulesFields_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += domainPasswordRulesFields_.CalculateSize(_repeated_domainPasswordRulesFields_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DomainPasswordRulesResponse other) { + if (other == null) { + return; + } + domainPasswordRulesFields_.Add(other.domainPasswordRulesFields_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + domainPasswordRulesFields_.AddEntriesFrom(input, _repeated_domainPasswordRulesFields_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + domainPasswordRulesFields_.AddEntriesFrom(ref input, _repeated_domainPasswordRulesFields_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApproveUserDeviceRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDeviceRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[27]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDeviceRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDeviceRequest(ApproveUserDeviceRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + encryptedDeviceDataKey_ = other.encryptedDeviceDataKey_; + denyApproval_ = other.denyApproval_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDeviceRequest Clone() { + return new ApproveUserDeviceRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 2; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedDeviceDataKey" field. + public const int EncryptedDeviceDataKeyFieldNumber = 3; + private pb::ByteString encryptedDeviceDataKey_ = pb::ByteString.Empty; + /// + /// required for cloud sso + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceDataKey { + get { return encryptedDeviceDataKey_; } + set { + encryptedDeviceDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "denyApproval" field. + public const int DenyApprovalFieldNumber = 4; + private bool denyApproval_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DenyApproval { + get { return denyApproval_; } + set { + denyApproval_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApproveUserDeviceRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApproveUserDeviceRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (EncryptedDeviceDataKey != other.EncryptedDeviceDataKey) return false; + if (DenyApproval != other.DenyApproval) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (EncryptedDeviceDataKey.Length != 0) hash ^= EncryptedDeviceDataKey.GetHashCode(); + if (DenyApproval != false) hash ^= DenyApproval.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (DenyApproval != false) { + output.WriteRawTag(32); + output.WriteBool(DenyApproval); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedDeviceDataKey); + } + if (DenyApproval != false) { + output.WriteRawTag(32); + output.WriteBool(DenyApproval); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (EncryptedDeviceDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceDataKey); + } + if (DenyApproval != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApproveUserDeviceRequest other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.EncryptedDeviceDataKey.Length != 0) { + EncryptedDeviceDataKey = other.EncryptedDeviceDataKey; + } + if (other.DenyApproval != false) { + DenyApproval = other.DenyApproval; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 26: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + case 32: { + DenyApproval = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 26: { + EncryptedDeviceDataKey = input.ReadBytes(); + break; + } + case 32: { + DenyApproval = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApproveUserDeviceResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDeviceResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[28]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDeviceResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDeviceResponse(ApproveUserDeviceResponse other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + failed_ = other.failed_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDeviceResponse Clone() { + return new ApproveUserDeviceResponse(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 2; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "failed" field. + public const int FailedFieldNumber = 3; + private bool failed_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Failed { + get { return failed_; } + set { + failed_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApproveUserDeviceResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApproveUserDeviceResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (Failed != other.Failed) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (Failed != false) hash ^= Failed.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceToken); + } + if (Failed != false) { + output.WriteRawTag(24); + output.WriteBool(Failed); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceToken); + } + if (Failed != false) { + output.WriteRawTag(24); + output.WriteBool(Failed); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (Failed != false) { + size += 1 + 1; + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApproveUserDeviceResponse other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.Failed != false) { + Failed = other.Failed; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 24: { + Failed = input.ReadBool(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 24: { + Failed = input.ReadBool(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApproveUserDevicesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDevicesRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[29]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDevicesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDevicesRequest(ApproveUserDevicesRequest other) : this() { + deviceRequests_ = other.deviceRequests_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDevicesRequest Clone() { + return new ApproveUserDevicesRequest(this); + } + + /// Field number for the "deviceRequests" field. + public const int DeviceRequestsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_deviceRequests_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.ApproveUserDeviceRequest.Parser); + private readonly pbc::RepeatedField deviceRequests_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DeviceRequests { + get { return deviceRequests_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApproveUserDevicesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApproveUserDevicesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!deviceRequests_.Equals(other.deviceRequests_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= deviceRequests_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + deviceRequests_.WriteTo(output, _repeated_deviceRequests_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + deviceRequests_.WriteTo(ref output, _repeated_deviceRequests_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += deviceRequests_.CalculateSize(_repeated_deviceRequests_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApproveUserDevicesRequest other) { + if (other == null) { + return; + } + deviceRequests_.Add(other.deviceRequests_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + deviceRequests_.AddEntriesFrom(input, _repeated_deviceRequests_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + deviceRequests_.AddEntriesFrom(ref input, _repeated_deviceRequests_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApproveUserDevicesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApproveUserDevicesResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[30]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDevicesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDevicesResponse(ApproveUserDevicesResponse other) : this() { + deviceResponses_ = other.deviceResponses_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApproveUserDevicesResponse Clone() { + return new ApproveUserDevicesResponse(this); + } + + /// Field number for the "deviceResponses" field. + public const int DeviceResponsesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_deviceResponses_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.ApproveUserDeviceResponse.Parser); + private readonly pbc::RepeatedField deviceResponses_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DeviceResponses { + get { return deviceResponses_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApproveUserDevicesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApproveUserDevicesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!deviceResponses_.Equals(other.deviceResponses_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= deviceResponses_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + deviceResponses_.WriteTo(output, _repeated_deviceResponses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + deviceResponses_.WriteTo(ref output, _repeated_deviceResponses_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += deviceResponses_.CalculateSize(_repeated_deviceResponses_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApproveUserDevicesResponse other) { + if (other == null) { + return; + } + deviceResponses_.Add(other.deviceResponses_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + deviceResponses_.AddEntriesFrom(input, _repeated_deviceResponses_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + deviceResponses_.AddEntriesFrom(ref input, _repeated_deviceResponses_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserDataKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserDataKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[31]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserDataKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserDataKey(EnterpriseUserDataKey other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + userEncryptedDataKey_ = other.userEncryptedDataKey_; + keyTypeId_ = other.keyTypeId_; + roleKey_ = other.roleKey_; + privateKey_ = other.privateKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserDataKey Clone() { + return new EnterpriseUserDataKey(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "userEncryptedDataKey" field. + public const int UserEncryptedDataKeyFieldNumber = 2; + private pb::ByteString userEncryptedDataKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString UserEncryptedDataKey { + get { return userEncryptedDataKey_; } + set { + userEncryptedDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyTypeId" field. + public const int KeyTypeIdFieldNumber = 3; + private int keyTypeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int KeyTypeId { + get { return keyTypeId_; } + set { + keyTypeId_ = value; + } + } + + /// Field number for the "roleKey" field. + public const int RoleKeyFieldNumber = 4; + private pb::ByteString roleKey_ = pb::ByteString.Empty; + /// + /// Used for migration + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RoleKey { + get { return roleKey_; } + set { + roleKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "privateKey" field. + public const int PrivateKeyFieldNumber = 5; + private pb::ByteString privateKey_ = pb::ByteString.Empty; + /// + /// Used for migration + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PrivateKey { + get { return privateKey_; } + set { + privateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserDataKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserDataKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (UserEncryptedDataKey != other.UserEncryptedDataKey) return false; + if (KeyTypeId != other.KeyTypeId) return false; + if (RoleKey != other.RoleKey) return false; + if (PrivateKey != other.PrivateKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (UserEncryptedDataKey.Length != 0) hash ^= UserEncryptedDataKey.GetHashCode(); + if (KeyTypeId != 0) hash ^= KeyTypeId.GetHashCode(); + if (RoleKey.Length != 0) hash ^= RoleKey.GetHashCode(); + if (PrivateKey.Length != 0) hash ^= PrivateKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (UserEncryptedDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(UserEncryptedDataKey); + } + if (KeyTypeId != 0) { + output.WriteRawTag(24); + output.WriteInt32(KeyTypeId); + } + if (RoleKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(RoleKey); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (UserEncryptedDataKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(UserEncryptedDataKey); + } + if (KeyTypeId != 0) { + output.WriteRawTag(24); + output.WriteInt32(KeyTypeId); + } + if (RoleKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(RoleKey); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (UserEncryptedDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(UserEncryptedDataKey); + } + if (KeyTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(KeyTypeId); + } + if (RoleKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RoleKey); + } + if (PrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrivateKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserDataKey other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.UserEncryptedDataKey.Length != 0) { + UserEncryptedDataKey = other.UserEncryptedDataKey; + } + if (other.KeyTypeId != 0) { + KeyTypeId = other.KeyTypeId; + } + if (other.RoleKey.Length != 0) { + RoleKey = other.RoleKey; + } + if (other.PrivateKey.Length != 0) { + PrivateKey = other.PrivateKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + UserEncryptedDataKey = input.ReadBytes(); + break; + } + case 24: { + KeyTypeId = input.ReadInt32(); + break; + } + case 34: { + RoleKey = input.ReadBytes(); + break; + } + case 42: { + PrivateKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + UserEncryptedDataKey = input.ReadBytes(); + break; + } + case 24: { + KeyTypeId = input.ReadInt32(); + break; + } + case 34: { + RoleKey = input.ReadBytes(); + break; + } + case 42: { + PrivateKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUserDataKeys : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUserDataKeys()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[32]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserDataKeys() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserDataKeys(EnterpriseUserDataKeys other) : this() { + keys_ = other.keys_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUserDataKeys Clone() { + return new EnterpriseUserDataKeys(this); + } + + /// Field number for the "keys" field. + public const int KeysFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_keys_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUserDataKey.Parser); + private readonly pbc::RepeatedField keys_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Keys { + get { return keys_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseUserDataKeys); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUserDataKeys other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!keys_.Equals(other.keys_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= keys_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + keys_.WriteTo(output, _repeated_keys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + keys_.WriteTo(ref output, _repeated_keys_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += keys_.CalculateSize(_repeated_keys_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUserDataKeys other) { + if (other == null) { + return; + } + keys_.Add(other.keys_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + keys_.AddEntriesFrom(input, _repeated_keys_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + keys_.AddEntriesFrom(ref input, _repeated_keys_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseDataRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseDataRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[33]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseDataRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseDataRequest(EnterpriseDataRequest other) : this() { + continuationToken_ = other.continuationToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseDataRequest Clone() { + return new EnterpriseDataRequest(this); + } + + /// Field number for the "continuationToken" field. + public const int ContinuationTokenFieldNumber = 1; + private pb::ByteString continuationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ContinuationToken { + get { return continuationToken_; } + set { + continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseDataRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseDataRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ContinuationToken != other.ContinuationToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ContinuationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ContinuationToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ContinuationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ContinuationToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ContinuationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseDataRequest other) { + if (other == null) { + return; + } + if (other.ContinuationToken.Length != 0) { + ContinuationToken = other.ContinuationToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ContinuationToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ContinuationToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SpecialProvisioning : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SpecialProvisioning()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[34]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SpecialProvisioning() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SpecialProvisioning(SpecialProvisioning other) : this() { + url_ = other.url_; + name_ = other.name_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SpecialProvisioning Clone() { + return new SpecialProvisioning(this); + } + + /// Field number for the "url" field. + public const int UrlFieldNumber = 1; + private string url_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Url { + get { return url_; } + set { + url_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SpecialProvisioning); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SpecialProvisioning other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Url != other.Url) return false; + if (Name != other.Name) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Url.Length != 0) hash ^= Url.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Url.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Url); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Url.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Url); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Url.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SpecialProvisioning other) { + if (other == null) { + return; + } + if (other.Url.Length != 0) { + Url = other.Url; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Url = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Url = input.ReadString(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GeneralDataEntity : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GeneralDataEntity()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[35]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GeneralDataEntity() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GeneralDataEntity(GeneralDataEntity other) : this() { + enterpriseName_ = other.enterpriseName_; + restrictVisibility_ = other.restrictVisibility_; + specialProvisioning_ = other.specialProvisioning_ != null ? other.specialProvisioning_.Clone() : null; + userPrivilege_ = other.userPrivilege_ != null ? other.userPrivilege_.Clone() : null; + distributor_ = other.distributor_; + forbidAccountTransfer_ = other.forbidAccountTransfer_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GeneralDataEntity Clone() { + return new GeneralDataEntity(this); + } + + /// Field number for the "enterpriseName" field. + public const int EnterpriseNameFieldNumber = 1; + private string enterpriseName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnterpriseName { + get { return enterpriseName_; } + set { + enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "restrictVisibility" field. + public const int RestrictVisibilityFieldNumber = 2; + private bool restrictVisibility_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictVisibility { + get { return restrictVisibility_; } + set { + restrictVisibility_ = value; + } + } + + /// Field number for the "specialProvisioning" field. + public const int SpecialProvisioningFieldNumber = 4; + private global::Enterprise.SpecialProvisioning specialProvisioning_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.SpecialProvisioning SpecialProvisioning { + get { return specialProvisioning_; } + set { + specialProvisioning_ = value; + } + } + + /// Field number for the "userPrivilege" field. + public const int UserPrivilegeFieldNumber = 7; + private global::Enterprise.UserPrivilege userPrivilege_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.UserPrivilege UserPrivilege { + get { return userPrivilege_; } + set { + userPrivilege_ = value; + } + } + + /// Field number for the "distributor" field. + public const int DistributorFieldNumber = 8; + private bool distributor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Distributor { + get { return distributor_; } + set { + distributor_ = value; + } + } + + /// Field number for the "forbidAccountTransfer" field. + public const int ForbidAccountTransferFieldNumber = 9; + private bool forbidAccountTransfer_; + /// + /// If true: + /// - role_enforcement_add won't let you add the REQUIRE_ACCOUNT_SHARE enforcement + /// - account_summary won't ask clients to share their data key for account share + /// - share_account, pre_account_transfer, & transfer_and_delete_user will abort + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ForbidAccountTransfer { + get { return forbidAccountTransfer_; } + set { + forbidAccountTransfer_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GeneralDataEntity); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GeneralDataEntity other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseName != other.EnterpriseName) return false; + if (RestrictVisibility != other.RestrictVisibility) return false; + if (!object.Equals(SpecialProvisioning, other.SpecialProvisioning)) return false; + if (!object.Equals(UserPrivilege, other.UserPrivilege)) return false; + if (Distributor != other.Distributor) return false; + if (ForbidAccountTransfer != other.ForbidAccountTransfer) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); + if (RestrictVisibility != false) hash ^= RestrictVisibility.GetHashCode(); + if (specialProvisioning_ != null) hash ^= SpecialProvisioning.GetHashCode(); + if (userPrivilege_ != null) hash ^= UserPrivilege.GetHashCode(); + if (Distributor != false) hash ^= Distributor.GetHashCode(); + if (ForbidAccountTransfer != false) hash ^= ForbidAccountTransfer.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(EnterpriseName); + } + if (RestrictVisibility != false) { + output.WriteRawTag(16); + output.WriteBool(RestrictVisibility); + } + if (specialProvisioning_ != null) { + output.WriteRawTag(34); + output.WriteMessage(SpecialProvisioning); + } + if (userPrivilege_ != null) { + output.WriteRawTag(58); + output.WriteMessage(UserPrivilege); + } + if (Distributor != false) { + output.WriteRawTag(64); + output.WriteBool(Distributor); + } + if (ForbidAccountTransfer != false) { + output.WriteRawTag(72); + output.WriteBool(ForbidAccountTransfer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseName.Length != 0) { + output.WriteRawTag(10); + output.WriteString(EnterpriseName); + } + if (RestrictVisibility != false) { + output.WriteRawTag(16); + output.WriteBool(RestrictVisibility); + } + if (specialProvisioning_ != null) { + output.WriteRawTag(34); + output.WriteMessage(SpecialProvisioning); + } + if (userPrivilege_ != null) { + output.WriteRawTag(58); + output.WriteMessage(UserPrivilege); + } + if (Distributor != false) { + output.WriteRawTag(64); + output.WriteBool(Distributor); + } + if (ForbidAccountTransfer != false) { + output.WriteRawTag(72); + output.WriteBool(ForbidAccountTransfer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); + } + if (RestrictVisibility != false) { + size += 1 + 1; + } + if (specialProvisioning_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SpecialProvisioning); + } + if (userPrivilege_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserPrivilege); + } + if (Distributor != false) { + size += 1 + 1; + } + if (ForbidAccountTransfer != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GeneralDataEntity other) { + if (other == null) { + return; + } + if (other.EnterpriseName.Length != 0) { + EnterpriseName = other.EnterpriseName; + } + if (other.RestrictVisibility != false) { + RestrictVisibility = other.RestrictVisibility; + } + if (other.specialProvisioning_ != null) { + if (specialProvisioning_ == null) { + SpecialProvisioning = new global::Enterprise.SpecialProvisioning(); + } + SpecialProvisioning.MergeFrom(other.SpecialProvisioning); + } + if (other.userPrivilege_ != null) { + if (userPrivilege_ == null) { + UserPrivilege = new global::Enterprise.UserPrivilege(); + } + UserPrivilege.MergeFrom(other.UserPrivilege); + } + if (other.Distributor != false) { + Distributor = other.Distributor; + } + if (other.ForbidAccountTransfer != false) { + ForbidAccountTransfer = other.ForbidAccountTransfer; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EnterpriseName = input.ReadString(); + break; + } + case 16: { + RestrictVisibility = input.ReadBool(); + break; + } + case 34: { + if (specialProvisioning_ == null) { + SpecialProvisioning = new global::Enterprise.SpecialProvisioning(); + } + input.ReadMessage(SpecialProvisioning); + break; + } + case 58: { + if (userPrivilege_ == null) { + UserPrivilege = new global::Enterprise.UserPrivilege(); + } + input.ReadMessage(UserPrivilege); + break; + } + case 64: { + Distributor = input.ReadBool(); + break; + } + case 72: { + ForbidAccountTransfer = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EnterpriseName = input.ReadString(); + break; + } + case 16: { + RestrictVisibility = input.ReadBool(); + break; + } + case 34: { + if (specialProvisioning_ == null) { + SpecialProvisioning = new global::Enterprise.SpecialProvisioning(); + } + input.ReadMessage(SpecialProvisioning); + break; + } + case 58: { + if (userPrivilege_ == null) { + UserPrivilege = new global::Enterprise.UserPrivilege(); + } + input.ReadMessage(UserPrivilege); + break; + } + case 64: { + Distributor = input.ReadBool(); + break; + } + case 72: { + ForbidAccountTransfer = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Node : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Node()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[36]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Node() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Node(Node other) : this() { + nodeId_ = other.nodeId_; + parentId_ = other.parentId_; + bridgeId_ = other.bridgeId_; + scimId_ = other.scimId_; + licenseId_ = other.licenseId_; + encryptedData_ = other.encryptedData_; + duoEnabled_ = other.duoEnabled_; + rsaEnabled_ = other.rsaEnabled_; + ssoServiceProviderId_ = other.ssoServiceProviderId_; + restrictVisibility_ = other.restrictVisibility_; + ssoServiceProviderIds_ = other.ssoServiceProviderIds_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Node Clone() { + return new Node(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "parentId" field. + public const int ParentIdFieldNumber = 2; + private long parentId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ParentId { + get { return parentId_; } + set { + parentId_ = value; + } + } + + /// Field number for the "bridgeId" field. + public const int BridgeIdFieldNumber = 3; + private long bridgeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BridgeId { + get { return bridgeId_; } + set { + bridgeId_ = value; + } + } + + /// Field number for the "scimId" field. + public const int ScimIdFieldNumber = 4; + private long scimId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ScimId { + get { return scimId_; } + set { + scimId_ = value; + } + } + + /// Field number for the "licenseId" field. + public const int LicenseIdFieldNumber = 5; + private long licenseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LicenseId { + get { return licenseId_; } + set { + licenseId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 6; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "duoEnabled" field. + public const int DuoEnabledFieldNumber = 7; + private bool duoEnabled_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool DuoEnabled { + get { return duoEnabled_; } + set { + duoEnabled_ = value; + } + } + + /// Field number for the "rsaEnabled" field. + public const int RsaEnabledFieldNumber = 8; + private bool rsaEnabled_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RsaEnabled { + get { return rsaEnabled_; } + set { + rsaEnabled_ = value; + } + } + + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 9; + private long ssoServiceProviderId_; + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long SsoServiceProviderId { + get { return ssoServiceProviderId_; } + set { + ssoServiceProviderId_ = value; + } + } + + /// Field number for the "restrictVisibility" field. + public const int RestrictVisibilityFieldNumber = 10; + private bool restrictVisibility_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictVisibility { + get { return restrictVisibility_; } + set { + restrictVisibility_ = value; + } + } + + /// Field number for the "ssoServiceProviderIds" field. + public const int SsoServiceProviderIdsFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_ssoServiceProviderIds_codec + = pb::FieldCodec.ForInt64(90); + private readonly pbc::RepeatedField ssoServiceProviderIds_ = new pbc::RepeatedField(); + /// + /// Nov 2021 - Nodes can now have more than one sso ServiceProviderId. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SsoServiceProviderIds { + get { return ssoServiceProviderIds_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Node); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Node other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (ParentId != other.ParentId) return false; + if (BridgeId != other.BridgeId) return false; + if (ScimId != other.ScimId) return false; + if (LicenseId != other.LicenseId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (DuoEnabled != other.DuoEnabled) return false; + if (RsaEnabled != other.RsaEnabled) return false; + if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + if (RestrictVisibility != other.RestrictVisibility) return false; + if(!ssoServiceProviderIds_.Equals(other.ssoServiceProviderIds_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (ParentId != 0L) hash ^= ParentId.GetHashCode(); + if (BridgeId != 0L) hash ^= BridgeId.GetHashCode(); + if (ScimId != 0L) hash ^= ScimId.GetHashCode(); + if (LicenseId != 0L) hash ^= LicenseId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (DuoEnabled != false) hash ^= DuoEnabled.GetHashCode(); + if (RsaEnabled != false) hash ^= RsaEnabled.GetHashCode(); + if (SsoServiceProviderId != 0L) hash ^= SsoServiceProviderId.GetHashCode(); + if (RestrictVisibility != false) hash ^= RestrictVisibility.GetHashCode(); + hash ^= ssoServiceProviderIds_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (ParentId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ParentId); + } + if (BridgeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(BridgeId); + } + if (ScimId != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ScimId); + } + if (LicenseId != 0L) { + output.WriteRawTag(40); + output.WriteInt64(LicenseId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(50); + output.WriteString(EncryptedData); + } + if (DuoEnabled != false) { + output.WriteRawTag(56); + output.WriteBool(DuoEnabled); + } + if (RsaEnabled != false) { + output.WriteRawTag(64); + output.WriteBool(RsaEnabled); + } + if (SsoServiceProviderId != 0L) { + output.WriteRawTag(72); + output.WriteInt64(SsoServiceProviderId); + } + if (RestrictVisibility != false) { + output.WriteRawTag(80); + output.WriteBool(RestrictVisibility); + } + ssoServiceProviderIds_.WriteTo(output, _repeated_ssoServiceProviderIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (ParentId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ParentId); + } + if (BridgeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(BridgeId); + } + if (ScimId != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ScimId); + } + if (LicenseId != 0L) { + output.WriteRawTag(40); + output.WriteInt64(LicenseId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(50); + output.WriteString(EncryptedData); + } + if (DuoEnabled != false) { + output.WriteRawTag(56); + output.WriteBool(DuoEnabled); + } + if (RsaEnabled != false) { + output.WriteRawTag(64); + output.WriteBool(RsaEnabled); + } + if (SsoServiceProviderId != 0L) { + output.WriteRawTag(72); + output.WriteInt64(SsoServiceProviderId); + } + if (RestrictVisibility != false) { + output.WriteRawTag(80); + output.WriteBool(RestrictVisibility); + } + ssoServiceProviderIds_.WriteTo(ref output, _repeated_ssoServiceProviderIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (ParentId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ParentId); + } + if (BridgeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BridgeId); + } + if (ScimId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ScimId); + } + if (LicenseId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LicenseId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (DuoEnabled != false) { + size += 1 + 1; + } + if (RsaEnabled != false) { + size += 1 + 1; + } + if (SsoServiceProviderId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(SsoServiceProviderId); + } + if (RestrictVisibility != false) { + size += 1 + 1; + } + size += ssoServiceProviderIds_.CalculateSize(_repeated_ssoServiceProviderIds_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Node other) { + if (other == null) { + return; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.ParentId != 0L) { + ParentId = other.ParentId; + } + if (other.BridgeId != 0L) { + BridgeId = other.BridgeId; + } + if (other.ScimId != 0L) { + ScimId = other.ScimId; + } + if (other.LicenseId != 0L) { + LicenseId = other.LicenseId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.DuoEnabled != false) { + DuoEnabled = other.DuoEnabled; + } + if (other.RsaEnabled != false) { + RsaEnabled = other.RsaEnabled; + } + if (other.SsoServiceProviderId != 0L) { + SsoServiceProviderId = other.SsoServiceProviderId; + } + if (other.RestrictVisibility != false) { + RestrictVisibility = other.RestrictVisibility; + } + ssoServiceProviderIds_.Add(other.ssoServiceProviderIds_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 16: { + ParentId = input.ReadInt64(); + break; + } + case 24: { + BridgeId = input.ReadInt64(); + break; + } + case 32: { + ScimId = input.ReadInt64(); + break; + } + case 40: { + LicenseId = input.ReadInt64(); + break; + } + case 50: { + EncryptedData = input.ReadString(); + break; + } + case 56: { + DuoEnabled = input.ReadBool(); + break; + } + case 64: { + RsaEnabled = input.ReadBool(); + break; + } + case 72: { + SsoServiceProviderId = input.ReadInt64(); + break; + } + case 80: { + RestrictVisibility = input.ReadBool(); + break; + } + case 90: + case 88: { + ssoServiceProviderIds_.AddEntriesFrom(input, _repeated_ssoServiceProviderIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 16: { + ParentId = input.ReadInt64(); + break; + } + case 24: { + BridgeId = input.ReadInt64(); + break; + } + case 32: { + ScimId = input.ReadInt64(); + break; + } + case 40: { + LicenseId = input.ReadInt64(); + break; + } + case 50: { + EncryptedData = input.ReadString(); + break; + } + case 56: { + DuoEnabled = input.ReadBool(); + break; + } + case 64: { + RsaEnabled = input.ReadBool(); + break; + } + case 72: { + SsoServiceProviderId = input.ReadInt64(); + break; + } + case 80: { + RestrictVisibility = input.ReadBool(); + break; + } + case 90: + case 88: { + ssoServiceProviderIds_.AddEntriesFrom(ref input, _repeated_ssoServiceProviderIds_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Role : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Role()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[37]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Role() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Role(Role other) : this() { + roleId_ = other.roleId_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + keyType_ = other.keyType_; + visibleBelow_ = other.visibleBelow_; + newUserInherit_ = other.newUserInherit_; + roleType_ = other.roleType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Role Clone() { + return new Role(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 3; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 4; + private string keyType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string KeyType { + get { return keyType_; } + set { + keyType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "visibleBelow" field. + public const int VisibleBelowFieldNumber = 5; + private bool visibleBelow_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool VisibleBelow { + get { return visibleBelow_; } + set { + visibleBelow_ = value; + } + } + + /// Field number for the "newUserInherit" field. + public const int NewUserInheritFieldNumber = 6; + private bool newUserInherit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool NewUserInherit { + get { return newUserInherit_; } + set { + newUserInherit_ = value; + } + } + + /// Field number for the "roleType" field. + public const int RoleTypeFieldNumber = 7; + private string roleType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RoleType { + get { return roleType_; } + set { + roleType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Role); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Role other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (KeyType != other.KeyType) return false; + if (VisibleBelow != other.VisibleBelow) return false; + if (NewUserInherit != other.NewUserInherit) return false; + if (RoleType != other.RoleType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (KeyType.Length != 0) hash ^= KeyType.GetHashCode(); + if (VisibleBelow != false) hash ^= VisibleBelow.GetHashCode(); + if (NewUserInherit != false) hash ^= NewUserInherit.GetHashCode(); + if (RoleType.Length != 0) hash ^= RoleType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EncryptedData); + } + if (KeyType.Length != 0) { + output.WriteRawTag(34); + output.WriteString(KeyType); + } + if (VisibleBelow != false) { + output.WriteRawTag(40); + output.WriteBool(VisibleBelow); + } + if (NewUserInherit != false) { + output.WriteRawTag(48); + output.WriteBool(NewUserInherit); + } + if (RoleType.Length != 0) { + output.WriteRawTag(58); + output.WriteString(RoleType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EncryptedData); + } + if (KeyType.Length != 0) { + output.WriteRawTag(34); + output.WriteString(KeyType); + } + if (VisibleBelow != false) { + output.WriteRawTag(40); + output.WriteBool(VisibleBelow); + } + if (NewUserInherit != false) { + output.WriteRawTag(48); + output.WriteBool(NewUserInherit); + } + if (RoleType.Length != 0) { + output.WriteRawTag(58); + output.WriteString(RoleType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (KeyType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyType); + } + if (VisibleBelow != false) { + size += 1 + 1; + } + if (NewUserInherit != false) { + size += 1 + 1; + } + if (RoleType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Role other) { + if (other == null) { + return; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.KeyType.Length != 0) { + KeyType = other.KeyType; + } + if (other.VisibleBelow != false) { + VisibleBelow = other.VisibleBelow; + } + if (other.NewUserInherit != false) { + NewUserInherit = other.NewUserInherit; + } + if (other.RoleType.Length != 0) { + RoleType = other.RoleType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadString(); + break; + } + case 34: { + KeyType = input.ReadString(); + break; + } + case 40: { + VisibleBelow = input.ReadBool(); + break; + } + case 48: { + NewUserInherit = input.ReadBool(); + break; + } + case 58: { + RoleType = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadString(); + break; + } + case 34: { + KeyType = input.ReadString(); + break; + } + case 40: { + VisibleBelow = input.ReadBool(); + break; + } + case 48: { + NewUserInherit = input.ReadBool(); + break; + } + case 58: { + RoleType = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class User : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new User()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[38]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public User() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public User(User other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + keyType_ = other.keyType_; + username_ = other.username_; + status_ = other.status_; + lock_ = other.lock_; + userId_ = other.userId_; + accountShareExpiration_ = other.accountShareExpiration_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + tfaEnabled_ = other.tfaEnabled_; + transferAcceptanceStatus_ = other.transferAcceptanceStatus_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public User Clone() { + return new User(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 3; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 4; + private string keyType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string KeyType { + get { return keyType_; } + set { + keyType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 5; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 6; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "lock" field. + public const int LockFieldNumber = 7; + private int lock_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Lock { + get { return lock_; } + set { + lock_ = value; + } + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 8; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "accountShareExpiration" field. + public const int AccountShareExpirationFieldNumber = 9; + private long accountShareExpiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long AccountShareExpiration { + get { return accountShareExpiration_; } + set { + accountShareExpiration_ = value; + } + } + + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 10; + private string fullName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 11; + private string jobTitle_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } + set { + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "tfaEnabled" field. + public const int TfaEnabledFieldNumber = 12; + private bool tfaEnabled_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool TfaEnabled { + get { return tfaEnabled_; } + set { + tfaEnabled_ = value; + } + } + + /// Field number for the "transferAcceptanceStatus" field. + public const int TransferAcceptanceStatusFieldNumber = 13; + private global::Enterprise.TransferAcceptanceStatus transferAcceptanceStatus_ = global::Enterprise.TransferAcceptanceStatus.Undefined; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TransferAcceptanceStatus TransferAcceptanceStatus { + get { return transferAcceptanceStatus_; } + set { + transferAcceptanceStatus_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as User); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(User other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (KeyType != other.KeyType) return false; + if (Username != other.Username) return false; + if (Status != other.Status) return false; + if (Lock != other.Lock) return false; + if (UserId != other.UserId) return false; + if (AccountShareExpiration != other.AccountShareExpiration) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (TfaEnabled != other.TfaEnabled) return false; + if (TransferAcceptanceStatus != other.TransferAcceptanceStatus) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (KeyType.Length != 0) hash ^= KeyType.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (Lock != 0) hash ^= Lock.GetHashCode(); + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (AccountShareExpiration != 0L) hash ^= AccountShareExpiration.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (TfaEnabled != false) hash ^= TfaEnabled.GetHashCode(); + if (TransferAcceptanceStatus != global::Enterprise.TransferAcceptanceStatus.Undefined) hash ^= TransferAcceptanceStatus.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EncryptedData); + } + if (KeyType.Length != 0) { + output.WriteRawTag(34); + output.WriteString(KeyType); + } + if (Username.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Username); + } + if (Status.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Status); + } + if (Lock != 0) { + output.WriteRawTag(56); + output.WriteInt32(Lock); + } + if (UserId != 0) { + output.WriteRawTag(64); + output.WriteInt32(UserId); + } + if (AccountShareExpiration != 0L) { + output.WriteRawTag(72); + output.WriteInt64(AccountShareExpiration); + } + if (FullName.Length != 0) { + output.WriteRawTag(82); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(90); + output.WriteString(JobTitle); + } + if (TfaEnabled != false) { + output.WriteRawTag(96); + output.WriteBool(TfaEnabled); + } + if (TransferAcceptanceStatus != global::Enterprise.TransferAcceptanceStatus.Undefined) { + output.WriteRawTag(104); + output.WriteEnum((int) TransferAcceptanceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EncryptedData); + } + if (KeyType.Length != 0) { + output.WriteRawTag(34); + output.WriteString(KeyType); + } + if (Username.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Username); + } + if (Status.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Status); + } + if (Lock != 0) { + output.WriteRawTag(56); + output.WriteInt32(Lock); + } + if (UserId != 0) { + output.WriteRawTag(64); + output.WriteInt32(UserId); + } + if (AccountShareExpiration != 0L) { + output.WriteRawTag(72); + output.WriteInt64(AccountShareExpiration); + } + if (FullName.Length != 0) { + output.WriteRawTag(82); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(90); + output.WriteString(JobTitle); + } + if (TfaEnabled != false) { + output.WriteRawTag(96); + output.WriteBool(TfaEnabled); + } + if (TransferAcceptanceStatus != global::Enterprise.TransferAcceptanceStatus.Undefined) { + output.WriteRawTag(104); + output.WriteEnum((int) TransferAcceptanceStatus); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (KeyType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyType); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (Lock != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Lock); + } + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (AccountShareExpiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(AccountShareExpiration); + } + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); + } + if (TfaEnabled != false) { + size += 1 + 1; + } + if (TransferAcceptanceStatus != global::Enterprise.TransferAcceptanceStatus.Undefined) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TransferAcceptanceStatus); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(User other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.KeyType.Length != 0) { + KeyType = other.KeyType; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.Lock != 0) { + Lock = other.Lock; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.AccountShareExpiration != 0L) { + AccountShareExpiration = other.AccountShareExpiration; + } + if (other.FullName.Length != 0) { + FullName = other.FullName; + } + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; + } + if (other.TfaEnabled != false) { + TfaEnabled = other.TfaEnabled; + } + if (other.TransferAcceptanceStatus != global::Enterprise.TransferAcceptanceStatus.Undefined) { + TransferAcceptanceStatus = other.TransferAcceptanceStatus; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadString(); + break; + } + case 34: { + KeyType = input.ReadString(); + break; + } + case 42: { + Username = input.ReadString(); + break; + } + case 50: { + Status = input.ReadString(); + break; + } + case 56: { + Lock = input.ReadInt32(); + break; + } + case 64: { + UserId = input.ReadInt32(); + break; + } + case 72: { + AccountShareExpiration = input.ReadInt64(); + break; + } + case 82: { + FullName = input.ReadString(); + break; + } + case 90: { + JobTitle = input.ReadString(); + break; + } + case 96: { + TfaEnabled = input.ReadBool(); + break; + } + case 104: { + TransferAcceptanceStatus = (global::Enterprise.TransferAcceptanceStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadString(); + break; + } + case 34: { + KeyType = input.ReadString(); + break; + } + case 42: { + Username = input.ReadString(); + break; + } + case 50: { + Status = input.ReadString(); + break; + } + case 56: { + Lock = input.ReadInt32(); + break; + } + case 64: { + UserId = input.ReadInt32(); + break; + } + case 72: { + AccountShareExpiration = input.ReadInt64(); + break; + } + case 82: { + FullName = input.ReadString(); + break; + } + case 90: { + JobTitle = input.ReadString(); + break; + } + case 96: { + TfaEnabled = input.ReadBool(); + break; + } + case 104: { + TransferAcceptanceStatus = (global::Enterprise.TransferAcceptanceStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserAlias : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAlias()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[39]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAlias() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAlias(UserAlias other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + username_ = other.username_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAlias Clone() { + return new UserAlias(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserAlias); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserAlias other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Username != other.Username) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserAlias other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportMetaData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportMetaData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[40]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportMetaData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportMetaData(ComplianceReportMetaData other) : this() { + reportUid_ = other.reportUid_; + nodeId_ = other.nodeId_; + reportName_ = other.reportName_; + dateGenerated_ = other.dateGenerated_; + runByName_ = other.runByName_; + numberOfOwners_ = other.numberOfOwners_; + numberOfRecords_ = other.numberOfRecords_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportMetaData Clone() { + return new ComplianceReportMetaData(this); + } + + /// Field number for the "reportUid" field. + public const int ReportUidFieldNumber = 1; + private pb::ByteString reportUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ReportUid { + get { return reportUid_; } + set { + reportUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + /// + /// node where the report was generated + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "reportName" field. + public const int ReportNameFieldNumber = 3; + private string reportName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ReportName { + get { return reportName_; } + set { + reportName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dateGenerated" field. + public const int DateGeneratedFieldNumber = 4; + private long dateGenerated_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DateGenerated { + get { return dateGenerated_; } + set { + dateGenerated_ = value; + } + } + + /// Field number for the "runByName" field. + public const int RunByNameFieldNumber = 5; + private string runByName_ = ""; + /// + /// user who generated the report + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RunByName { + get { return runByName_; } + set { + runByName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "numberOfOwners" field. + public const int NumberOfOwnersFieldNumber = 7; + private int numberOfOwners_; + /// + /// number of record owners included in the report + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberOfOwners { + get { return numberOfOwners_; } + set { + numberOfOwners_ = value; + } + } + + /// Field number for the "numberOfRecords" field. + public const int NumberOfRecordsFieldNumber = 8; + private int numberOfRecords_; + /// + /// number of records included in the report + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberOfRecords { + get { return numberOfRecords_; } + set { + numberOfRecords_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportMetaData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportMetaData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ReportUid != other.ReportUid) return false; + if (NodeId != other.NodeId) return false; + if (ReportName != other.ReportName) return false; + if (DateGenerated != other.DateGenerated) return false; + if (RunByName != other.RunByName) return false; + if (NumberOfOwners != other.NumberOfOwners) return false; + if (NumberOfRecords != other.NumberOfRecords) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ReportUid.Length != 0) hash ^= ReportUid.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (ReportName.Length != 0) hash ^= ReportName.GetHashCode(); + if (DateGenerated != 0L) hash ^= DateGenerated.GetHashCode(); + if (RunByName.Length != 0) hash ^= RunByName.GetHashCode(); + if (NumberOfOwners != 0) hash ^= NumberOfOwners.GetHashCode(); + if (NumberOfRecords != 0) hash ^= NumberOfRecords.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ReportUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ReportUid); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (ReportName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ReportName); + } + if (DateGenerated != 0L) { + output.WriteRawTag(32); + output.WriteInt64(DateGenerated); + } + if (RunByName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(RunByName); + } + if (NumberOfOwners != 0) { + output.WriteRawTag(56); + output.WriteInt32(NumberOfOwners); + } + if (NumberOfRecords != 0) { + output.WriteRawTag(64); + output.WriteInt32(NumberOfRecords); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ReportUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ReportUid); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (ReportName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ReportName); + } + if (DateGenerated != 0L) { + output.WriteRawTag(32); + output.WriteInt64(DateGenerated); + } + if (RunByName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(RunByName); + } + if (NumberOfOwners != 0) { + output.WriteRawTag(56); + output.WriteInt32(NumberOfOwners); + } + if (NumberOfRecords != 0) { + output.WriteRawTag(64); + output.WriteInt32(NumberOfRecords); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ReportUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ReportUid); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (ReportName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ReportName); + } + if (DateGenerated != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DateGenerated); + } + if (RunByName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RunByName); + } + if (NumberOfOwners != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfOwners); + } + if (NumberOfRecords != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfRecords); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportMetaData other) { + if (other == null) { + return; + } + if (other.ReportUid.Length != 0) { + ReportUid = other.ReportUid; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.ReportName.Length != 0) { + ReportName = other.ReportName; + } + if (other.DateGenerated != 0L) { + DateGenerated = other.DateGenerated; + } + if (other.RunByName.Length != 0) { + RunByName = other.RunByName; + } + if (other.NumberOfOwners != 0) { + NumberOfOwners = other.NumberOfOwners; + } + if (other.NumberOfRecords != 0) { + NumberOfRecords = other.NumberOfRecords; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ReportUid = input.ReadBytes(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + ReportName = input.ReadString(); + break; + } + case 32: { + DateGenerated = input.ReadInt64(); + break; + } + case 42: { + RunByName = input.ReadString(); + break; + } + case 56: { + NumberOfOwners = input.ReadInt32(); + break; + } + case 64: { + NumberOfRecords = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ReportUid = input.ReadBytes(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + ReportName = input.ReadString(); + break; + } + case 32: { + DateGenerated = input.ReadInt64(); + break; + } + case 42: { + RunByName = input.ReadString(); + break; + } + case 56: { + NumberOfOwners = input.ReadInt32(); + break; + } + case 64: { + NumberOfRecords = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ManagedNode : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManagedNode()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[41]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedNode() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedNode(ManagedNode other) : this() { + roleId_ = other.roleId_; + managedNodeId_ = other.managedNodeId_; + cascadeNodeManagement_ = other.cascadeNodeManagement_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedNode Clone() { + return new ManagedNode(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "managedNodeId" field. + public const int ManagedNodeIdFieldNumber = 2; + private long managedNodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ManagedNodeId { + get { return managedNodeId_; } + set { + managedNodeId_ = value; + } + } + + /// Field number for the "cascadeNodeManagement" field. + public const int CascadeNodeManagementFieldNumber = 3; + private bool cascadeNodeManagement_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CascadeNodeManagement { + get { return cascadeNodeManagement_; } + set { + cascadeNodeManagement_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ManagedNode); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ManagedNode other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + if (ManagedNodeId != other.ManagedNodeId) return false; + if (CascadeNodeManagement != other.CascadeNodeManagement) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (ManagedNodeId != 0L) hash ^= ManagedNodeId.GetHashCode(); + if (CascadeNodeManagement != false) hash ^= CascadeNodeManagement.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (ManagedNodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ManagedNodeId); + } + if (CascadeNodeManagement != false) { + output.WriteRawTag(24); + output.WriteBool(CascadeNodeManagement); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (ManagedNodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ManagedNodeId); + } + if (CascadeNodeManagement != false) { + output.WriteRawTag(24); + output.WriteBool(CascadeNodeManagement); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (ManagedNodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ManagedNodeId); + } + if (CascadeNodeManagement != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ManagedNode other) { + if (other == null) { + return; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.ManagedNodeId != 0L) { + ManagedNodeId = other.ManagedNodeId; + } + if (other.CascadeNodeManagement != false) { + CascadeNodeManagement = other.CascadeNodeManagement; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + ManagedNodeId = input.ReadInt64(); + break; + } + case 24: { + CascadeNodeManagement = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + ManagedNodeId = input.ReadInt64(); + break; + } + case 24: { + CascadeNodeManagement = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserManagedNode : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserManagedNode()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[42]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserManagedNode() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserManagedNode(UserManagedNode other) : this() { + nodeId_ = other.nodeId_; + cascadeNodeManagement_ = other.cascadeNodeManagement_; + privileges_ = other.privileges_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserManagedNode Clone() { + return new UserManagedNode(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "cascadeNodeManagement" field. + public const int CascadeNodeManagementFieldNumber = 2; + private bool cascadeNodeManagement_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CascadeNodeManagement { + get { return cascadeNodeManagement_; } + set { + cascadeNodeManagement_ = value; + } + } + + /// Field number for the "privileges" field. + public const int PrivilegesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_privileges_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField privileges_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Privileges { + get { return privileges_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserManagedNode); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserManagedNode other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (CascadeNodeManagement != other.CascadeNodeManagement) return false; + if(!privileges_.Equals(other.privileges_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (CascadeNodeManagement != false) hash ^= CascadeNodeManagement.GetHashCode(); + hash ^= privileges_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (CascadeNodeManagement != false) { + output.WriteRawTag(16); + output.WriteBool(CascadeNodeManagement); + } + privileges_.WriteTo(output, _repeated_privileges_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (CascadeNodeManagement != false) { + output.WriteRawTag(16); + output.WriteBool(CascadeNodeManagement); + } + privileges_.WriteTo(ref output, _repeated_privileges_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (CascadeNodeManagement != false) { + size += 1 + 1; + } + size += privileges_.CalculateSize(_repeated_privileges_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserManagedNode other) { + if (other == null) { + return; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.CascadeNodeManagement != false) { + CascadeNodeManagement = other.CascadeNodeManagement; + } + privileges_.Add(other.privileges_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 16: { + CascadeNodeManagement = input.ReadBool(); + break; + } + case 26: { + privileges_.AddEntriesFrom(input, _repeated_privileges_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 16: { + CascadeNodeManagement = input.ReadBool(); + break; + } + case 26: { + privileges_.AddEntriesFrom(ref input, _repeated_privileges_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserPrivilege : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserPrivilege()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[43]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserPrivilege() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserPrivilege(UserPrivilege other) : this() { + userManagedNodes_ = other.userManagedNodes_.Clone(); + enterpriseUserId_ = other.enterpriseUserId_; + encryptedData_ = other.encryptedData_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserPrivilege Clone() { + return new UserPrivilege(this); + } + + /// Field number for the "userManagedNodes" field. + public const int UserManagedNodesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_userManagedNodes_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.UserManagedNode.Parser); + private readonly pbc::RepeatedField userManagedNodes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserManagedNodes { + get { return userManagedNodes_; } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 3; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserPrivilege); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserPrivilege other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!userManagedNodes_.Equals(other.userManagedNodes_)) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedData != other.EncryptedData) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= userManagedNodes_.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + userManagedNodes_.WriteTo(output, _repeated_userManagedNodes_codec); + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + userManagedNodes_.WriteTo(ref output, _repeated_userManagedNodes_codec); + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += userManagedNodes_.CalculateSize(_repeated_userManagedNodes_codec); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserPrivilege other) { + if (other == null) { + return; + } + userManagedNodes_.Add(other.userManagedNodes_); + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + userManagedNodes_.AddEntriesFrom(input, _repeated_userManagedNodes_codec); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + userManagedNodes_.AddEntriesFrom(ref input, _repeated_userManagedNodes_codec); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[44]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUser(RoleUser other) : this() { + roleId_ = other.roleId_; + enterpriseUserId_ = other.enterpriseUserId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleUser Clone() { + return new RoleUser(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoleUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleUser other) { + if (other == null) { + return; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + ///possible values for privilegeType + ///UNKNOWN = 0 + ///MANAGE_USER = 1 + ///MANAGE_NODES = 2 + ///MANAGE_LICENCES = 3 + ///MANAGE_ROLES = 4 + ///MANAGE_TEAMS = 5 + ///TRANSFER_ACCOUNT = 6 + ///RUN_REPORTS = 7 + ///VIEW_TREE = 8 + ///MANAGE_BRIDGE = 9 + ///MANAGE_COMPANIES = 10 + ///ALLOCATE_POOL_LICENSES = 11 + ///APPROVE_DEVICE = 13 + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RolePrivilege : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RolePrivilege()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[45]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RolePrivilege() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RolePrivilege(RolePrivilege other) : this() { + managedNodeId_ = other.managedNodeId_; + roleId_ = other.roleId_; + privilegeType_ = other.privilegeType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RolePrivilege Clone() { + return new RolePrivilege(this); + } + + /// Field number for the "managedNodeId" field. + public const int ManagedNodeIdFieldNumber = 1; + private long managedNodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ManagedNodeId { + get { return managedNodeId_; } + set { + managedNodeId_ = value; + } + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 2; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "privilegeType" field. + public const int PrivilegeTypeFieldNumber = 3; + private string privilegeType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string PrivilegeType { + get { return privilegeType_; } + set { + privilegeType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RolePrivilege); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RolePrivilege other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ManagedNodeId != other.ManagedNodeId) return false; + if (RoleId != other.RoleId) return false; + if (PrivilegeType != other.PrivilegeType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ManagedNodeId != 0L) hash ^= ManagedNodeId.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (PrivilegeType.Length != 0) hash ^= PrivilegeType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ManagedNodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(ManagedNodeId); + } + if (RoleId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(RoleId); + } + if (PrivilegeType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PrivilegeType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ManagedNodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(ManagedNodeId); + } + if (RoleId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(RoleId); + } + if (PrivilegeType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(PrivilegeType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ManagedNodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ManagedNodeId); + } + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (PrivilegeType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(PrivilegeType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RolePrivilege other) { + if (other == null) { + return; + } + if (other.ManagedNodeId != 0L) { + ManagedNodeId = other.ManagedNodeId; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.PrivilegeType.Length != 0) { + PrivilegeType = other.PrivilegeType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ManagedNodeId = input.ReadInt64(); + break; + } + case 16: { + RoleId = input.ReadInt64(); + break; + } + case 26: { + PrivilegeType = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ManagedNodeId = input.ReadInt64(); + break; + } + case 16: { + RoleId = input.ReadInt64(); + break; + } + case 26: { + PrivilegeType = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleEnforcement : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleEnforcement()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[46]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleEnforcement() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleEnforcement(RoleEnforcement other) : this() { + roleId_ = other.roleId_; + enforcementType_ = other.enforcementType_; + value_ = other.value_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleEnforcement Clone() { + return new RoleEnforcement(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "enforcementType" field. + public const int EnforcementTypeFieldNumber = 2; + private string enforcementType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnforcementType { + get { return enforcementType_; } + set { + enforcementType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 3; + private string value_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Value { + get { return value_; } + set { + value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoleEnforcement); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleEnforcement other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + if (EnforcementType != other.EnforcementType) return false; + if (Value != other.Value) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (EnforcementType.Length != 0) hash ^= EnforcementType.GetHashCode(); + if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EnforcementType.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnforcementType); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EnforcementType.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnforcementType); + } + if (Value.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (EnforcementType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnforcementType); + } + if (Value.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleEnforcement other) { + if (other == null) { + return; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.EnforcementType.Length != 0) { + EnforcementType = other.EnforcementType; + } + if (other.Value.Length != 0) { + Value = other.Value; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + EnforcementType = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + EnforcementType = input.ReadString(); + break; + } + case 26: { + Value = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Team : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Team()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[47]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Team() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Team(Team other) : this() { + teamUid_ = other.teamUid_; + name_ = other.name_; + nodeId_ = other.nodeId_; + restrictEdit_ = other.restrictEdit_; + restrictShare_ = other.restrictShare_; + restrictView_ = other.restrictView_; + encryptedData_ = other.encryptedData_; + encryptedTeamKey_ = other.encryptedTeamKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Team Clone() { + return new Team(this); + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 3; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "restrictEdit" field. + public const int RestrictEditFieldNumber = 4; + private bool restrictEdit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictEdit { + get { return restrictEdit_; } + set { + restrictEdit_ = value; + } + } + + /// Field number for the "restrictShare" field. + public const int RestrictShareFieldNumber = 5; + private bool restrictShare_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictShare { + get { return restrictShare_; } + set { + restrictShare_ = value; + } + } + + /// Field number for the "restrictView" field. + public const int RestrictViewFieldNumber = 6; + private bool restrictView_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictView { + get { return restrictView_; } + set { + restrictView_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 7; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedTeamKey" field. + public const int EncryptedTeamKeyFieldNumber = 8; + private string encryptedTeamKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedTeamKey { + get { return encryptedTeamKey_; } + set { + encryptedTeamKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Team); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Team other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if (Name != other.Name) return false; + if (NodeId != other.NodeId) return false; + if (RestrictEdit != other.RestrictEdit) return false; + if (RestrictShare != other.RestrictShare) return false; + if (RestrictView != other.RestrictView) return false; + if (EncryptedData != other.EncryptedData) return false; + if (EncryptedTeamKey != other.EncryptedTeamKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (RestrictEdit != false) hash ^= RestrictEdit.GetHashCode(); + if (RestrictShare != false) hash ^= RestrictShare.GetHashCode(); + if (RestrictView != false) hash ^= RestrictView.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (EncryptedTeamKey.Length != 0) hash ^= EncryptedTeamKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (RestrictEdit != false) { + output.WriteRawTag(32); + output.WriteBool(RestrictEdit); + } + if (RestrictShare != false) { + output.WriteRawTag(40); + output.WriteBool(RestrictShare); + } + if (RestrictView != false) { + output.WriteRawTag(48); + output.WriteBool(RestrictView); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(58); + output.WriteString(EncryptedData); + } + if (EncryptedTeamKey.Length != 0) { + output.WriteRawTag(66); + output.WriteString(EncryptedTeamKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (RestrictEdit != false) { + output.WriteRawTag(32); + output.WriteBool(RestrictEdit); + } + if (RestrictShare != false) { + output.WriteRawTag(40); + output.WriteBool(RestrictShare); + } + if (RestrictView != false) { + output.WriteRawTag(48); + output.WriteBool(RestrictView); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(58); + output.WriteString(EncryptedData); + } + if (EncryptedTeamKey.Length != 0) { + output.WriteRawTag(66); + output.WriteString(EncryptedTeamKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (RestrictEdit != false) { + size += 1 + 1; + } + if (RestrictShare != false) { + size += 1 + 1; + } + if (RestrictView != false) { + size += 1 + 1; + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (EncryptedTeamKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedTeamKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Team other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.RestrictEdit != false) { + RestrictEdit = other.RestrictEdit; + } + if (other.RestrictShare != false) { + RestrictShare = other.RestrictShare; + } + if (other.RestrictView != false) { + RestrictView = other.RestrictView; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.EncryptedTeamKey.Length != 0) { + EncryptedTeamKey = other.EncryptedTeamKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 32: { + RestrictEdit = input.ReadBool(); + break; + } + case 40: { + RestrictShare = input.ReadBool(); + break; + } + case 48: { + RestrictView = input.ReadBool(); + break; + } + case 58: { + EncryptedData = input.ReadString(); + break; + } + case 66: { + EncryptedTeamKey = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 32: { + RestrictEdit = input.ReadBool(); + break; + } + case 40: { + RestrictShare = input.ReadBool(); + break; + } + case 48: { + RestrictView = input.ReadBool(); + break; + } + case 58: { + EncryptedData = input.ReadString(); + break; + } + case 66: { + EncryptedTeamKey = input.ReadString(); + break; + } + } + } + } + #endif + + } + + /// + ///possible value for userType + ///USER = 0; + ///ADMIN = 1; + ///ADMIN_HIDE_SHARED_FOLDERS = 2; + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[48]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamUser(TeamUser other) : this() { + teamUid_ = other.teamUid_; + enterpriseUserId_ = other.enterpriseUserId_; + userType_ = other.userType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamUser Clone() { + return new TeamUser(this); + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "userType" field. + public const int UserTypeFieldNumber = 3; + private string userType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserType { + get { return userType_; } + set { + userType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TeamUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (UserType != other.UserType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (UserType.Length != 0) hash ^= UserType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (UserType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(UserType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (UserType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(UserType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (UserType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamUser other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.UserType.Length != 0) { + UserType = other.UserType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 26: { + UserType = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 26: { + UserType = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetDistributorInfoResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetDistributorInfoResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[49]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDistributorInfoResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDistributorInfoResponse(GetDistributorInfoResponse other) : this() { + distributors_ = other.distributors_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDistributorInfoResponse Clone() { + return new GetDistributorInfoResponse(this); + } + + /// Field number for the "distributors" field. + public const int DistributorsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_distributors_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.Distributor.Parser); + private readonly pbc::RepeatedField distributors_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Distributors { + get { return distributors_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetDistributorInfoResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetDistributorInfoResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!distributors_.Equals(other.distributors_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= distributors_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + distributors_.WriteTo(output, _repeated_distributors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + distributors_.WriteTo(ref output, _repeated_distributors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += distributors_.CalculateSize(_repeated_distributors_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetDistributorInfoResponse other) { + if (other == null) { + return; + } + distributors_.Add(other.distributors_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + distributors_.AddEntriesFrom(input, _repeated_distributors_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + distributors_.AddEntriesFrom(ref input, _repeated_distributors_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Distributor : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Distributor()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[50]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Distributor() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Distributor(Distributor other) : this() { + name_ = other.name_; + mspInfos_ = other.mspInfos_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Distributor Clone() { + return new Distributor(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mspInfos" field. + public const int MspInfosFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_mspInfos_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.MspInfo.Parser); + private readonly pbc::RepeatedField mspInfos_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MspInfos { + get { return mspInfos_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Distributor); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Distributor other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if(!mspInfos_.Equals(other.mspInfos_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + hash ^= mspInfos_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + mspInfos_.WriteTo(output, _repeated_mspInfos_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + mspInfos_.WriteTo(ref output, _repeated_mspInfos_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + size += mspInfos_.CalculateSize(_repeated_mspInfos_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Distributor other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + mspInfos_.Add(other.mspInfos_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + mspInfos_.AddEntriesFrom(input, _repeated_mspInfos_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 18: { + mspInfos_.AddEntriesFrom(ref input, _repeated_mspInfos_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MspInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MspInfo()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[51]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MspInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MspInfo(MspInfo other) : this() { + enterpriseId_ = other.enterpriseId_; + enterpriseName_ = other.enterpriseName_; + allocatedLicenses_ = other.allocatedLicenses_; + allowedMcProducts_ = other.allowedMcProducts_.Clone(); + allowedAddOns_ = other.allowedAddOns_.Clone(); + maxFilePlanType_ = other.maxFilePlanType_; + managedCompanies_ = other.managedCompanies_.Clone(); + allowUnlimitedLicenses_ = other.allowUnlimitedLicenses_; + addOns_ = other.addOns_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MspInfo Clone() { + return new MspInfo(this); + } + + /// Field number for the "enterpriseId" field. + public const int EnterpriseIdFieldNumber = 1; + private int enterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EnterpriseId { + get { return enterpriseId_; } + set { + enterpriseId_ = value; + } + } + + /// Field number for the "enterpriseName" field. + public const int EnterpriseNameFieldNumber = 2; + private string enterpriseName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnterpriseName { + get { return enterpriseName_; } + set { + enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "allocatedLicenses" field. + public const int AllocatedLicensesFieldNumber = 3; + private int allocatedLicenses_; + /// + /// MAX_INT is infinity + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int AllocatedLicenses { + get { return allocatedLicenses_; } + set { + allocatedLicenses_ = value; + } + } + + /// Field number for the "allowedMcProducts" field. + public const int AllowedMcProductsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_allowedMcProducts_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField allowedMcProducts_ = new pbc::RepeatedField(); + /// + /// codes of allowed MC Products + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedMcProducts { + get { return allowedMcProducts_; } + } + + /// Field number for the "allowedAddOns" field. + public const int AllowedAddOnsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_allowedAddOns_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField allowedAddOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedAddOns { + get { return allowedAddOns_; } + } + + /// Field number for the "maxFilePlanType" field. + public const int MaxFilePlanTypeFieldNumber = 6; + private string maxFilePlanType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MaxFilePlanType { + get { return maxFilePlanType_; } + set { + maxFilePlanType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "managedCompanies" field. + public const int ManagedCompaniesFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_managedCompanies_codec + = pb::FieldCodec.ForMessage(58, global::Enterprise.ManagedCompany.Parser); + private readonly pbc::RepeatedField managedCompanies_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ManagedCompanies { + get { return managedCompanies_; } + } + + /// Field number for the "allowUnlimitedLicenses" field. + public const int AllowUnlimitedLicensesFieldNumber = 8; + private bool allowUnlimitedLicenses_; + /// + ///Allows MSP allocate Infinity as number of licenses to its MCs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AllowUnlimitedLicenses { + get { return allowUnlimitedLicenses_; } + set { + allowUnlimitedLicenses_ = value; + } + } + + /// Field number for the "addOns" field. + public const int AddOnsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_addOns_codec + = pb::FieldCodec.ForMessage(74, global::Enterprise.LicenseAddOn.Parser); + private readonly pbc::RepeatedField addOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AddOns { + get { return addOns_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MspInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MspInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseId != other.EnterpriseId) return false; + if (EnterpriseName != other.EnterpriseName) return false; + if (AllocatedLicenses != other.AllocatedLicenses) return false; + if(!allowedMcProducts_.Equals(other.allowedMcProducts_)) return false; + if(!allowedAddOns_.Equals(other.allowedAddOns_)) return false; + if (MaxFilePlanType != other.MaxFilePlanType) return false; + if(!managedCompanies_.Equals(other.managedCompanies_)) return false; + if (AllowUnlimitedLicenses != other.AllowUnlimitedLicenses) return false; + if(!addOns_.Equals(other.addOns_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseId != 0) hash ^= EnterpriseId.GetHashCode(); + if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); + if (AllocatedLicenses != 0) hash ^= AllocatedLicenses.GetHashCode(); + hash ^= allowedMcProducts_.GetHashCode(); + hash ^= allowedAddOns_.GetHashCode(); + if (MaxFilePlanType.Length != 0) hash ^= MaxFilePlanType.GetHashCode(); + hash ^= managedCompanies_.GetHashCode(); + if (AllowUnlimitedLicenses != false) hash ^= AllowUnlimitedLicenses.GetHashCode(); + hash ^= addOns_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(EnterpriseId); + } + if (EnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnterpriseName); + } + if (AllocatedLicenses != 0) { + output.WriteRawTag(24); + output.WriteInt32(AllocatedLicenses); + } + allowedMcProducts_.WriteTo(output, _repeated_allowedMcProducts_codec); + allowedAddOns_.WriteTo(output, _repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + output.WriteRawTag(50); + output.WriteString(MaxFilePlanType); + } + managedCompanies_.WriteTo(output, _repeated_managedCompanies_codec); + if (AllowUnlimitedLicenses != false) { + output.WriteRawTag(64); + output.WriteBool(AllowUnlimitedLicenses); + } + addOns_.WriteTo(output, _repeated_addOns_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(EnterpriseId); + } + if (EnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnterpriseName); + } + if (AllocatedLicenses != 0) { + output.WriteRawTag(24); + output.WriteInt32(AllocatedLicenses); + } + allowedMcProducts_.WriteTo(ref output, _repeated_allowedMcProducts_codec); + allowedAddOns_.WriteTo(ref output, _repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + output.WriteRawTag(50); + output.WriteString(MaxFilePlanType); + } + managedCompanies_.WriteTo(ref output, _repeated_managedCompanies_codec); + if (AllowUnlimitedLicenses != false) { + output.WriteRawTag(64); + output.WriteBool(AllowUnlimitedLicenses); + } + addOns_.WriteTo(ref output, _repeated_addOns_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseId); + } + if (EnterpriseName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); + } + if (AllocatedLicenses != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AllocatedLicenses); + } + size += allowedMcProducts_.CalculateSize(_repeated_allowedMcProducts_codec); + size += allowedAddOns_.CalculateSize(_repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MaxFilePlanType); + } + size += managedCompanies_.CalculateSize(_repeated_managedCompanies_codec); + if (AllowUnlimitedLicenses != false) { + size += 1 + 1; + } + size += addOns_.CalculateSize(_repeated_addOns_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MspInfo other) { + if (other == null) { + return; + } + if (other.EnterpriseId != 0) { + EnterpriseId = other.EnterpriseId; + } + if (other.EnterpriseName.Length != 0) { + EnterpriseName = other.EnterpriseName; + } + if (other.AllocatedLicenses != 0) { + AllocatedLicenses = other.AllocatedLicenses; + } + allowedMcProducts_.Add(other.allowedMcProducts_); + allowedAddOns_.Add(other.allowedAddOns_); + if (other.MaxFilePlanType.Length != 0) { + MaxFilePlanType = other.MaxFilePlanType; + } + managedCompanies_.Add(other.managedCompanies_); + if (other.AllowUnlimitedLicenses != false) { + AllowUnlimitedLicenses = other.AllowUnlimitedLicenses; + } + addOns_.Add(other.addOns_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseId = input.ReadInt32(); + break; + } + case 18: { + EnterpriseName = input.ReadString(); + break; + } + case 24: { + AllocatedLicenses = input.ReadInt32(); + break; + } + case 34: { + allowedMcProducts_.AddEntriesFrom(input, _repeated_allowedMcProducts_codec); + break; + } + case 42: { + allowedAddOns_.AddEntriesFrom(input, _repeated_allowedAddOns_codec); + break; + } + case 50: { + MaxFilePlanType = input.ReadString(); + break; + } + case 58: { + managedCompanies_.AddEntriesFrom(input, _repeated_managedCompanies_codec); + break; + } + case 64: { + AllowUnlimitedLicenses = input.ReadBool(); + break; + } + case 74: { + addOns_.AddEntriesFrom(input, _repeated_addOns_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseId = input.ReadInt32(); + break; + } + case 18: { + EnterpriseName = input.ReadString(); + break; + } + case 24: { + AllocatedLicenses = input.ReadInt32(); + break; + } + case 34: { + allowedMcProducts_.AddEntriesFrom(ref input, _repeated_allowedMcProducts_codec); + break; + } + case 42: { + allowedAddOns_.AddEntriesFrom(ref input, _repeated_allowedAddOns_codec); + break; + } + case 50: { + MaxFilePlanType = input.ReadString(); + break; + } + case 58: { + managedCompanies_.AddEntriesFrom(ref input, _repeated_managedCompanies_codec); + break; + } + case 64: { + AllowUnlimitedLicenses = input.ReadBool(); + break; + } + case 74: { + addOns_.AddEntriesFrom(ref input, _repeated_addOns_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ManagedCompany : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManagedCompany()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[52]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCompany() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCompany(ManagedCompany other) : this() { + mcEnterpriseId_ = other.mcEnterpriseId_; + mcEnterpriseName_ = other.mcEnterpriseName_; + mspNodeId_ = other.mspNodeId_; + numberOfSeats_ = other.numberOfSeats_; + numberOfUsers_ = other.numberOfUsers_; + productId_ = other.productId_; + isExpired_ = other.isExpired_; + treeKey_ = other.treeKey_; + treeKeyRole_ = other.treeKeyRole_; + filePlanType_ = other.filePlanType_; + addOns_ = other.addOns_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ManagedCompany Clone() { + return new ManagedCompany(this); + } + + /// Field number for the "mcEnterpriseId" field. + public const int McEnterpriseIdFieldNumber = 1; + private int mcEnterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int McEnterpriseId { + get { return mcEnterpriseId_; } + set { + mcEnterpriseId_ = value; + } + } + + /// Field number for the "mcEnterpriseName" field. + public const int McEnterpriseNameFieldNumber = 2; + private string mcEnterpriseName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string McEnterpriseName { + get { return mcEnterpriseName_; } + set { + mcEnterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mspNodeId" field. + public const int MspNodeIdFieldNumber = 3; + private long mspNodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MspNodeId { + get { return mspNodeId_; } + set { + mspNodeId_ = value; + } + } + + /// Field number for the "numberOfSeats" field. + public const int NumberOfSeatsFieldNumber = 4; + private int numberOfSeats_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberOfSeats { + get { return numberOfSeats_; } + set { + numberOfSeats_ = value; + } + } + + /// Field number for the "numberOfUsers" field. + public const int NumberOfUsersFieldNumber = 5; + private int numberOfUsers_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberOfUsers { + get { return numberOfUsers_; } + set { + numberOfUsers_ = value; + } + } + + /// Field number for the "productId" field. + public const int ProductIdFieldNumber = 6; + private string productId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProductId { + get { return productId_; } + set { + productId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "isExpired" field. + public const int IsExpiredFieldNumber = 7; + private bool isExpired_; + /// + /// this is also the indication of whether or not it is expired as it gets expired when it is paused. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsExpired { + get { return isExpired_; } + set { + isExpired_ = value; + } + } + + /// Field number for the "treeKey" field. + public const int TreeKeyFieldNumber = 8; + private string treeKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TreeKey { + get { return treeKey_; } + set { + treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "tree_key_role" field. + public const int TreeKeyRoleFieldNumber = 9; + private long treeKeyRole_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long TreeKeyRole { + get { return treeKeyRole_; } + set { + treeKeyRole_ = value; + } + } + + /// Field number for the "filePlanType" field. + public const int FilePlanTypeFieldNumber = 10; + private string filePlanType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FilePlanType { + get { return filePlanType_; } + set { + filePlanType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "addOns" field. + public const int AddOnsFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_addOns_codec + = pb::FieldCodec.ForMessage(90, global::Enterprise.LicenseAddOn.Parser); + private readonly pbc::RepeatedField addOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AddOns { + get { return addOns_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ManagedCompany); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ManagedCompany other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (McEnterpriseId != other.McEnterpriseId) return false; + if (McEnterpriseName != other.McEnterpriseName) return false; + if (MspNodeId != other.MspNodeId) return false; + if (NumberOfSeats != other.NumberOfSeats) return false; + if (NumberOfUsers != other.NumberOfUsers) return false; + if (ProductId != other.ProductId) return false; + if (IsExpired != other.IsExpired) return false; + if (TreeKey != other.TreeKey) return false; + if (TreeKeyRole != other.TreeKeyRole) return false; + if (FilePlanType != other.FilePlanType) return false; + if(!addOns_.Equals(other.addOns_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (McEnterpriseId != 0) hash ^= McEnterpriseId.GetHashCode(); + if (McEnterpriseName.Length != 0) hash ^= McEnterpriseName.GetHashCode(); + if (MspNodeId != 0L) hash ^= MspNodeId.GetHashCode(); + if (NumberOfSeats != 0) hash ^= NumberOfSeats.GetHashCode(); + if (NumberOfUsers != 0) hash ^= NumberOfUsers.GetHashCode(); + if (ProductId.Length != 0) hash ^= ProductId.GetHashCode(); + if (IsExpired != false) hash ^= IsExpired.GetHashCode(); + if (TreeKey.Length != 0) hash ^= TreeKey.GetHashCode(); + if (TreeKeyRole != 0L) hash ^= TreeKeyRole.GetHashCode(); + if (FilePlanType.Length != 0) hash ^= FilePlanType.GetHashCode(); + hash ^= addOns_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (McEnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(McEnterpriseId); + } + if (McEnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(McEnterpriseName); + } + if (MspNodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(MspNodeId); + } + if (NumberOfSeats != 0) { + output.WriteRawTag(32); + output.WriteInt32(NumberOfSeats); + } + if (NumberOfUsers != 0) { + output.WriteRawTag(40); + output.WriteInt32(NumberOfUsers); + } + if (ProductId.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ProductId); + } + if (IsExpired != false) { + output.WriteRawTag(56); + output.WriteBool(IsExpired); + } + if (TreeKey.Length != 0) { + output.WriteRawTag(66); + output.WriteString(TreeKey); + } + if (TreeKeyRole != 0L) { + output.WriteRawTag(72); + output.WriteInt64(TreeKeyRole); + } + if (FilePlanType.Length != 0) { + output.WriteRawTag(82); + output.WriteString(FilePlanType); + } + addOns_.WriteTo(output, _repeated_addOns_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (McEnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(McEnterpriseId); + } + if (McEnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(McEnterpriseName); + } + if (MspNodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(MspNodeId); + } + if (NumberOfSeats != 0) { + output.WriteRawTag(32); + output.WriteInt32(NumberOfSeats); + } + if (NumberOfUsers != 0) { + output.WriteRawTag(40); + output.WriteInt32(NumberOfUsers); + } + if (ProductId.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ProductId); + } + if (IsExpired != false) { + output.WriteRawTag(56); + output.WriteBool(IsExpired); + } + if (TreeKey.Length != 0) { + output.WriteRawTag(66); + output.WriteString(TreeKey); + } + if (TreeKeyRole != 0L) { + output.WriteRawTag(72); + output.WriteInt64(TreeKeyRole); + } + if (FilePlanType.Length != 0) { + output.WriteRawTag(82); + output.WriteString(FilePlanType); + } + addOns_.WriteTo(ref output, _repeated_addOns_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (McEnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(McEnterpriseId); + } + if (McEnterpriseName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(McEnterpriseName); + } + if (MspNodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MspNodeId); + } + if (NumberOfSeats != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfSeats); + } + if (NumberOfUsers != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfUsers); + } + if (ProductId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProductId); + } + if (IsExpired != false) { + size += 1 + 1; + } + if (TreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TreeKey); + } + if (TreeKeyRole != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(TreeKeyRole); + } + if (FilePlanType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FilePlanType); + } + size += addOns_.CalculateSize(_repeated_addOns_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ManagedCompany other) { + if (other == null) { + return; + } + if (other.McEnterpriseId != 0) { + McEnterpriseId = other.McEnterpriseId; + } + if (other.McEnterpriseName.Length != 0) { + McEnterpriseName = other.McEnterpriseName; + } + if (other.MspNodeId != 0L) { + MspNodeId = other.MspNodeId; + } + if (other.NumberOfSeats != 0) { + NumberOfSeats = other.NumberOfSeats; + } + if (other.NumberOfUsers != 0) { + NumberOfUsers = other.NumberOfUsers; + } + if (other.ProductId.Length != 0) { + ProductId = other.ProductId; + } + if (other.IsExpired != false) { + IsExpired = other.IsExpired; + } + if (other.TreeKey.Length != 0) { + TreeKey = other.TreeKey; + } + if (other.TreeKeyRole != 0L) { + TreeKeyRole = other.TreeKeyRole; + } + if (other.FilePlanType.Length != 0) { + FilePlanType = other.FilePlanType; + } + addOns_.Add(other.addOns_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 18: { + McEnterpriseName = input.ReadString(); + break; + } + case 24: { + MspNodeId = input.ReadInt64(); + break; + } + case 32: { + NumberOfSeats = input.ReadInt32(); + break; + } + case 40: { + NumberOfUsers = input.ReadInt32(); + break; + } + case 50: { + ProductId = input.ReadString(); + break; + } + case 56: { + IsExpired = input.ReadBool(); + break; + } + case 66: { + TreeKey = input.ReadString(); + break; + } + case 72: { + TreeKeyRole = input.ReadInt64(); + break; + } + case 82: { + FilePlanType = input.ReadString(); + break; + } + case 90: { + addOns_.AddEntriesFrom(input, _repeated_addOns_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + McEnterpriseId = input.ReadInt32(); + break; + } + case 18: { + McEnterpriseName = input.ReadString(); + break; + } + case 24: { + MspNodeId = input.ReadInt64(); + break; + } + case 32: { + NumberOfSeats = input.ReadInt32(); + break; + } + case 40: { + NumberOfUsers = input.ReadInt32(); + break; + } + case 50: { + ProductId = input.ReadString(); + break; + } + case 56: { + IsExpired = input.ReadBool(); + break; + } + case 66: { + TreeKey = input.ReadString(); + break; + } + case 72: { + TreeKeyRole = input.ReadInt64(); + break; + } + case 82: { + FilePlanType = input.ReadString(); + break; + } + case 90: { + addOns_.AddEntriesFrom(ref input, _repeated_addOns_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MSPPool : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MSPPool()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[53]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPPool() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPPool(MSPPool other) : this() { + productId_ = other.productId_; + seats_ = other.seats_; + availableSeats_ = other.availableSeats_; + stash_ = other.stash_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPPool Clone() { + return new MSPPool(this); + } + + /// Field number for the "productId" field. + public const int ProductIdFieldNumber = 1; + private string productId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ProductId { + get { return productId_; } + set { + productId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "seats" field. + public const int SeatsFieldNumber = 2; + private int seats_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Seats { + get { return seats_; } + set { + seats_ = value; + } + } + + /// Field number for the "availableSeats" field. + public const int AvailableSeatsFieldNumber = 3; + private int availableSeats_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int AvailableSeats { + get { return availableSeats_; } + set { + availableSeats_ = value; + } + } + + /// Field number for the "stash" field. + public const int StashFieldNumber = 4; + private int stash_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Stash { + get { return stash_; } + set { + stash_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MSPPool); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MSPPool other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ProductId != other.ProductId) return false; + if (Seats != other.Seats) return false; + if (AvailableSeats != other.AvailableSeats) return false; + if (Stash != other.Stash) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ProductId.Length != 0) hash ^= ProductId.GetHashCode(); + if (Seats != 0) hash ^= Seats.GetHashCode(); + if (AvailableSeats != 0) hash ^= AvailableSeats.GetHashCode(); + if (Stash != 0) hash ^= Stash.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ProductId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ProductId); + } + if (Seats != 0) { + output.WriteRawTag(16); + output.WriteInt32(Seats); + } + if (AvailableSeats != 0) { + output.WriteRawTag(24); + output.WriteInt32(AvailableSeats); + } + if (Stash != 0) { + output.WriteRawTag(32); + output.WriteInt32(Stash); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ProductId.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ProductId); + } + if (Seats != 0) { + output.WriteRawTag(16); + output.WriteInt32(Seats); + } + if (AvailableSeats != 0) { + output.WriteRawTag(24); + output.WriteInt32(AvailableSeats); + } + if (Stash != 0) { + output.WriteRawTag(32); + output.WriteInt32(Stash); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ProductId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProductId); + } + if (Seats != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Seats); + } + if (AvailableSeats != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(AvailableSeats); + } + if (Stash != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Stash); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MSPPool other) { + if (other == null) { + return; + } + if (other.ProductId.Length != 0) { + ProductId = other.ProductId; + } + if (other.Seats != 0) { + Seats = other.Seats; + } + if (other.AvailableSeats != 0) { + AvailableSeats = other.AvailableSeats; + } + if (other.Stash != 0) { + Stash = other.Stash; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ProductId = input.ReadString(); + break; + } + case 16: { + Seats = input.ReadInt32(); + break; + } + case 24: { + AvailableSeats = input.ReadInt32(); + break; + } + case 32: { + Stash = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ProductId = input.ReadString(); + break; + } + case 16: { + Seats = input.ReadInt32(); + break; + } + case 24: { + AvailableSeats = input.ReadInt32(); + break; + } + case 32: { + Stash = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MSPContact : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MSPContact()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[54]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPContact() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPContact(MSPContact other) : this() { + enterpriseId_ = other.enterpriseId_; + enterpriseName_ = other.enterpriseName_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPContact Clone() { + return new MSPContact(this); + } + + /// Field number for the "enterpriseId" field. + public const int EnterpriseIdFieldNumber = 1; + private int enterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EnterpriseId { + get { return enterpriseId_; } + set { + enterpriseId_ = value; + } + } + + /// Field number for the "enterpriseName" field. + public const int EnterpriseNameFieldNumber = 2; + private string enterpriseName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EnterpriseName { + get { return enterpriseName_; } + set { + enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MSPContact); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MSPContact other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseId != other.EnterpriseId) return false; + if (EnterpriseName != other.EnterpriseName) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseId != 0) hash ^= EnterpriseId.GetHashCode(); + if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(EnterpriseId); + } + if (EnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnterpriseName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(EnterpriseId); + } + if (EnterpriseName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EnterpriseName); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseId); + } + if (EnterpriseName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MSPContact other) { + if (other == null) { + return; + } + if (other.EnterpriseId != 0) { + EnterpriseId = other.EnterpriseId; + } + if (other.EnterpriseName.Length != 0) { + EnterpriseName = other.EnterpriseName; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseId = input.ReadInt32(); + break; + } + case 18: { + EnterpriseName = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseId = input.ReadInt32(); + break; + } + case 18: { + EnterpriseName = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LicenseAddOn : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LicenseAddOn()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[55]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicenseAddOn() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicenseAddOn(LicenseAddOn other) : this() { + name_ = other.name_; + enabled_ = other.enabled_; + isTrial_ = other.isTrial_; + expiration_ = other.expiration_; + created_ = other.created_; + seats_ = other.seats_; + activationTime_ = other.activationTime_; + includedInProduct_ = other.includedInProduct_; + apiCallCount_ = other.apiCallCount_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LicenseAddOn Clone() { + return new LicenseAddOn(this); + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 1; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enabled" field. + public const int EnabledFieldNumber = 2; + private bool enabled_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Enabled { + get { return enabled_; } + set { + enabled_ = value; + } + } + + /// Field number for the "isTrial" field. + public const int IsTrialFieldNumber = 3; + private bool isTrial_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsTrial { + get { return isTrial_; } + set { + isTrial_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 4; + private long expiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "created" field. + public const int CreatedFieldNumber = 5; + private long created_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Created { + get { return created_; } + set { + created_ = value; + } + } + + /// Field number for the "seats" field. + public const int SeatsFieldNumber = 6; + private int seats_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Seats { + get { return seats_; } + set { + seats_ = value; + } + } + + /// Field number for the "activationTime" field. + public const int ActivationTimeFieldNumber = 7; + private long activationTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ActivationTime { + get { return activationTime_; } + set { + activationTime_ = value; + } + } + + /// Field number for the "includedInProduct" field. + public const int IncludedInProductFieldNumber = 8; + private bool includedInProduct_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludedInProduct { + get { return includedInProduct_; } + set { + includedInProduct_ = value; + } + } + + /// Field number for the "apiCallCount" field. + public const int ApiCallCountFieldNumber = 9; + private int apiCallCount_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ApiCallCount { + get { return apiCallCount_; } + set { + apiCallCount_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as LicenseAddOn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LicenseAddOn other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Name != other.Name) return false; + if (Enabled != other.Enabled) return false; + if (IsTrial != other.IsTrial) return false; + if (Expiration != other.Expiration) return false; + if (Created != other.Created) return false; + if (Seats != other.Seats) return false; + if (ActivationTime != other.ActivationTime) return false; + if (IncludedInProduct != other.IncludedInProduct) return false; + if (ApiCallCount != other.ApiCallCount) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Enabled != false) hash ^= Enabled.GetHashCode(); + if (IsTrial != false) hash ^= IsTrial.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (Created != 0L) hash ^= Created.GetHashCode(); + if (Seats != 0) hash ^= Seats.GetHashCode(); + if (ActivationTime != 0L) hash ^= ActivationTime.GetHashCode(); + if (IncludedInProduct != false) hash ^= IncludedInProduct.GetHashCode(); + if (ApiCallCount != 0) hash ^= ApiCallCount.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Enabled != false) { + output.WriteRawTag(16); + output.WriteBool(Enabled); + } + if (IsTrial != false) { + output.WriteRawTag(24); + output.WriteBool(IsTrial); + } + if (Expiration != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Expiration); + } + if (Created != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Created); + } + if (Seats != 0) { + output.WriteRawTag(48); + output.WriteInt32(Seats); + } + if (ActivationTime != 0L) { + output.WriteRawTag(56); + output.WriteInt64(ActivationTime); + } + if (IncludedInProduct != false) { + output.WriteRawTag(64); + output.WriteBool(IncludedInProduct); + } + if (ApiCallCount != 0) { + output.WriteRawTag(72); + output.WriteInt32(ApiCallCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Name.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Name); + } + if (Enabled != false) { + output.WriteRawTag(16); + output.WriteBool(Enabled); + } + if (IsTrial != false) { + output.WriteRawTag(24); + output.WriteBool(IsTrial); + } + if (Expiration != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Expiration); + } + if (Created != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Created); + } + if (Seats != 0) { + output.WriteRawTag(48); + output.WriteInt32(Seats); + } + if (ActivationTime != 0L) { + output.WriteRawTag(56); + output.WriteInt64(ActivationTime); + } + if (IncludedInProduct != false) { + output.WriteRawTag(64); + output.WriteBool(IncludedInProduct); + } + if (ApiCallCount != 0) { + output.WriteRawTag(72); + output.WriteInt32(ApiCallCount); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Enabled != false) { + size += 1 + 1; + } + if (IsTrial != false) { + size += 1 + 1; + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + } + if (Created != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Created); + } + if (Seats != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Seats); + } + if (ActivationTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ActivationTime); + } + if (IncludedInProduct != false) { + size += 1 + 1; + } + if (ApiCallCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ApiCallCount); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LicenseAddOn other) { + if (other == null) { + return; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Enabled != false) { + Enabled = other.Enabled; + } + if (other.IsTrial != false) { + IsTrial = other.IsTrial; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.Created != 0L) { + Created = other.Created; + } + if (other.Seats != 0) { + Seats = other.Seats; + } + if (other.ActivationTime != 0L) { + ActivationTime = other.ActivationTime; + } + if (other.IncludedInProduct != false) { + IncludedInProduct = other.IncludedInProduct; + } + if (other.ApiCallCount != 0) { + ApiCallCount = other.ApiCallCount; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Enabled = input.ReadBool(); + break; + } + case 24: { + IsTrial = input.ReadBool(); + break; + } + case 32: { + Expiration = input.ReadInt64(); + break; + } + case 40: { + Created = input.ReadInt64(); + break; + } + case 48: { + Seats = input.ReadInt32(); + break; + } + case 56: { + ActivationTime = input.ReadInt64(); + break; + } + case 64: { + IncludedInProduct = input.ReadBool(); + break; + } + case 72: { + ApiCallCount = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Name = input.ReadString(); + break; + } + case 16: { + Enabled = input.ReadBool(); + break; + } + case 24: { + IsTrial = input.ReadBool(); + break; + } + case 32: { + Expiration = input.ReadInt64(); + break; + } + case 40: { + Created = input.ReadInt64(); + break; + } + case 48: { + Seats = input.ReadInt32(); + break; + } + case 56: { + ActivationTime = input.ReadInt64(); + break; + } + case 64: { + IncludedInProduct = input.ReadBool(); + break; + } + case 72: { + ApiCallCount = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MCDefault : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MCDefault()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[56]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MCDefault() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MCDefault(MCDefault other) : this() { + mcProduct_ = other.mcProduct_; + addOns_ = other.addOns_.Clone(); + filePlanType_ = other.filePlanType_; + maxLicenses_ = other.maxLicenses_; + fixedMaxLicenses_ = other.fixedMaxLicenses_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MCDefault Clone() { + return new MCDefault(this); + } + + /// Field number for the "mcProduct" field. + public const int McProductFieldNumber = 1; + private string mcProduct_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string McProduct { + get { return mcProduct_; } + set { + mcProduct_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "addOns" field. + public const int AddOnsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_addOns_codec + = pb::FieldCodec.ForString(18); + private readonly pbc::RepeatedField addOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AddOns { + get { return addOns_; } + } + + /// Field number for the "filePlanType" field. + public const int FilePlanTypeFieldNumber = 3; + private string filePlanType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FilePlanType { + get { return filePlanType_; } + set { + filePlanType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "maxLicenses" field. + public const int MaxLicensesFieldNumber = 4; + private int maxLicenses_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxLicenses { + get { return maxLicenses_; } + set { + maxLicenses_ = value; + } + } + + /// Field number for the "fixedMaxLicenses" field. + public const int FixedMaxLicensesFieldNumber = 5; + private bool fixedMaxLicenses_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FixedMaxLicenses { + get { return fixedMaxLicenses_; } + set { + fixedMaxLicenses_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MCDefault); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MCDefault other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (McProduct != other.McProduct) return false; + if(!addOns_.Equals(other.addOns_)) return false; + if (FilePlanType != other.FilePlanType) return false; + if (MaxLicenses != other.MaxLicenses) return false; + if (FixedMaxLicenses != other.FixedMaxLicenses) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (McProduct.Length != 0) hash ^= McProduct.GetHashCode(); + hash ^= addOns_.GetHashCode(); + if (FilePlanType.Length != 0) hash ^= FilePlanType.GetHashCode(); + if (MaxLicenses != 0) hash ^= MaxLicenses.GetHashCode(); + if (FixedMaxLicenses != false) hash ^= FixedMaxLicenses.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (McProduct.Length != 0) { + output.WriteRawTag(10); + output.WriteString(McProduct); + } + addOns_.WriteTo(output, _repeated_addOns_codec); + if (FilePlanType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(FilePlanType); + } + if (MaxLicenses != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxLicenses); + } + if (FixedMaxLicenses != false) { + output.WriteRawTag(40); + output.WriteBool(FixedMaxLicenses); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (McProduct.Length != 0) { + output.WriteRawTag(10); + output.WriteString(McProduct); + } + addOns_.WriteTo(ref output, _repeated_addOns_codec); + if (FilePlanType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(FilePlanType); + } + if (MaxLicenses != 0) { + output.WriteRawTag(32); + output.WriteInt32(MaxLicenses); + } + if (FixedMaxLicenses != false) { + output.WriteRawTag(40); + output.WriteBool(FixedMaxLicenses); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (McProduct.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(McProduct); + } + size += addOns_.CalculateSize(_repeated_addOns_codec); + if (FilePlanType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FilePlanType); + } + if (MaxLicenses != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxLicenses); + } + if (FixedMaxLicenses != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MCDefault other) { + if (other == null) { + return; + } + if (other.McProduct.Length != 0) { + McProduct = other.McProduct; + } + addOns_.Add(other.addOns_); + if (other.FilePlanType.Length != 0) { + FilePlanType = other.FilePlanType; + } + if (other.MaxLicenses != 0) { + MaxLicenses = other.MaxLicenses; + } + if (other.FixedMaxLicenses != false) { + FixedMaxLicenses = other.FixedMaxLicenses; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + McProduct = input.ReadString(); + break; + } + case 18: { + addOns_.AddEntriesFrom(input, _repeated_addOns_codec); + break; + } + case 26: { + FilePlanType = input.ReadString(); + break; + } + case 32: { + MaxLicenses = input.ReadInt32(); + break; + } + case 40: { + FixedMaxLicenses = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + McProduct = input.ReadString(); + break; + } + case 18: { + addOns_.AddEntriesFrom(ref input, _repeated_addOns_codec); + break; + } + case 26: { + FilePlanType = input.ReadString(); + break; + } + case 32: { + MaxLicenses = input.ReadInt32(); + break; + } + case 40: { + FixedMaxLicenses = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + /// permits granted by a distributor to its MSP to pass to MC + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MSPPermits : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MSPPermits()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[57]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPPermits() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPPermits(MSPPermits other) : this() { + restricted_ = other.restricted_; + maxAllowedLicenses_ = other.maxAllowedLicenses_; + allowedMcProducts_ = other.allowedMcProducts_.Clone(); + allowedAddOns_ = other.allowedAddOns_.Clone(); + maxFilePlanType_ = other.maxFilePlanType_; + allowUnlimitedLicenses_ = other.allowUnlimitedLicenses_; + mcDefaults_ = other.mcDefaults_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MSPPermits Clone() { + return new MSPPermits(this); + } + + /// Field number for the "restricted" field. + public const int RestrictedFieldNumber = 1; + private bool restricted_; + /// + /// if false then no need to check the rest + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Restricted { + get { return restricted_; } + set { + restricted_ = value; + } + } + + /// Field number for the "maxAllowedLicenses" field. + public const int MaxAllowedLicensesFieldNumber = 2; + private int maxAllowedLicenses_; + /// + /// obsolete in favor of allowUnlimitedLicenses + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxAllowedLicenses { + get { return maxAllowedLicenses_; } + set { + maxAllowedLicenses_ = value; + } + } + + /// Field number for the "allowedMcProducts" field. + public const int AllowedMcProductsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_allowedMcProducts_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField allowedMcProducts_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedMcProducts { + get { return allowedMcProducts_; } + } + + /// Field number for the "allowedAddOns" field. + public const int AllowedAddOnsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_allowedAddOns_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField allowedAddOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedAddOns { + get { return allowedAddOns_; } + } + + /// Field number for the "maxFilePlanType" field. + public const int MaxFilePlanTypeFieldNumber = 5; + private string maxFilePlanType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MaxFilePlanType { + get { return maxFilePlanType_; } + set { + maxFilePlanType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "allowUnlimitedLicenses" field. + public const int AllowUnlimitedLicensesFieldNumber = 6; + private bool allowUnlimitedLicenses_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AllowUnlimitedLicenses { + get { return allowUnlimitedLicenses_; } + set { + allowUnlimitedLicenses_ = value; + } + } + + /// Field number for the "mcDefaults" field. + public const int McDefaultsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_mcDefaults_codec + = pb::FieldCodec.ForMessage(58, global::Enterprise.MCDefault.Parser); + private readonly pbc::RepeatedField mcDefaults_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField McDefaults { + get { return mcDefaults_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MSPPermits); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MSPPermits other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Restricted != other.Restricted) return false; + if (MaxAllowedLicenses != other.MaxAllowedLicenses) return false; + if(!allowedMcProducts_.Equals(other.allowedMcProducts_)) return false; + if(!allowedAddOns_.Equals(other.allowedAddOns_)) return false; + if (MaxFilePlanType != other.MaxFilePlanType) return false; + if (AllowUnlimitedLicenses != other.AllowUnlimitedLicenses) return false; + if(!mcDefaults_.Equals(other.mcDefaults_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Restricted != false) hash ^= Restricted.GetHashCode(); + if (MaxAllowedLicenses != 0) hash ^= MaxAllowedLicenses.GetHashCode(); + hash ^= allowedMcProducts_.GetHashCode(); + hash ^= allowedAddOns_.GetHashCode(); + if (MaxFilePlanType.Length != 0) hash ^= MaxFilePlanType.GetHashCode(); + if (AllowUnlimitedLicenses != false) hash ^= AllowUnlimitedLicenses.GetHashCode(); + hash ^= mcDefaults_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Restricted != false) { + output.WriteRawTag(8); + output.WriteBool(Restricted); + } + if (MaxAllowedLicenses != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxAllowedLicenses); + } + allowedMcProducts_.WriteTo(output, _repeated_allowedMcProducts_codec); + allowedAddOns_.WriteTo(output, _repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + output.WriteRawTag(42); + output.WriteString(MaxFilePlanType); + } + if (AllowUnlimitedLicenses != false) { + output.WriteRawTag(48); + output.WriteBool(AllowUnlimitedLicenses); + } + mcDefaults_.WriteTo(output, _repeated_mcDefaults_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Restricted != false) { + output.WriteRawTag(8); + output.WriteBool(Restricted); + } + if (MaxAllowedLicenses != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxAllowedLicenses); + } + allowedMcProducts_.WriteTo(ref output, _repeated_allowedMcProducts_codec); + allowedAddOns_.WriteTo(ref output, _repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + output.WriteRawTag(42); + output.WriteString(MaxFilePlanType); + } + if (AllowUnlimitedLicenses != false) { + output.WriteRawTag(48); + output.WriteBool(AllowUnlimitedLicenses); + } + mcDefaults_.WriteTo(ref output, _repeated_mcDefaults_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Restricted != false) { + size += 1 + 1; + } + if (MaxAllowedLicenses != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxAllowedLicenses); + } + size += allowedMcProducts_.CalculateSize(_repeated_allowedMcProducts_codec); + size += allowedAddOns_.CalculateSize(_repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MaxFilePlanType); + } + if (AllowUnlimitedLicenses != false) { + size += 1 + 1; + } + size += mcDefaults_.CalculateSize(_repeated_mcDefaults_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MSPPermits other) { + if (other == null) { + return; + } + if (other.Restricted != false) { + Restricted = other.Restricted; + } + if (other.MaxAllowedLicenses != 0) { + MaxAllowedLicenses = other.MaxAllowedLicenses; + } + allowedMcProducts_.Add(other.allowedMcProducts_); + allowedAddOns_.Add(other.allowedAddOns_); + if (other.MaxFilePlanType.Length != 0) { + MaxFilePlanType = other.MaxFilePlanType; + } + if (other.AllowUnlimitedLicenses != false) { + AllowUnlimitedLicenses = other.AllowUnlimitedLicenses; + } + mcDefaults_.Add(other.mcDefaults_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Restricted = input.ReadBool(); + break; + } + case 16: { + MaxAllowedLicenses = input.ReadInt32(); + break; + } + case 26: { + allowedMcProducts_.AddEntriesFrom(input, _repeated_allowedMcProducts_codec); + break; + } + case 34: { + allowedAddOns_.AddEntriesFrom(input, _repeated_allowedAddOns_codec); + break; + } + case 42: { + MaxFilePlanType = input.ReadString(); + break; + } + case 48: { + AllowUnlimitedLicenses = input.ReadBool(); + break; + } + case 58: { + mcDefaults_.AddEntriesFrom(input, _repeated_mcDefaults_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Restricted = input.ReadBool(); + break; + } + case 16: { + MaxAllowedLicenses = input.ReadInt32(); + break; + } + case 26: { + allowedMcProducts_.AddEntriesFrom(ref input, _repeated_allowedMcProducts_codec); + break; + } + case 34: { + allowedAddOns_.AddEntriesFrom(ref input, _repeated_allowedAddOns_codec); + break; + } + case 42: { + MaxFilePlanType = input.ReadString(); + break; + } + case 48: { + AllowUnlimitedLicenses = input.ReadBool(); + break; + } + case 58: { + mcDefaults_.AddEntriesFrom(ref input, _repeated_mcDefaults_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class License : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new License()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[58]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public License() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public License(License other) : this() { + paid_ = other.paid_; + numberOfSeats_ = other.numberOfSeats_; + expiration_ = other.expiration_; + licenseKeyId_ = other.licenseKeyId_; + productTypeId_ = other.productTypeId_; + name_ = other.name_; + enterpriseLicenseId_ = other.enterpriseLicenseId_; + seatsAllocated_ = other.seatsAllocated_; + seatsPending_ = other.seatsPending_; + tier_ = other.tier_; + filePlanTypeId_ = other.filePlanTypeId_; + maxBytes_ = other.maxBytes_; + storageExpiration_ = other.storageExpiration_; + licenseStatus_ = other.licenseStatus_; + mspPool_ = other.mspPool_.Clone(); + managedBy_ = other.managedBy_ != null ? other.managedBy_.Clone() : null; + addOns_ = other.addOns_.Clone(); + nextBillingDate_ = other.nextBillingDate_; + hasMSPLegacyLog_ = other.hasMSPLegacyLog_; + mspPermits_ = other.mspPermits_ != null ? other.mspPermits_.Clone() : null; + distributor_ = other.distributor_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public License Clone() { + return new License(this); + } + + /// Field number for the "paid" field. + public const int PaidFieldNumber = 1; + private bool paid_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Paid { + get { return paid_; } + set { + paid_ = value; + } + } + + /// Field number for the "numberOfSeats" field. + public const int NumberOfSeatsFieldNumber = 2; + private int numberOfSeats_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int NumberOfSeats { + get { return numberOfSeats_; } + set { + numberOfSeats_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 3; + private long expiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "licenseKeyId" field. + public const int LicenseKeyIdFieldNumber = 4; + private int licenseKeyId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int LicenseKeyId { + get { return licenseKeyId_; } + set { + licenseKeyId_ = value; + } + } + + /// Field number for the "productTypeId" field. + public const int ProductTypeIdFieldNumber = 5; + private int productTypeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ProductTypeId { + get { return productTypeId_; } + set { + productTypeId_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 6; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseLicenseId" field. + public const int EnterpriseLicenseIdFieldNumber = 7; + private long enterpriseLicenseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseLicenseId { + get { return enterpriseLicenseId_; } + set { + enterpriseLicenseId_ = value; + } + } + + /// Field number for the "seatsAllocated" field. + public const int SeatsAllocatedFieldNumber = 8; + private int seatsAllocated_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SeatsAllocated { + get { return seatsAllocated_; } + set { + seatsAllocated_ = value; + } + } + + /// Field number for the "seatsPending" field. + public const int SeatsPendingFieldNumber = 9; + private int seatsPending_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SeatsPending { + get { return seatsPending_; } + set { + seatsPending_ = value; + } + } + + /// Field number for the "tier" field. + public const int TierFieldNumber = 10; + private int tier_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Tier { + get { return tier_; } + set { + tier_ = value; + } + } + + /// Field number for the "filePlanTypeId" field. + public const int FilePlanTypeIdFieldNumber = 11; + private int filePlanTypeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int FilePlanTypeId { + get { return filePlanTypeId_; } + set { + filePlanTypeId_ = value; + } + } + + /// Field number for the "maxBytes" field. + public const int MaxBytesFieldNumber = 12; + private long maxBytes_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long MaxBytes { + get { return maxBytes_; } + set { + maxBytes_ = value; + } + } + + /// Field number for the "storageExpiration" field. + public const int StorageExpirationFieldNumber = 13; + private long storageExpiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long StorageExpiration { + get { return storageExpiration_; } + set { + storageExpiration_ = value; + } + } + + /// Field number for the "licenseStatus" field. + public const int LicenseStatusFieldNumber = 14; + private string licenseStatus_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LicenseStatus { + get { return licenseStatus_; } + set { + licenseStatus_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "mspPool" field. + public const int MspPoolFieldNumber = 15; + private static readonly pb::FieldCodec _repeated_mspPool_codec + = pb::FieldCodec.ForMessage(122, global::Enterprise.MSPPool.Parser); + private readonly pbc::RepeatedField mspPool_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MspPool { + get { return mspPool_; } + } + + /// Field number for the "managedBy" field. + public const int ManagedByFieldNumber = 16; + private global::Enterprise.MSPContact managedBy_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.MSPContact ManagedBy { + get { return managedBy_; } + set { + managedBy_ = value; + } + } + + /// Field number for the "addOns" field. + public const int AddOnsFieldNumber = 17; + private static readonly pb::FieldCodec _repeated_addOns_codec + = pb::FieldCodec.ForMessage(138, global::Enterprise.LicenseAddOn.Parser); + private readonly pbc::RepeatedField addOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AddOns { + get { return addOns_; } + } + + /// Field number for the "nextBillingDate" field. + public const int NextBillingDateFieldNumber = 18; + private long nextBillingDate_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NextBillingDate { + get { return nextBillingDate_; } + set { + nextBillingDate_ = value; + } + } + + /// Field number for the "hasMSPLegacyLog" field. + public const int HasMSPLegacyLogFieldNumber = 19; + private bool hasMSPLegacyLog_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMSPLegacyLog { + get { return hasMSPLegacyLog_; } + set { + hasMSPLegacyLog_ = value; + } + } + + /// Field number for the "mspPermits" field. + public const int MspPermitsFieldNumber = 20; + private global::Enterprise.MSPPermits mspPermits_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.MSPPermits MspPermits { + get { return mspPermits_; } + set { + mspPermits_ = value; + } + } + + /// Field number for the "distributor" field. + public const int DistributorFieldNumber = 21; + private bool distributor_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Distributor { + get { return distributor_; } + set { + distributor_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as License); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(License other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Paid != other.Paid) return false; + if (NumberOfSeats != other.NumberOfSeats) return false; + if (Expiration != other.Expiration) return false; + if (LicenseKeyId != other.LicenseKeyId) return false; + if (ProductTypeId != other.ProductTypeId) return false; + if (Name != other.Name) return false; + if (EnterpriseLicenseId != other.EnterpriseLicenseId) return false; + if (SeatsAllocated != other.SeatsAllocated) return false; + if (SeatsPending != other.SeatsPending) return false; + if (Tier != other.Tier) return false; + if (FilePlanTypeId != other.FilePlanTypeId) return false; + if (MaxBytes != other.MaxBytes) return false; + if (StorageExpiration != other.StorageExpiration) return false; + if (LicenseStatus != other.LicenseStatus) return false; + if(!mspPool_.Equals(other.mspPool_)) return false; + if (!object.Equals(ManagedBy, other.ManagedBy)) return false; + if(!addOns_.Equals(other.addOns_)) return false; + if (NextBillingDate != other.NextBillingDate) return false; + if (HasMSPLegacyLog != other.HasMSPLegacyLog) return false; + if (!object.Equals(MspPermits, other.MspPermits)) return false; + if (Distributor != other.Distributor) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Paid != false) hash ^= Paid.GetHashCode(); + if (NumberOfSeats != 0) hash ^= NumberOfSeats.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (LicenseKeyId != 0) hash ^= LicenseKeyId.GetHashCode(); + if (ProductTypeId != 0) hash ^= ProductTypeId.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (EnterpriseLicenseId != 0L) hash ^= EnterpriseLicenseId.GetHashCode(); + if (SeatsAllocated != 0) hash ^= SeatsAllocated.GetHashCode(); + if (SeatsPending != 0) hash ^= SeatsPending.GetHashCode(); + if (Tier != 0) hash ^= Tier.GetHashCode(); + if (FilePlanTypeId != 0) hash ^= FilePlanTypeId.GetHashCode(); + if (MaxBytes != 0L) hash ^= MaxBytes.GetHashCode(); + if (StorageExpiration != 0L) hash ^= StorageExpiration.GetHashCode(); + if (LicenseStatus.Length != 0) hash ^= LicenseStatus.GetHashCode(); + hash ^= mspPool_.GetHashCode(); + if (managedBy_ != null) hash ^= ManagedBy.GetHashCode(); + hash ^= addOns_.GetHashCode(); + if (NextBillingDate != 0L) hash ^= NextBillingDate.GetHashCode(); + if (HasMSPLegacyLog != false) hash ^= HasMSPLegacyLog.GetHashCode(); + if (mspPermits_ != null) hash ^= MspPermits.GetHashCode(); + if (Distributor != false) hash ^= Distributor.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Paid != false) { + output.WriteRawTag(8); + output.WriteBool(Paid); + } + if (NumberOfSeats != 0) { + output.WriteRawTag(16); + output.WriteInt32(NumberOfSeats); + } + if (Expiration != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Expiration); + } + if (LicenseKeyId != 0) { + output.WriteRawTag(32); + output.WriteInt32(LicenseKeyId); + } + if (ProductTypeId != 0) { + output.WriteRawTag(40); + output.WriteInt32(ProductTypeId); + } + if (Name.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Name); + } + if (EnterpriseLicenseId != 0L) { + output.WriteRawTag(56); + output.WriteInt64(EnterpriseLicenseId); + } + if (SeatsAllocated != 0) { + output.WriteRawTag(64); + output.WriteInt32(SeatsAllocated); + } + if (SeatsPending != 0) { + output.WriteRawTag(72); + output.WriteInt32(SeatsPending); + } + if (Tier != 0) { + output.WriteRawTag(80); + output.WriteInt32(Tier); + } + if (FilePlanTypeId != 0) { + output.WriteRawTag(88); + output.WriteInt32(FilePlanTypeId); + } + if (MaxBytes != 0L) { + output.WriteRawTag(96); + output.WriteInt64(MaxBytes); + } + if (StorageExpiration != 0L) { + output.WriteRawTag(104); + output.WriteInt64(StorageExpiration); + } + if (LicenseStatus.Length != 0) { + output.WriteRawTag(114); + output.WriteString(LicenseStatus); + } + mspPool_.WriteTo(output, _repeated_mspPool_codec); + if (managedBy_ != null) { + output.WriteRawTag(130, 1); + output.WriteMessage(ManagedBy); + } + addOns_.WriteTo(output, _repeated_addOns_codec); + if (NextBillingDate != 0L) { + output.WriteRawTag(144, 1); + output.WriteInt64(NextBillingDate); + } + if (HasMSPLegacyLog != false) { + output.WriteRawTag(152, 1); + output.WriteBool(HasMSPLegacyLog); + } + if (mspPermits_ != null) { + output.WriteRawTag(162, 1); + output.WriteMessage(MspPermits); + } + if (Distributor != false) { + output.WriteRawTag(168, 1); + output.WriteBool(Distributor); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Paid != false) { + output.WriteRawTag(8); + output.WriteBool(Paid); + } + if (NumberOfSeats != 0) { + output.WriteRawTag(16); + output.WriteInt32(NumberOfSeats); + } + if (Expiration != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Expiration); + } + if (LicenseKeyId != 0) { + output.WriteRawTag(32); + output.WriteInt32(LicenseKeyId); + } + if (ProductTypeId != 0) { + output.WriteRawTag(40); + output.WriteInt32(ProductTypeId); + } + if (Name.Length != 0) { + output.WriteRawTag(50); + output.WriteString(Name); + } + if (EnterpriseLicenseId != 0L) { + output.WriteRawTag(56); + output.WriteInt64(EnterpriseLicenseId); + } + if (SeatsAllocated != 0) { + output.WriteRawTag(64); + output.WriteInt32(SeatsAllocated); + } + if (SeatsPending != 0) { + output.WriteRawTag(72); + output.WriteInt32(SeatsPending); + } + if (Tier != 0) { + output.WriteRawTag(80); + output.WriteInt32(Tier); + } + if (FilePlanTypeId != 0) { + output.WriteRawTag(88); + output.WriteInt32(FilePlanTypeId); + } + if (MaxBytes != 0L) { + output.WriteRawTag(96); + output.WriteInt64(MaxBytes); + } + if (StorageExpiration != 0L) { + output.WriteRawTag(104); + output.WriteInt64(StorageExpiration); + } + if (LicenseStatus.Length != 0) { + output.WriteRawTag(114); + output.WriteString(LicenseStatus); + } + mspPool_.WriteTo(ref output, _repeated_mspPool_codec); + if (managedBy_ != null) { + output.WriteRawTag(130, 1); + output.WriteMessage(ManagedBy); + } + addOns_.WriteTo(ref output, _repeated_addOns_codec); + if (NextBillingDate != 0L) { + output.WriteRawTag(144, 1); + output.WriteInt64(NextBillingDate); + } + if (HasMSPLegacyLog != false) { + output.WriteRawTag(152, 1); + output.WriteBool(HasMSPLegacyLog); + } + if (mspPermits_ != null) { + output.WriteRawTag(162, 1); + output.WriteMessage(MspPermits); + } + if (Distributor != false) { + output.WriteRawTag(168, 1); + output.WriteBool(Distributor); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Paid != false) { + size += 1 + 1; + } + if (NumberOfSeats != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfSeats); + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + } + if (LicenseKeyId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(LicenseKeyId); + } + if (ProductTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ProductTypeId); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (EnterpriseLicenseId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseLicenseId); + } + if (SeatsAllocated != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SeatsAllocated); + } + if (SeatsPending != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SeatsPending); + } + if (Tier != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Tier); + } + if (FilePlanTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(FilePlanTypeId); + } + if (MaxBytes != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxBytes); + } + if (StorageExpiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(StorageExpiration); + } + if (LicenseStatus.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LicenseStatus); + } + size += mspPool_.CalculateSize(_repeated_mspPool_codec); + if (managedBy_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(ManagedBy); + } + size += addOns_.CalculateSize(_repeated_addOns_codec); + if (NextBillingDate != 0L) { + size += 2 + pb::CodedOutputStream.ComputeInt64Size(NextBillingDate); + } + if (HasMSPLegacyLog != false) { + size += 2 + 1; + } + if (mspPermits_ != null) { + size += 2 + pb::CodedOutputStream.ComputeMessageSize(MspPermits); + } + if (Distributor != false) { + size += 2 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(License other) { + if (other == null) { + return; + } + if (other.Paid != false) { + Paid = other.Paid; + } + if (other.NumberOfSeats != 0) { + NumberOfSeats = other.NumberOfSeats; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.LicenseKeyId != 0) { + LicenseKeyId = other.LicenseKeyId; + } + if (other.ProductTypeId != 0) { + ProductTypeId = other.ProductTypeId; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.EnterpriseLicenseId != 0L) { + EnterpriseLicenseId = other.EnterpriseLicenseId; + } + if (other.SeatsAllocated != 0) { + SeatsAllocated = other.SeatsAllocated; + } + if (other.SeatsPending != 0) { + SeatsPending = other.SeatsPending; + } + if (other.Tier != 0) { + Tier = other.Tier; + } + if (other.FilePlanTypeId != 0) { + FilePlanTypeId = other.FilePlanTypeId; + } + if (other.MaxBytes != 0L) { + MaxBytes = other.MaxBytes; + } + if (other.StorageExpiration != 0L) { + StorageExpiration = other.StorageExpiration; + } + if (other.LicenseStatus.Length != 0) { + LicenseStatus = other.LicenseStatus; + } + mspPool_.Add(other.mspPool_); + if (other.managedBy_ != null) { + if (managedBy_ == null) { + ManagedBy = new global::Enterprise.MSPContact(); + } + ManagedBy.MergeFrom(other.ManagedBy); + } + addOns_.Add(other.addOns_); + if (other.NextBillingDate != 0L) { + NextBillingDate = other.NextBillingDate; + } + if (other.HasMSPLegacyLog != false) { + HasMSPLegacyLog = other.HasMSPLegacyLog; + } + if (other.mspPermits_ != null) { + if (mspPermits_ == null) { + MspPermits = new global::Enterprise.MSPPermits(); + } + MspPermits.MergeFrom(other.MspPermits); + } + if (other.Distributor != false) { + Distributor = other.Distributor; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Paid = input.ReadBool(); + break; + } + case 16: { + NumberOfSeats = input.ReadInt32(); + break; + } + case 24: { + Expiration = input.ReadInt64(); + break; + } + case 32: { + LicenseKeyId = input.ReadInt32(); + break; + } + case 40: { + ProductTypeId = input.ReadInt32(); + break; + } + case 50: { + Name = input.ReadString(); + break; + } + case 56: { + EnterpriseLicenseId = input.ReadInt64(); + break; + } + case 64: { + SeatsAllocated = input.ReadInt32(); + break; + } + case 72: { + SeatsPending = input.ReadInt32(); + break; + } + case 80: { + Tier = input.ReadInt32(); + break; + } + case 88: { + FilePlanTypeId = input.ReadInt32(); + break; + } + case 96: { + MaxBytes = input.ReadInt64(); + break; + } + case 104: { + StorageExpiration = input.ReadInt64(); + break; + } + case 114: { + LicenseStatus = input.ReadString(); + break; + } + case 122: { + mspPool_.AddEntriesFrom(input, _repeated_mspPool_codec); + break; + } + case 130: { + if (managedBy_ == null) { + ManagedBy = new global::Enterprise.MSPContact(); + } + input.ReadMessage(ManagedBy); + break; + } + case 138: { + addOns_.AddEntriesFrom(input, _repeated_addOns_codec); + break; + } + case 144: { + NextBillingDate = input.ReadInt64(); + break; + } + case 152: { + HasMSPLegacyLog = input.ReadBool(); + break; + } + case 162: { + if (mspPermits_ == null) { + MspPermits = new global::Enterprise.MSPPermits(); + } + input.ReadMessage(MspPermits); + break; + } + case 168: { + Distributor = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Paid = input.ReadBool(); + break; + } + case 16: { + NumberOfSeats = input.ReadInt32(); + break; + } + case 24: { + Expiration = input.ReadInt64(); + break; + } + case 32: { + LicenseKeyId = input.ReadInt32(); + break; + } + case 40: { + ProductTypeId = input.ReadInt32(); + break; + } + case 50: { + Name = input.ReadString(); + break; + } + case 56: { + EnterpriseLicenseId = input.ReadInt64(); + break; + } + case 64: { + SeatsAllocated = input.ReadInt32(); + break; + } + case 72: { + SeatsPending = input.ReadInt32(); + break; + } + case 80: { + Tier = input.ReadInt32(); + break; + } + case 88: { + FilePlanTypeId = input.ReadInt32(); + break; + } + case 96: { + MaxBytes = input.ReadInt64(); + break; + } + case 104: { + StorageExpiration = input.ReadInt64(); + break; + } + case 114: { + LicenseStatus = input.ReadString(); + break; + } + case 122: { + mspPool_.AddEntriesFrom(ref input, _repeated_mspPool_codec); + break; + } + case 130: { + if (managedBy_ == null) { + ManagedBy = new global::Enterprise.MSPContact(); + } + input.ReadMessage(ManagedBy); + break; + } + case 138: { + addOns_.AddEntriesFrom(ref input, _repeated_addOns_codec); + break; + } + case 144: { + NextBillingDate = input.ReadInt64(); + break; + } + case 152: { + HasMSPLegacyLog = input.ReadBool(); + break; + } + case 162: { + if (mspPermits_ == null) { + MspPermits = new global::Enterprise.MSPPermits(); + } + input.ReadMessage(MspPermits); + break; + } + case 168: { + Distributor = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Bridge : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Bridge()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[59]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Bridge() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Bridge(Bridge other) : this() { + bridgeId_ = other.bridgeId_; + nodeId_ = other.nodeId_; + wanIpEnforcement_ = other.wanIpEnforcement_; + lanIpEnforcement_ = other.lanIpEnforcement_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Bridge Clone() { + return new Bridge(this); + } + + /// Field number for the "bridgeId" field. + public const int BridgeIdFieldNumber = 1; + private long bridgeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long BridgeId { + get { return bridgeId_; } + set { + bridgeId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "wanIpEnforcement" field. + public const int WanIpEnforcementFieldNumber = 3; + private string wanIpEnforcement_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string WanIpEnforcement { + get { return wanIpEnforcement_; } + set { + wanIpEnforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "lanIpEnforcement" field. + public const int LanIpEnforcementFieldNumber = 4; + private string lanIpEnforcement_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LanIpEnforcement { + get { return lanIpEnforcement_; } + set { + lanIpEnforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 5; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Bridge); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Bridge other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (BridgeId != other.BridgeId) return false; + if (NodeId != other.NodeId) return false; + if (WanIpEnforcement != other.WanIpEnforcement) return false; + if (LanIpEnforcement != other.LanIpEnforcement) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (BridgeId != 0L) hash ^= BridgeId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (WanIpEnforcement.Length != 0) hash ^= WanIpEnforcement.GetHashCode(); + if (LanIpEnforcement.Length != 0) hash ^= LanIpEnforcement.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (BridgeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(BridgeId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (WanIpEnforcement.Length != 0) { + output.WriteRawTag(26); + output.WriteString(WanIpEnforcement); + } + if (LanIpEnforcement.Length != 0) { + output.WriteRawTag(34); + output.WriteString(LanIpEnforcement); + } + if (Status.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (BridgeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(BridgeId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (WanIpEnforcement.Length != 0) { + output.WriteRawTag(26); + output.WriteString(WanIpEnforcement); + } + if (LanIpEnforcement.Length != 0) { + output.WriteRawTag(34); + output.WriteString(LanIpEnforcement); + } + if (Status.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (BridgeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(BridgeId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (WanIpEnforcement.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(WanIpEnforcement); + } + if (LanIpEnforcement.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LanIpEnforcement); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Bridge other) { + if (other == null) { + return; + } + if (other.BridgeId != 0L) { + BridgeId = other.BridgeId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.WanIpEnforcement.Length != 0) { + WanIpEnforcement = other.WanIpEnforcement; + } + if (other.LanIpEnforcement.Length != 0) { + LanIpEnforcement = other.LanIpEnforcement; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + BridgeId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + WanIpEnforcement = input.ReadString(); + break; + } + case 34: { + LanIpEnforcement = input.ReadString(); + break; + } + case 42: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + BridgeId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + WanIpEnforcement = input.ReadString(); + break; + } + case 34: { + LanIpEnforcement = input.ReadString(); + break; + } + case 42: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Scim : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Scim()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[60]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Scim() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Scim(Scim other) : this() { + scimId_ = other.scimId_; + nodeId_ = other.nodeId_; + status_ = other.status_; + lastSynced_ = other.lastSynced_; + rolePrefix_ = other.rolePrefix_; + uniqueGroups_ = other.uniqueGroups_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Scim Clone() { + return new Scim(this); + } + + /// Field number for the "scimId" field. + public const int ScimIdFieldNumber = 1; + private long scimId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ScimId { + get { return scimId_; } + set { + scimId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "lastSynced" field. + public const int LastSyncedFieldNumber = 4; + private long lastSynced_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LastSynced { + get { return lastSynced_; } + set { + lastSynced_ = value; + } + } + + /// Field number for the "rolePrefix" field. + public const int RolePrefixFieldNumber = 5; + private string rolePrefix_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RolePrefix { + get { return rolePrefix_; } + set { + rolePrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "uniqueGroups" field. + public const int UniqueGroupsFieldNumber = 6; + private bool uniqueGroups_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UniqueGroups { + get { return uniqueGroups_; } + set { + uniqueGroups_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Scim); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Scim other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ScimId != other.ScimId) return false; + if (NodeId != other.NodeId) return false; + if (Status != other.Status) return false; + if (LastSynced != other.LastSynced) return false; + if (RolePrefix != other.RolePrefix) return false; + if (UniqueGroups != other.UniqueGroups) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ScimId != 0L) hash ^= ScimId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (LastSynced != 0L) hash ^= LastSynced.GetHashCode(); + if (RolePrefix.Length != 0) hash ^= RolePrefix.GetHashCode(); + if (UniqueGroups != false) hash ^= UniqueGroups.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ScimId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(ScimId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (LastSynced != 0L) { + output.WriteRawTag(32); + output.WriteInt64(LastSynced); + } + if (RolePrefix.Length != 0) { + output.WriteRawTag(42); + output.WriteString(RolePrefix); + } + if (UniqueGroups != false) { + output.WriteRawTag(48); + output.WriteBool(UniqueGroups); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ScimId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(ScimId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (LastSynced != 0L) { + output.WriteRawTag(32); + output.WriteInt64(LastSynced); + } + if (RolePrefix.Length != 0) { + output.WriteRawTag(42); + output.WriteString(RolePrefix); + } + if (UniqueGroups != false) { + output.WriteRawTag(48); + output.WriteBool(UniqueGroups); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ScimId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ScimId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (LastSynced != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastSynced); + } + if (RolePrefix.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RolePrefix); + } + if (UniqueGroups != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Scim other) { + if (other == null) { + return; + } + if (other.ScimId != 0L) { + ScimId = other.ScimId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.LastSynced != 0L) { + LastSynced = other.LastSynced; + } + if (other.RolePrefix.Length != 0) { + RolePrefix = other.RolePrefix; + } + if (other.UniqueGroups != false) { + UniqueGroups = other.UniqueGroups; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ScimId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 32: { + LastSynced = input.ReadInt64(); + break; + } + case 42: { + RolePrefix = input.ReadString(); + break; + } + case 48: { + UniqueGroups = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ScimId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 32: { + LastSynced = input.ReadInt64(); + break; + } + case 42: { + RolePrefix = input.ReadString(); + break; + } + case 48: { + UniqueGroups = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EmailProvision : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmailProvision()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[61]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmailProvision() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmailProvision(EmailProvision other) : this() { + id_ = other.id_; + nodeId_ = other.nodeId_; + domain_ = other.domain_; + method_ = other.method_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EmailProvision Clone() { + return new EmailProvision(this); + } + + /// Field number for the "id" field. + public const int IdFieldNumber = 1; + private int id_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Id { + get { return id_; } + set { + id_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "domain" field. + public const int DomainFieldNumber = 3; + private string domain_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Domain { + get { return domain_; } + set { + domain_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "method" field. + public const int MethodFieldNumber = 4; + private string method_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Method { + get { return method_; } + set { + method_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EmailProvision); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EmailProvision other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Id != other.Id) return false; + if (NodeId != other.NodeId) return false; + if (Domain != other.Domain) return false; + if (Method != other.Method) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Id != 0) hash ^= Id.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (Domain.Length != 0) hash ^= Domain.GetHashCode(); + if (Method.Length != 0) hash ^= Method.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (Domain.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Domain); + } + if (Method.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Method); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Id != 0) { + output.WriteRawTag(8); + output.WriteInt32(Id); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (Domain.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Domain); + } + if (Method.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Method); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Id != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (Domain.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Domain); + } + if (Method.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Method); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EmailProvision other) { + if (other == null) { + return; + } + if (other.Id != 0) { + Id = other.Id; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.Domain.Length != 0) { + Domain = other.Domain; + } + if (other.Method.Length != 0) { + Method = other.Method; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + Domain = input.ReadString(); + break; + } + case 34: { + Method = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Id = input.ReadInt32(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + Domain = input.ReadString(); + break; + } + case 34: { + Method = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class QueuedTeam : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueuedTeam()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[62]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueuedTeam() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueuedTeam(QueuedTeam other) : this() { + teamUid_ = other.teamUid_; + name_ = other.name_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueuedTeam Clone() { + return new QueuedTeam(this); + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 2; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 3; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 4; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as QueuedTeam); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(QueuedTeam other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if (Name != other.Name) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(QueuedTeam other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 34: { + EncryptedData = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 34: { + EncryptedData = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class QueuedTeamUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueuedTeamUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[63]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueuedTeamUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueuedTeamUser(QueuedTeamUser other) : this() { + teamUid_ = other.teamUid_; + users_ = other.users_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public QueuedTeamUser Clone() { + return new QueuedTeamUser(this); + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as QueuedTeamUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(QueuedTeamUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if(!users_.Equals(other.users_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + hash ^= users_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + users_.WriteTo(output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + users_.WriteTo(ref output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + size += users_.CalculateSize(_repeated_users_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(QueuedTeamUser other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + users_.Add(other.users_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: + case 16: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: + case 16: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// This is not used in an API yet. + /// It can be used in a new teams_add API if we do one. + /// It is currently used internally when creating teams. + /// + /// The command is successful if at least one of the teams was added successfully. + /// The top-level errorMessage field is used only when the top-level result is "error". + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsAddResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsAddResult()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[64]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsAddResult() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsAddResult(TeamsAddResult other) : this() { + successfulTeamAdd_ = other.successfulTeamAdd_.Clone(); + unsuccessfulTeamAdd_ = other.unsuccessfulTeamAdd_.Clone(); + result_ = other.result_; + errorMessage_ = other.errorMessage_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsAddResult Clone() { + return new TeamsAddResult(this); + } + + /// Field number for the "successfulTeamAdd" field. + public const int SuccessfulTeamAddFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_successfulTeamAdd_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.TeamAddResult.Parser); + private readonly pbc::RepeatedField successfulTeamAdd_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SuccessfulTeamAdd { + get { return successfulTeamAdd_; } + } + + /// Field number for the "unsuccessfulTeamAdd" field. + public const int UnsuccessfulTeamAddFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_unsuccessfulTeamAdd_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.TeamAddResult.Parser); + private readonly pbc::RepeatedField unsuccessfulTeamAdd_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UnsuccessfulTeamAdd { + get { return unsuccessfulTeamAdd_; } + } + + /// Field number for the "result" field. + public const int ResultFieldNumber = 3; + private string result_ = ""; + /// + /// "success" or "fail" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Result { + get { return result_; } + set { + result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "errorMessage" field. + public const int ErrorMessageFieldNumber = 4; + private string errorMessage_ = ""; + /// + /// only used if result == "fail" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ErrorMessage { + get { return errorMessage_; } + set { + errorMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TeamsAddResult); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsAddResult other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!successfulTeamAdd_.Equals(other.successfulTeamAdd_)) return false; + if(!unsuccessfulTeamAdd_.Equals(other.unsuccessfulTeamAdd_)) return false; + if (Result != other.Result) return false; + if (ErrorMessage != other.ErrorMessage) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= successfulTeamAdd_.GetHashCode(); + hash ^= unsuccessfulTeamAdd_.GetHashCode(); + if (Result.Length != 0) hash ^= Result.GetHashCode(); + if (ErrorMessage.Length != 0) hash ^= ErrorMessage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + successfulTeamAdd_.WriteTo(output, _repeated_successfulTeamAdd_codec); + unsuccessfulTeamAdd_.WriteTo(output, _repeated_unsuccessfulTeamAdd_codec); + if (Result.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Result); + } + if (ErrorMessage.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ErrorMessage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + successfulTeamAdd_.WriteTo(ref output, _repeated_successfulTeamAdd_codec); + unsuccessfulTeamAdd_.WriteTo(ref output, _repeated_unsuccessfulTeamAdd_codec); + if (Result.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Result); + } + if (ErrorMessage.Length != 0) { + output.WriteRawTag(34); + output.WriteString(ErrorMessage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += successfulTeamAdd_.CalculateSize(_repeated_successfulTeamAdd_codec); + size += unsuccessfulTeamAdd_.CalculateSize(_repeated_unsuccessfulTeamAdd_codec); + if (Result.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Result); + } + if (ErrorMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorMessage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsAddResult other) { + if (other == null) { + return; + } + successfulTeamAdd_.Add(other.successfulTeamAdd_); + unsuccessfulTeamAdd_.Add(other.unsuccessfulTeamAdd_); + if (other.Result.Length != 0) { + Result = other.Result; + } + if (other.ErrorMessage.Length != 0) { + ErrorMessage = other.ErrorMessage; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + successfulTeamAdd_.AddEntriesFrom(input, _repeated_successfulTeamAdd_codec); + break; + } + case 18: { + unsuccessfulTeamAdd_.AddEntriesFrom(input, _repeated_unsuccessfulTeamAdd_codec); + break; + } + case 26: { + Result = input.ReadString(); + break; + } + case 34: { + ErrorMessage = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + successfulTeamAdd_.AddEntriesFrom(ref input, _repeated_successfulTeamAdd_codec); + break; + } + case 18: { + unsuccessfulTeamAdd_.AddEntriesFrom(ref input, _repeated_unsuccessfulTeamAdd_codec); + break; + } + case 26: { + Result = input.ReadString(); + break; + } + case 34: { + ErrorMessage = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamAddResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamAddResult()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[65]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamAddResult() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamAddResult(TeamAddResult other) : this() { + team_ = other.team_ != null ? other.team_.Clone() : null; + result_ = other.result_; + errorMessage_ = other.errorMessage_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamAddResult Clone() { + return new TeamAddResult(this); + } + + /// Field number for the "team" field. + public const int TeamFieldNumber = 1; + private global::Enterprise.Team team_; + /// + /// team info. May not be completely filled out + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.Team Team { + get { return team_; } + set { + team_ = value; + } + } + + /// Field number for the "result" field. + public const int ResultFieldNumber = 2; + private string result_ = ""; + /// + /// "success" or "fail" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Result { + get { return result_; } + set { + result_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "errorMessage" field. + public const int ErrorMessageFieldNumber = 3; + private string errorMessage_ = ""; + /// + /// only used if result == "fail" + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ErrorMessage { + get { return errorMessage_; } + set { + errorMessage_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TeamAddResult); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamAddResult other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(Team, other.Team)) return false; + if (Result != other.Result) return false; + if (ErrorMessage != other.ErrorMessage) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (team_ != null) hash ^= Team.GetHashCode(); + if (Result.Length != 0) hash ^= Result.GetHashCode(); + if (ErrorMessage.Length != 0) hash ^= ErrorMessage.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (team_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Team); + } + if (Result.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Result); + } + if (ErrorMessage.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ErrorMessage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (team_ != null) { + output.WriteRawTag(10); + output.WriteMessage(Team); + } + if (Result.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Result); + } + if (ErrorMessage.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ErrorMessage); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (team_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Team); + } + if (Result.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Result); + } + if (ErrorMessage.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorMessage); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamAddResult other) { + if (other == null) { + return; + } + if (other.team_ != null) { + if (team_ == null) { + Team = new global::Enterprise.Team(); + } + Team.MergeFrom(other.Team); + } + if (other.Result.Length != 0) { + Result = other.Result; + } + if (other.ErrorMessage.Length != 0) { + ErrorMessage = other.ErrorMessage; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (team_ == null) { + Team = new global::Enterprise.Team(); + } + input.ReadMessage(Team); + break; + } + case 18: { + Result = input.ReadString(); + break; + } + case 26: { + ErrorMessage = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (team_ == null) { + Team = new global::Enterprise.Team(); + } + input.ReadMessage(Team); + break; + } + case 18: { + Result = input.ReadString(); + break; + } + case 26: { + ErrorMessage = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoService : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoService()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[66]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoService() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoService(SsoService other) : this() { + ssoServiceProviderId_ = other.ssoServiceProviderId_; + nodeId_ = other.nodeId_; + name_ = other.name_; + spUrl_ = other.spUrl_; + inviteNewUsers_ = other.inviteNewUsers_; + active_ = other.active_; + isCloud_ = other.isCloud_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoService Clone() { + return new SsoService(this); + } + + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 1; + private long ssoServiceProviderId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long SsoServiceProviderId { + get { return ssoServiceProviderId_; } + set { + ssoServiceProviderId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 3; + private string name_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } + set { + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sp_url" field. + public const int SpUrlFieldNumber = 4; + private string spUrl_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SpUrl { + get { return spUrl_; } + set { + spUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "inviteNewUsers" field. + public const int InviteNewUsersFieldNumber = 5; + private bool inviteNewUsers_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool InviteNewUsers { + get { return inviteNewUsers_; } + set { + inviteNewUsers_ = value; + } + } + + /// Field number for the "active" field. + public const int ActiveFieldNumber = 6; + private bool active_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Active { + get { return active_; } + set { + active_ = value; + } + } + + /// Field number for the "isCloud" field. + public const int IsCloudFieldNumber = 7; + private bool isCloud_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsCloud { + get { return isCloud_; } + set { + isCloud_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoService); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoService other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + if (NodeId != other.NodeId) return false; + if (Name != other.Name) return false; + if (SpUrl != other.SpUrl) return false; + if (InviteNewUsers != other.InviteNewUsers) return false; + if (Active != other.Active) return false; + if (IsCloud != other.IsCloud) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SsoServiceProviderId != 0L) hash ^= SsoServiceProviderId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (SpUrl.Length != 0) hash ^= SpUrl.GetHashCode(); + if (InviteNewUsers != false) hash ^= InviteNewUsers.GetHashCode(); + if (Active != false) hash ^= Active.GetHashCode(); + if (IsCloud != false) hash ^= IsCloud.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoServiceProviderId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(SsoServiceProviderId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (SpUrl.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SpUrl); + } + if (InviteNewUsers != false) { + output.WriteRawTag(40); + output.WriteBool(InviteNewUsers); + } + if (Active != false) { + output.WriteRawTag(48); + output.WriteBool(Active); + } + if (IsCloud != false) { + output.WriteRawTag(56); + output.WriteBool(IsCloud); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(SsoServiceProviderId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (SpUrl.Length != 0) { + output.WriteRawTag(34); + output.WriteString(SpUrl); + } + if (InviteNewUsers != false) { + output.WriteRawTag(40); + output.WriteBool(InviteNewUsers); + } + if (Active != false) { + output.WriteRawTag(48); + output.WriteBool(Active); + } + if (IsCloud != false) { + output.WriteRawTag(56); + output.WriteBool(IsCloud); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SsoServiceProviderId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(SsoServiceProviderId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (SpUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SpUrl); + } + if (InviteNewUsers != false) { + size += 1 + 1; + } + if (Active != false) { + size += 1 + 1; + } + if (IsCloud != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoService other) { + if (other == null) { + return; + } + if (other.SsoServiceProviderId != 0L) { + SsoServiceProviderId = other.SsoServiceProviderId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.SpUrl.Length != 0) { + SpUrl = other.SpUrl; + } + if (other.InviteNewUsers != false) { + InviteNewUsers = other.InviteNewUsers; + } + if (other.Active != false) { + Active = other.Active; + } + if (other.IsCloud != false) { + IsCloud = other.IsCloud; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + SsoServiceProviderId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + case 34: { + SpUrl = input.ReadString(); + break; + } + case 40: { + InviteNewUsers = input.ReadBool(); + break; + } + case 48: { + Active = input.ReadBool(); + break; + } + case 56: { + IsCloud = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + case 34: { + SpUrl = input.ReadString(); + break; + } + case 40: { + InviteNewUsers = input.ReadBool(); + break; + } + case 48: { + Active = input.ReadBool(); + break; + } + case 56: { + IsCloud = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ReportFilterUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReportFilterUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[67]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportFilterUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportFilterUser(ReportFilterUser other) : this() { + userId_ = other.userId_; + email_ = other.email_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ReportFilterUser Clone() { + return new ReportFilterUser(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "email" field. + public const int EmailFieldNumber = 2; + private string email_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } + set { + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ReportFilterUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ReportFilterUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (Email != other.Email) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (Email.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (Email.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ReportFilterUser other) { + if (other == null) { + return; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.Email.Length != 0) { + Email = other.Email; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + Email = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + Email = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeviceRequestForAdminApproval : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceRequestForAdminApproval()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[68]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceRequestForAdminApproval() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceRequestForAdminApproval(DeviceRequestForAdminApproval other) : this() { + deviceId_ = other.deviceId_; + enterpriseUserId_ = other.enterpriseUserId_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + devicePublicKey_ = other.devicePublicKey_; + deviceName_ = other.deviceName_; + clientVersion_ = other.clientVersion_; + deviceType_ = other.deviceType_; + date_ = other.date_; + ipAddress_ = other.ipAddress_; + location_ = other.location_; + email_ = other.email_; + accountUid_ = other.accountUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeviceRequestForAdminApproval Clone() { + return new DeviceRequestForAdminApproval(this); + } + + /// Field number for the "deviceId" field. + public const int DeviceIdFieldNumber = 1; + private long deviceId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DeviceId { + get { return deviceId_; } + set { + deviceId_ = value; + } + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 2; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 3; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } + set { + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "devicePublicKey" field. + public const int DevicePublicKeyFieldNumber = 4; + private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DevicePublicKey { + get { return devicePublicKey_; } + set { + devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceName" field. + public const int DeviceNameFieldNumber = 5; + private string deviceName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceName { + get { return deviceName_; } + set { + deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 6; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "deviceType" field. + public const int DeviceTypeFieldNumber = 7; + private string deviceType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DeviceType { + get { return deviceType_; } + set { + deviceType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "date" field. + public const int DateFieldNumber = 8; + private long date_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Date { + get { return date_; } + set { + date_ = value; + } + } + + /// Field number for the "ipAddress" field. + public const int IpAddressFieldNumber = 9; + private string ipAddress_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string IpAddress { + get { return ipAddress_; } + set { + ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "location" field. + public const int LocationFieldNumber = 10; + private string location_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Location { + get { return location_; } + set { + location_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "email" field. + public const int EmailFieldNumber = 11; + private string email_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } + set { + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 12; + private pb::ByteString accountUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AccountUid { + get { return accountUid_; } + set { + accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeviceRequestForAdminApproval); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeviceRequestForAdminApproval other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (DeviceId != other.DeviceId) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (DevicePublicKey != other.DevicePublicKey) return false; + if (DeviceName != other.DeviceName) return false; + if (ClientVersion != other.ClientVersion) return false; + if (DeviceType != other.DeviceType) return false; + if (Date != other.Date) return false; + if (IpAddress != other.IpAddress) return false; + if (Location != other.Location) return false; + if (Email != other.Email) return false; + if (AccountUid != other.AccountUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (DeviceId != 0L) hash ^= DeviceId.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); + if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); + if (DeviceType.Length != 0) hash ^= DeviceType.GetHashCode(); + if (Date != 0L) hash ^= Date.GetHashCode(); + if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); + if (Location.Length != 0) hash ^= Location.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (DeviceId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DeviceId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedDeviceToken); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(DeviceName); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ClientVersion); + } + if (DeviceType.Length != 0) { + output.WriteRawTag(58); + output.WriteString(DeviceType); + } + if (Date != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Date); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(74); + output.WriteString(IpAddress); + } + if (Location.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Location); + } + if (Email.Length != 0) { + output.WriteRawTag(90); + output.WriteString(Email); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DeviceId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DeviceId); + } + if (EnterpriseUserId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedDeviceToken); + } + if (DevicePublicKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(DevicePublicKey); + } + if (DeviceName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(DeviceName); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(50); + output.WriteString(ClientVersion); + } + if (DeviceType.Length != 0) { + output.WriteRawTag(58); + output.WriteString(DeviceType); + } + if (Date != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Date); + } + if (IpAddress.Length != 0) { + output.WriteRawTag(74); + output.WriteString(IpAddress); + } + if (Location.Length != 0) { + output.WriteRawTag(82); + output.WriteString(Location); + } + if (Email.Length != 0) { + output.WriteRawTag(90); + output.WriteString(Email); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (DeviceId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeviceId); + } + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (DevicePublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); + } + if (DeviceName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); + } + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } + if (DeviceType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceType); + } + if (Date != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Date); + } + if (IpAddress.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + } + if (Location.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Location); + } + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeviceRequestForAdminApproval other) { + if (other == null) { + return; + } + if (other.DeviceId != 0L) { + DeviceId = other.DeviceId; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.DevicePublicKey.Length != 0) { + DevicePublicKey = other.DevicePublicKey; + } + if (other.DeviceName.Length != 0) { + DeviceName = other.DeviceName; + } + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } + if (other.DeviceType.Length != 0) { + DeviceType = other.DeviceType; + } + if (other.Date != 0L) { + Date = other.Date; + } + if (other.IpAddress.Length != 0) { + IpAddress = other.IpAddress; + } + if (other.Location.Length != 0) { + Location = other.Location; + } + if (other.Email.Length != 0) { + Email = other.Email; + } + if (other.AccountUid.Length != 0) { + AccountUid = other.AccountUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + DeviceId = input.ReadInt64(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 26: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); + break; + } + case 42: { + DeviceName = input.ReadString(); + break; + } + case 50: { + ClientVersion = input.ReadString(); + break; + } + case 58: { + DeviceType = input.ReadString(); + break; + } + case 64: { + Date = input.ReadInt64(); + break; + } + case 74: { + IpAddress = input.ReadString(); + break; + } + case 82: { + Location = input.ReadString(); + break; + } + case 90: { + Email = input.ReadString(); + break; + } + case 98: { + AccountUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + DeviceId = input.ReadInt64(); + break; + } + case 16: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 26: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 34: { + DevicePublicKey = input.ReadBytes(); + break; + } + case 42: { + DeviceName = input.ReadString(); + break; + } + case 50: { + ClientVersion = input.ReadString(); + break; + } + case 58: { + DeviceType = input.ReadString(); + break; + } + case 64: { + Date = input.ReadInt64(); + break; + } + case 74: { + IpAddress = input.ReadString(); + break; + } + case 82: { + Location = input.ReadString(); + break; + } + case 90: { + Email = input.ReadString(); + break; + } + case 98: { + AccountUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[69]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseData(EnterpriseData other) : this() { + entity_ = other.entity_; + delete_ = other.delete_; + data_ = other.data_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseData Clone() { + return new EnterpriseData(this); + } + + /// Field number for the "entity" field. + public const int EntityFieldNumber = 1; + private global::Enterprise.EnterpriseDataEntity entity_ = global::Enterprise.EnterpriseDataEntity.Unknown; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EnterpriseDataEntity Entity { + get { return entity_; } + set { + entity_ = value; + } + } + + /// Field number for the "delete" field. + public const int DeleteFieldNumber = 2; + private bool delete_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Delete { + get { return delete_; } + set { + delete_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_data_codec + = pb::FieldCodec.ForBytes(26); + private readonly pbc::RepeatedField data_ = new pbc::RepeatedField(); + /// + /// If delete==false then it's list of entity objects (Node, Users etc...). If delete==true then those objects have only ids but no other info. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Data { + get { return data_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Entity != other.Entity) return false; + if (Delete != other.Delete) return false; + if(!data_.Equals(other.data_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) hash ^= Entity.GetHashCode(); + if (Delete != false) hash ^= Delete.GetHashCode(); + hash ^= data_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Entity); + } + if (Delete != false) { + output.WriteRawTag(16); + output.WriteBool(Delete); + } + data_.WriteTo(output, _repeated_data_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) Entity); + } + if (Delete != false) { + output.WriteRawTag(16); + output.WriteBool(Delete); + } + data_.WriteTo(ref output, _repeated_data_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Entity); + } + if (Delete != false) { + size += 1 + 1; + } + size += data_.CalculateSize(_repeated_data_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseData other) { + if (other == null) { + return; + } + if (other.Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { + Entity = other.Entity; + } + if (other.Delete != false) { + Delete = other.Delete; + } + data_.Add(other.data_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Entity = (global::Enterprise.EnterpriseDataEntity) input.ReadEnum(); + break; + } + case 16: { + Delete = input.ReadBool(); + break; + } + case 26: { + data_.AddEntriesFrom(input, _repeated_data_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Entity = (global::Enterprise.EnterpriseDataEntity) input.ReadEnum(); + break; + } + case 16: { + Delete = input.ReadBool(); + break; + } + case 26: { + data_.AddEntriesFrom(ref input, _repeated_data_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseDataResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseDataResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[70]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseDataResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseDataResponse(EnterpriseDataResponse other) : this() { + continuationToken_ = other.continuationToken_; + hasMore_ = other.hasMore_; + cacheStatus_ = other.cacheStatus_; + data_ = other.data_.Clone(); + generalData_ = other.generalData_ != null ? other.generalData_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseDataResponse Clone() { + return new EnterpriseDataResponse(this); + } + + /// Field number for the "continuationToken" field. + public const int ContinuationTokenFieldNumber = 1; + private pb::ByteString continuationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ContinuationToken { + get { return continuationToken_; } + set { + continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "hasMore" field. + public const int HasMoreFieldNumber = 2; + private bool hasMore_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMore { + get { return hasMore_; } + set { + hasMore_ = value; + } + } + + /// Field number for the "cacheStatus" field. + public const int CacheStatusFieldNumber = 3; + private global::Enterprise.CacheStatus cacheStatus_ = global::Enterprise.CacheStatus.Keep; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.CacheStatus CacheStatus { + get { return cacheStatus_; } + set { + cacheStatus_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_data_codec + = pb::FieldCodec.ForMessage(34, global::Enterprise.EnterpriseData.Parser); + private readonly pbc::RepeatedField data_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Data { + get { return data_; } + } + + /// Field number for the "generalData" field. + public const int GeneralDataFieldNumber = 5; + private global::Enterprise.GeneralDataEntity generalData_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.GeneralDataEntity GeneralData { + get { return generalData_; } + set { + generalData_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseDataResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseDataResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ContinuationToken != other.ContinuationToken) return false; + if (HasMore != other.HasMore) return false; + if (CacheStatus != other.CacheStatus) return false; + if(!data_.Equals(other.data_)) return false; + if (!object.Equals(GeneralData, other.GeneralData)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (HasMore != false) hash ^= HasMore.GetHashCode(); + if (CacheStatus != global::Enterprise.CacheStatus.Keep) hash ^= CacheStatus.GetHashCode(); + hash ^= data_.GetHashCode(); + if (generalData_ != null) hash ^= GeneralData.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ContinuationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ContinuationToken); + } + if (HasMore != false) { + output.WriteRawTag(16); + output.WriteBool(HasMore); + } + if (CacheStatus != global::Enterprise.CacheStatus.Keep) { + output.WriteRawTag(24); + output.WriteEnum((int) CacheStatus); + } + data_.WriteTo(output, _repeated_data_codec); + if (generalData_ != null) { + output.WriteRawTag(42); + output.WriteMessage(GeneralData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ContinuationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ContinuationToken); + } + if (HasMore != false) { + output.WriteRawTag(16); + output.WriteBool(HasMore); + } + if (CacheStatus != global::Enterprise.CacheStatus.Keep) { + output.WriteRawTag(24); + output.WriteEnum((int) CacheStatus); + } + data_.WriteTo(ref output, _repeated_data_codec); + if (generalData_ != null) { + output.WriteRawTag(42); + output.WriteMessage(GeneralData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ContinuationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + } + if (HasMore != false) { + size += 1 + 1; + } + if (CacheStatus != global::Enterprise.CacheStatus.Keep) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CacheStatus); + } + size += data_.CalculateSize(_repeated_data_codec); + if (generalData_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(GeneralData); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseDataResponse other) { + if (other == null) { + return; + } + if (other.ContinuationToken.Length != 0) { + ContinuationToken = other.ContinuationToken; + } + if (other.HasMore != false) { + HasMore = other.HasMore; + } + if (other.CacheStatus != global::Enterprise.CacheStatus.Keep) { + CacheStatus = other.CacheStatus; + } + data_.Add(other.data_); + if (other.generalData_ != null) { + if (generalData_ == null) { + GeneralData = new global::Enterprise.GeneralDataEntity(); + } + GeneralData.MergeFrom(other.GeneralData); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ContinuationToken = input.ReadBytes(); + break; + } + case 16: { + HasMore = input.ReadBool(); + break; + } + case 24: { + CacheStatus = (global::Enterprise.CacheStatus) input.ReadEnum(); + break; + } + case 34: { + data_.AddEntriesFrom(input, _repeated_data_codec); + break; + } + case 42: { + if (generalData_ == null) { + GeneralData = new global::Enterprise.GeneralDataEntity(); + } + input.ReadMessage(GeneralData); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ContinuationToken = input.ReadBytes(); + break; + } + case 16: { + HasMore = input.ReadBool(); + break; + } + case 24: { + CacheStatus = (global::Enterprise.CacheStatus) input.ReadEnum(); + break; + } + case 34: { + data_.AddEntriesFrom(ref input, _repeated_data_codec); + break; + } + case 42: { + if (generalData_ == null) { + GeneralData = new global::Enterprise.GeneralDataEntity(); + } + input.ReadMessage(GeneralData); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[71]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupRequest(BackupRequest other) : this() { + continuationToken_ = other.continuationToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupRequest Clone() { + return new BackupRequest(this); + } + + /// Field number for the "continuationToken" field. + public const int ContinuationTokenFieldNumber = 1; + private pb::ByteString continuationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ContinuationToken { + get { return continuationToken_; } + set { + continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ContinuationToken != other.ContinuationToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ContinuationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ContinuationToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ContinuationToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ContinuationToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ContinuationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupRequest other) { + if (other == null) { + return; + } + if (other.ContinuationToken.Length != 0) { + ContinuationToken = other.ContinuationToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ContinuationToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ContinuationToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[72]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupRecord(BackupRecord other) : this() { + userId_ = other.userId_; + recordUid_ = other.recordUid_; + key_ = other.key_; + keyType_ = other.keyType_; + version_ = other.version_; + data_ = other.data_; + extra_ = other.extra_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupRecord Clone() { + return new BackupRecord(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "key" field. + public const int KeyFieldNumber = 3; + private pb::ByteString key_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Key { + get { return key_; } + set { + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 4; + private global::Enterprise.BackupKeyType keyType_ = global::Enterprise.BackupKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.BackupKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 5; + private int version_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Version { + get { return version_; } + set { + version_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 6; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "extra" field. + public const int ExtraFieldNumber = 7; + private pb::ByteString extra_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Extra { + get { return extra_; } + set { + extra_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (RecordUid != other.RecordUid) return false; + if (Key != other.Key) return false; + if (KeyType != other.KeyType) return false; + if (Version != other.Version) return false; + if (Data != other.Data) return false; + if (Extra != other.Extra) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (KeyType != global::Enterprise.BackupKeyType.NoKey) hash ^= KeyType.GetHashCode(); + if (Version != 0) hash ^= Version.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (Extra.Length != 0) hash ^= Extra.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (Key.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Key); + } + if (KeyType != global::Enterprise.BackupKeyType.NoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) KeyType); + } + if (Version != 0) { + output.WriteRawTag(40); + output.WriteInt32(Version); + } + if (Data.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(Data); + } + if (Extra.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(Extra); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (Key.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Key); + } + if (KeyType != global::Enterprise.BackupKeyType.NoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) KeyType); + } + if (Version != 0) { + output.WriteRawTag(40); + output.WriteInt32(Version); + } + if (Data.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(Data); + } + if (Extra.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(Extra); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + } + if (KeyType != global::Enterprise.BackupKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (Version != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (Extra.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Extra); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupRecord other) { + if (other == null) { + return; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.KeyType != global::Enterprise.BackupKeyType.NoKey) { + KeyType = other.KeyType; + } + if (other.Version != 0) { + Version = other.Version; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.Extra.Length != 0) { + Extra = other.Extra; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + Key = input.ReadBytes(); + break; + } + case 32: { + KeyType = (global::Enterprise.BackupKeyType) input.ReadEnum(); + break; + } + case 40: { + Version = input.ReadInt32(); + break; + } + case 50: { + Data = input.ReadBytes(); + break; + } + case 58: { + Extra = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + Key = input.ReadBytes(); + break; + } + case 32: { + KeyType = (global::Enterprise.BackupKeyType) input.ReadEnum(); + break; + } + case 40: { + Version = input.ReadInt32(); + break; + } + case 50: { + Data = input.ReadBytes(); + break; + } + case 58: { + Extra = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[73]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupKey(BackupKey other) : this() { + userId_ = other.userId_; + backupKey_ = other.backupKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupKey Clone() { + return new BackupKey(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "backupKey" field. + public const int BackupKey_FieldNumber = 2; + private pb::ByteString backupKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString BackupKey_ { + get { return backupKey_; } + set { + backupKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (BackupKey_ != other.BackupKey_) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (BackupKey_.Length != 0) hash ^= BackupKey_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (BackupKey_.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(BackupKey_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (BackupKey_.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(BackupKey_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (BackupKey_.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(BackupKey_); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupKey other) { + if (other == null) { + return; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.BackupKey_.Length != 0) { + BackupKey_ = other.BackupKey_; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + BackupKey_ = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + BackupKey_ = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[74]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupUser(BackupUser other) : this() { + userId_ = other.userId_; + userName_ = other.userName_; + dataKey_ = other.dataKey_; + dataKeyType_ = other.dataKeyType_; + privateKey_ = other.privateKey_; + treeKey_ = other.treeKey_; + treeKeyType_ = other.treeKeyType_; + backupKeys_ = other.backupKeys_.Clone(); + privateECKey_ = other.privateECKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupUser Clone() { + return new BackupUser(this); + } + + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private int userId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserId { + get { return userId_; } + set { + userId_ = value; + } + } + + /// Field number for the "userName" field. + public const int UserNameFieldNumber = 2; + private string userName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserName { + get { return userName_; } + set { + userName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dataKey" field. + public const int DataKeyFieldNumber = 3; + private pb::ByteString dataKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString DataKey { + get { return dataKey_; } + set { + dataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dataKeyType" field. + public const int DataKeyTypeFieldNumber = 4; + private global::Enterprise.BackupUserDataKeyType dataKeyType_ = global::Enterprise.BackupUserDataKeyType.Own; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.BackupUserDataKeyType DataKeyType { + get { return dataKeyType_; } + set { + dataKeyType_ = value; + } + } + + /// Field number for the "privateKey" field. + public const int PrivateKeyFieldNumber = 5; + private pb::ByteString privateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PrivateKey { + get { return privateKey_; } + set { + privateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "treeKey" field. + public const int TreeKeyFieldNumber = 6; + private pb::ByteString treeKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TreeKey { + get { return treeKey_; } + set { + treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "treeKeyType" field. + public const int TreeKeyTypeFieldNumber = 7; + private global::Enterprise.BackupKeyType treeKeyType_ = global::Enterprise.BackupKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.BackupKeyType TreeKeyType { + get { return treeKeyType_; } + set { + treeKeyType_ = value; + } + } + + /// Field number for the "backupKeys" field. + public const int BackupKeysFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_backupKeys_codec + = pb::FieldCodec.ForMessage(66, global::Enterprise.BackupKey.Parser); + private readonly pbc::RepeatedField backupKeys_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField BackupKeys { + get { return backupKeys_; } + } + + /// Field number for the "privateECKey" field. + public const int PrivateECKeyFieldNumber = 9; + private pb::ByteString privateECKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString PrivateECKey { + get { return privateECKey_; } + set { + privateECKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (UserId != other.UserId) return false; + if (UserName != other.UserName) return false; + if (DataKey != other.DataKey) return false; + if (DataKeyType != other.DataKeyType) return false; + if (PrivateKey != other.PrivateKey) return false; + if (TreeKey != other.TreeKey) return false; + if (TreeKeyType != other.TreeKeyType) return false; + if(!backupKeys_.Equals(other.backupKeys_)) return false; + if (PrivateECKey != other.PrivateECKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (UserName.Length != 0) hash ^= UserName.GetHashCode(); + if (DataKey.Length != 0) hash ^= DataKey.GetHashCode(); + if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) hash ^= DataKeyType.GetHashCode(); + if (PrivateKey.Length != 0) hash ^= PrivateKey.GetHashCode(); + if (TreeKey.Length != 0) hash ^= TreeKey.GetHashCode(); + if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) hash ^= TreeKeyType.GetHashCode(); + hash ^= backupKeys_.GetHashCode(); + if (PrivateECKey.Length != 0) hash ^= PrivateECKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (UserName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserName); + } + if (DataKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(DataKey); + } + if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { + output.WriteRawTag(32); + output.WriteEnum((int) DataKeyType); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PrivateKey); + } + if (TreeKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(TreeKey); + } + if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { + output.WriteRawTag(56); + output.WriteEnum((int) TreeKeyType); + } + backupKeys_.WriteTo(output, _repeated_backupKeys_codec); + if (PrivateECKey.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(PrivateECKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteInt32(UserId); + } + if (UserName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserName); + } + if (DataKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(DataKey); + } + if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { + output.WriteRawTag(32); + output.WriteEnum((int) DataKeyType); + } + if (PrivateKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(PrivateKey); + } + if (TreeKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(TreeKey); + } + if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { + output.WriteRawTag(56); + output.WriteEnum((int) TreeKeyType); + } + backupKeys_.WriteTo(ref output, _repeated_backupKeys_codec); + if (PrivateECKey.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(PrivateECKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + } + if (UserName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserName); + } + if (DataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(DataKey); + } + if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DataKeyType); + } + if (PrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrivateKey); + } + if (TreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TreeKey); + } + if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TreeKeyType); + } + size += backupKeys_.CalculateSize(_repeated_backupKeys_codec); + if (PrivateECKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrivateECKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupUser other) { + if (other == null) { + return; + } + if (other.UserId != 0) { + UserId = other.UserId; + } + if (other.UserName.Length != 0) { + UserName = other.UserName; + } + if (other.DataKey.Length != 0) { + DataKey = other.DataKey; + } + if (other.DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { + DataKeyType = other.DataKeyType; + } + if (other.PrivateKey.Length != 0) { + PrivateKey = other.PrivateKey; + } + if (other.TreeKey.Length != 0) { + TreeKey = other.TreeKey; + } + if (other.TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { + TreeKeyType = other.TreeKeyType; + } + backupKeys_.Add(other.backupKeys_); + if (other.PrivateECKey.Length != 0) { + PrivateECKey = other.PrivateECKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + UserName = input.ReadString(); + break; + } + case 26: { + DataKey = input.ReadBytes(); + break; + } + case 32: { + DataKeyType = (global::Enterprise.BackupUserDataKeyType) input.ReadEnum(); + break; + } + case 42: { + PrivateKey = input.ReadBytes(); + break; + } + case 50: { + TreeKey = input.ReadBytes(); + break; + } + case 56: { + TreeKeyType = (global::Enterprise.BackupKeyType) input.ReadEnum(); + break; + } + case 66: { + backupKeys_.AddEntriesFrom(input, _repeated_backupKeys_codec); + break; + } + case 74: { + PrivateECKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + UserId = input.ReadInt32(); + break; + } + case 18: { + UserName = input.ReadString(); + break; + } + case 26: { + DataKey = input.ReadBytes(); + break; + } + case 32: { + DataKeyType = (global::Enterprise.BackupUserDataKeyType) input.ReadEnum(); + break; + } + case 42: { + PrivateKey = input.ReadBytes(); + break; + } + case 50: { + TreeKey = input.ReadBytes(); + break; + } + case 56: { + TreeKeyType = (global::Enterprise.BackupKeyType) input.ReadEnum(); + break; + } + case 66: { + backupKeys_.AddEntriesFrom(ref input, _repeated_backupKeys_codec); + break; + } + case 74: { + PrivateECKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[75]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupResponse(BackupResponse other) : this() { + enterpriseEccPrivateKey_ = other.enterpriseEccPrivateKey_; + users_ = other.users_.Clone(); + records_ = other.records_.Clone(); + continuationToken_ = other.continuationToken_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupResponse Clone() { + return new BackupResponse(this); + } + + /// Field number for the "enterpriseEccPrivateKey" field. + public const int EnterpriseEccPrivateKeyFieldNumber = 1; + private pb::ByteString enterpriseEccPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EnterpriseEccPrivateKey { + get { return enterpriseEccPrivateKey_; } + set { + enterpriseEccPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.BackupUser.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(26, global::Enterprise.BackupRecord.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "continuationToken" field. + public const int ContinuationTokenFieldNumber = 4; + private pb::ByteString continuationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ContinuationToken { + get { return continuationToken_; } + set { + continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseEccPrivateKey != other.EnterpriseEccPrivateKey) return false; + if(!users_.Equals(other.users_)) return false; + if(!records_.Equals(other.records_)) return false; + if (ContinuationToken != other.ContinuationToken) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseEccPrivateKey.Length != 0) hash ^= EnterpriseEccPrivateKey.GetHashCode(); + hash ^= users_.GetHashCode(); + hash ^= records_.GetHashCode(); + if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseEccPrivateKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EnterpriseEccPrivateKey); + } + users_.WriteTo(output, _repeated_users_codec); + records_.WriteTo(output, _repeated_records_codec); + if (ContinuationToken.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ContinuationToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseEccPrivateKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EnterpriseEccPrivateKey); + } + users_.WriteTo(ref output, _repeated_users_codec); + records_.WriteTo(ref output, _repeated_records_codec); + if (ContinuationToken.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ContinuationToken); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseEccPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterpriseEccPrivateKey); + } + size += users_.CalculateSize(_repeated_users_codec); + size += records_.CalculateSize(_repeated_records_codec); + if (ContinuationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupResponse other) { + if (other == null) { + return; + } + if (other.EnterpriseEccPrivateKey.Length != 0) { + EnterpriseEccPrivateKey = other.EnterpriseEccPrivateKey; + } + users_.Add(other.users_); + records_.Add(other.records_); + if (other.ContinuationToken.Length != 0) { + ContinuationToken = other.ContinuationToken; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EnterpriseEccPrivateKey = input.ReadBytes(); + break; + } + case 18: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + case 26: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 34: { + ContinuationToken = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EnterpriseEccPrivateKey = input.ReadBytes(); + break; + } + case 18: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + case 26: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 34: { + ContinuationToken = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupFile : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupFile()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[76]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupFile() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupFile(BackupFile other) : this() { + user_ = other.user_; + backupUid_ = other.backupUid_; + fileName_ = other.fileName_; + created_ = other.created_; + downloadUrl_ = other.downloadUrl_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupFile Clone() { + return new BackupFile(this); + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 1; + private string user_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string User { + get { return user_; } + set { + user_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "backupUid" field. + public const int BackupUidFieldNumber = 2; + private pb::ByteString backupUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString BackupUid { + get { return backupUid_; } + set { + backupUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fileName" field. + public const int FileNameFieldNumber = 3; + private string fileName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FileName { + get { return fileName_; } + set { + fileName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "created" field. + public const int CreatedFieldNumber = 4; + private long created_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Created { + get { return created_; } + set { + created_ = value; + } + } + + /// Field number for the "downloadUrl" field. + public const int DownloadUrlFieldNumber = 5; + private string downloadUrl_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DownloadUrl { + get { return downloadUrl_; } + set { + downloadUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupFile); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupFile other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (User != other.User) return false; + if (BackupUid != other.BackupUid) return false; + if (FileName != other.FileName) return false; + if (Created != other.Created) return false; + if (DownloadUrl != other.DownloadUrl) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (User.Length != 0) hash ^= User.GetHashCode(); + if (BackupUid.Length != 0) hash ^= BackupUid.GetHashCode(); + if (FileName.Length != 0) hash ^= FileName.GetHashCode(); + if (Created != 0L) hash ^= Created.GetHashCode(); + if (DownloadUrl.Length != 0) hash ^= DownloadUrl.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (User.Length != 0) { + output.WriteRawTag(10); + output.WriteString(User); + } + if (BackupUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(BackupUid); + } + if (FileName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(FileName); + } + if (Created != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Created); + } + if (DownloadUrl.Length != 0) { + output.WriteRawTag(42); + output.WriteString(DownloadUrl); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (User.Length != 0) { + output.WriteRawTag(10); + output.WriteString(User); + } + if (BackupUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(BackupUid); + } + if (FileName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(FileName); + } + if (Created != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Created); + } + if (DownloadUrl.Length != 0) { + output.WriteRawTag(42); + output.WriteString(DownloadUrl); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (User.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(User); + } + if (BackupUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(BackupUid); + } + if (FileName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileName); + } + if (Created != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Created); + } + if (DownloadUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DownloadUrl); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupFile other) { + if (other == null) { + return; + } + if (other.User.Length != 0) { + User = other.User; + } + if (other.BackupUid.Length != 0) { + BackupUid = other.BackupUid; + } + if (other.FileName.Length != 0) { + FileName = other.FileName; + } + if (other.Created != 0L) { + Created = other.Created; + } + if (other.DownloadUrl.Length != 0) { + DownloadUrl = other.DownloadUrl; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + User = input.ReadString(); + break; + } + case 18: { + BackupUid = input.ReadBytes(); + break; + } + case 26: { + FileName = input.ReadString(); + break; + } + case 32: { + Created = input.ReadInt64(); + break; + } + case 42: { + DownloadUrl = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + User = input.ReadString(); + break; + } + case 18: { + BackupUid = input.ReadBytes(); + break; + } + case 26: { + FileName = input.ReadString(); + break; + } + case 32: { + Created = input.ReadInt64(); + break; + } + case 42: { + DownloadUrl = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class BackupsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[77]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupsResponse(BackupsResponse other) : this() { + files_ = other.files_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public BackupsResponse Clone() { + return new BackupsResponse(this); + } + + /// Field number for the "files" field. + public const int FilesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_files_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.BackupFile.Parser); + private readonly pbc::RepeatedField files_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Files { + get { return files_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as BackupsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(BackupsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!files_.Equals(other.files_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= files_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + files_.WriteTo(output, _repeated_files_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + files_.WriteTo(ref output, _repeated_files_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += files_.CalculateSize(_repeated_files_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(BackupsResponse other) { + if (other == null) { + return; + } + files_.Add(other.files_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + files_.AddEntriesFrom(input, _repeated_files_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + files_.AddEntriesFrom(ref input, _repeated_files_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetEnterpriseDataKeysRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetEnterpriseDataKeysRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[78]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetEnterpriseDataKeysRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetEnterpriseDataKeysRequest(GetEnterpriseDataKeysRequest other) : this() { + roleId_ = other.roleId_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetEnterpriseDataKeysRequest Clone() { + return new GetEnterpriseDataKeysRequest(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_roleId_codec + = pb::FieldCodec.ForInt64(10); + private readonly pbc::RepeatedField roleId_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleId { + get { return roleId_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetEnterpriseDataKeysRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetEnterpriseDataKeysRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!roleId_.Equals(other.roleId_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= roleId_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + roleId_.WriteTo(output, _repeated_roleId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + roleId_.WriteTo(ref output, _repeated_roleId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += roleId_.CalculateSize(_repeated_roleId_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetEnterpriseDataKeysRequest other) { + if (other == null) { + return; + } + roleId_.Add(other.roleId_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + roleId_.AddEntriesFrom(input, _repeated_roleId_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + roleId_.AddEntriesFrom(ref input, _repeated_roleId_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetEnterpriseDataKeysResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetEnterpriseDataKeysResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[79]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetEnterpriseDataKeysResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetEnterpriseDataKeysResponse(GetEnterpriseDataKeysResponse other) : this() { + reEncryptedRoleKey_ = other.reEncryptedRoleKey_.Clone(); + roleKey_ = other.roleKey_.Clone(); + mspKey_ = other.mspKey_ != null ? other.mspKey_.Clone() : null; + enterpriseKeys_ = other.enterpriseKeys_ != null ? other.enterpriseKeys_.Clone() : null; + treeKey_ = other.treeKey_ != null ? other.treeKey_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetEnterpriseDataKeysResponse Clone() { + return new GetEnterpriseDataKeysResponse(this); + } + + /// Field number for the "reEncryptedRoleKey" field. + public const int ReEncryptedRoleKeyFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_reEncryptedRoleKey_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.ReEncryptedRoleKey.Parser); + private readonly pbc::RepeatedField reEncryptedRoleKey_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ReEncryptedRoleKey { + get { return reEncryptedRoleKey_; } + } + + /// Field number for the "roleKey" field. + public const int RoleKeyFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_roleKey_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.RoleKey.Parser); + private readonly pbc::RepeatedField roleKey_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleKey { + get { return roleKey_; } + } + + /// Field number for the "mspKey" field. + public const int MspKeyFieldNumber = 3; + private global::Enterprise.MspKey mspKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.MspKey MspKey { + get { return mspKey_; } + set { + mspKey_ = value; + } + } + + /// Field number for the "enterpriseKeys" field. + public const int EnterpriseKeysFieldNumber = 4; + private global::Enterprise.EnterpriseKeys enterpriseKeys_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EnterpriseKeys EnterpriseKeys { + get { return enterpriseKeys_; } + set { + enterpriseKeys_ = value; + } + } + + /// Field number for the "treeKey" field. + public const int TreeKeyFieldNumber = 5; + private global::Enterprise.TreeKey treeKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TreeKey TreeKey { + get { return treeKey_; } + set { + treeKey_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetEnterpriseDataKeysResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetEnterpriseDataKeysResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!reEncryptedRoleKey_.Equals(other.reEncryptedRoleKey_)) return false; + if(!roleKey_.Equals(other.roleKey_)) return false; + if (!object.Equals(MspKey, other.MspKey)) return false; + if (!object.Equals(EnterpriseKeys, other.EnterpriseKeys)) return false; + if (!object.Equals(TreeKey, other.TreeKey)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= reEncryptedRoleKey_.GetHashCode(); + hash ^= roleKey_.GetHashCode(); + if (mspKey_ != null) hash ^= MspKey.GetHashCode(); + if (enterpriseKeys_ != null) hash ^= EnterpriseKeys.GetHashCode(); + if (treeKey_ != null) hash ^= TreeKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + reEncryptedRoleKey_.WriteTo(output, _repeated_reEncryptedRoleKey_codec); + roleKey_.WriteTo(output, _repeated_roleKey_codec); + if (mspKey_ != null) { + output.WriteRawTag(26); + output.WriteMessage(MspKey); + } + if (enterpriseKeys_ != null) { + output.WriteRawTag(34); + output.WriteMessage(EnterpriseKeys); + } + if (treeKey_ != null) { + output.WriteRawTag(42); + output.WriteMessage(TreeKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + reEncryptedRoleKey_.WriteTo(ref output, _repeated_reEncryptedRoleKey_codec); + roleKey_.WriteTo(ref output, _repeated_roleKey_codec); + if (mspKey_ != null) { + output.WriteRawTag(26); + output.WriteMessage(MspKey); + } + if (enterpriseKeys_ != null) { + output.WriteRawTag(34); + output.WriteMessage(EnterpriseKeys); + } + if (treeKey_ != null) { + output.WriteRawTag(42); + output.WriteMessage(TreeKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += reEncryptedRoleKey_.CalculateSize(_repeated_reEncryptedRoleKey_codec); + size += roleKey_.CalculateSize(_repeated_roleKey_codec); + if (mspKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(MspKey); + } + if (enterpriseKeys_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(EnterpriseKeys); + } + if (treeKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TreeKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetEnterpriseDataKeysResponse other) { + if (other == null) { + return; + } + reEncryptedRoleKey_.Add(other.reEncryptedRoleKey_); + roleKey_.Add(other.roleKey_); + if (other.mspKey_ != null) { + if (mspKey_ == null) { + MspKey = new global::Enterprise.MspKey(); + } + MspKey.MergeFrom(other.MspKey); + } + if (other.enterpriseKeys_ != null) { + if (enterpriseKeys_ == null) { + EnterpriseKeys = new global::Enterprise.EnterpriseKeys(); + } + EnterpriseKeys.MergeFrom(other.EnterpriseKeys); + } + if (other.treeKey_ != null) { + if (treeKey_ == null) { + TreeKey = new global::Enterprise.TreeKey(); + } + TreeKey.MergeFrom(other.TreeKey); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + reEncryptedRoleKey_.AddEntriesFrom(input, _repeated_reEncryptedRoleKey_codec); + break; + } + case 18: { + roleKey_.AddEntriesFrom(input, _repeated_roleKey_codec); + break; + } + case 26: { + if (mspKey_ == null) { + MspKey = new global::Enterprise.MspKey(); + } + input.ReadMessage(MspKey); + break; + } + case 34: { + if (enterpriseKeys_ == null) { + EnterpriseKeys = new global::Enterprise.EnterpriseKeys(); + } + input.ReadMessage(EnterpriseKeys); + break; + } + case 42: { + if (treeKey_ == null) { + TreeKey = new global::Enterprise.TreeKey(); + } + input.ReadMessage(TreeKey); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + reEncryptedRoleKey_.AddEntriesFrom(ref input, _repeated_reEncryptedRoleKey_codec); + break; + } + case 18: { + roleKey_.AddEntriesFrom(ref input, _repeated_roleKey_codec); + break; + } + case 26: { + if (mspKey_ == null) { + MspKey = new global::Enterprise.MspKey(); + } + input.ReadMessage(MspKey); + break; + } + case 34: { + if (enterpriseKeys_ == null) { + EnterpriseKeys = new global::Enterprise.EnterpriseKeys(); + } + input.ReadMessage(EnterpriseKeys); + break; + } + case 42: { + if (treeKey_ == null) { + TreeKey = new global::Enterprise.TreeKey(); + } + input.ReadMessage(TreeKey); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[80]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleKey(RoleKey other) : this() { + roleId_ = other.roleId_; + encryptedKey_ = other.encryptedKey_; + keyType_ = other.keyType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleKey Clone() { + return new RoleKey(this); + } + + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "encryptedKey" field. + public const int EncryptedKeyFieldNumber = 2; + private string encryptedKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedKey { + get { return encryptedKey_; } + set { + encryptedKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 3; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RoleKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RoleId != other.RoleId) return false; + if (EncryptedKey != other.EncryptedKey) return false; + if (KeyType != other.KeyType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (EncryptedKey.Length != 0) hash ^= EncryptedKey.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EncryptedKey.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EncryptedKey); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) KeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EncryptedKey.Length != 0) { + output.WriteRawTag(18); + output.WriteString(EncryptedKey); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) KeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + } + if (EncryptedKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedKey); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleKey other) { + if (other == null) { + return; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + if (other.EncryptedKey.Length != 0) { + EncryptedKey = other.EncryptedKey; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + EncryptedKey = input.ReadString(); + break; + } + case 24: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + EncryptedKey = input.ReadString(); + break; + } + case 24: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class MspKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MspKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[81]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MspKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MspKey(MspKey other) : this() { + encryptedMspTreeKey_ = other.encryptedMspTreeKey_; + encryptedMspTreeKeyType_ = other.encryptedMspTreeKeyType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public MspKey Clone() { + return new MspKey(this); + } + + /// Field number for the "encryptedMspTreeKey" field. + public const int EncryptedMspTreeKeyFieldNumber = 1; + private string encryptedMspTreeKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedMspTreeKey { + get { return encryptedMspTreeKey_; } + set { + encryptedMspTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedMspTreeKeyType" field. + public const int EncryptedMspTreeKeyTypeFieldNumber = 2; + private global::Enterprise.EncryptedKeyType encryptedMspTreeKeyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType EncryptedMspTreeKeyType { + get { return encryptedMspTreeKeyType_; } + set { + encryptedMspTreeKeyType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as MspKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(MspKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EncryptedMspTreeKey != other.EncryptedMspTreeKey) return false; + if (EncryptedMspTreeKeyType != other.EncryptedMspTreeKeyType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EncryptedMspTreeKey.Length != 0) hash ^= EncryptedMspTreeKey.GetHashCode(); + if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= EncryptedMspTreeKeyType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EncryptedMspTreeKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(EncryptedMspTreeKey); + } + if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) EncryptedMspTreeKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedMspTreeKey.Length != 0) { + output.WriteRawTag(10); + output.WriteString(EncryptedMspTreeKey); + } + if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) EncryptedMspTreeKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EncryptedMspTreeKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedMspTreeKey); + } + if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EncryptedMspTreeKeyType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(MspKey other) { + if (other == null) { + return; + } + if (other.EncryptedMspTreeKey.Length != 0) { + EncryptedMspTreeKey = other.EncryptedMspTreeKey; + } + if (other.EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + EncryptedMspTreeKeyType = other.EncryptedMspTreeKeyType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + EncryptedMspTreeKey = input.ReadString(); + break; + } + case 16: { + EncryptedMspTreeKeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedMspTreeKey = input.ReadString(); + break; + } + case 16: { + EncryptedMspTreeKeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseKeys : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseKeys()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[82]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseKeys() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseKeys(EnterpriseKeys other) : this() { + rsaPublicKey_ = other.rsaPublicKey_; + rsaEncryptedPrivateKey_ = other.rsaEncryptedPrivateKey_; + eccPublicKey_ = other.eccPublicKey_; + eccEncryptedPrivateKey_ = other.eccEncryptedPrivateKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseKeys Clone() { + return new EnterpriseKeys(this); + } + + /// Field number for the "rsaPublicKey" field. + public const int RsaPublicKeyFieldNumber = 1; + private pb::ByteString rsaPublicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RsaPublicKey { + get { return rsaPublicKey_; } + set { + rsaPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "rsaEncryptedPrivateKey" field. + public const int RsaEncryptedPrivateKeyFieldNumber = 2; + private pb::ByteString rsaEncryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RsaEncryptedPrivateKey { + get { return rsaEncryptedPrivateKey_; } + set { + rsaEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "eccPublicKey" field. + public const int EccPublicKeyFieldNumber = 3; + private pb::ByteString eccPublicKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EccPublicKey { + get { return eccPublicKey_; } + set { + eccPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "eccEncryptedPrivateKey" field. + public const int EccEncryptedPrivateKeyFieldNumber = 4; + private pb::ByteString eccEncryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EccEncryptedPrivateKey { + get { return eccEncryptedPrivateKey_; } + set { + eccEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as EnterpriseKeys); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseKeys other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RsaPublicKey != other.RsaPublicKey) return false; + if (RsaEncryptedPrivateKey != other.RsaEncryptedPrivateKey) return false; + if (EccPublicKey != other.EccPublicKey) return false; + if (EccEncryptedPrivateKey != other.EccEncryptedPrivateKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RsaPublicKey.Length != 0) hash ^= RsaPublicKey.GetHashCode(); + if (RsaEncryptedPrivateKey.Length != 0) hash ^= RsaEncryptedPrivateKey.GetHashCode(); + if (EccPublicKey.Length != 0) hash ^= EccPublicKey.GetHashCode(); + if (EccEncryptedPrivateKey.Length != 0) hash ^= EccEncryptedPrivateKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RsaPublicKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EccEncryptedPrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RsaPublicKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EccEncryptedPrivateKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RsaPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccEncryptedPrivateKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseKeys other) { + if (other == null) { + return; + } + if (other.RsaPublicKey.Length != 0) { + RsaPublicKey = other.RsaPublicKey; + } + if (other.RsaEncryptedPrivateKey.Length != 0) { + RsaEncryptedPrivateKey = other.RsaEncryptedPrivateKey; + } + if (other.EccPublicKey.Length != 0) { + EccPublicKey = other.EccPublicKey; + } + if (other.EccEncryptedPrivateKey.Length != 0) { + EccEncryptedPrivateKey = other.EccEncryptedPrivateKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RsaPublicKey = input.ReadBytes(); + break; + } + case 18: { + RsaEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 26: { + EccPublicKey = input.ReadBytes(); + break; + } + case 34: { + EccEncryptedPrivateKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RsaPublicKey = input.ReadBytes(); + break; + } + case 18: { + RsaEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 26: { + EccPublicKey = input.ReadBytes(); + break; + } + case 34: { + EccEncryptedPrivateKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TreeKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TreeKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[83]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TreeKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TreeKey(TreeKey other) : this() { + treeKey_ = other.treeKey_; + keyTypeId_ = other.keyTypeId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TreeKey Clone() { + return new TreeKey(this); + } + + /// Field number for the "treeKey" field. + public const int TreeKey_FieldNumber = 1; + private string treeKey_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TreeKey_ { + get { return treeKey_; } + set { + treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyTypeId" field. + public const int KeyTypeIdFieldNumber = 2; + private global::Enterprise.BackupKeyType keyTypeId_ = global::Enterprise.BackupKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.BackupKeyType KeyTypeId { + get { return keyTypeId_; } + set { + keyTypeId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TreeKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TreeKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TreeKey_ != other.TreeKey_) return false; + if (KeyTypeId != other.KeyTypeId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TreeKey_.Length != 0) hash ^= TreeKey_.GetHashCode(); + if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) hash ^= KeyTypeId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TreeKey_.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TreeKey_); + } + if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) KeyTypeId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TreeKey_.Length != 0) { + output.WriteRawTag(10); + output.WriteString(TreeKey_); + } + if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) KeyTypeId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TreeKey_.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TreeKey_); + } + if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyTypeId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TreeKey other) { + if (other == null) { + return; + } + if (other.TreeKey_.Length != 0) { + TreeKey_ = other.TreeKey_; + } + if (other.KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { + KeyTypeId = other.KeyTypeId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TreeKey_ = input.ReadString(); + break; + } + case 16: { + KeyTypeId = (global::Enterprise.BackupKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TreeKey_ = input.ReadString(); + break; + } + case 16: { + KeyTypeId = (global::Enterprise.BackupKeyType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedRecordResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedRecordResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[84]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordResponse(SharedRecordResponse other) : this() { + events_ = other.events_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordResponse Clone() { + return new SharedRecordResponse(this); + } + + /// Field number for the "events" field. + public const int EventsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_events_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.SharedRecordEvent.Parser); + private readonly pbc::RepeatedField events_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Events { + get { return events_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedRecordResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedRecordResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!events_.Equals(other.events_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= events_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + events_.WriteTo(output, _repeated_events_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + events_.WriteTo(ref output, _repeated_events_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += events_.CalculateSize(_repeated_events_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedRecordResponse other) { + if (other == null) { + return; + } + events_.Add(other.events_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + events_.AddEntriesFrom(input, _repeated_events_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + events_.AddEntriesFrom(ref input, _repeated_events_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedRecordEvent : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedRecordEvent()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[85]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordEvent() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordEvent(SharedRecordEvent other) : this() { + recordUid_ = other.recordUid_; + userName_ = other.userName_; + canEdit_ = other.canEdit_; + canReshare_ = other.canReshare_; + shareFrom_ = other.shareFrom_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordEvent Clone() { + return new SharedRecordEvent(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "userName" field. + public const int UserNameFieldNumber = 2; + private string userName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string UserName { + get { return userName_; } + set { + userName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "canEdit" field. + public const int CanEditFieldNumber = 3; + private bool canEdit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CanEdit { + get { return canEdit_; } + set { + canEdit_ = value; + } + } + + /// Field number for the "canReshare" field. + public const int CanReshareFieldNumber = 4; + private bool canReshare_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CanReshare { + get { return canReshare_; } + set { + canReshare_ = value; + } + } + + /// Field number for the "shareFrom" field. + public const int ShareFromFieldNumber = 5; + private int shareFrom_; + /// + ///1 is direct share, 2 share folder, 3 share team folder + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ShareFrom { + get { return shareFrom_; } + set { + shareFrom_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedRecordEvent); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedRecordEvent other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (UserName != other.UserName) return false; + if (CanEdit != other.CanEdit) return false; + if (CanReshare != other.CanReshare) return false; + if (ShareFrom != other.ShareFrom) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (UserName.Length != 0) hash ^= UserName.GetHashCode(); + if (CanEdit != false) hash ^= CanEdit.GetHashCode(); + if (CanReshare != false) hash ^= CanReshare.GetHashCode(); + if (ShareFrom != 0) hash ^= ShareFrom.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (UserName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserName); + } + if (CanEdit != false) { + output.WriteRawTag(24); + output.WriteBool(CanEdit); + } + if (CanReshare != false) { + output.WriteRawTag(32); + output.WriteBool(CanReshare); + } + if (ShareFrom != 0) { + output.WriteRawTag(40); + output.WriteInt32(ShareFrom); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (UserName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(UserName); + } + if (CanEdit != false) { + output.WriteRawTag(24); + output.WriteBool(CanEdit); + } + if (CanReshare != false) { + output.WriteRawTag(32); + output.WriteBool(CanReshare); + } + if (ShareFrom != 0) { + output.WriteRawTag(40); + output.WriteInt32(ShareFrom); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (UserName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(UserName); + } + if (CanEdit != false) { + size += 1 + 1; + } + if (CanReshare != false) { + size += 1 + 1; + } + if (ShareFrom != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ShareFrom); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedRecordEvent other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.UserName.Length != 0) { + UserName = other.UserName; + } + if (other.CanEdit != false) { + CanEdit = other.CanEdit; + } + if (other.CanReshare != false) { + CanReshare = other.CanReshare; + } + if (other.ShareFrom != 0) { + ShareFrom = other.ShareFrom; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + UserName = input.ReadString(); + break; + } + case 24: { + CanEdit = input.ReadBool(); + break; + } + case 32: { + CanReshare = input.ReadBool(); + break; + } + case 40: { + ShareFrom = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + UserName = input.ReadString(); + break; + } + case 24: { + CanEdit = input.ReadBool(); + break; + } + case 32: { + CanReshare = input.ReadBool(); + break; + } + case 40: { + ShareFrom = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SetRestrictVisibilityRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetRestrictVisibilityRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[86]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetRestrictVisibilityRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetRestrictVisibilityRequest(SetRestrictVisibilityRequest other) : this() { + nodeId_ = other.nodeId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SetRestrictVisibilityRequest Clone() { + return new SetRestrictVisibilityRequest(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SetRestrictVisibilityRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SetRestrictVisibilityRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SetRestrictVisibilityRequest other) { + if (other == null) { + return; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// Note that this guy's not currently used! We will probably make + /// enterprise_user_add take multiple users like enterprise_user_update. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAddRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[87]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAddRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAddRequest(UserAddRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + keyType_ = other.keyType_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + email_ = other.email_; + suppressEmailInvite_ = other.suppressEmailInvite_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserAddRequest Clone() { + return new UserAddRequest(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 3; + private pb::ByteString encryptedData_ = pb::ByteString.Empty; + /// + ///Data encrypted with the tree key, i.e. { display_name="first name middle last name"} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 4; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } + } + + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 5; + private string fullName_ = ""; + /// + ///The user full name, i.e. {John Doe} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 6; + private string jobTitle_ = ""; + /// + ///The job tile, i.e. {Chief Financial Officer} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } + set { + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "email" field. + public const int EmailFieldNumber = 7; + private string email_ = ""; + /// + ///The email address of new the enterprise user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } + set { + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "suppressEmailInvite" field. + public const int SuppressEmailInviteFieldNumber = 8; + private bool suppressEmailInvite_; + /// + ///Optional field, if true, server will not send the user an invite email, but instead will return the verification code in the response + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool SuppressEmailInvite { + get { return suppressEmailInvite_; } + set { + suppressEmailInvite_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserAddRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserAddRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (KeyType != other.KeyType) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (Email != other.Email) return false; + if (SuppressEmailInvite != other.SuppressEmailInvite) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (SuppressEmailInvite != false) hash ^= SuppressEmailInvite.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(50); + output.WriteString(JobTitle); + } + if (Email.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Email); + } + if (SuppressEmailInvite != false) { + output.WriteRawTag(64); + output.WriteBool(SuppressEmailInvite); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(50); + output.WriteString(JobTitle); + } + if (Email.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Email); + } + if (SuppressEmailInvite != false) { + output.WriteRawTag(64); + output.WriteBool(SuppressEmailInvite); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); + } + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (SuppressEmailInvite != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserAddRequest other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; + } + if (other.FullName.Length != 0) { + FullName = other.FullName; + } + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; + } + if (other.Email.Length != 0) { + Email = other.Email; + } + if (other.SuppressEmailInvite != false) { + SuppressEmailInvite = other.SuppressEmailInvite; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadBytes(); + break; + } + case 32: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 42: { + FullName = input.ReadString(); + break; + } + case 50: { + JobTitle = input.ReadString(); + break; + } + case 58: { + Email = input.ReadString(); + break; + } + case 64: { + SuppressEmailInvite = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadBytes(); + break; + } + case 32: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 42: { + FullName = input.ReadString(); + break; + } + case 50: { + JobTitle = input.ReadString(); + break; + } + case 58: { + Email = input.ReadString(); + break; + } + case 64: { + SuppressEmailInvite = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserUpdateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[88]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateRequest(UserUpdateRequest other) : this() { + users_ = other.users_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateRequest Clone() { + return new UserUpdateRequest(this); + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.UserUpdate.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserUpdateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!users_.Equals(other.users_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= users_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + users_.WriteTo(output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + users_.WriteTo(ref output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += users_.CalculateSize(_repeated_users_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserUpdateRequest other) { + if (other == null) { + return; + } + users_.Add(other.users_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + } + } + } + #endif + + } + + /// + /// Note that ONLY fullName is currently supported! + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserUpdate : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserUpdate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[89]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdate(UserUpdate other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + keyType_ = other.keyType_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + email_ = other.email_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdate Clone() { + return new UserUpdate(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 2; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 3; + private pb::ByteString encryptedData_ = pb::ByteString.Empty; + /// + ///Data encrypted with the tree key, i.e. { display_name="first name middle last name"} + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 4; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } + } + + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 5; + private string fullName_ = ""; + /// + ///The user full name, e.g. "Explodin' Dr. Jaggers Flymo". Sending an empty string will leave the name unchanged; sending all whitespace will clear the name. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 6; + private string jobTitle_ = ""; + /// + ///The job tile, e.g. "Drums". Sending an empty string will leave the title unchanged; sending all whitespace will clear the title. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } + set { + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "email" field. + public const int EmailFieldNumber = 7; + private string email_ = ""; + /// + ///The new email address of the enterprise user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } + set { + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserUpdate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserUpdate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (KeyType != other.KeyType) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (Email != other.Email) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(50); + output.WriteString(JobTitle); + } + if (Email.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (NodeId != 0L) { + output.WriteRawTag(16); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(50); + output.WriteString(JobTitle); + } + if (Email.Length != 0) { + output.WriteRawTag(58); + output.WriteString(Email); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); + } + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserUpdate other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; + } + if (other.FullName.Length != 0) { + FullName = other.FullName; + } + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; + } + if (other.Email.Length != 0) { + Email = other.Email; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadBytes(); + break; + } + case 32: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 42: { + FullName = input.ReadString(); + break; + } + case 50: { + JobTitle = input.ReadString(); + break; + } + case 58: { + Email = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + NodeId = input.ReadInt64(); + break; + } + case 26: { + EncryptedData = input.ReadBytes(); + break; + } + case 32: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 42: { + FullName = input.ReadString(); + break; + } + case 50: { + JobTitle = input.ReadString(); + break; + } + case 58: { + Email = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserUpdateResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserUpdateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[90]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateResponse(UserUpdateResponse other) : this() { + users_ = other.users_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateResponse Clone() { + return new UserUpdateResponse(this); + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.UserUpdateResult.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserUpdateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserUpdateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!users_.Equals(other.users_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= users_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + users_.WriteTo(output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + users_.WriteTo(ref output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += users_.CalculateSize(_repeated_users_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserUpdateResponse other) { + if (other == null) { + return; + } + users_.Add(other.users_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserUpdateResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserUpdateResult()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[91]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateResult() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateResult(UserUpdateResult other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserUpdateResult Clone() { + return new UserUpdateResult(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Enterprise.UserUpdateStatus status_ = global::Enterprise.UserUpdateStatus.UserUpdateOk; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.UserUpdateStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserUpdateResult); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserUpdateResult other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Status != global::Enterprise.UserUpdateStatus.UserUpdateOk) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.UserUpdateStatus.UserUpdateOk) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.UserUpdateStatus.UserUpdateOk) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Status != global::Enterprise.UserUpdateStatus.UserUpdateOk) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserUpdateResult other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Status != global::Enterprise.UserUpdateStatus.UserUpdateOk) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Status = (global::Enterprise.UserUpdateStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Status = (global::Enterprise.UserUpdateStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceRecordOwnersRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceRecordOwnersRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[92]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceRecordOwnersRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceRecordOwnersRequest(ComplianceRecordOwnersRequest other) : this() { + nodeIds_ = other.nodeIds_.Clone(); + includeNonShared_ = other.includeNonShared_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceRecordOwnersRequest Clone() { + return new ComplianceRecordOwnersRequest(this); + } + + /// Field number for the "nodeIds" field. + public const int NodeIdsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_nodeIds_codec + = pb::FieldCodec.ForInt64(10); + private readonly pbc::RepeatedField nodeIds_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField NodeIds { + get { return nodeIds_; } + } + + /// Field number for the "includeNonShared" field. + public const int IncludeNonSharedFieldNumber = 2; + private bool includeNonShared_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeNonShared { + get { return includeNonShared_; } + set { + includeNonShared_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceRecordOwnersRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceRecordOwnersRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!nodeIds_.Equals(other.nodeIds_)) return false; + if (IncludeNonShared != other.IncludeNonShared) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= nodeIds_.GetHashCode(); + if (IncludeNonShared != false) hash ^= IncludeNonShared.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + nodeIds_.WriteTo(output, _repeated_nodeIds_codec); + if (IncludeNonShared != false) { + output.WriteRawTag(16); + output.WriteBool(IncludeNonShared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + nodeIds_.WriteTo(ref output, _repeated_nodeIds_codec); + if (IncludeNonShared != false) { + output.WriteRawTag(16); + output.WriteBool(IncludeNonShared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += nodeIds_.CalculateSize(_repeated_nodeIds_codec); + if (IncludeNonShared != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceRecordOwnersRequest other) { + if (other == null) { + return; + } + nodeIds_.Add(other.nodeIds_); + if (other.IncludeNonShared != false) { + IncludeNonShared = other.IncludeNonShared; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + nodeIds_.AddEntriesFrom(input, _repeated_nodeIds_codec); + break; + } + case 16: { + IncludeNonShared = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + nodeIds_.AddEntriesFrom(ref input, _repeated_nodeIds_codec); + break; + } + case 16: { + IncludeNonShared = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceRecordOwnersResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceRecordOwnersResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[93]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceRecordOwnersResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceRecordOwnersResponse(ComplianceRecordOwnersResponse other) : this() { + recordOwners_ = other.recordOwners_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceRecordOwnersResponse Clone() { + return new ComplianceRecordOwnersResponse(this); + } + + /// Field number for the "recordOwners" field. + public const int RecordOwnersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordOwners_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.RecordOwner.Parser); + private readonly pbc::RepeatedField recordOwners_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordOwners { + get { return recordOwners_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceRecordOwnersResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceRecordOwnersResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordOwners_.Equals(other.recordOwners_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordOwners_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordOwners_.WriteTo(output, _repeated_recordOwners_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordOwners_.WriteTo(ref output, _repeated_recordOwners_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordOwners_.CalculateSize(_repeated_recordOwners_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceRecordOwnersResponse other) { + if (other == null) { + return; + } + recordOwners_.Add(other.recordOwners_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordOwners_.AddEntriesFrom(input, _repeated_recordOwners_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordOwners_.AddEntriesFrom(ref input, _repeated_recordOwners_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordOwner : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordOwner()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[94]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordOwner() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordOwner(RecordOwner other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + shared_ = other.shared_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordOwner Clone() { + return new RecordOwner(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "shared" field. + public const int SharedFieldNumber = 2; + private bool shared_; + /// + /// true if at least one owned record is shared. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Shared { + get { return shared_; } + set { + shared_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordOwner); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordOwner other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Shared != other.Shared) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Shared != false) hash ^= Shared.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Shared != false) { + output.WriteRawTag(16); + output.WriteBool(Shared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Shared != false) { + output.WriteRawTag(16); + output.WriteBool(Shared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Shared != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordOwner other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Shared != false) { + Shared = other.Shared; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Shared = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Shared = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PreliminaryComplianceDataRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PreliminaryComplianceDataRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[95]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PreliminaryComplianceDataRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PreliminaryComplianceDataRequest(PreliminaryComplianceDataRequest other) : this() { + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); + includeNonShared_ = other.includeNonShared_; + continuationToken_ = other.continuationToken_; + includeTotalMatchingRecordsInFirstResponse_ = other.includeTotalMatchingRecordsInFirstResponse_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PreliminaryComplianceDataRequest Clone() { + return new PreliminaryComplianceDataRequest(this); + } + + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(10); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } + } + + /// Field number for the "includeNonShared" field. + public const int IncludeNonSharedFieldNumber = 2; + private bool includeNonShared_; + /// + ///Default is false, meaning we'll consider only records which are shared. If true, we'll include the list of records that are not shared. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeNonShared { + get { return includeNonShared_; } + set { + includeNonShared_ = value; + } + } + + /// Field number for the "continuationToken" field. + public const int ContinuationTokenFieldNumber = 3; + private pb::ByteString continuationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ContinuationToken { + get { return continuationToken_; } + set { + continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "includeTotalMatchingRecordsInFirstResponse" field. + public const int IncludeTotalMatchingRecordsInFirstResponseFieldNumber = 4; + private bool includeTotalMatchingRecordsInFirstResponse_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeTotalMatchingRecordsInFirstResponse { + get { return includeTotalMatchingRecordsInFirstResponse_; } + set { + includeTotalMatchingRecordsInFirstResponse_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PreliminaryComplianceDataRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PreliminaryComplianceDataRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; + if (IncludeNonShared != other.IncludeNonShared) return false; + if (ContinuationToken != other.ContinuationToken) return false; + if (IncludeTotalMatchingRecordsInFirstResponse != other.IncludeTotalMatchingRecordsInFirstResponse) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= enterpriseUserIds_.GetHashCode(); + if (IncludeNonShared != false) hash ^= IncludeNonShared.GetHashCode(); + if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (IncludeTotalMatchingRecordsInFirstResponse != false) hash ^= IncludeTotalMatchingRecordsInFirstResponse.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); + if (IncludeNonShared != false) { + output.WriteRawTag(16); + output.WriteBool(IncludeNonShared); + } + if (ContinuationToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ContinuationToken); + } + if (IncludeTotalMatchingRecordsInFirstResponse != false) { + output.WriteRawTag(32); + output.WriteBool(IncludeTotalMatchingRecordsInFirstResponse); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); + if (IncludeNonShared != false) { + output.WriteRawTag(16); + output.WriteBool(IncludeNonShared); + } + if (ContinuationToken.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ContinuationToken); + } + if (IncludeTotalMatchingRecordsInFirstResponse != false) { + output.WriteRawTag(32); + output.WriteBool(IncludeTotalMatchingRecordsInFirstResponse); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); + if (IncludeNonShared != false) { + size += 1 + 1; + } + if (ContinuationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + } + if (IncludeTotalMatchingRecordsInFirstResponse != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PreliminaryComplianceDataRequest other) { + if (other == null) { + return; + } + enterpriseUserIds_.Add(other.enterpriseUserIds_); + if (other.IncludeNonShared != false) { + IncludeNonShared = other.IncludeNonShared; + } + if (other.ContinuationToken.Length != 0) { + ContinuationToken = other.ContinuationToken; + } + if (other.IncludeTotalMatchingRecordsInFirstResponse != false) { + IncludeTotalMatchingRecordsInFirstResponse = other.IncludeTotalMatchingRecordsInFirstResponse; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); + break; + } + case 16: { + IncludeNonShared = input.ReadBool(); + break; + } + case 26: { + ContinuationToken = input.ReadBytes(); + break; + } + case 32: { + IncludeTotalMatchingRecordsInFirstResponse = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); + break; + } + case 16: { + IncludeNonShared = input.ReadBool(); + break; + } + case 26: { + ContinuationToken = input.ReadBytes(); + break; + } + case 32: { + IncludeTotalMatchingRecordsInFirstResponse = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PreliminaryComplianceDataResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PreliminaryComplianceDataResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[96]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PreliminaryComplianceDataResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PreliminaryComplianceDataResponse(PreliminaryComplianceDataResponse other) : this() { + auditUserData_ = other.auditUserData_.Clone(); + continuationToken_ = other.continuationToken_; + hasMore_ = other.hasMore_; + totalMatchingRecords_ = other.totalMatchingRecords_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public PreliminaryComplianceDataResponse Clone() { + return new PreliminaryComplianceDataResponse(this); + } + + /// Field number for the "auditUserData" field. + public const int AuditUserDataFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_auditUserData_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.AuditUserData.Parser); + private readonly pbc::RepeatedField auditUserData_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AuditUserData { + get { return auditUserData_; } + } + + /// Field number for the "continuationToken" field. + public const int ContinuationTokenFieldNumber = 2; + private pb::ByteString continuationToken_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ContinuationToken { + get { return continuationToken_; } + set { + continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "hasMore" field. + public const int HasMoreFieldNumber = 3; + private bool hasMore_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasMore { + get { return hasMore_; } + set { + hasMore_ = value; + } + } + + /// Field number for the "totalMatchingRecords" field. + public const int TotalMatchingRecordsFieldNumber = 4; + private int totalMatchingRecords_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TotalMatchingRecords { + get { return totalMatchingRecords_; } + set { + totalMatchingRecords_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as PreliminaryComplianceDataResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(PreliminaryComplianceDataResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!auditUserData_.Equals(other.auditUserData_)) return false; + if (ContinuationToken != other.ContinuationToken) return false; + if (HasMore != other.HasMore) return false; + if (TotalMatchingRecords != other.TotalMatchingRecords) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= auditUserData_.GetHashCode(); + if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (HasMore != false) hash ^= HasMore.GetHashCode(); + if (TotalMatchingRecords != 0) hash ^= TotalMatchingRecords.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + auditUserData_.WriteTo(output, _repeated_auditUserData_codec); + if (ContinuationToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ContinuationToken); + } + if (HasMore != false) { + output.WriteRawTag(24); + output.WriteBool(HasMore); + } + if (TotalMatchingRecords != 0) { + output.WriteRawTag(32); + output.WriteInt32(TotalMatchingRecords); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + auditUserData_.WriteTo(ref output, _repeated_auditUserData_codec); + if (ContinuationToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(ContinuationToken); + } + if (HasMore != false) { + output.WriteRawTag(24); + output.WriteBool(HasMore); + } + if (TotalMatchingRecords != 0) { + output.WriteRawTag(32); + output.WriteInt32(TotalMatchingRecords); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += auditUserData_.CalculateSize(_repeated_auditUserData_codec); + if (ContinuationToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + } + if (HasMore != false) { + size += 1 + 1; + } + if (TotalMatchingRecords != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TotalMatchingRecords); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(PreliminaryComplianceDataResponse other) { + if (other == null) { + return; + } + auditUserData_.Add(other.auditUserData_); + if (other.ContinuationToken.Length != 0) { + ContinuationToken = other.ContinuationToken; + } + if (other.HasMore != false) { + HasMore = other.HasMore; + } + if (other.TotalMatchingRecords != 0) { + TotalMatchingRecords = other.TotalMatchingRecords; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + auditUserData_.AddEntriesFrom(input, _repeated_auditUserData_codec); + break; + } + case 18: { + ContinuationToken = input.ReadBytes(); + break; + } + case 24: { + HasMore = input.ReadBool(); + break; + } + case 32: { + TotalMatchingRecords = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + auditUserData_.AddEntriesFrom(ref input, _repeated_auditUserData_codec); + break; + } + case 18: { + ContinuationToken = input.ReadBytes(); + break; + } + case 24: { + HasMore = input.ReadBool(); + break; + } + case 32: { + TotalMatchingRecords = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuditUserRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuditUserRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[97]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditUserRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditUserRecord(AuditUserRecord other) : this() { + recordUid_ = other.recordUid_; + encryptedData_ = other.encryptedData_; + shared_ = other.shared_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditUserRecord Clone() { + return new AuditUserRecord(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 2; + private pb::ByteString encryptedData_ = pb::ByteString.Empty; + /// + ///audit data encrypted with the audit key. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "shared" field. + public const int SharedFieldNumber = 3; + private bool shared_; + /// + ///Default is false. If true, this record is shared. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Shared { + get { return shared_; } + set { + shared_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AuditUserRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AuditUserRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (EncryptedData != other.EncryptedData) return false; + if (Shared != other.Shared) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (Shared != false) hash ^= Shared.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (Shared != false) { + output.WriteRawTag(24); + output.WriteBool(Shared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (Shared != false) { + output.WriteRawTag(24); + output.WriteBool(Shared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedData); + } + if (Shared != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AuditUserRecord other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.Shared != false) { + Shared = other.Shared; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + case 24: { + Shared = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + case 24: { + Shared = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuditUserData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuditUserData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[98]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditUserData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditUserData(AuditUserData other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + auditUserRecords_ = other.auditUserRecords_.Clone(); + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditUserData Clone() { + return new AuditUserData(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "auditUserRecords" field. + public const int AuditUserRecordsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_auditUserRecords_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.AuditUserRecord.Parser); + private readonly pbc::RepeatedField auditUserRecords_ = new pbc::RepeatedField(); + /// + ///The list of record owned or owned and shared by this user. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AuditUserRecords { + get { return auditUserRecords_; } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private global::Enterprise.AuditUserStatus status_ = global::Enterprise.AuditUserStatus.Ok; + /// + ///Status of user for report + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.AuditUserStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AuditUserData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AuditUserData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if(!auditUserRecords_.Equals(other.auditUserRecords_)) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + hash ^= auditUserRecords_.GetHashCode(); + if (Status != global::Enterprise.AuditUserStatus.Ok) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + auditUserRecords_.WriteTo(output, _repeated_auditUserRecords_codec); + if (Status != global::Enterprise.AuditUserStatus.Ok) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + auditUserRecords_.WriteTo(ref output, _repeated_auditUserRecords_codec); + if (Status != global::Enterprise.AuditUserStatus.Ok) { + output.WriteRawTag(24); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + size += auditUserRecords_.CalculateSize(_repeated_auditUserRecords_codec); + if (Status != global::Enterprise.AuditUserStatus.Ok) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AuditUserData other) { + if (other == null) { + return; + } + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + auditUserRecords_.Add(other.auditUserRecords_); + if (other.Status != global::Enterprise.AuditUserStatus.Ok) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + auditUserRecords_.AddEntriesFrom(input, _repeated_auditUserRecords_codec); + break; + } + case 24: { + Status = (global::Enterprise.AuditUserStatus) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + auditUserRecords_.AddEntriesFrom(ref input, _repeated_auditUserRecords_codec); + break; + } + case 24: { + Status = (global::Enterprise.AuditUserStatus) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportFilters : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportFilters()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[99]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportFilters() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportFilters(ComplianceReportFilters other) : this() { + recordTitles_ = other.recordTitles_.Clone(); + recordUids_ = other.recordUids_.Clone(); + jobTitles_ = other.jobTitles_.Clone(); + urls_ = other.urls_.Clone(); + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportFilters Clone() { + return new ComplianceReportFilters(this); + } + + /// Field number for the "recordTitles" field. + public const int RecordTitlesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordTitles_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField recordTitles_ = new pbc::RepeatedField(); + /// + ///The list of record titles. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordTitles { + get { return recordTitles_; } + } + + /// Field number for the "recordUids" field. + public const int RecordUidsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + /// + ///The list of record UIDs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } + } + + /// Field number for the "jobTitles" field. + public const int JobTitlesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_jobTitles_codec + = pb::FieldCodec.ForInt64(26); + private readonly pbc::RepeatedField jobTitles_ = new pbc::RepeatedField(); + /// + ///The list of user job titles. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField JobTitles { + get { return jobTitles_; } + } + + /// Field number for the "urls" field. + public const int UrlsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_urls_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField urls_ = new pbc::RepeatedField(); + /// + ///The list of record URLs. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Urls { + get { return urls_; } + } + + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(42); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); + /// + ///The list of users chosen. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportFilters); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportFilters other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordTitles_.Equals(other.recordTitles_)) return false; + if(!recordUids_.Equals(other.recordUids_)) return false; + if(!jobTitles_.Equals(other.jobTitles_)) return false; + if(!urls_.Equals(other.urls_)) return false; + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordTitles_.GetHashCode(); + hash ^= recordUids_.GetHashCode(); + hash ^= jobTitles_.GetHashCode(); + hash ^= urls_.GetHashCode(); + hash ^= enterpriseUserIds_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordTitles_.WriteTo(output, _repeated_recordTitles_codec); + recordUids_.WriteTo(output, _repeated_recordUids_codec); + jobTitles_.WriteTo(output, _repeated_jobTitles_codec); + urls_.WriteTo(output, _repeated_urls_codec); + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordTitles_.WriteTo(ref output, _repeated_recordTitles_codec); + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + jobTitles_.WriteTo(ref output, _repeated_jobTitles_codec); + urls_.WriteTo(ref output, _repeated_urls_codec); + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordTitles_.CalculateSize(_repeated_recordTitles_codec); + size += recordUids_.CalculateSize(_repeated_recordUids_codec); + size += jobTitles_.CalculateSize(_repeated_jobTitles_codec); + size += urls_.CalculateSize(_repeated_urls_codec); + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportFilters other) { + if (other == null) { + return; + } + recordTitles_.Add(other.recordTitles_); + recordUids_.Add(other.recordUids_); + jobTitles_.Add(other.jobTitles_); + urls_.Add(other.urls_); + enterpriseUserIds_.Add(other.enterpriseUserIds_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordTitles_.AddEntriesFrom(input, _repeated_recordTitles_codec); + break; + } + case 18: { + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); + break; + } + case 26: + case 24: { + jobTitles_.AddEntriesFrom(input, _repeated_jobTitles_codec); + break; + } + case 34: { + urls_.AddEntriesFrom(input, _repeated_urls_codec); + break; + } + case 42: + case 40: { + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordTitles_.AddEntriesFrom(ref input, _repeated_recordTitles_codec); + break; + } + case 18: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + case 26: + case 24: { + jobTitles_.AddEntriesFrom(ref input, _repeated_jobTitles_codec); + break; + } + case 34: { + urls_.AddEntriesFrom(ref input, _repeated_urls_codec); + break; + } + case 42: + case 40: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[100]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportRequest(ComplianceReportRequest other) : this() { + complianceReportRun_ = other.complianceReportRun_ != null ? other.complianceReportRun_.Clone() : null; + reportName_ = other.reportName_; + saveReport_ = other.saveReport_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportRequest Clone() { + return new ComplianceReportRequest(this); + } + + /// Field number for the "complianceReportRun" field. + public const int ComplianceReportRunFieldNumber = 1; + private global::Enterprise.ComplianceReportRun complianceReportRun_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.ComplianceReportRun ComplianceReportRun { + get { return complianceReportRun_; } + set { + complianceReportRun_ = value; + } + } + + /// Field number for the "reportName" field. + public const int ReportNameFieldNumber = 2; + private string reportName_ = ""; + /// + ///The report name (only required when we want to save the report). + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ReportName { + get { return reportName_; } + set { + reportName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "saveReport" field. + public const int SaveReportFieldNumber = 3; + private bool saveReport_; + /// + ///Default is false. True means we will save the report. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool SaveReport { + get { return saveReport_; } + set { + saveReport_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ComplianceReportRun, other.ComplianceReportRun)) return false; + if (ReportName != other.ReportName) return false; + if (SaveReport != other.SaveReport) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (complianceReportRun_ != null) hash ^= ComplianceReportRun.GetHashCode(); + if (ReportName.Length != 0) hash ^= ReportName.GetHashCode(); + if (SaveReport != false) hash ^= SaveReport.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (complianceReportRun_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ComplianceReportRun); + } + if (ReportName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ReportName); + } + if (SaveReport != false) { + output.WriteRawTag(24); + output.WriteBool(SaveReport); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (complianceReportRun_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ComplianceReportRun); + } + if (ReportName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ReportName); + } + if (SaveReport != false) { + output.WriteRawTag(24); + output.WriteBool(SaveReport); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (complianceReportRun_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ComplianceReportRun); + } + if (ReportName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ReportName); + } + if (SaveReport != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportRequest other) { + if (other == null) { + return; + } + if (other.complianceReportRun_ != null) { + if (complianceReportRun_ == null) { + ComplianceReportRun = new global::Enterprise.ComplianceReportRun(); + } + ComplianceReportRun.MergeFrom(other.ComplianceReportRun); + } + if (other.ReportName.Length != 0) { + ReportName = other.ReportName; + } + if (other.SaveReport != false) { + SaveReport = other.SaveReport; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (complianceReportRun_ == null) { + ComplianceReportRun = new global::Enterprise.ComplianceReportRun(); + } + input.ReadMessage(ComplianceReportRun); + break; + } + case 18: { + ReportName = input.ReadString(); + break; + } + case 24: { + SaveReport = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (complianceReportRun_ == null) { + ComplianceReportRun = new global::Enterprise.ComplianceReportRun(); + } + input.ReadMessage(ComplianceReportRun); + break; + } + case 18: { + ReportName = input.ReadString(); + break; + } + case 24: { + SaveReport = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportRun : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportRun()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[101]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportRun() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportRun(ComplianceReportRun other) : this() { + reportCriteriaAndFilter_ = other.reportCriteriaAndFilter_ != null ? other.reportCriteriaAndFilter_.Clone() : null; + users_ = other.users_.Clone(); + records_ = other.records_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportRun Clone() { + return new ComplianceReportRun(this); + } + + /// Field number for the "reportCriteriaAndFilter" field. + public const int ReportCriteriaAndFilterFieldNumber = 1; + private global::Enterprise.ComplianceReportCriteriaAndFilter reportCriteriaAndFilter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.ComplianceReportCriteriaAndFilter ReportCriteriaAndFilter { + get { return reportCriteriaAndFilter_; } + set { + reportCriteriaAndFilter_ = value; + } + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + /// + ///List of enterprise user IDs sent to get_preliminary_compliance_data. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForBytes(26); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + /// + ///These are the records that will be run. Max number of recordUids is 1000. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportRun); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportRun other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (!object.Equals(ReportCriteriaAndFilter, other.ReportCriteriaAndFilter)) return false; + if(!users_.Equals(other.users_)) return false; + if(!records_.Equals(other.records_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (reportCriteriaAndFilter_ != null) hash ^= ReportCriteriaAndFilter.GetHashCode(); + hash ^= users_.GetHashCode(); + hash ^= records_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (reportCriteriaAndFilter_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ReportCriteriaAndFilter); + } + users_.WriteTo(output, _repeated_users_codec); + records_.WriteTo(output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (reportCriteriaAndFilter_ != null) { + output.WriteRawTag(10); + output.WriteMessage(ReportCriteriaAndFilter); + } + users_.WriteTo(ref output, _repeated_users_codec); + records_.WriteTo(ref output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (reportCriteriaAndFilter_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ReportCriteriaAndFilter); + } + size += users_.CalculateSize(_repeated_users_codec); + size += records_.CalculateSize(_repeated_records_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportRun other) { + if (other == null) { + return; + } + if (other.reportCriteriaAndFilter_ != null) { + if (reportCriteriaAndFilter_ == null) { + ReportCriteriaAndFilter = new global::Enterprise.ComplianceReportCriteriaAndFilter(); + } + ReportCriteriaAndFilter.MergeFrom(other.ReportCriteriaAndFilter); + } + users_.Add(other.users_); + records_.Add(other.records_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + if (reportCriteriaAndFilter_ == null) { + ReportCriteriaAndFilter = new global::Enterprise.ComplianceReportCriteriaAndFilter(); + } + input.ReadMessage(ReportCriteriaAndFilter); + break; + } + case 18: + case 16: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + case 26: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + if (reportCriteriaAndFilter_ == null) { + ReportCriteriaAndFilter = new global::Enterprise.ComplianceReportCriteriaAndFilter(); + } + input.ReadMessage(ReportCriteriaAndFilter); + break; + } + case 18: + case 16: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + case 26: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportCriteriaAndFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportCriteriaAndFilter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[102]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteriaAndFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteriaAndFilter(ComplianceReportCriteriaAndFilter other) : this() { + nodeId_ = other.nodeId_; + criteriaUid_ = other.criteriaUid_; + criteriaName_ = other.criteriaName_; + criteria_ = other.criteria_ != null ? other.criteria_.Clone() : null; + filters_ = other.filters_.Clone(); + lastModified_ = other.lastModified_; + nodeEncryptedData_ = other.nodeEncryptedData_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteriaAndFilter Clone() { + return new ComplianceReportCriteriaAndFilter(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "criteriaUid" field. + public const int CriteriaUidFieldNumber = 2; + private pb::ByteString criteriaUid_ = pb::ByteString.Empty; + /// + ///Uid provided by the client + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString CriteriaUid { + get { return criteriaUid_; } + set { + criteriaUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "criteriaName" field. + public const int CriteriaNameFieldNumber = 3; + private string criteriaName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string CriteriaName { + get { return criteriaName_; } + set { + criteriaName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "criteria" field. + public const int CriteriaFieldNumber = 4; + private global::Enterprise.ComplianceReportCriteria criteria_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.ComplianceReportCriteria Criteria { + get { return criteria_; } + set { + criteria_ = value; + } + } + + /// Field number for the "filters" field. + public const int FiltersFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_filters_codec + = pb::FieldCodec.ForMessage(42, global::Enterprise.ComplianceReportFilter.Parser); + private readonly pbc::RepeatedField filters_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Filters { + get { return filters_; } + } + + /// Field number for the "lastModified" field. + public const int LastModifiedFieldNumber = 6; + private long lastModified_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long LastModified { + get { return lastModified_; } + set { + lastModified_ = value; + } + } + + /// Field number for the "nodeEncryptedData" field. + public const int NodeEncryptedDataFieldNumber = 7; + private pb::ByteString nodeEncryptedData_ = pb::ByteString.Empty; + /// + ///The node data object encrypted with the tree key that contains the nodeName + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString NodeEncryptedData { + get { return nodeEncryptedData_; } + set { + nodeEncryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportCriteriaAndFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportCriteriaAndFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (CriteriaUid != other.CriteriaUid) return false; + if (CriteriaName != other.CriteriaName) return false; + if (!object.Equals(Criteria, other.Criteria)) return false; + if(!filters_.Equals(other.filters_)) return false; + if (LastModified != other.LastModified) return false; + if (NodeEncryptedData != other.NodeEncryptedData) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (CriteriaUid.Length != 0) hash ^= CriteriaUid.GetHashCode(); + if (CriteriaName.Length != 0) hash ^= CriteriaName.GetHashCode(); + if (criteria_ != null) hash ^= Criteria.GetHashCode(); + hash ^= filters_.GetHashCode(); + if (LastModified != 0L) hash ^= LastModified.GetHashCode(); + if (NodeEncryptedData.Length != 0) hash ^= NodeEncryptedData.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (CriteriaUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(CriteriaUid); + } + if (CriteriaName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CriteriaName); + } + if (criteria_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Criteria); + } + filters_.WriteTo(output, _repeated_filters_codec); + if (LastModified != 0L) { + output.WriteRawTag(48); + output.WriteInt64(LastModified); + } + if (NodeEncryptedData.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(NodeEncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(NodeId); + } + if (CriteriaUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(CriteriaUid); + } + if (CriteriaName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(CriteriaName); + } + if (criteria_ != null) { + output.WriteRawTag(34); + output.WriteMessage(Criteria); + } + filters_.WriteTo(ref output, _repeated_filters_codec); + if (LastModified != 0L) { + output.WriteRawTag(48); + output.WriteInt64(LastModified); + } + if (NodeEncryptedData.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(NodeEncryptedData); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (CriteriaUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(CriteriaUid); + } + if (CriteriaName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(CriteriaName); + } + if (criteria_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Criteria); + } + size += filters_.CalculateSize(_repeated_filters_codec); + if (LastModified != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastModified); + } + if (NodeEncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(NodeEncryptedData); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportCriteriaAndFilter other) { + if (other == null) { + return; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.CriteriaUid.Length != 0) { + CriteriaUid = other.CriteriaUid; + } + if (other.CriteriaName.Length != 0) { + CriteriaName = other.CriteriaName; + } + if (other.criteria_ != null) { + if (criteria_ == null) { + Criteria = new global::Enterprise.ComplianceReportCriteria(); + } + Criteria.MergeFrom(other.Criteria); + } + filters_.Add(other.filters_); + if (other.LastModified != 0L) { + LastModified = other.LastModified; + } + if (other.NodeEncryptedData.Length != 0) { + NodeEncryptedData = other.NodeEncryptedData; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 18: { + CriteriaUid = input.ReadBytes(); + break; + } + case 26: { + CriteriaName = input.ReadString(); + break; + } + case 34: { + if (criteria_ == null) { + Criteria = new global::Enterprise.ComplianceReportCriteria(); + } + input.ReadMessage(Criteria); + break; + } + case 42: { + filters_.AddEntriesFrom(input, _repeated_filters_codec); + break; + } + case 48: { + LastModified = input.ReadInt64(); + break; + } + case 58: { + NodeEncryptedData = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadInt64(); + break; + } + case 18: { + CriteriaUid = input.ReadBytes(); + break; + } + case 26: { + CriteriaName = input.ReadString(); + break; + } + case 34: { + if (criteria_ == null) { + Criteria = new global::Enterprise.ComplianceReportCriteria(); + } + input.ReadMessage(Criteria); + break; + } + case 42: { + filters_.AddEntriesFrom(ref input, _repeated_filters_codec); + break; + } + case 48: { + LastModified = input.ReadInt64(); + break; + } + case 58: { + NodeEncryptedData = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportCriteria : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportCriteria()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[103]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteria() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteria(ComplianceReportCriteria other) : this() { + jobTitles_ = other.jobTitles_.Clone(); + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); + includeNonShared_ = other.includeNonShared_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteria Clone() { + return new ComplianceReportCriteria(this); + } + + /// Field number for the "jobTitles" field. + public const int JobTitlesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_jobTitles_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField jobTitles_ = new pbc::RepeatedField(); + /// + ///The list of job titles chosen. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField JobTitles { + get { return jobTitles_; } + } + + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); + /// + ///The list of users chosen. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } + } + + /// Field number for the "includeNonShared" field. + public const int IncludeNonSharedFieldNumber = 3; + private bool includeNonShared_; + /// + ///If true, include the list the records that are not shared + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeNonShared { + get { return includeNonShared_; } + set { + includeNonShared_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportCriteria); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportCriteria other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!jobTitles_.Equals(other.jobTitles_)) return false; + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; + if (IncludeNonShared != other.IncludeNonShared) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= jobTitles_.GetHashCode(); + hash ^= enterpriseUserIds_.GetHashCode(); + if (IncludeNonShared != false) hash ^= IncludeNonShared.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + jobTitles_.WriteTo(output, _repeated_jobTitles_codec); + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); + if (IncludeNonShared != false) { + output.WriteRawTag(24); + output.WriteBool(IncludeNonShared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + jobTitles_.WriteTo(ref output, _repeated_jobTitles_codec); + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); + if (IncludeNonShared != false) { + output.WriteRawTag(24); + output.WriteBool(IncludeNonShared); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += jobTitles_.CalculateSize(_repeated_jobTitles_codec); + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); + if (IncludeNonShared != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportCriteria other) { + if (other == null) { + return; + } + jobTitles_.Add(other.jobTitles_); + enterpriseUserIds_.Add(other.enterpriseUserIds_); + if (other.IncludeNonShared != false) { + IncludeNonShared = other.IncludeNonShared; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + jobTitles_.AddEntriesFrom(input, _repeated_jobTitles_codec); + break; + } + case 18: + case 16: { + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); + break; + } + case 24: { + IncludeNonShared = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + jobTitles_.AddEntriesFrom(ref input, _repeated_jobTitles_codec); + break; + } + case 18: + case 16: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); + break; + } + case 24: { + IncludeNonShared = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportFilter : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportFilter()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[104]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportFilter() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportFilter(ComplianceReportFilter other) : this() { + recordTitles_ = other.recordTitles_.Clone(); + recordUids_ = other.recordUids_.Clone(); + jobTitles_ = other.jobTitles_.Clone(); + urls_ = other.urls_.Clone(); + recordTypes_ = other.recordTypes_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportFilter Clone() { + return new ComplianceReportFilter(this); + } + + /// Field number for the "recordTitles" field. + public const int RecordTitlesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordTitles_codec + = pb::FieldCodec.ForString(10); + private readonly pbc::RepeatedField recordTitles_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordTitles { + get { return recordTitles_; } + } + + /// Field number for the "recordUids" field. + public const int RecordUidsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } + } + + /// Field number for the "jobTitles" field. + public const int JobTitlesFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_jobTitles_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField jobTitles_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField JobTitles { + get { return jobTitles_; } + } + + /// Field number for the "urls" field. + public const int UrlsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_urls_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField urls_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Urls { + get { return urls_; } + } + + /// Field number for the "recordTypes" field. + public const int RecordTypesFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_recordTypes_codec + = pb::FieldCodec.ForString(42); + private readonly pbc::RepeatedField recordTypes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordTypes { + get { return recordTypes_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ComplianceReportFilter); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportFilter other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordTitles_.Equals(other.recordTitles_)) return false; + if(!recordUids_.Equals(other.recordUids_)) return false; + if(!jobTitles_.Equals(other.jobTitles_)) return false; + if(!urls_.Equals(other.urls_)) return false; + if(!recordTypes_.Equals(other.recordTypes_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordTitles_.GetHashCode(); + hash ^= recordUids_.GetHashCode(); + hash ^= jobTitles_.GetHashCode(); + hash ^= urls_.GetHashCode(); + hash ^= recordTypes_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordTitles_.WriteTo(output, _repeated_recordTitles_codec); + recordUids_.WriteTo(output, _repeated_recordUids_codec); + jobTitles_.WriteTo(output, _repeated_jobTitles_codec); + urls_.WriteTo(output, _repeated_urls_codec); + recordTypes_.WriteTo(output, _repeated_recordTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordTitles_.WriteTo(ref output, _repeated_recordTitles_codec); + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + jobTitles_.WriteTo(ref output, _repeated_jobTitles_codec); + urls_.WriteTo(ref output, _repeated_urls_codec); + recordTypes_.WriteTo(ref output, _repeated_recordTypes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordTitles_.CalculateSize(_repeated_recordTitles_codec); + size += recordUids_.CalculateSize(_repeated_recordUids_codec); + size += jobTitles_.CalculateSize(_repeated_jobTitles_codec); + size += urls_.CalculateSize(_repeated_urls_codec); + size += recordTypes_.CalculateSize(_repeated_recordTypes_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportFilter other) { + if (other == null) { + return; + } + recordTitles_.Add(other.recordTitles_); + recordUids_.Add(other.recordUids_); + jobTitles_.Add(other.jobTitles_); + urls_.Add(other.urls_); + recordTypes_.Add(other.recordTypes_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordTitles_.AddEntriesFrom(input, _repeated_recordTitles_codec); + break; + } + case 18: { + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); + break; + } + case 26: { + jobTitles_.AddEntriesFrom(input, _repeated_jobTitles_codec); + break; + } + case 34: { + urls_.AddEntriesFrom(input, _repeated_urls_codec); + break; + } + case 42: { + recordTypes_.AddEntriesFrom(input, _repeated_recordTypes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordTitles_.AddEntriesFrom(ref input, _repeated_recordTitles_codec); + break; + } + case 18: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + case 26: { + jobTitles_.AddEntriesFrom(ref input, _repeated_jobTitles_codec); + break; + } + case 34: { + urls_.AddEntriesFrom(ref input, _repeated_urls_codec); + break; + } + case 42: { + recordTypes_.AddEntriesFrom(ref input, _repeated_recordTypes_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[24]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[105]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseDataRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseDataRequest(EnterpriseDataRequest other) : this() { - continuationToken_ = other.continuationToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportResponse(ComplianceReportResponse other) : this() { + dateGenerated_ = other.dateGenerated_; + runByUserName_ = other.runByUserName_; + reportName_ = other.reportName_; + reportUid_ = other.reportUid_; + complianceReportRun_ = other.complianceReportRun_ != null ? other.complianceReportRun_.Clone() : null; + userProfiles_ = other.userProfiles_.Clone(); + auditTeams_ = other.auditTeams_.Clone(); + auditRecords_ = other.auditRecords_.Clone(); + userRecords_ = other.userRecords_.Clone(); + sharedFolderRecords_ = other.sharedFolderRecords_.Clone(); + sharedFolderUsers_ = other.sharedFolderUsers_.Clone(); + sharedFolderTeams_ = other.sharedFolderTeams_.Clone(); + auditTeamUsers_ = other.auditTeamUsers_.Clone(); + auditRoles_ = other.auditRoles_.Clone(); + linkedRecords_ = other.linkedRecords_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseDataRequest Clone() { - return new EnterpriseDataRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportResponse Clone() { + return new ComplianceReportResponse(this); } - /// Field number for the "continuationToken" field. - public const int ContinuationTokenFieldNumber = 1; - private pb::ByteString continuationToken_ = pb::ByteString.Empty; + /// Field number for the "dateGenerated" field. + public const int DateGeneratedFieldNumber = 1; + private long dateGenerated_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ContinuationToken { - get { return continuationToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DateGenerated { + get { return dateGenerated_; } set { - continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + dateGenerated_ = value; + } + } + + /// Field number for the "runByUserName" field. + public const int RunByUserNameFieldNumber = 2; + private string runByUserName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string RunByUserName { + get { return runByUserName_; } + set { + runByUserName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "reportName" field. + public const int ReportNameFieldNumber = 3; + private string reportName_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ReportName { + get { return reportName_; } + set { + reportName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "reportUid" field. + public const int ReportUidFieldNumber = 4; + private pb::ByteString reportUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ReportUid { + get { return reportUid_; } + set { + reportUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "complianceReportRun" field. + public const int ComplianceReportRunFieldNumber = 5; + private global::Enterprise.ComplianceReportRun complianceReportRun_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.ComplianceReportRun ComplianceReportRun { + get { return complianceReportRun_; } + set { + complianceReportRun_ = value; } } + /// Field number for the "userProfiles" field. + public const int UserProfilesFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_userProfiles_codec + = pb::FieldCodec.ForMessage(50, global::Enterprise.UserProfile.Parser); + private readonly pbc::RepeatedField userProfiles_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserProfiles { + get { return userProfiles_; } + } + + /// Field number for the "auditTeams" field. + public const int AuditTeamsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_auditTeams_codec + = pb::FieldCodec.ForMessage(58, global::Enterprise.AuditTeam.Parser); + private readonly pbc::RepeatedField auditTeams_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AuditTeams { + get { return auditTeams_; } + } + + /// Field number for the "auditRecords" field. + public const int AuditRecordsFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_auditRecords_codec + = pb::FieldCodec.ForMessage(66, global::Enterprise.AuditRecord.Parser); + private readonly pbc::RepeatedField auditRecords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AuditRecords { + get { return auditRecords_; } + } + + /// Field number for the "userRecords" field. + public const int UserRecordsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_userRecords_codec + = pb::FieldCodec.ForMessage(74, global::Enterprise.UserRecord.Parser); + private readonly pbc::RepeatedField userRecords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserRecords { + get { return userRecords_; } + } + + /// Field number for the "sharedFolderRecords" field. + public const int SharedFolderRecordsFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_sharedFolderRecords_codec + = pb::FieldCodec.ForMessage(82, global::Enterprise.SharedFolderRecord.Parser); + private readonly pbc::RepeatedField sharedFolderRecords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRecords { + get { return sharedFolderRecords_; } + } + + /// Field number for the "sharedFolderUsers" field. + public const int SharedFolderUsersFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_sharedFolderUsers_codec + = pb::FieldCodec.ForMessage(90, global::Enterprise.SharedFolderUser.Parser); + private readonly pbc::RepeatedField sharedFolderUsers_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUsers { + get { return sharedFolderUsers_; } + } + + /// Field number for the "sharedFolderTeams" field. + public const int SharedFolderTeamsFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_sharedFolderTeams_codec + = pb::FieldCodec.ForMessage(98, global::Enterprise.SharedFolderTeam.Parser); + private readonly pbc::RepeatedField sharedFolderTeams_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderTeams { + get { return sharedFolderTeams_; } + } + + /// Field number for the "auditTeamUsers" field. + public const int AuditTeamUsersFieldNumber = 13; + private static readonly pb::FieldCodec _repeated_auditTeamUsers_codec + = pb::FieldCodec.ForMessage(106, global::Enterprise.AuditTeamUser.Parser); + private readonly pbc::RepeatedField auditTeamUsers_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AuditTeamUsers { + get { return auditTeamUsers_; } + } + + /// Field number for the "auditRoles" field. + public const int AuditRolesFieldNumber = 14; + private static readonly pb::FieldCodec _repeated_auditRoles_codec + = pb::FieldCodec.ForMessage(114, global::Enterprise.AuditRole.Parser); + private readonly pbc::RepeatedField auditRoles_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AuditRoles { + get { return auditRoles_; } + } + + /// Field number for the "linkedRecords" field. + public const int LinkedRecordsFieldNumber = 15; + private static readonly pb::FieldCodec _repeated_linkedRecords_codec + = pb::FieldCodec.ForMessage(122, global::Enterprise.LinkedRecord.Parser); + private readonly pbc::RepeatedField linkedRecords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LinkedRecords { + get { return linkedRecords_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseDataRequest); + return Equals(other as ComplianceReportResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseDataRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ContinuationToken != other.ContinuationToken) return false; + if (DateGenerated != other.DateGenerated) return false; + if (RunByUserName != other.RunByUserName) return false; + if (ReportName != other.ReportName) return false; + if (ReportUid != other.ReportUid) return false; + if (!object.Equals(ComplianceReportRun, other.ComplianceReportRun)) return false; + if(!userProfiles_.Equals(other.userProfiles_)) return false; + if(!auditTeams_.Equals(other.auditTeams_)) return false; + if(!auditRecords_.Equals(other.auditRecords_)) return false; + if(!userRecords_.Equals(other.userRecords_)) return false; + if(!sharedFolderRecords_.Equals(other.sharedFolderRecords_)) return false; + if(!sharedFolderUsers_.Equals(other.sharedFolderUsers_)) return false; + if(!sharedFolderTeams_.Equals(other.sharedFolderTeams_)) return false; + if(!auditTeamUsers_.Equals(other.auditTeamUsers_)) return false; + if(!auditRoles_.Equals(other.auditRoles_)) return false; + if(!linkedRecords_.Equals(other.linkedRecords_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (DateGenerated != 0L) hash ^= DateGenerated.GetHashCode(); + if (RunByUserName.Length != 0) hash ^= RunByUserName.GetHashCode(); + if (ReportName.Length != 0) hash ^= ReportName.GetHashCode(); + if (ReportUid.Length != 0) hash ^= ReportUid.GetHashCode(); + if (complianceReportRun_ != null) hash ^= ComplianceReportRun.GetHashCode(); + hash ^= userProfiles_.GetHashCode(); + hash ^= auditTeams_.GetHashCode(); + hash ^= auditRecords_.GetHashCode(); + hash ^= userRecords_.GetHashCode(); + hash ^= sharedFolderRecords_.GetHashCode(); + hash ^= sharedFolderUsers_.GetHashCode(); + hash ^= sharedFolderTeams_.GetHashCode(); + hash ^= auditTeamUsers_.GetHashCode(); + hash ^= auditRoles_.GetHashCode(); + hash ^= linkedRecords_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4611,27 +32864,122 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ContinuationToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(ContinuationToken); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (DateGenerated != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DateGenerated); + } + if (RunByUserName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RunByUserName); + } + if (ReportName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ReportName); } + if (ReportUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ReportUid); + } + if (complianceReportRun_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ComplianceReportRun); + } + userProfiles_.WriteTo(output, _repeated_userProfiles_codec); + auditTeams_.WriteTo(output, _repeated_auditTeams_codec); + auditRecords_.WriteTo(output, _repeated_auditRecords_codec); + userRecords_.WriteTo(output, _repeated_userRecords_codec); + sharedFolderRecords_.WriteTo(output, _repeated_sharedFolderRecords_codec); + sharedFolderUsers_.WriteTo(output, _repeated_sharedFolderUsers_codec); + sharedFolderTeams_.WriteTo(output, _repeated_sharedFolderTeams_codec); + auditTeamUsers_.WriteTo(output, _repeated_auditTeamUsers_codec); + auditRoles_.WriteTo(output, _repeated_auditRoles_codec); + linkedRecords_.WriteTo(output, _repeated_linkedRecords_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DateGenerated != 0L) { + output.WriteRawTag(8); + output.WriteInt64(DateGenerated); + } + if (RunByUserName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(RunByUserName); + } + if (ReportName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ReportName); + } + if (ReportUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(ReportUid); + } + if (complianceReportRun_ != null) { + output.WriteRawTag(42); + output.WriteMessage(ComplianceReportRun); + } + userProfiles_.WriteTo(ref output, _repeated_userProfiles_codec); + auditTeams_.WriteTo(ref output, _repeated_auditTeams_codec); + auditRecords_.WriteTo(ref output, _repeated_auditRecords_codec); + userRecords_.WriteTo(ref output, _repeated_userRecords_codec); + sharedFolderRecords_.WriteTo(ref output, _repeated_sharedFolderRecords_codec); + sharedFolderUsers_.WriteTo(ref output, _repeated_sharedFolderUsers_codec); + sharedFolderTeams_.WriteTo(ref output, _repeated_sharedFolderTeams_codec); + auditTeamUsers_.WriteTo(ref output, _repeated_auditTeamUsers_codec); + auditRoles_.WriteTo(ref output, _repeated_auditRoles_codec); + linkedRecords_.WriteTo(ref output, _repeated_linkedRecords_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ContinuationToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); - } + if (DateGenerated != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DateGenerated); + } + if (RunByUserName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(RunByUserName); + } + if (ReportName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ReportName); + } + if (ReportUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ReportUid); + } + if (complianceReportRun_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ComplianceReportRun); + } + size += userProfiles_.CalculateSize(_repeated_userProfiles_codec); + size += auditTeams_.CalculateSize(_repeated_auditTeams_codec); + size += auditRecords_.CalculateSize(_repeated_auditRecords_codec); + size += userRecords_.CalculateSize(_repeated_userRecords_codec); + size += sharedFolderRecords_.CalculateSize(_repeated_sharedFolderRecords_codec); + size += sharedFolderUsers_.CalculateSize(_repeated_sharedFolderUsers_codec); + size += sharedFolderTeams_.CalculateSize(_repeated_sharedFolderTeams_codec); + size += auditTeamUsers_.CalculateSize(_repeated_auditTeamUsers_codec); + size += auditRoles_.CalculateSize(_repeated_auditRoles_codec); + size += linkedRecords_.CalculateSize(_repeated_linkedRecords_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4639,114 +32987,375 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseDataRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportResponse other) { if (other == null) { return; } - if (other.ContinuationToken.Length != 0) { - ContinuationToken = other.ContinuationToken; + if (other.DateGenerated != 0L) { + DateGenerated = other.DateGenerated; + } + if (other.RunByUserName.Length != 0) { + RunByUserName = other.RunByUserName; + } + if (other.ReportName.Length != 0) { + ReportName = other.ReportName; + } + if (other.ReportUid.Length != 0) { + ReportUid = other.ReportUid; + } + if (other.complianceReportRun_ != null) { + if (complianceReportRun_ == null) { + ComplianceReportRun = new global::Enterprise.ComplianceReportRun(); + } + ComplianceReportRun.MergeFrom(other.ComplianceReportRun); + } + userProfiles_.Add(other.userProfiles_); + auditTeams_.Add(other.auditTeams_); + auditRecords_.Add(other.auditRecords_); + userRecords_.Add(other.userRecords_); + sharedFolderRecords_.Add(other.sharedFolderRecords_); + sharedFolderUsers_.Add(other.sharedFolderUsers_); + sharedFolderTeams_.Add(other.sharedFolderTeams_); + auditTeamUsers_.Add(other.auditTeamUsers_); + auditRoles_.Add(other.auditRoles_); + linkedRecords_.Add(other.linkedRecords_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + DateGenerated = input.ReadInt64(); + break; + } + case 18: { + RunByUserName = input.ReadString(); + break; + } + case 26: { + ReportName = input.ReadString(); + break; + } + case 34: { + ReportUid = input.ReadBytes(); + break; + } + case 42: { + if (complianceReportRun_ == null) { + ComplianceReportRun = new global::Enterprise.ComplianceReportRun(); + } + input.ReadMessage(ComplianceReportRun); + break; + } + case 50: { + userProfiles_.AddEntriesFrom(input, _repeated_userProfiles_codec); + break; + } + case 58: { + auditTeams_.AddEntriesFrom(input, _repeated_auditTeams_codec); + break; + } + case 66: { + auditRecords_.AddEntriesFrom(input, _repeated_auditRecords_codec); + break; + } + case 74: { + userRecords_.AddEntriesFrom(input, _repeated_userRecords_codec); + break; + } + case 82: { + sharedFolderRecords_.AddEntriesFrom(input, _repeated_sharedFolderRecords_codec); + break; + } + case 90: { + sharedFolderUsers_.AddEntriesFrom(input, _repeated_sharedFolderUsers_codec); + break; + } + case 98: { + sharedFolderTeams_.AddEntriesFrom(input, _repeated_sharedFolderTeams_codec); + break; + } + case 106: { + auditTeamUsers_.AddEntriesFrom(input, _repeated_auditTeamUsers_codec); + break; + } + case 114: { + auditRoles_.AddEntriesFrom(input, _repeated_auditRoles_codec); + break; + } + case 122: { + linkedRecords_.AddEntriesFrom(input, _repeated_linkedRecords_codec); + break; + } + } } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - ContinuationToken = input.ReadBytes(); + case 8: { + DateGenerated = input.ReadInt64(); + break; + } + case 18: { + RunByUserName = input.ReadString(); + break; + } + case 26: { + ReportName = input.ReadString(); + break; + } + case 34: { + ReportUid = input.ReadBytes(); + break; + } + case 42: { + if (complianceReportRun_ == null) { + ComplianceReportRun = new global::Enterprise.ComplianceReportRun(); + } + input.ReadMessage(ComplianceReportRun); + break; + } + case 50: { + userProfiles_.AddEntriesFrom(ref input, _repeated_userProfiles_codec); + break; + } + case 58: { + auditTeams_.AddEntriesFrom(ref input, _repeated_auditTeams_codec); + break; + } + case 66: { + auditRecords_.AddEntriesFrom(ref input, _repeated_auditRecords_codec); + break; + } + case 74: { + userRecords_.AddEntriesFrom(ref input, _repeated_userRecords_codec); + break; + } + case 82: { + sharedFolderRecords_.AddEntriesFrom(ref input, _repeated_sharedFolderRecords_codec); + break; + } + case 90: { + sharedFolderUsers_.AddEntriesFrom(ref input, _repeated_sharedFolderUsers_codec); + break; + } + case 98: { + sharedFolderTeams_.AddEntriesFrom(ref input, _repeated_sharedFolderTeams_codec); + break; + } + case 106: { + auditTeamUsers_.AddEntriesFrom(ref input, _repeated_auditTeamUsers_codec); + break; + } + case 114: { + auditRoles_.AddEntriesFrom(ref input, _repeated_auditRoles_codec); + break; + } + case 122: { + linkedRecords_.AddEntriesFrom(ref input, _repeated_linkedRecords_codec); break; } } } } + #endif } - public sealed partial class SpecialProvisioning : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SpecialProvisioning()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuditRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuditRecord()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[25]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[106]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SpecialProvisioning() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditRecord() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SpecialProvisioning(SpecialProvisioning other) : this() { - url_ = other.url_; - name_ = other.name_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditRecord(AuditRecord other) : this() { + recordUid_ = other.recordUid_; + auditData_ = other.auditData_; + hasAttachments_ = other.hasAttachments_; + inTrash_ = other.inTrash_; + treeLeft_ = other.treeLeft_; + treeRight_ = other.treeRight_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SpecialProvisioning Clone() { - return new SpecialProvisioning(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditRecord Clone() { + return new AuditRecord(this); } - /// Field number for the "url" field. - public const int UrlFieldNumber = 1; - private string url_ = ""; + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Url { - get { return url_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } set { - url_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "name" field. - public const int NameFieldNumber = 2; - private string name_ = ""; + /// Field number for the "auditData" field. + public const int AuditDataFieldNumber = 2; + private pb::ByteString auditData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AuditData { + get { return auditData_; } set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + auditData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "hasAttachments" field. + public const int HasAttachmentsFieldNumber = 3; + private bool hasAttachments_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasAttachments { + get { return hasAttachments_; } + set { + hasAttachments_ = value; + } + } + + /// Field number for the "inTrash" field. + public const int InTrashFieldNumber = 4; + private bool inTrash_; + /// + /// true if this record is in its owner's trash/"deleted items". Not set on older saved reports. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool InTrash { + get { return inTrash_; } + set { + inTrash_ = value; + } + } + + /// Field number for the "treeLeft" field. + public const int TreeLeftFieldNumber = 5; + private int treeLeft_; + /// + /// record's owner's node. Not set in older saved reports. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TreeLeft { + get { return treeLeft_; } + set { + treeLeft_ = value; + } + } + + /// Field number for the "treeRight" field. + public const int TreeRightFieldNumber = 6; + private int treeRight_; + /// + /// record's owner's node. Not set in older saved reports. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TreeRight { + get { return treeRight_; } + set { + treeRight_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SpecialProvisioning); + return Equals(other as AuditRecord); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SpecialProvisioning other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AuditRecord other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Url != other.Url) return false; - if (Name != other.Name) return false; + if (RecordUid != other.RecordUid) return false; + if (AuditData != other.AuditData) return false; + if (HasAttachments != other.HasAttachments) return false; + if (InTrash != other.InTrash) return false; + if (TreeLeft != other.TreeLeft) return false; + if (TreeRight != other.TreeRight) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Url.Length != 0) hash ^= Url.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (AuditData.Length != 0) hash ^= AuditData.GetHashCode(); + if (HasAttachments != false) hash ^= HasAttachments.GetHashCode(); + if (InTrash != false) hash ^= InTrash.GetHashCode(); + if (TreeLeft != 0) hash ^= TreeLeft.GetHashCode(); + if (TreeRight != 0) hash ^= TreeRight.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4754,33 +33363,102 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Url.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Url); + output.WriteBytes(RecordUid); } - if (Name.Length != 0) { + if (AuditData.Length != 0) { output.WriteRawTag(18); - output.WriteString(Name); + output.WriteBytes(AuditData); + } + if (HasAttachments != false) { + output.WriteRawTag(24); + output.WriteBool(HasAttachments); + } + if (InTrash != false) { + output.WriteRawTag(32); + output.WriteBool(InTrash); + } + if (TreeLeft != 0) { + output.WriteRawTag(40); + output.WriteInt32(TreeLeft); + } + if (TreeRight != 0) { + output.WriteRawTag(48); + output.WriteInt32(TreeRight); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (AuditData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AuditData); + } + if (HasAttachments != false) { + output.WriteRawTag(24); + output.WriteBool(HasAttachments); + } + if (InTrash != false) { + output.WriteRawTag(32); + output.WriteBool(InTrash); + } + if (TreeLeft != 0) { + output.WriteRawTag(40); + output.WriteInt32(TreeLeft); + } + if (TreeRight != 0) { + output.WriteRawTag(48); + output.WriteInt32(TreeRight); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Url.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + if (AuditData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuditData); + } + if (HasAttachments != false) { + size += 1 + 1; + } + if (InTrash != false) { + size += 1 + 1; + } + if (TreeLeft != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TreeLeft); + } + if (TreeRight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TreeRight); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -4789,149 +33467,304 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SpecialProvisioning other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AuditRecord other) { if (other == null) { return; } - if (other.Url.Length != 0) { - Url = other.Url; + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; } - if (other.Name.Length != 0) { - Name = other.Name; + if (other.AuditData.Length != 0) { + AuditData = other.AuditData; + } + if (other.HasAttachments != false) { + HasAttachments = other.HasAttachments; + } + if (other.InTrash != false) { + InTrash = other.InTrash; + } + if (other.TreeLeft != 0) { + TreeLeft = other.TreeLeft; + } + if (other.TreeRight != 0) { + TreeRight = other.TreeRight; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Url = input.ReadString(); + RecordUid = input.ReadBytes(); break; } case 18: { - Name = input.ReadString(); + AuditData = input.ReadBytes(); + break; + } + case 24: { + HasAttachments = input.ReadBool(); + break; + } + case 32: { + InTrash = input.ReadBool(); + break; + } + case 40: { + TreeLeft = input.ReadInt32(); + break; + } + case 48: { + TreeRight = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + AuditData = input.ReadBytes(); + break; + } + case 24: { + HasAttachments = input.ReadBool(); + break; + } + case 32: { + InTrash = input.ReadBool(); + break; + } + case 40: { + TreeLeft = input.ReadInt32(); + break; + } + case 48: { + TreeRight = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class GeneralDataEntity : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GeneralDataEntity()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuditRole : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuditRole()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[26]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[107]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GeneralDataEntity() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditRole() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GeneralDataEntity(GeneralDataEntity other) : this() { - enterpriseName_ = other.enterpriseName_; - restrictVisibility_ = other.restrictVisibility_; - specialProvisioning_ = other.specialProvisioning_ != null ? other.specialProvisioning_.Clone() : null; - userPrivilege_ = other.userPrivilege_ != null ? other.userPrivilege_.Clone() : null; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditRole(AuditRole other) : this() { + roleId_ = other.roleId_; + encryptedData_ = other.encryptedData_; + restrictShareOutsideEnterprise_ = other.restrictShareOutsideEnterprise_; + restrictShareAll_ = other.restrictShareAll_; + restrictShareOfAttachments_ = other.restrictShareOfAttachments_; + restrictMaskPasswordsWhileEditing_ = other.restrictMaskPasswordsWhileEditing_; + roleNodeManagements_ = other.roleNodeManagements_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GeneralDataEntity Clone() { - return new GeneralDataEntity(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditRole Clone() { + return new AuditRole(this); } - /// Field number for the "enterpriseName" field. - public const int EnterpriseNameFieldNumber = 1; - private string enterpriseName_ = ""; + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 1; + private long roleId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } + set { + roleId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 2; + private pb::ByteString encryptedData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "restrictShareOutsideEnterprise" field. + public const int RestrictShareOutsideEnterpriseFieldNumber = 3; + private bool restrictShareOutsideEnterprise_; + /// + ///True means cannot share records to others not in the same enterprise + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EnterpriseName { - get { return enterpriseName_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictShareOutsideEnterprise { + get { return restrictShareOutsideEnterprise_; } set { - enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + restrictShareOutsideEnterprise_ = value; } } - /// Field number for the "restrictVisibility" field. - public const int RestrictVisibilityFieldNumber = 2; - private bool restrictVisibility_; + /// Field number for the "restrictShareAll" field. + public const int RestrictShareAllFieldNumber = 4; + private bool restrictShareAll_; + /// + ///True means can't share records + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool RestrictVisibility { - get { return restrictVisibility_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictShareAll { + get { return restrictShareAll_; } set { - restrictVisibility_ = value; + restrictShareAll_ = value; } } - /// Field number for the "specialProvisioning" field. - public const int SpecialProvisioningFieldNumber = 4; - private global::Enterprise.SpecialProvisioning specialProvisioning_; + /// Field number for the "restrictShareOfAttachments" field. + public const int RestrictShareOfAttachmentsFieldNumber = 5; + private bool restrictShareOfAttachments_; + /// + ///True means can't share records with attachments + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.SpecialProvisioning SpecialProvisioning { - get { return specialProvisioning_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictShareOfAttachments { + get { return restrictShareOfAttachments_; } set { - specialProvisioning_ = value; + restrictShareOfAttachments_ = value; } } - /// Field number for the "userPrivilege" field. - public const int UserPrivilegeFieldNumber = 7; - private global::Enterprise.UserPrivilege userPrivilege_; + /// Field number for the "restrictMaskPasswordsWhileEditing" field. + public const int RestrictMaskPasswordsWhileEditingFieldNumber = 6; + private bool restrictMaskPasswordsWhileEditing_; + /// + ///True means you can't even see the password when you are editing + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.UserPrivilege UserPrivilege { - get { return userPrivilege_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictMaskPasswordsWhileEditing { + get { return restrictMaskPasswordsWhileEditing_; } set { - userPrivilege_ = value; + restrictMaskPasswordsWhileEditing_ = value; } } + /// Field number for the "roleNodeManagements" field. + public const int RoleNodeManagementsFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_roleNodeManagements_codec + = pb::FieldCodec.ForMessage(58, global::Enterprise.RoleNodeManagement.Parser); + private readonly pbc::RepeatedField roleNodeManagements_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleNodeManagements { + get { return roleNodeManagements_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GeneralDataEntity); + return Equals(other as AuditRole); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GeneralDataEntity other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AuditRole other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseName != other.EnterpriseName) return false; - if (RestrictVisibility != other.RestrictVisibility) return false; - if (!object.Equals(SpecialProvisioning, other.SpecialProvisioning)) return false; - if (!object.Equals(UserPrivilege, other.UserPrivilege)) return false; + if (RoleId != other.RoleId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (RestrictShareOutsideEnterprise != other.RestrictShareOutsideEnterprise) return false; + if (RestrictShareAll != other.RestrictShareAll) return false; + if (RestrictShareOfAttachments != other.RestrictShareOfAttachments) return false; + if (RestrictMaskPasswordsWhileEditing != other.RestrictMaskPasswordsWhileEditing) return false; + if(!roleNodeManagements_.Equals(other.roleNodeManagements_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); - if (RestrictVisibility != false) hash ^= RestrictVisibility.GetHashCode(); - if (specialProvisioning_ != null) hash ^= SpecialProvisioning.GetHashCode(); - if (userPrivilege_ != null) hash ^= UserPrivilege.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (RestrictShareOutsideEnterprise != false) hash ^= RestrictShareOutsideEnterprise.GetHashCode(); + if (RestrictShareAll != false) hash ^= RestrictShareAll.GetHashCode(); + if (RestrictShareOfAttachments != false) hash ^= RestrictShareOfAttachments.GetHashCode(); + if (RestrictMaskPasswordsWhileEditing != false) hash ^= RestrictMaskPasswordsWhileEditing.GetHashCode(); + hash ^= roleNodeManagements_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4939,48 +33772,106 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseName.Length != 0) { - output.WriteRawTag(10); - output.WriteString(EnterpriseName); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); } - if (RestrictVisibility != false) { - output.WriteRawTag(16); - output.WriteBool(RestrictVisibility); + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); } - if (specialProvisioning_ != null) { - output.WriteRawTag(34); - output.WriteMessage(SpecialProvisioning); + if (RestrictShareOutsideEnterprise != false) { + output.WriteRawTag(24); + output.WriteBool(RestrictShareOutsideEnterprise); } - if (userPrivilege_ != null) { - output.WriteRawTag(58); - output.WriteMessage(UserPrivilege); + if (RestrictShareAll != false) { + output.WriteRawTag(32); + output.WriteBool(RestrictShareAll); + } + if (RestrictShareOfAttachments != false) { + output.WriteRawTag(40); + output.WriteBool(RestrictShareOfAttachments); + } + if (RestrictMaskPasswordsWhileEditing != false) { + output.WriteRawTag(48); + output.WriteBool(RestrictMaskPasswordsWhileEditing); } + roleNodeManagements_.WriteTo(output, _repeated_roleNodeManagements_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RoleId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(RoleId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedData); + } + if (RestrictShareOutsideEnterprise != false) { + output.WriteRawTag(24); + output.WriteBool(RestrictShareOutsideEnterprise); + } + if (RestrictShareAll != false) { + output.WriteRawTag(32); + output.WriteBool(RestrictShareAll); + } + if (RestrictShareOfAttachments != false) { + output.WriteRawTag(40); + output.WriteBool(RestrictShareOfAttachments); + } + if (RestrictMaskPasswordsWhileEditing != false) { + output.WriteRawTag(48); + output.WriteBool(RestrictMaskPasswordsWhileEditing); + } + roleNodeManagements_.WriteTo(ref output, _repeated_roleNodeManagements_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); } - if (RestrictVisibility != false) { + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedData); + } + if (RestrictShareOutsideEnterprise != false) { size += 1 + 1; } - if (specialProvisioning_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(SpecialProvisioning); + if (RestrictShareAll != false) { + size += 1 + 1; } - if (userPrivilege_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(UserPrivilege); + if (RestrictShareOfAttachments != false) { + size += 1 + 1; } + if (RestrictMaskPasswordsWhileEditing != false) { + size += 1 + 1; + } + size += roleNodeManagements_.CalculateSize(_repeated_roleNodeManagements_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -4988,259 +33879,260 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GeneralDataEntity other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AuditRole other) { if (other == null) { return; } - if (other.EnterpriseName.Length != 0) { - EnterpriseName = other.EnterpriseName; + if (other.RoleId != 0L) { + RoleId = other.RoleId; } - if (other.RestrictVisibility != false) { - RestrictVisibility = other.RestrictVisibility; + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; } - if (other.specialProvisioning_ != null) { - if (specialProvisioning_ == null) { - SpecialProvisioning = new global::Enterprise.SpecialProvisioning(); - } - SpecialProvisioning.MergeFrom(other.SpecialProvisioning); + if (other.RestrictShareOutsideEnterprise != false) { + RestrictShareOutsideEnterprise = other.RestrictShareOutsideEnterprise; } - if (other.userPrivilege_ != null) { - if (userPrivilege_ == null) { - UserPrivilege = new global::Enterprise.UserPrivilege(); - } - UserPrivilege.MergeFrom(other.UserPrivilege); + if (other.RestrictShareAll != false) { + RestrictShareAll = other.RestrictShareAll; + } + if (other.RestrictShareOfAttachments != false) { + RestrictShareOfAttachments = other.RestrictShareOfAttachments; } + if (other.RestrictMaskPasswordsWhileEditing != false) { + RestrictMaskPasswordsWhileEditing = other.RestrictMaskPasswordsWhileEditing; + } + roleNodeManagements_.Add(other.roleNodeManagements_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - EnterpriseName = input.ReadString(); + case 8: { + RoleId = input.ReadInt64(); break; } - case 16: { - RestrictVisibility = input.ReadBool(); + case 18: { + EncryptedData = input.ReadBytes(); break; } - case 34: { - if (specialProvisioning_ == null) { - SpecialProvisioning = new global::Enterprise.SpecialProvisioning(); - } - input.ReadMessage(SpecialProvisioning); + case 24: { + RestrictShareOutsideEnterprise = input.ReadBool(); + break; + } + case 32: { + RestrictShareAll = input.ReadBool(); + break; + } + case 40: { + RestrictShareOfAttachments = input.ReadBool(); + break; + } + case 48: { + RestrictMaskPasswordsWhileEditing = input.ReadBool(); break; } case 58: { - if (userPrivilege_ == null) { - UserPrivilege = new global::Enterprise.UserPrivilege(); - } - input.ReadMessage(UserPrivilege); + roleNodeManagements_.AddEntriesFrom(input, _repeated_roleNodeManagements_codec); break; } } } + #endif } - } - - public sealed partial class Node : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Node()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[27]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Node() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Node(Node other) : this() { - nodeId_ = other.nodeId_; - parentId_ = other.parentId_; - bridgeId_ = other.bridgeId_; - scimId_ = other.scimId_; - licenseId_ = other.licenseId_; - encryptedData_ = other.encryptedData_; - duoEnabled_ = other.duoEnabled_; - rsaEnabled_ = other.rsaEnabled_; - ssoServiceProviderId_ = other.ssoServiceProviderId_; - restrictVisibility_ = other.restrictVisibility_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Node Clone() { - return new Node(this); - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 1; - private long nodeId_; + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RoleId = input.ReadInt64(); + break; + } + case 18: { + EncryptedData = input.ReadBytes(); + break; + } + case 24: { + RestrictShareOutsideEnterprise = input.ReadBool(); + break; + } + case 32: { + RestrictShareAll = input.ReadBool(); + break; + } + case 40: { + RestrictShareOfAttachments = input.ReadBool(); + break; + } + case 48: { + RestrictMaskPasswordsWhileEditing = input.ReadBool(); + break; + } + case 58: { + roleNodeManagements_.AddEntriesFrom(ref input, _repeated_roleNodeManagements_codec); + break; + } + } } } + #endif - /// Field number for the "parentId" field. - public const int ParentIdFieldNumber = 2; - private long parentId_; + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RoleNodeManagement : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleNodeManagement()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long ParentId { - get { return parentId_; } - set { - parentId_ = value; - } - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } - /// Field number for the "bridgeId" field. - public const int BridgeIdFieldNumber = 3; - private long bridgeId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long BridgeId { - get { return bridgeId_; } - set { - bridgeId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[108]; } } - /// Field number for the "scimId" field. - public const int ScimIdFieldNumber = 4; - private long scimId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long ScimId { - get { return scimId_; } - set { - scimId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "licenseId" field. - public const int LicenseIdFieldNumber = 5; - private long licenseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long LicenseId { - get { return licenseId_; } - set { - licenseId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleNodeManagement() { + OnConstruction(); } - /// Field number for the "encryptedData" field. - public const int EncryptedDataFieldNumber = 6; - private string encryptedData_ = ""; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedData { - get { return encryptedData_; } - set { - encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleNodeManagement(RoleNodeManagement other) : this() { + treeLeft_ = other.treeLeft_; + treeRight_ = other.treeRight_; + cascade_ = other.cascade_; + privileges_ = other.privileges_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "duoEnabled" field. - public const int DuoEnabledFieldNumber = 7; - private bool duoEnabled_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool DuoEnabled { - get { return duoEnabled_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RoleNodeManagement Clone() { + return new RoleNodeManagement(this); + } + + /// Field number for the "treeLeft" field. + public const int TreeLeftFieldNumber = 1; + private int treeLeft_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TreeLeft { + get { return treeLeft_; } set { - duoEnabled_ = value; + treeLeft_ = value; } } - /// Field number for the "rsaEnabled" field. - public const int RsaEnabledFieldNumber = 8; - private bool rsaEnabled_; + /// Field number for the "treeRight" field. + public const int TreeRightFieldNumber = 2; + private int treeRight_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool RsaEnabled { - get { return rsaEnabled_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int TreeRight { + get { return treeRight_; } set { - rsaEnabled_ = value; + treeRight_ = value; } } - /// Field number for the "ssoServiceProviderId" field. - public const int SsoServiceProviderIdFieldNumber = 9; - private long ssoServiceProviderId_; + /// Field number for the "cascade" field. + public const int CascadeFieldNumber = 3; + private bool cascade_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long SsoServiceProviderId { - get { return ssoServiceProviderId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Cascade { + get { return cascade_; } set { - ssoServiceProviderId_ = value; + cascade_ = value; } } - /// Field number for the "restrictVisibility" field. - public const int RestrictVisibilityFieldNumber = 10; - private bool restrictVisibility_; + /// Field number for the "privileges" field. + public const int PrivilegesFieldNumber = 4; + private int privileges_; + /// + /// bit field; 1 is SHARING_ADMINISTRATOR + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool RestrictVisibility { - get { return restrictVisibility_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Privileges { + get { return privileges_; } set { - restrictVisibility_ = value; + privileges_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Node); + return Equals(other as RoleNodeManagement); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Node other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RoleNodeManagement other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (NodeId != other.NodeId) return false; - if (ParentId != other.ParentId) return false; - if (BridgeId != other.BridgeId) return false; - if (ScimId != other.ScimId) return false; - if (LicenseId != other.LicenseId) return false; - if (EncryptedData != other.EncryptedData) return false; - if (DuoEnabled != other.DuoEnabled) return false; - if (RsaEnabled != other.RsaEnabled) return false; - if (SsoServiceProviderId != other.SsoServiceProviderId) return false; - if (RestrictVisibility != other.RestrictVisibility) return false; + if (TreeLeft != other.TreeLeft) return false; + if (TreeRight != other.TreeRight) return false; + if (Cascade != other.Cascade) return false; + if (Privileges != other.Privileges) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (ParentId != 0L) hash ^= ParentId.GetHashCode(); - if (BridgeId != 0L) hash ^= BridgeId.GetHashCode(); - if (ScimId != 0L) hash ^= ScimId.GetHashCode(); - if (LicenseId != 0L) hash ^= LicenseId.GetHashCode(); - if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); - if (DuoEnabled != false) hash ^= DuoEnabled.GetHashCode(); - if (RsaEnabled != false) hash ^= RsaEnabled.GetHashCode(); - if (SsoServiceProviderId != 0L) hash ^= SsoServiceProviderId.GetHashCode(); - if (RestrictVisibility != false) hash ^= RestrictVisibility.GetHashCode(); + if (TreeLeft != 0) hash ^= TreeLeft.GetHashCode(); + if (TreeRight != 0) hash ^= TreeRight.GetHashCode(); + if (Cascade != false) hash ^= Cascade.GetHashCode(); + if (Privileges != 0) hash ^= Privileges.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5248,89 +34140,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (NodeId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TreeLeft != 0) { output.WriteRawTag(8); - output.WriteInt64(NodeId); + output.WriteInt32(TreeLeft); } - if (ParentId != 0L) { + if (TreeRight != 0) { output.WriteRawTag(16); - output.WriteInt64(ParentId); + output.WriteInt32(TreeRight); } - if (BridgeId != 0L) { + if (Cascade != false) { output.WriteRawTag(24); - output.WriteInt64(BridgeId); + output.WriteBool(Cascade); } - if (ScimId != 0L) { + if (Privileges != 0) { output.WriteRawTag(32); - output.WriteInt64(ScimId); - } - if (LicenseId != 0L) { - output.WriteRawTag(40); - output.WriteInt64(LicenseId); + output.WriteInt32(Privileges); } - if (EncryptedData.Length != 0) { - output.WriteRawTag(50); - output.WriteString(EncryptedData); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (DuoEnabled != false) { - output.WriteRawTag(56); - output.WriteBool(DuoEnabled); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TreeLeft != 0) { + output.WriteRawTag(8); + output.WriteInt32(TreeLeft); } - if (RsaEnabled != false) { - output.WriteRawTag(64); - output.WriteBool(RsaEnabled); + if (TreeRight != 0) { + output.WriteRawTag(16); + output.WriteInt32(TreeRight); } - if (SsoServiceProviderId != 0L) { - output.WriteRawTag(72); - output.WriteInt64(SsoServiceProviderId); + if (Cascade != false) { + output.WriteRawTag(24); + output.WriteBool(Cascade); } - if (RestrictVisibility != false) { - output.WriteRawTag(80); - output.WriteBool(RestrictVisibility); + if (Privileges != 0) { + output.WriteRawTag(32); + output.WriteInt32(Privileges); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (ParentId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ParentId); - } - if (BridgeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(BridgeId); + if (TreeLeft != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TreeLeft); } - if (ScimId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ScimId); - } - if (LicenseId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(LicenseId); - } - if (EncryptedData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + if (TreeRight != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(TreeRight); } - if (DuoEnabled != false) { - size += 1 + 1; - } - if (RsaEnabled != false) { + if (Cascade != false) { size += 1 + 1; } - if (SsoServiceProviderId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(SsoServiceProviderId); - } - if (RestrictVisibility != false) { - size += 1 + 1; + if (Privileges != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Privileges); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -5339,247 +34222,243 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Node other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RoleNodeManagement other) { if (other == null) { return; } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.ParentId != 0L) { - ParentId = other.ParentId; - } - if (other.BridgeId != 0L) { - BridgeId = other.BridgeId; - } - if (other.ScimId != 0L) { - ScimId = other.ScimId; - } - if (other.LicenseId != 0L) { - LicenseId = other.LicenseId; - } - if (other.EncryptedData.Length != 0) { - EncryptedData = other.EncryptedData; - } - if (other.DuoEnabled != false) { - DuoEnabled = other.DuoEnabled; + if (other.TreeLeft != 0) { + TreeLeft = other.TreeLeft; } - if (other.RsaEnabled != false) { - RsaEnabled = other.RsaEnabled; + if (other.TreeRight != 0) { + TreeRight = other.TreeRight; } - if (other.SsoServiceProviderId != 0L) { - SsoServiceProviderId = other.SsoServiceProviderId; + if (other.Cascade != false) { + Cascade = other.Cascade; } - if (other.RestrictVisibility != false) { - RestrictVisibility = other.RestrictVisibility; + if (other.Privileges != 0) { + Privileges = other.Privileges; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - NodeId = input.ReadInt64(); + TreeLeft = input.ReadInt32(); break; } case 16: { - ParentId = input.ReadInt64(); + TreeRight = input.ReadInt32(); break; } case 24: { - BridgeId = input.ReadInt64(); + Cascade = input.ReadBool(); break; } case 32: { - ScimId = input.ReadInt64(); - break; - } - case 40: { - LicenseId = input.ReadInt64(); + Privileges = input.ReadInt32(); break; } - case 50: { - EncryptedData = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 56: { - DuoEnabled = input.ReadBool(); + case 8: { + TreeLeft = input.ReadInt32(); break; } - case 64: { - RsaEnabled = input.ReadBool(); + case 16: { + TreeRight = input.ReadInt32(); break; } - case 72: { - SsoServiceProviderId = input.ReadInt64(); + case 24: { + Cascade = input.ReadBool(); break; } - case 80: { - RestrictVisibility = input.ReadBool(); + case 32: { + Privileges = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class Role : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Role()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserProfile : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserProfile()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[28]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[109]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Role() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserProfile() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Role(Role other) : this() { - roleId_ = other.roleId_; - nodeId_ = other.nodeId_; - encryptedData_ = other.encryptedData_; - keyType_ = other.keyType_; - visibleBelow_ = other.visibleBelow_; - newUserInherit_ = other.newUserInherit_; - roleType_ = other.roleType_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserProfile(UserProfile other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + email_ = other.email_; + roleIds_ = other.roleIds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Role Clone() { - return new Role(this); - } - - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private long roleId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } - set { - roleId_ = value; - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 2; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserProfile Clone() { + return new UserProfile(this); } - /// Field number for the "encryptedData" field. - public const int EncryptedDataFieldNumber = 3; - private string encryptedData_ = ""; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedData { - get { return encryptedData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; } } - /// Field number for the "keyType" field. - public const int KeyTypeFieldNumber = 4; - private string keyType_ = ""; + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 2; + private string fullName_ = ""; + /// + ///The user's full name. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string KeyType { - get { return keyType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } set { - keyType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "visibleBelow" field. - public const int VisibleBelowFieldNumber = 5; - private bool visibleBelow_; + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 3; + private string jobTitle_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool VisibleBelow { - get { return visibleBelow_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } set { - visibleBelow_ = value; + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "newUserInherit" field. - public const int NewUserInheritFieldNumber = 6; - private bool newUserInherit_; + /// Field number for the "email" field. + public const int EmailFieldNumber = 4; + private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool NewUserInherit { - get { return newUserInherit_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } set { - newUserInherit_ = value; + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "roleType" field. - public const int RoleTypeFieldNumber = 7; - private string roleType_ = ""; + /// Field number for the "roleIds" field. + public const int RoleIdsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_roleIds_codec + = pb::FieldCodec.ForInt64(42); + private readonly pbc::RepeatedField roleIds_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string RoleType { - get { return roleType_; } - set { - roleType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RoleIds { + get { return roleIds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Role); + return Equals(other as UserProfile); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Role other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserProfile other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RoleId != other.RoleId) return false; - if (NodeId != other.NodeId) return false; - if (EncryptedData != other.EncryptedData) return false; - if (KeyType != other.KeyType) return false; - if (VisibleBelow != other.VisibleBelow) return false; - if (NewUserInherit != other.NewUserInherit) return false; - if (RoleType != other.RoleType) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (Email != other.Email) return false; + if(!roleIds_.Equals(other.roleIds_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); - if (KeyType.Length != 0) hash ^= KeyType.GetHashCode(); - if (VisibleBelow != false) hash ^= VisibleBelow.GetHashCode(); - if (NewUserInherit != false) hash ^= NewUserInherit.GetHashCode(); - if (RoleType.Length != 0) hash ^= RoleType.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + hash ^= roleIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5587,69 +34466,84 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RoleId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(RoleId); + output.WriteInt64(EnterpriseUserId); } - if (NodeId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(NodeId); + if (FullName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FullName); } - if (EncryptedData.Length != 0) { + if (JobTitle.Length != 0) { output.WriteRawTag(26); - output.WriteString(EncryptedData); + output.WriteString(JobTitle); } - if (KeyType.Length != 0) { + if (Email.Length != 0) { output.WriteRawTag(34); - output.WriteString(KeyType); + output.WriteString(Email); } - if (VisibleBelow != false) { - output.WriteRawTag(40); - output.WriteBool(VisibleBelow); + roleIds_.WriteTo(output, _repeated_roleIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (NewUserInherit != false) { - output.WriteRawTag(48); - output.WriteBool(NewUserInherit); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (RoleType.Length != 0) { - output.WriteRawTag(58); - output.WriteString(RoleType); + if (FullName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(26); + output.WriteString(JobTitle); } + if (Email.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Email); + } + roleIds_.WriteTo(ref output, _repeated_roleIds_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (EncryptedData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); - } - if (KeyType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyType); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (VisibleBelow != false) { - size += 1 + 1; + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); } - if (NewUserInherit != false) { - size += 1 + 1; + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); } - if (RoleType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(RoleType); + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); } + size += roleIds_.CalculateSize(_repeated_roleIds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -5657,254 +34551,207 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Role other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserProfile other) { if (other == null) { return; } - if (other.RoleId != 0L) { - RoleId = other.RoleId; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.EncryptedData.Length != 0) { - EncryptedData = other.EncryptedData; - } - if (other.KeyType.Length != 0) { - KeyType = other.KeyType; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.VisibleBelow != false) { - VisibleBelow = other.VisibleBelow; + if (other.FullName.Length != 0) { + FullName = other.FullName; } - if (other.NewUserInherit != false) { - NewUserInherit = other.NewUserInherit; + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; } - if (other.RoleType.Length != 0) { - RoleType = other.RoleType; + if (other.Email.Length != 0) { + Email = other.Email; } + roleIds_.Add(other.roleIds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - RoleId = input.ReadInt64(); + EnterpriseUserId = input.ReadInt64(); break; } - case 16: { - NodeId = input.ReadInt64(); + case 18: { + FullName = input.ReadString(); break; } case 26: { - EncryptedData = input.ReadString(); + JobTitle = input.ReadString(); break; } case 34: { - KeyType = input.ReadString(); + Email = input.ReadString(); break; } + case 42: case 40: { - VisibleBelow = input.ReadBool(); + roleIds_.AddEntriesFrom(input, _repeated_roleIds_codec); break; } - case 48: { - NewUserInherit = input.ReadBool(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } - case 58: { - RoleType = input.ReadString(); + case 18: { + FullName = input.ReadString(); + break; + } + case 26: { + JobTitle = input.ReadString(); + break; + } + case 34: { + Email = input.ReadString(); + break; + } + case 42: + case 40: { + roleIds_.AddEntriesFrom(ref input, _repeated_roleIds_codec); break; } } } } + #endif } - public sealed partial class User : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new User()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordPermission : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordPermission()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[29]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[110]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public User() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordPermission() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public User(User other) : this() { - enterpriseUserId_ = other.enterpriseUserId_; - nodeId_ = other.nodeId_; - encryptedData_ = other.encryptedData_; - keyType_ = other.keyType_; - username_ = other.username_; - status_ = other.status_; - lock_ = other.lock_; - userId_ = other.userId_; - accountShareExpiration_ = other.accountShareExpiration_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public User Clone() { - return new User(this); - } - - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 1; - private long enterpriseUserId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } - set { - enterpriseUserId_ = value; - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 2; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } - } - - /// Field number for the "encryptedData" field. - public const int EncryptedDataFieldNumber = 3; - private string encryptedData_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedData { - get { return encryptedData_; } - set { - encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "keyType" field. - public const int KeyTypeFieldNumber = 4; - private string keyType_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string KeyType { - get { return keyType_; } - set { - keyType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "username" field. - public const int UsernameFieldNumber = 5; - private string username_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "status" field. - public const int StatusFieldNumber = 6; - private string status_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Status { - get { return status_; } - set { - status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordPermission(RecordPermission other) : this() { + recordUid_ = other.recordUid_; + permissionBits_ = other.permissionBits_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "lock" field. - public const int LockFieldNumber = 7; - private int lock_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Lock { - get { return lock_; } - set { - lock_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordPermission Clone() { + return new RecordPermission(this); } - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 8; - private int userId_; + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UserId { - get { return userId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } set { - userId_ = value; + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "accountShareExpiration" field. - public const int AccountShareExpirationFieldNumber = 9; - private long accountShareExpiration_; + /// Field number for the "permissionBits" field. + public const int PermissionBitsFieldNumber = 2; + private int permissionBits_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long AccountShareExpiration { - get { return accountShareExpiration_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PermissionBits { + get { return permissionBits_; } set { - accountShareExpiration_ = value; + permissionBits_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as User); + return Equals(other as RecordPermission); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(User other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordPermission other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (NodeId != other.NodeId) return false; - if (EncryptedData != other.EncryptedData) return false; - if (KeyType != other.KeyType) return false; - if (Username != other.Username) return false; - if (Status != other.Status) return false; - if (Lock != other.Lock) return false; - if (UserId != other.UserId) return false; - if (AccountShareExpiration != other.AccountShareExpiration) return false; + if (RecordUid != other.RecordUid) return false; + if (PermissionBits != other.PermissionBits) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); - if (KeyType.Length != 0) hash ^= KeyType.GetHashCode(); - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (Status.Length != 0) hash ^= Status.GetHashCode(); - if (Lock != 0) hash ^= Lock.GetHashCode(); - if (UserId != 0) hash ^= UserId.GetHashCode(); - if (AccountShareExpiration != 0L) hash ^= AccountShareExpiration.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (PermissionBits != 0) hash ^= PermissionBits.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -5912,82 +34759,58 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseUserId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(EnterpriseUserId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); } - if (NodeId != 0L) { + if (PermissionBits != 0) { output.WriteRawTag(16); - output.WriteInt64(NodeId); - } - if (EncryptedData.Length != 0) { - output.WriteRawTag(26); - output.WriteString(EncryptedData); - } - if (KeyType.Length != 0) { - output.WriteRawTag(34); - output.WriteString(KeyType); - } - if (Username.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Username); - } - if (Status.Length != 0) { - output.WriteRawTag(50); - output.WriteString(Status); + output.WriteInt32(PermissionBits); } - if (Lock != 0) { - output.WriteRawTag(56); - output.WriteInt32(Lock); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (UserId != 0) { - output.WriteRawTag(64); - output.WriteInt32(UserId); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); } - if (AccountShareExpiration != 0L) { - output.WriteRawTag(72); - output.WriteInt64(AccountShareExpiration); + if (PermissionBits != 0) { + output.WriteRawTag(16); + output.WriteInt32(PermissionBits); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (EncryptedData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); - } - if (KeyType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(KeyType); - } - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (Status.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); - } - if (Lock != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Lock); - } - if (UserId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); } - if (AccountShareExpiration != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(AccountShareExpiration); + if (PermissionBits != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PermissionBits); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -5996,129 +34819,129 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(User other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordPermission other) { if (other == null) { return; } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.EncryptedData.Length != 0) { - EncryptedData = other.EncryptedData; - } - if (other.KeyType.Length != 0) { - KeyType = other.KeyType; - } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.Status.Length != 0) { - Status = other.Status; - } - if (other.Lock != 0) { - Lock = other.Lock; - } - if (other.UserId != 0) { - UserId = other.UserId; + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; } - if (other.AccountShareExpiration != 0L) { - AccountShareExpiration = other.AccountShareExpiration; + if (other.PermissionBits != 0) { + PermissionBits = other.PermissionBits; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseUserId = input.ReadInt64(); + case 10: { + RecordUid = input.ReadBytes(); break; } case 16: { - NodeId = input.ReadInt64(); + PermissionBits = input.ReadInt32(); break; } - case 26: { - EncryptedData = input.ReadString(); - break; - } - case 34: { - KeyType = input.ReadString(); - break; - } - case 42: { - Username = input.ReadString(); - break; - } - case 50: { - Status = input.ReadString(); - break; - } - case 56: { - Lock = input.ReadInt32(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 64: { - UserId = input.ReadInt32(); + case 10: { + RecordUid = input.ReadBytes(); break; } - case 72: { - AccountShareExpiration = input.ReadInt64(); + case 16: { + PermissionBits = input.ReadInt32(); break; } } } } + #endif } - public sealed partial class UserAlias : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserAlias()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserRecord()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[30]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[111]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAlias() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRecord() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAlias(UserAlias other) : this() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRecord(UserRecord other) : this() { enterpriseUserId_ = other.enterpriseUserId_; - username_ = other.username_; + recordPermissions_ = other.recordPermissions_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserAlias Clone() { - return new UserAlias(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserRecord Clone() { + return new UserRecord(this); } /// Field number for the "enterpriseUserId" field. public const int EnterpriseUserIdFieldNumber = 1; private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long EnterpriseUserId { get { return enterpriseUserId_; } set { @@ -6126,24 +34949,26 @@ public long EnterpriseUserId { } } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 2; - private string username_ = ""; + /// Field number for the "recordPermissions" field. + public const int RecordPermissionsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordPermissions_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.RecordPermission.Parser); + private readonly pbc::RepeatedField recordPermissions_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordPermissions { + get { return recordPermissions_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserAlias); + return Equals(other as UserRecord); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserAlias other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserRecord other) { if (ReferenceEquals(other, null)) { return false; } @@ -6151,15 +34976,16 @@ public bool Equals(UserAlias other) { return true; } if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (Username != other.Username) return false; + if(!recordPermissions_.Equals(other.recordPermissions_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (Username.Length != 0) hash ^= Username.GetHashCode(); + hash ^= recordPermissions_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6167,34 +34993,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EnterpriseUserId != 0L) { output.WriteRawTag(8); output.WriteInt64(EnterpriseUserId); } - if (Username.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Username); - } + recordPermissions_.WriteTo(output, _repeated_recordPermissions_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + recordPermissions_.WriteTo(ref output, _repeated_recordPermissions_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EnterpriseUserId != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } + size += recordPermissions_.CalculateSize(_repeated_recordPermissions_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6202,24 +35045,31 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserAlias other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserRecord other) { if (other == null) { return; } if (other.EnterpriseUserId != 0L) { EnterpriseUserId = other.EnterpriseUserId; } - if (other.Username.Length != 0) { - Username = other.Username; - } + recordPermissions_.Add(other.recordPermissions_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -6228,109 +35078,169 @@ public void MergeFrom(pb::CodedInputStream input) { break; } case 18: { - Username = input.ReadString(); + recordPermissions_.AddEntriesFrom(input, _repeated_recordPermissions_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + recordPermissions_.AddEntriesFrom(ref input, _repeated_recordPermissions_codec); break; } } } } + #endif } - public sealed partial class ManagedNode : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManagedNode()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuditTeam : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuditTeam()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[31]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[112]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ManagedNode() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditTeam() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ManagedNode(ManagedNode other) : this() { - roleId_ = other.roleId_; - managedNodeId_ = other.managedNodeId_; - cascadeNodeManagement_ = other.cascadeNodeManagement_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditTeam(AuditTeam other) : this() { + teamUid_ = other.teamUid_; + teamName_ = other.teamName_; + restrictEdit_ = other.restrictEdit_; + restrictShare_ = other.restrictShare_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ManagedNode Clone() { - return new ManagedNode(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditTeam Clone() { + return new AuditTeam(this); } - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private long roleId_; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - roleId_ = value; + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "managedNodeId" field. - public const int ManagedNodeIdFieldNumber = 2; - private long managedNodeId_; + /// Field number for the "teamName" field. + public const int TeamNameFieldNumber = 2; + private string teamName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long ManagedNodeId { - get { return managedNodeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TeamName { + get { return teamName_; } set { - managedNodeId_ = value; + teamName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "cascadeNodeManagement" field. - public const int CascadeNodeManagementFieldNumber = 3; - private bool cascadeNodeManagement_; + /// Field number for the "restrictEdit" field. + public const int RestrictEditFieldNumber = 3; + private bool restrictEdit_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool CascadeNodeManagement { - get { return cascadeNodeManagement_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictEdit { + get { return restrictEdit_; } set { - cascadeNodeManagement_ = value; + restrictEdit_ = value; + } + } + + /// Field number for the "restrictShare" field. + public const int RestrictShareFieldNumber = 4; + private bool restrictShare_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RestrictShare { + get { return restrictShare_; } + set { + restrictShare_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ManagedNode); + return Equals(other as AuditTeam); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ManagedNode other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AuditTeam other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RoleId != other.RoleId) return false; - if (ManagedNodeId != other.ManagedNodeId) return false; - if (CascadeNodeManagement != other.CascadeNodeManagement) return false; + if (TeamUid != other.TeamUid) return false; + if (TeamName != other.TeamName) return false; + if (RestrictEdit != other.RestrictEdit) return false; + if (RestrictShare != other.RestrictShare) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); - if (ManagedNodeId != 0L) hash ^= ManagedNodeId.GetHashCode(); - if (CascadeNodeManagement != false) hash ^= CascadeNodeManagement.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (TeamName.Length != 0) hash ^= TeamName.GetHashCode(); + if (RestrictEdit != false) hash ^= RestrictEdit.GetHashCode(); + if (RestrictShare != false) hash ^= RestrictShare.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6338,39 +35248,79 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RoleId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(RoleId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); } - if (ManagedNodeId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(ManagedNodeId); + if (TeamName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TeamName); } - if (CascadeNodeManagement != false) { + if (RestrictEdit != false) { output.WriteRawTag(24); - output.WriteBool(CascadeNodeManagement); + output.WriteBool(RestrictEdit); + } + if (RestrictShare != false) { + output.WriteRawTag(32); + output.WriteBool(RestrictShare); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (TeamName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(TeamName); + } + if (RestrictEdit != false) { + output.WriteRawTag(24); + output.WriteBool(RestrictEdit); + } + if (RestrictShare != false) { + output.WriteRawTag(32); + output.WriteBool(RestrictShare); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); } - if (ManagedNodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ManagedNodeId); + if (TeamName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TeamName); } - if (CascadeNodeManagement != false) { + if (RestrictEdit != false) { + size += 1 + 1; + } + if (RestrictShare != false) { size += 1 + 1; } if (_unknownFields != null) { @@ -6380,141 +35330,195 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ManagedNode other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AuditTeam other) { if (other == null) { return; } - if (other.RoleId != 0L) { - RoleId = other.RoleId; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; } - if (other.ManagedNodeId != 0L) { - ManagedNodeId = other.ManagedNodeId; + if (other.TeamName.Length != 0) { + TeamName = other.TeamName; } - if (other.CascadeNodeManagement != false) { - CascadeNodeManagement = other.CascadeNodeManagement; + if (other.RestrictEdit != false) { + RestrictEdit = other.RestrictEdit; + } + if (other.RestrictShare != false) { + RestrictShare = other.RestrictShare; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - RoleId = input.ReadInt64(); + case 10: { + TeamUid = input.ReadBytes(); break; } - case 16: { - ManagedNodeId = input.ReadInt64(); + case 18: { + TeamName = input.ReadString(); break; } case 24: { - CascadeNodeManagement = input.ReadBool(); + RestrictEdit = input.ReadBool(); + break; + } + case 32: { + RestrictShare = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + TeamName = input.ReadString(); + break; + } + case 24: { + RestrictEdit = input.ReadBool(); + break; + } + case 32: { + RestrictShare = input.ReadBool(); break; } } } } + #endif } - public sealed partial class UserManagedNode : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserManagedNode()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AuditTeamUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AuditTeamUser()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[32]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[113]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserManagedNode() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditTeamUser() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserManagedNode(UserManagedNode other) : this() { - nodeId_ = other.nodeId_; - cascadeNodeManagement_ = other.cascadeNodeManagement_; - privileges_ = other.privileges_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditTeamUser(AuditTeamUser other) : this() { + teamUid_ = other.teamUid_; + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserManagedNode Clone() { - return new UserManagedNode(this); - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 1; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AuditTeamUser Clone() { + return new AuditTeamUser(this); } - /// Field number for the "cascadeNodeManagement" field. - public const int CascadeNodeManagementFieldNumber = 2; - private bool cascadeNodeManagement_; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool CascadeNodeManagement { - get { return cascadeNodeManagement_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - cascadeNodeManagement_ = value; + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "privileges" field. - public const int PrivilegesFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_privileges_codec - = pb::FieldCodec.ForString(26); - private readonly pbc::RepeatedField privileges_ = new pbc::RepeatedField(); + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Privileges { - get { return privileges_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserManagedNode); + return Equals(other as AuditTeamUser); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserManagedNode other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AuditTeamUser other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (NodeId != other.NodeId) return false; - if (CascadeNodeManagement != other.CascadeNodeManagement) return false; - if(!privileges_.Equals(other.privileges_)) return false; + if (TeamUid != other.TeamUid) return false; + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (CascadeNodeManagement != false) hash ^= CascadeNodeManagement.GetHashCode(); - hash ^= privileges_.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + hash ^= enterpriseUserIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6522,36 +35526,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (NodeId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(NodeId); - } - if (CascadeNodeManagement != false) { - output.WriteRawTag(16); - output.WriteBool(CascadeNodeManagement); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); } - privileges_.WriteTo(output, _repeated_privileges_codec); + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (CascadeNodeManagement != false) { - size += 1 + 1; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); } - size += privileges_.CalculateSize(_repeated_privileges_codec); + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6559,139 +35578,187 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserManagedNode other) { - if (other == null) { - return; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AuditTeamUser other) { + if (other == null) { + return; } - if (other.CascadeNodeManagement != false) { - CascadeNodeManagement = other.CascadeNodeManagement; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; } - privileges_.Add(other.privileges_); + enterpriseUserIds_.Add(other.enterpriseUserIds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - NodeId = input.ReadInt64(); + case 10: { + TeamUid = input.ReadBytes(); break; } + case 18: case 16: { - CascadeNodeManagement = input.ReadBool(); + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); break; } - case 26: { - privileges_.AddEntriesFrom(input, _repeated_privileges_codec); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: + case 16: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); break; } } } } + #endif } - public sealed partial class UserPrivilege : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserPrivilege()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderRecord()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[33]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[114]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserPrivilege() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderRecord() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserPrivilege(UserPrivilege other) : this() { - userManagedNodes_ = other.userManagedNodes_.Clone(); - enterpriseUserId_ = other.enterpriseUserId_; - encryptedData_ = other.encryptedData_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderRecord(SharedFolderRecord other) : this() { + sharedFolderUid_ = other.sharedFolderUid_; + recordPermissions_ = other.recordPermissions_.Clone(); + shareAdminRecords_ = other.shareAdminRecords_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public UserPrivilege Clone() { - return new UserPrivilege(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderRecord Clone() { + return new SharedFolderRecord(this); } - /// Field number for the "userManagedNodes" field. - public const int UserManagedNodesFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_userManagedNodes_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.UserManagedNode.Parser); - private readonly pbc::RepeatedField userManagedNodes_ = new pbc::RepeatedField(); + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 1; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField UserManagedNodes { - get { return userManagedNodes_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 2; - private long enterpriseUserId_; + /// Field number for the "recordPermissions" field. + public const int RecordPermissionsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordPermissions_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.RecordPermission.Parser); + private readonly pbc::RepeatedField recordPermissions_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } - set { - enterpriseUserId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordPermissions { + get { return recordPermissions_; } } - /// Field number for the "encryptedData" field. - public const int EncryptedDataFieldNumber = 3; - private string encryptedData_ = ""; + /// Field number for the "shareAdminRecords" field. + public const int ShareAdminRecordsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_shareAdminRecords_codec + = pb::FieldCodec.ForMessage(26, global::Enterprise.ShareAdminRecord.Parser); + private readonly pbc::RepeatedField shareAdminRecords_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedData { - get { return encryptedData_; } - set { - encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareAdminRecords { + get { return shareAdminRecords_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as UserPrivilege); + return Equals(other as SharedFolderRecord); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(UserPrivilege other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderRecord other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!userManagedNodes_.Equals(other.userManagedNodes_)) return false; - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (EncryptedData != other.EncryptedData) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if(!recordPermissions_.Equals(other.recordPermissions_)) return false; + if(!shareAdminRecords_.Equals(other.shareAdminRecords_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= userManagedNodes_.GetHashCode(); - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + hash ^= recordPermissions_.GetHashCode(); + hash ^= shareAdminRecords_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6699,36 +35766,54 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - userManagedNodes_.WriteTo(output, _repeated_userManagedNodes_codec); - if (EnterpriseUserId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(EnterpriseUserId); - } - if (EncryptedData.Length != 0) { - output.WriteRawTag(26); - output.WriteString(EncryptedData); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); } + recordPermissions_.WriteTo(output, _repeated_recordPermissions_codec); + shareAdminRecords_.WriteTo(output, _repeated_shareAdminRecords_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + recordPermissions_.WriteTo(ref output, _repeated_recordPermissions_codec); + shareAdminRecords_.WriteTo(ref output, _repeated_shareAdminRecords_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += userManagedNodes_.CalculateSize(_repeated_userManagedNodes_codec); - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (EncryptedData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); } + size += recordPermissions_.CalculateSize(_repeated_recordPermissions_codec); + size += shareAdminRecords_.CalculateSize(_repeated_shareAdminRecords_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6736,96 +35821,136 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(UserPrivilege other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderRecord other) { if (other == null) { return; } - userManagedNodes_.Add(other.userManagedNodes_); - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.EncryptedData.Length != 0) { - EncryptedData = other.EncryptedData; + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; } + recordPermissions_.Add(other.recordPermissions_); + shareAdminRecords_.Add(other.shareAdminRecords_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - userManagedNodes_.AddEntriesFrom(input, _repeated_userManagedNodes_codec); + SharedFolderUid = input.ReadBytes(); break; } - case 16: { - EnterpriseUserId = input.ReadInt64(); + case 18: { + recordPermissions_.AddEntriesFrom(input, _repeated_recordPermissions_codec); break; } case 26: { - EncryptedData = input.ReadString(); + shareAdminRecords_.AddEntriesFrom(input, _repeated_shareAdminRecords_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 18: { + recordPermissions_.AddEntriesFrom(ref input, _repeated_recordPermissions_codec); + break; + } + case 26: { + shareAdminRecords_.AddEntriesFrom(ref input, _repeated_shareAdminRecords_codec); break; } } } } + #endif } - public sealed partial class RoleUser : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleUser()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShareAdminRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShareAdminRecord()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[34]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[115]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleUser() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareAdminRecord() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleUser(RoleUser other) : this() { - roleId_ = other.roleId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareAdminRecord(ShareAdminRecord other) : this() { enterpriseUserId_ = other.enterpriseUserId_; + recordPermissionIndexes_ = other.recordPermissionIndexes_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleUser Clone() { - return new RoleUser(this); - } - - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private long roleId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } - set { - roleId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareAdminRecord Clone() { + return new ShareAdminRecord(this); } /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 2; + public const int EnterpriseUserIdFieldNumber = 1; private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long EnterpriseUserId { get { return enterpriseUserId_; } set { @@ -6833,29 +35958,43 @@ public long EnterpriseUserId { } } + /// Field number for the "recordPermissionIndexes" field. + public const int RecordPermissionIndexesFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordPermissionIndexes_codec + = pb::FieldCodec.ForInt32(18); + private readonly pbc::RepeatedField recordPermissionIndexes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordPermissionIndexes { + get { return recordPermissionIndexes_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RoleUser); + return Equals(other as ShareAdminRecord); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RoleUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShareAdminRecord other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RoleId != other.RoleId) return false; if (EnterpriseUserId != other.EnterpriseUserId) return false; + if(!recordPermissionIndexes_.Equals(other.recordPermissionIndexes_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + hash ^= recordPermissionIndexes_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -6863,34 +36002,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RoleId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(RoleId); + output.WriteInt64(EnterpriseUserId); + } + recordPermissionIndexes_.WriteTo(output, _repeated_recordPermissionIndexes_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (EnterpriseUserId != 0L) { - output.WriteRawTag(16); + output.WriteRawTag(8); output.WriteInt64(EnterpriseUserId); } + recordPermissionIndexes_.WriteTo(ref output, _repeated_recordPermissionIndexes_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); - } if (EnterpriseUserId != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } + size += recordPermissionIndexes_.CalculateSize(_repeated_recordPermissionIndexes_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -6898,151 +36054,173 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RoleUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShareAdminRecord other) { if (other == null) { return; } - if (other.RoleId != 0L) { - RoleId = other.RoleId; - } if (other.EnterpriseUserId != 0L) { EnterpriseUserId = other.EnterpriseUserId; } + recordPermissionIndexes_.Add(other.recordPermissionIndexes_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - RoleId = input.ReadInt64(); + EnterpriseUserId = input.ReadInt64(); break; } + case 18: case 16: { + recordPermissionIndexes_.AddEntriesFrom(input, _repeated_recordPermissionIndexes_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { EnterpriseUserId = input.ReadInt64(); break; } + case 18: + case 16: { + recordPermissionIndexes_.AddEntriesFrom(ref input, _repeated_recordPermissionIndexes_codec); + break; + } } } } + #endif } - /// - ///possible values for privilegeType - ///UNKNOWN = 0 - ///MANAGE_USER = 1 - ///MANAGE_NODES = 2 - ///MANAGE_LICENCES = 3 - ///MANAGE_ROLES = 4 - ///MANAGE_TEAMS = 5 - ///TRANSFER_ACCOUNT = 6 - ///RUN_REPORTS = 7 - ///VIEW_TREE = 8 - ///MANAGE_BRIDGE = 9 - ///MANAGE_COMPANIES = 10 - ///ALLOCATE_POOL_LICENSES = 11 - ///APPROVE_DEVICE = 13 - /// - public sealed partial class RolePrivilege : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RolePrivilege()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUser()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[35]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[116]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RolePrivilege() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUser() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RolePrivilege(RolePrivilege other) : this() { - managedNodeId_ = other.managedNodeId_; - roleId_ = other.roleId_; - privilegeType_ = other.privilegeType_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUser(SharedFolderUser other) : this() { + sharedFolderUid_ = other.sharedFolderUid_; + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RolePrivilege Clone() { - return new RolePrivilege(this); - } - - /// Field number for the "managedNodeId" field. - public const int ManagedNodeIdFieldNumber = 1; - private long managedNodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long ManagedNodeId { - get { return managedNodeId_; } - set { - managedNodeId_ = value; - } - } - - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 2; - private long roleId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } - set { - roleId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUser Clone() { + return new SharedFolderUser(this); } - - /// Field number for the "privilegeType" field. - public const int PrivilegeTypeFieldNumber = 3; - private string privilegeType_ = ""; + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 1; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string PrivilegeType { - get { return privilegeType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } set { - privilegeType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(18); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RolePrivilege); + return Equals(other as SharedFolderUser); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RolePrivilege other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUser other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ManagedNodeId != other.ManagedNodeId) return false; - if (RoleId != other.RoleId) return false; - if (PrivilegeType != other.PrivilegeType) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ManagedNodeId != 0L) hash ^= ManagedNodeId.GetHashCode(); - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); - if (PrivilegeType.Length != 0) hash ^= PrivilegeType.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + hash ^= enterpriseUserIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7050,41 +36228,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ManagedNodeId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(ManagedNodeId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); } - if (RoleId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(RoleId); + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (PrivilegeType.Length != 0) { - output.WriteRawTag(26); - output.WriteString(PrivilegeType); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); } + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ManagedNodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ManagedNodeId); - } - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); - } - if (PrivilegeType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(PrivilegeType); + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); } + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -7092,142 +36280,173 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RolePrivilege other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUser other) { if (other == null) { return; } - if (other.ManagedNodeId != 0L) { - ManagedNodeId = other.ManagedNodeId; - } - if (other.RoleId != 0L) { - RoleId = other.RoleId; - } - if (other.PrivilegeType.Length != 0) { - PrivilegeType = other.PrivilegeType; + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; } + enterpriseUserIds_.Add(other.enterpriseUserIds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ManagedNodeId = input.ReadInt64(); + case 10: { + SharedFolderUid = input.ReadBytes(); break; } + case 18: case 16: { - RoleId = input.ReadInt64(); + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); break; } - case 26: { - PrivilegeType = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 18: + case 16: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); break; } } } } + #endif } - public sealed partial class RoleEnforcement : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleEnforcement()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderTeam : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderTeam()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[36]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[117]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleEnforcement() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderTeam() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleEnforcement(RoleEnforcement other) : this() { - roleId_ = other.roleId_; - enforcementType_ = other.enforcementType_; - value_ = other.value_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderTeam(SharedFolderTeam other) : this() { + sharedFolderUid_ = other.sharedFolderUid_; + teamUids_ = other.teamUids_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleEnforcement Clone() { - return new RoleEnforcement(this); - } - - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private long roleId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } - set { - roleId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderTeam Clone() { + return new SharedFolderTeam(this); } - /// Field number for the "enforcementType" field. - public const int EnforcementTypeFieldNumber = 2; - private string enforcementType_ = ""; + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 1; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EnforcementType { - get { return enforcementType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } set { - enforcementType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "value" field. - public const int ValueFieldNumber = 3; - private string value_ = ""; + /// Field number for the "teamUids" field. + public const int TeamUidsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_teamUids_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField teamUids_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Value { - get { return value_; } - set { - value_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TeamUids { + get { return teamUids_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RoleEnforcement); + return Equals(other as SharedFolderTeam); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RoleEnforcement other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderTeam other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RoleId != other.RoleId) return false; - if (EnforcementType != other.EnforcementType) return false; - if (Value != other.Value) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if(!teamUids_.Equals(other.teamUids_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); - if (EnforcementType.Length != 0) hash ^= EnforcementType.GetHashCode(); - if (Value.Length != 0) hash ^= Value.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + hash ^= teamUids_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7235,41 +36454,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RoleId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(RoleId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); } - if (EnforcementType.Length != 0) { - output.WriteRawTag(18); - output.WriteString(EnforcementType); + teamUids_.WriteTo(output, _repeated_teamUids_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Value.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Value); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); } + teamUids_.WriteTo(ref output, _repeated_teamUids_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); - } - if (EnforcementType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EnforcementType); - } - if (Value.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Value); + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); } + size += teamUids_.CalculateSize(_repeated_teamUids_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -7277,212 +36506,157 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RoleEnforcement other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderTeam other) { if (other == null) { return; } - if (other.RoleId != 0L) { - RoleId = other.RoleId; - } - if (other.EnforcementType.Length != 0) { - EnforcementType = other.EnforcementType; - } - if (other.Value.Length != 0) { - Value = other.Value; + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; } + teamUids_.Add(other.teamUids_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - RoleId = input.ReadInt64(); + case 10: { + SharedFolderUid = input.ReadBytes(); break; } case 18: { - EnforcementType = input.ReadString(); + teamUids_.AddEntriesFrom(input, _repeated_teamUids_codec); break; } - case 26: { - Value = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 18: { + teamUids_.AddEntriesFrom(ref input, _repeated_teamUids_codec); break; } } } } + #endif } - public sealed partial class Team : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Team()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetComplianceReportRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetComplianceReportRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[37]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[118]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Team() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetComplianceReportRequest() { OnConstruction(); } partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Team(Team other) : this() { - teamUid_ = other.teamUid_; - name_ = other.name_; - nodeId_ = other.nodeId_; - restrictEdit_ = other.restrictEdit_; - restrictShare_ = other.restrictShare_; - restrictView_ = other.restrictView_; - encryptedData_ = other.encryptedData_; - encryptedTeamKey_ = other.encryptedTeamKey_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Team Clone() { - return new Team(this); - } - - /// Field number for the "teamUid" field. - public const int TeamUidFieldNumber = 1; - private pb::ByteString teamUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString TeamUid { - get { return teamUid_; } - set { - teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "name" field. - public const int NameFieldNumber = 2; - private string name_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 3; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } - } - - /// Field number for the "restrictEdit" field. - public const int RestrictEditFieldNumber = 4; - private bool restrictEdit_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool RestrictEdit { - get { return restrictEdit_; } - set { - restrictEdit_ = value; - } - } - - /// Field number for the "restrictShare" field. - public const int RestrictShareFieldNumber = 5; - private bool restrictShare_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool RestrictShare { - get { return restrictShare_; } - set { - restrictShare_ = value; - } - } - - /// Field number for the "restrictView" field. - public const int RestrictViewFieldNumber = 6; - private bool restrictView_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool RestrictView { - get { return restrictView_; } - set { - restrictView_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetComplianceReportRequest(GetComplianceReportRequest other) : this() { + reportUid_ = other.reportUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "encryptedData" field. - public const int EncryptedDataFieldNumber = 7; - private string encryptedData_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedData { - get { return encryptedData_; } - set { - encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetComplianceReportRequest Clone() { + return new GetComplianceReportRequest(this); } - /// Field number for the "encryptedTeamKey" field. - public const int EncryptedTeamKeyFieldNumber = 8; - private string encryptedTeamKey_ = ""; + /// Field number for the "reportUid" field. + public const int ReportUidFieldNumber = 1; + private pb::ByteString reportUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedTeamKey { - get { return encryptedTeamKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ReportUid { + get { return reportUid_; } set { - encryptedTeamKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + reportUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Team); + return Equals(other as GetComplianceReportRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Team other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetComplianceReportRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (TeamUid != other.TeamUid) return false; - if (Name != other.Name) return false; - if (NodeId != other.NodeId) return false; - if (RestrictEdit != other.RestrictEdit) return false; - if (RestrictShare != other.RestrictShare) return false; - if (RestrictView != other.RestrictView) return false; - if (EncryptedData != other.EncryptedData) return false; - if (EncryptedTeamKey != other.EncryptedTeamKey) return false; + if (ReportUid != other.ReportUid) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (RestrictEdit != false) hash ^= RestrictEdit.GetHashCode(); - if (RestrictShare != false) hash ^= RestrictShare.GetHashCode(); - if (RestrictView != false) hash ^= RestrictView.GetHashCode(); - if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); - if (EncryptedTeamKey.Length != 0) hash ^= EncryptedTeamKey.GetHashCode(); + if (ReportUid.Length != 0) hash ^= ReportUid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7490,75 +36664,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (TeamUid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ReportUid.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(TeamUid); - } - if (Name.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Name); - } - if (NodeId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(NodeId); - } - if (RestrictEdit != false) { - output.WriteRawTag(32); - output.WriteBool(RestrictEdit); - } - if (RestrictShare != false) { - output.WriteRawTag(40); - output.WriteBool(RestrictShare); - } - if (RestrictView != false) { - output.WriteRawTag(48); - output.WriteBool(RestrictView); + output.WriteBytes(ReportUid); } - if (EncryptedData.Length != 0) { - output.WriteRawTag(58); - output.WriteString(EncryptedData); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (EncryptedTeamKey.Length != 0) { - output.WriteRawTag(66); - output.WriteString(EncryptedTeamKey); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ReportUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(ReportUid); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (TeamUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); - } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (RestrictEdit != false) { - size += 1 + 1; - } - if (RestrictShare != false) { - size += 1 + 1; - } - if (RestrictView != false) { - size += 1 + 1; - } - if (EncryptedData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); - } - if (EncryptedTeamKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedTeamKey); + if (ReportUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ReportUid); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -7567,183 +36713,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Team other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetComplianceReportRequest other) { if (other == null) { return; } - if (other.TeamUid.Length != 0) { - TeamUid = other.TeamUid; - } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.RestrictEdit != false) { - RestrictEdit = other.RestrictEdit; - } - if (other.RestrictShare != false) { - RestrictShare = other.RestrictShare; - } - if (other.RestrictView != false) { - RestrictView = other.RestrictView; - } - if (other.EncryptedData.Length != 0) { - EncryptedData = other.EncryptedData; - } - if (other.EncryptedTeamKey.Length != 0) { - EncryptedTeamKey = other.EncryptedTeamKey; + if (other.ReportUid.Length != 0) { + ReportUid = other.ReportUid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - TeamUid = input.ReadBytes(); - break; - } - case 18: { - Name = input.ReadString(); + ReportUid = input.ReadBytes(); break; } - case 24: { - NodeId = input.ReadInt64(); - break; - } - case 32: { - RestrictEdit = input.ReadBool(); - break; - } - case 40: { - RestrictShare = input.ReadBool(); - break; - } - case 48: { - RestrictView = input.ReadBool(); - break; - } - case 58: { - EncryptedData = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 66: { - EncryptedTeamKey = input.ReadString(); + case 10: { + ReportUid = input.ReadBytes(); break; } } } } + #endif } - /// - ///possible value for userType - ///USER = 0; - ///ADMIN = 1; - ///ADMIN_HIDE_SHARED_FOLDERS = 2; - /// - public sealed partial class TeamUser : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamUser()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetComplianceReportResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetComplianceReportResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[38]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[119]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TeamUser() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetComplianceReportResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TeamUser(TeamUser other) : this() { - teamUid_ = other.teamUid_; - enterpriseUserId_ = other.enterpriseUserId_; - userType_ = other.userType_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetComplianceReportResponse(GetComplianceReportResponse other) : this() { + downloadUrl_ = other.downloadUrl_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TeamUser Clone() { - return new TeamUser(this); - } - - /// Field number for the "teamUid" field. - public const int TeamUidFieldNumber = 1; - private pb::ByteString teamUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString TeamUid { - get { return teamUid_; } - set { - teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 2; - private long enterpriseUserId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseUserId { - get { return enterpriseUserId_; } - set { - enterpriseUserId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetComplianceReportResponse Clone() { + return new GetComplianceReportResponse(this); } - /// Field number for the "userType" field. - public const int UserTypeFieldNumber = 3; - private string userType_ = ""; + /// Field number for the "downloadUrl" field. + public const int DownloadUrlFieldNumber = 1; + private string downloadUrl_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string UserType { - get { return userType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string DownloadUrl { + get { return downloadUrl_; } set { - userType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + downloadUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as TeamUser); + return Equals(other as GetComplianceReportResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(TeamUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetComplianceReportResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (TeamUid != other.TeamUid) return false; - if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (UserType != other.UserType) return false; + if (DownloadUrl != other.DownloadUrl) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); - if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (UserType.Length != 0) hash ^= UserType.GetHashCode(); + if (DownloadUrl.Length != 0) hash ^= DownloadUrl.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -7751,40 +36862,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (TeamUid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (DownloadUrl.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(TeamUid); + output.WriteString(DownloadUrl); } - if (EnterpriseUserId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(EnterpriseUserId); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (UserType.Length != 0) { - output.WriteRawTag(26); - output.WriteString(UserType); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (DownloadUrl.Length != 0) { + output.WriteRawTag(10); + output.WriteString(DownloadUrl); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (TeamUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); - } - if (EnterpriseUserId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); - } - if (UserType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(UserType); + if (DownloadUrl.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(DownloadUrl); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -7793,226 +36911,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(TeamUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetComplianceReportResponse other) { if (other == null) { return; } - if (other.TeamUid.Length != 0) { - TeamUid = other.TeamUid; - } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.UserType.Length != 0) { - UserType = other.UserType; + if (other.DownloadUrl.Length != 0) { + DownloadUrl = other.DownloadUrl; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - TeamUid = input.ReadBytes(); + DownloadUrl = input.ReadString(); break; } - case 16: { - EnterpriseUserId = input.ReadInt64(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 26: { - UserType = input.ReadString(); + case 10: { + DownloadUrl = input.ReadString(); break; } } } } + #endif } - public sealed partial class ManagedCompany : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ManagedCompany()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ComplianceReportCriteriaRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ComplianceReportCriteriaRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[39]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[120]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ManagedCompany() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteriaRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ManagedCompany(ManagedCompany other) : this() { - mcEnterpriseId_ = other.mcEnterpriseId_; - mcEnterpriseName_ = other.mcEnterpriseName_; - mspNodeId_ = other.mspNodeId_; - numberOfSeats_ = other.numberOfSeats_; - numberOfUsers_ = other.numberOfUsers_; - productId_ = other.productId_; - isExpired_ = other.isExpired_; - treeKey_ = other.treeKey_; - treeKeyRole_ = other.treeKeyRole_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteriaRequest(ComplianceReportCriteriaRequest other) : this() { + criteriaUid_ = other.criteriaUid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ManagedCompany Clone() { - return new ManagedCompany(this); - } - - /// Field number for the "mcEnterpriseId" field. - public const int McEnterpriseIdFieldNumber = 1; - private int mcEnterpriseId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int McEnterpriseId { - get { return mcEnterpriseId_; } - set { - mcEnterpriseId_ = value; - } - } - - /// Field number for the "mcEnterpriseName" field. - public const int McEnterpriseNameFieldNumber = 2; - private string mcEnterpriseName_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string McEnterpriseName { - get { return mcEnterpriseName_; } - set { - mcEnterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "mspNodeId" field. - public const int MspNodeIdFieldNumber = 3; - private long mspNodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long MspNodeId { - get { return mspNodeId_; } - set { - mspNodeId_ = value; - } - } - - /// Field number for the "numberOfSeats" field. - public const int NumberOfSeatsFieldNumber = 4; - private int numberOfSeats_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int NumberOfSeats { - get { return numberOfSeats_; } - set { - numberOfSeats_ = value; - } - } - - /// Field number for the "numberOfUsers" field. - public const int NumberOfUsersFieldNumber = 5; - private int numberOfUsers_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int NumberOfUsers { - get { return numberOfUsers_; } - set { - numberOfUsers_ = value; - } - } - - /// Field number for the "productId" field. - public const int ProductIdFieldNumber = 6; - private string productId_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ProductId { - get { return productId_; } - set { - productId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "isExpired" field. - public const int IsExpiredFieldNumber = 7; - private bool isExpired_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IsExpired { - get { return isExpired_; } - set { - isExpired_ = value; - } - } - - /// Field number for the "treeKey" field. - public const int TreeKeyFieldNumber = 8; - private string treeKey_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string TreeKey { - get { return treeKey_; } - set { - treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ComplianceReportCriteriaRequest Clone() { + return new ComplianceReportCriteriaRequest(this); } - /// Field number for the "tree_key_role" field. - public const int TreeKeyRoleFieldNumber = 9; - private long treeKeyRole_; + /// Field number for the "criteriaUid" field. + public const int CriteriaUidFieldNumber = 1; + private pb::ByteString criteriaUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long TreeKeyRole { - get { return treeKeyRole_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString CriteriaUid { + get { return criteriaUid_; } set { - treeKeyRole_ = value; + criteriaUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ManagedCompany); + return Equals(other as ComplianceReportCriteriaRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ManagedCompany other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ComplianceReportCriteriaRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (McEnterpriseId != other.McEnterpriseId) return false; - if (McEnterpriseName != other.McEnterpriseName) return false; - if (MspNodeId != other.MspNodeId) return false; - if (NumberOfSeats != other.NumberOfSeats) return false; - if (NumberOfUsers != other.NumberOfUsers) return false; - if (ProductId != other.ProductId) return false; - if (IsExpired != other.IsExpired) return false; - if (TreeKey != other.TreeKey) return false; - if (TreeKeyRole != other.TreeKeyRole) return false; + if (CriteriaUid != other.CriteriaUid) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (McEnterpriseId != 0) hash ^= McEnterpriseId.GetHashCode(); - if (McEnterpriseName.Length != 0) hash ^= McEnterpriseName.GetHashCode(); - if (MspNodeId != 0L) hash ^= MspNodeId.GetHashCode(); - if (NumberOfSeats != 0) hash ^= NumberOfSeats.GetHashCode(); - if (NumberOfUsers != 0) hash ^= NumberOfUsers.GetHashCode(); - if (ProductId.Length != 0) hash ^= ProductId.GetHashCode(); - if (IsExpired != false) hash ^= IsExpired.GetHashCode(); - if (TreeKey.Length != 0) hash ^= TreeKey.GetHashCode(); - if (TreeKeyRole != 0L) hash ^= TreeKeyRole.GetHashCode(); + if (CriteriaUid.Length != 0) hash ^= CriteriaUid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8020,82 +37060,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (McEnterpriseId != 0) { - output.WriteRawTag(8); - output.WriteInt32(McEnterpriseId); - } - if (McEnterpriseName.Length != 0) { - output.WriteRawTag(18); - output.WriteString(McEnterpriseName); - } - if (MspNodeId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(MspNodeId); - } - if (NumberOfSeats != 0) { - output.WriteRawTag(32); - output.WriteInt32(NumberOfSeats); - } - if (NumberOfUsers != 0) { - output.WriteRawTag(40); - output.WriteInt32(NumberOfUsers); - } - if (ProductId.Length != 0) { - output.WriteRawTag(50); - output.WriteString(ProductId); - } - if (IsExpired != false) { - output.WriteRawTag(56); - output.WriteBool(IsExpired); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (CriteriaUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(CriteriaUid); } - if (TreeKey.Length != 0) { - output.WriteRawTag(66); - output.WriteString(TreeKey); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (TreeKeyRole != 0L) { - output.WriteRawTag(72); - output.WriteInt64(TreeKeyRole); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CriteriaUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(CriteriaUid); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (McEnterpriseId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(McEnterpriseId); - } - if (McEnterpriseName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(McEnterpriseName); - } - if (MspNodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(MspNodeId); - } - if (NumberOfSeats != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfSeats); - } - if (NumberOfUsers != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfUsers); - } - if (ProductId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ProductId); - } - if (IsExpired != false) { - size += 1 + 1; - } - if (TreeKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(TreeKey); - } - if (TreeKeyRole != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(TreeKeyRole); + if (CriteriaUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(CriteriaUid); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -8104,198 +37109,148 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ManagedCompany other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ComplianceReportCriteriaRequest other) { if (other == null) { return; } - if (other.McEnterpriseId != 0) { - McEnterpriseId = other.McEnterpriseId; - } - if (other.McEnterpriseName.Length != 0) { - McEnterpriseName = other.McEnterpriseName; - } - if (other.MspNodeId != 0L) { - MspNodeId = other.MspNodeId; - } - if (other.NumberOfSeats != 0) { - NumberOfSeats = other.NumberOfSeats; - } - if (other.NumberOfUsers != 0) { - NumberOfUsers = other.NumberOfUsers; - } - if (other.ProductId.Length != 0) { - ProductId = other.ProductId; - } - if (other.IsExpired != false) { - IsExpired = other.IsExpired; - } - if (other.TreeKey.Length != 0) { - TreeKey = other.TreeKey; - } - if (other.TreeKeyRole != 0L) { - TreeKeyRole = other.TreeKeyRole; + if (other.CriteriaUid.Length != 0) { + CriteriaUid = other.CriteriaUid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - McEnterpriseId = input.ReadInt32(); - break; - } - case 18: { - McEnterpriseName = input.ReadString(); - break; - } - case 24: { - MspNodeId = input.ReadInt64(); - break; - } - case 32: { - NumberOfSeats = input.ReadInt32(); - break; - } - case 40: { - NumberOfUsers = input.ReadInt32(); - break; - } - case 50: { - ProductId = input.ReadString(); + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - } - case 56: { - IsExpired = input.ReadBool(); + case 10: { + CriteriaUid = input.ReadBytes(); break; } - case 66: { - TreeKey = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 72: { - TreeKeyRole = input.ReadInt64(); + case 10: { + CriteriaUid = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class MSPPool : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MSPPool()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SaveComplianceReportCriteriaResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SaveComplianceReportCriteriaResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[40]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[121]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MSPPool() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SaveComplianceReportCriteriaResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MSPPool(MSPPool other) : this() { - productId_ = other.productId_; - seats_ = other.seats_; - availableSeats_ = other.availableSeats_; - stash_ = other.stash_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SaveComplianceReportCriteriaResponse(SaveComplianceReportCriteriaResponse other) : this() { + criteriaUid_ = other.criteriaUid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MSPPool Clone() { - return new MSPPool(this); - } - - /// Field number for the "productId" field. - public const int ProductIdFieldNumber = 1; - private string productId_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ProductId { - get { return productId_; } - set { - productId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "seats" field. - public const int SeatsFieldNumber = 2; - private int seats_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Seats { - get { return seats_; } - set { - seats_ = value; - } - } - - /// Field number for the "availableSeats" field. - public const int AvailableSeatsFieldNumber = 3; - private int availableSeats_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int AvailableSeats { - get { return availableSeats_; } - set { - availableSeats_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SaveComplianceReportCriteriaResponse Clone() { + return new SaveComplianceReportCriteriaResponse(this); } - /// Field number for the "stash" field. - public const int StashFieldNumber = 4; - private int stash_; + /// Field number for the "criteriaUid" field. + public const int CriteriaUidFieldNumber = 1; + private pb::ByteString criteriaUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Stash { - get { return stash_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString CriteriaUid { + get { return criteriaUid_; } set { - stash_ = value; + criteriaUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MSPPool); + return Equals(other as SaveComplianceReportCriteriaResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MSPPool other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SaveComplianceReportCriteriaResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ProductId != other.ProductId) return false; - if (Seats != other.Seats) return false; - if (AvailableSeats != other.AvailableSeats) return false; - if (Stash != other.Stash) return false; + if (CriteriaUid != other.CriteriaUid) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ProductId.Length != 0) hash ^= ProductId.GetHashCode(); - if (Seats != 0) hash ^= Seats.GetHashCode(); - if (AvailableSeats != 0) hash ^= AvailableSeats.GetHashCode(); - if (Stash != 0) hash ^= Stash.GetHashCode(); + if (CriteriaUid.Length != 0) hash ^= CriteriaUid.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8303,47 +37258,47 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ProductId.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (CriteriaUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(ProductId); - } - if (Seats != 0) { - output.WriteRawTag(16); - output.WriteInt32(Seats); + output.WriteBytes(CriteriaUid); } - if (AvailableSeats != 0) { - output.WriteRawTag(24); - output.WriteInt32(AvailableSeats); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Stash != 0) { - output.WriteRawTag(32); - output.WriteInt32(Stash); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (CriteriaUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(CriteriaUid); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ProductId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ProductId); - } - if (Seats != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Seats); - } - if (AvailableSeats != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(AvailableSeats); - } - if (Stash != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Stash); + if (CriteriaUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(CriteriaUid); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -8352,135 +37307,168 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MSPPool other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SaveComplianceReportCriteriaResponse other) { if (other == null) { return; } - if (other.ProductId.Length != 0) { - ProductId = other.ProductId; - } - if (other.Seats != 0) { - Seats = other.Seats; - } - if (other.AvailableSeats != 0) { - AvailableSeats = other.AvailableSeats; - } - if (other.Stash != 0) { - Stash = other.Stash; + if (other.CriteriaUid.Length != 0) { + CriteriaUid = other.CriteriaUid; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - ProductId = input.ReadString(); - break; - } - case 16: { - Seats = input.ReadInt32(); + CriteriaUid = input.ReadBytes(); break; } - case 24: { - AvailableSeats = input.ReadInt32(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 32: { - Stash = input.ReadInt32(); + case 10: { + CriteriaUid = input.ReadBytes(); break; } } } } + #endif } - public sealed partial class MSPContact : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MSPContact()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class LinkedRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LinkedRecord()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[41]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[122]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MSPContact() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LinkedRecord() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MSPContact(MSPContact other) : this() { - enterpriseId_ = other.enterpriseId_; - enterpriseName_ = other.enterpriseName_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LinkedRecord(LinkedRecord other) : this() { + ownerUid_ = other.ownerUid_; + recordUids_ = other.recordUids_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MSPContact Clone() { - return new MSPContact(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public LinkedRecord Clone() { + return new LinkedRecord(this); } - /// Field number for the "enterpriseId" field. - public const int EnterpriseIdFieldNumber = 1; - private int enterpriseId_; + /// Field number for the "ownerUid" field. + public const int OwnerUidFieldNumber = 1; + private pb::ByteString ownerUid_ = pb::ByteString.Empty; + /// + /// This is the owner *record* UID. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int EnterpriseId { - get { return enterpriseId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString OwnerUid { + get { return ownerUid_; } set { - enterpriseId_ = value; + ownerUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "enterpriseName" field. - public const int EnterpriseNameFieldNumber = 2; - private string enterpriseName_ = ""; + /// Field number for the "recordUids" field. + public const int RecordUidsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + /// + /// A child record may have multiple parent/"owner" records, but will not itself be an owner. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EnterpriseName { - get { return enterpriseName_; } - set { - enterpriseName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MSPContact); + return Equals(other as LinkedRecord); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MSPContact other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(LinkedRecord other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseId != other.EnterpriseId) return false; - if (EnterpriseName != other.EnterpriseName) return false; + if (OwnerUid != other.OwnerUid) return false; + if(!recordUids_.Equals(other.recordUids_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseId != 0) hash ^= EnterpriseId.GetHashCode(); - if (EnterpriseName.Length != 0) hash ^= EnterpriseName.GetHashCode(); + if (OwnerUid.Length != 0) hash ^= OwnerUid.GetHashCode(); + hash ^= recordUids_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8488,34 +37476,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseId != 0) { - output.WriteRawTag(8); - output.WriteInt32(EnterpriseId); - } - if (EnterpriseName.Length != 0) { - output.WriteRawTag(18); - output.WriteString(EnterpriseName); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (OwnerUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(OwnerUid); } + recordUids_.WriteTo(output, _repeated_recordUids_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (OwnerUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(OwnerUid); + } + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseId); - } - if (EnterpriseName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EnterpriseName); + if (OwnerUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(OwnerUid); } + size += recordUids_.CalculateSize(_repeated_recordUids_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -8523,163 +37528,187 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MSPContact other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(LinkedRecord other) { if (other == null) { return; } - if (other.EnterpriseId != 0) { - EnterpriseId = other.EnterpriseId; - } - if (other.EnterpriseName.Length != 0) { - EnterpriseName = other.EnterpriseName; + if (other.OwnerUid.Length != 0) { + OwnerUid = other.OwnerUid; } + recordUids_.Add(other.recordUids_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - EnterpriseId = input.ReadInt32(); + case 10: { + OwnerUid = input.ReadBytes(); break; } case 18: { - EnterpriseName = input.ReadString(); + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); break; } } } + #endif } - } - - public sealed partial class LicenseAddOn : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new LicenseAddOn()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[42]; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + OwnerUid = input.ReadBytes(); + break; + } + case 18: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + } + } } + #endif - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } + } + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetSharingAdminsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSharingAdminsRequest()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LicenseAddOn() { - OnConstruction(); - } - - partial void OnConstruction(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LicenseAddOn(LicenseAddOn other) : this() { - name_ = other.name_; - enabled_ = other.enabled_; - isTrial_ = other.isTrial_; - expiration_ = other.expiration_; - created_ = other.created_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[123]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public LicenseAddOn Clone() { - return new LicenseAddOn(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "name" field. - public const int NameFieldNumber = 1; - private string name_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSharingAdminsRequest() { + OnConstruction(); } - /// Field number for the "enabled" field. - public const int EnabledFieldNumber = 2; - private bool enabled_; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Enabled { - get { return enabled_; } - set { - enabled_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSharingAdminsRequest(GetSharingAdminsRequest other) : this() { + sharedFolderUid_ = other.sharedFolderUid_; + recordUid_ = other.recordUid_; + username_ = other.username_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "isTrial" field. - public const int IsTrialFieldNumber = 3; - private bool isTrial_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IsTrial { - get { return isTrial_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSharingAdminsRequest Clone() { + return new GetSharingAdminsRequest(this); + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 1; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } set { - isTrial_ = value; + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "expiration" field. - public const int ExpirationFieldNumber = 4; - private long expiration_; + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Expiration { - get { return expiration_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } set { - expiration_ = value; + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "created" field. - public const int CreatedFieldNumber = 5; - private long created_; + /// Field number for the "username" field. + public const int UsernameFieldNumber = 3; + private string username_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Created { - get { return created_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } set { - created_ = value; + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as LicenseAddOn); + return Equals(other as GetSharingAdminsRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(LicenseAddOn other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetSharingAdminsRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Name != other.Name) return false; - if (Enabled != other.Enabled) return false; - if (IsTrial != other.IsTrial) return false; - if (Expiration != other.Expiration) return false; - if (Created != other.Created) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if (RecordUid != other.RecordUid) return false; + if (Username != other.Username) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (Enabled != false) hash ^= Enabled.GetHashCode(); - if (IsTrial != false) hash ^= IsTrial.GetHashCode(); - if (Expiration != 0L) hash ^= Expiration.GetHashCode(); - if (Created != 0L) hash ^= Created.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -8687,54 +37716,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Name.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUid.Length != 0) { output.WriteRawTag(10); - output.WriteString(Name); + output.WriteBytes(SharedFolderUid); } - if (Enabled != false) { - output.WriteRawTag(16); - output.WriteBool(Enabled); + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); } - if (IsTrial != false) { - output.WriteRawTag(24); - output.WriteBool(IsTrial); + if (Username.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Username); } - if (Expiration != 0L) { - output.WriteRawTag(32); - output.WriteInt64(Expiration); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Created != 0L) { - output.WriteRawTag(40); - output.WriteInt64(Created); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (Username.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Username); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (Enabled != false) { - size += 1 + 1; - } - if (IsTrial != false) { - size += 1 + 1; + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); } - if (Expiration != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); } - if (Created != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Created); + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -8743,350 +37787,278 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(LicenseAddOn other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetSharingAdminsRequest other) { if (other == null) { return; } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.Enabled != false) { - Enabled = other.Enabled; - } - if (other.IsTrial != false) { - IsTrial = other.IsTrial; + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; } - if (other.Expiration != 0L) { - Expiration = other.Expiration; + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; } - if (other.Created != 0L) { - Created = other.Created; + if (other.Username.Length != 0) { + Username = other.Username; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - Name = input.ReadString(); + SharedFolderUid = input.ReadBytes(); break; } - case 16: { - Enabled = input.ReadBool(); + case 18: { + RecordUid = input.ReadBytes(); break; } - case 24: { - IsTrial = input.ReadBool(); + case 26: { + Username = input.ReadString(); break; } - case 32: { - Expiration = input.ReadInt64(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); break; } - case 40: { - Created = input.ReadInt64(); + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + Username = input.ReadString(); break; } } } } + #endif } - public sealed partial class License : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new License()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserProfileExt : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserProfileExt()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[43]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[124]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public License() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public License(License other) : this() { - paid_ = other.paid_; - numberOfSeats_ = other.numberOfSeats_; - expiration_ = other.expiration_; - licenseKeyId_ = other.licenseKeyId_; - productTypeId_ = other.productTypeId_; - name_ = other.name_; - enterpriseLicenseId_ = other.enterpriseLicenseId_; - seatsAllocated_ = other.seatsAllocated_; - seatsPending_ = other.seatsPending_; - tier_ = other.tier_; - filePlanTypeId_ = other.filePlanTypeId_; - maxBytes_ = other.maxBytes_; - storageExpiration_ = other.storageExpiration_; - licenseStatus_ = other.licenseStatus_; - mspPool_ = other.mspPool_.Clone(); - managedBy_ = other.managedBy_ != null ? other.managedBy_.Clone() : null; - addOns_ = other.addOns_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public License Clone() { - return new License(this); - } - - /// Field number for the "paid" field. - public const int PaidFieldNumber = 1; - private bool paid_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Paid { - get { return paid_; } - set { - paid_ = value; - } - } - - /// Field number for the "numberOfSeats" field. - public const int NumberOfSeatsFieldNumber = 2; - private int numberOfSeats_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int NumberOfSeats { - get { return numberOfSeats_; } - set { - numberOfSeats_ = value; - } - } - - /// Field number for the "expiration" field. - public const int ExpirationFieldNumber = 3; - private long expiration_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Expiration { - get { return expiration_; } - set { - expiration_ = value; - } - } - - /// Field number for the "licenseKeyId" field. - public const int LicenseKeyIdFieldNumber = 4; - private int licenseKeyId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int LicenseKeyId { - get { return licenseKeyId_; } - set { - licenseKeyId_ = value; - } - } - - /// Field number for the "productTypeId" field. - public const int ProductTypeIdFieldNumber = 5; - private int productTypeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ProductTypeId { - get { return productTypeId_; } - set { - productTypeId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserProfileExt() { + OnConstruction(); } - /// Field number for the "name" field. - public const int NameFieldNumber = 6; - private string name_ = ""; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserProfileExt(UserProfileExt other) : this() { + email_ = other.email_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + isMSPMCAdmin_ = other.isMSPMCAdmin_; + isInSharedFolder_ = other.isInSharedFolder_; + isShareAdminForRequestedObject_ = other.isShareAdminForRequestedObject_; + isShareAdminForSharedFolderOwner_ = other.isShareAdminForSharedFolderOwner_; + hasAccessToObject_ = other.hasAccessToObject_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "enterpriseLicenseId" field. - public const int EnterpriseLicenseIdFieldNumber = 7; - private long enterpriseLicenseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long EnterpriseLicenseId { - get { return enterpriseLicenseId_; } - set { - enterpriseLicenseId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserProfileExt Clone() { + return new UserProfileExt(this); } - /// Field number for the "seatsAllocated" field. - public const int SeatsAllocatedFieldNumber = 8; - private int seatsAllocated_; + /// Field number for the "email" field. + public const int EmailFieldNumber = 1; + private string email_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SeatsAllocated { - get { return seatsAllocated_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } set { - seatsAllocated_ = value; + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "seatsPending" field. - public const int SeatsPendingFieldNumber = 9; - private int seatsPending_; + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 2; + private string fullName_ = ""; + /// + ///The user's full name. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SeatsPending { - get { return seatsPending_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } set { - seatsPending_ = value; + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "tier" field. - public const int TierFieldNumber = 10; - private int tier_; + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 3; + private string jobTitle_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Tier { - get { return tier_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } set { - tier_ = value; + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "filePlanTypeId" field. - public const int FilePlanTypeIdFieldNumber = 11; - private int filePlanTypeId_; + /// Field number for the "isMSPMCAdmin" field. + public const int IsMSPMCAdminFieldNumber = 4; + private bool isMSPMCAdmin_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int FilePlanTypeId { - get { return filePlanTypeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsMSPMCAdmin { + get { return isMSPMCAdmin_; } set { - filePlanTypeId_ = value; + isMSPMCAdmin_ = value; } } - /// Field number for the "maxBytes" field. - public const int MaxBytesFieldNumber = 12; - private long maxBytes_; + /// Field number for the "isInSharedFolder" field. + public const int IsInSharedFolderFieldNumber = 5; + private bool isInSharedFolder_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long MaxBytes { - get { return maxBytes_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsInSharedFolder { + get { return isInSharedFolder_; } set { - maxBytes_ = value; + isInSharedFolder_ = value; } } - /// Field number for the "storageExpiration" field. - public const int StorageExpirationFieldNumber = 13; - private long storageExpiration_; + /// Field number for the "isShareAdminForRequestedObject" field. + public const int IsShareAdminForRequestedObjectFieldNumber = 6; + private bool isShareAdminForRequestedObject_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long StorageExpiration { - get { return storageExpiration_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShareAdminForRequestedObject { + get { return isShareAdminForRequestedObject_; } set { - storageExpiration_ = value; + isShareAdminForRequestedObject_ = value; } } - /// Field number for the "licenseStatus" field. - public const int LicenseStatusFieldNumber = 14; - private string licenseStatus_ = ""; + /// Field number for the "isShareAdminForSharedFolderOwner" field. + public const int IsShareAdminForSharedFolderOwnerFieldNumber = 7; + private bool isShareAdminForSharedFolderOwner_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string LicenseStatus { - get { return licenseStatus_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShareAdminForSharedFolderOwner { + get { return isShareAdminForSharedFolderOwner_; } set { - licenseStatus_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + isShareAdminForSharedFolderOwner_ = value; } } - /// Field number for the "mspPool" field. - public const int MspPoolFieldNumber = 15; - private static readonly pb::FieldCodec _repeated_mspPool_codec - = pb::FieldCodec.ForMessage(122, global::Enterprise.MSPPool.Parser); - private readonly pbc::RepeatedField mspPool_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField MspPool { - get { return mspPool_; } - } - - /// Field number for the "managedBy" field. - public const int ManagedByFieldNumber = 16; - private global::Enterprise.MSPContact managedBy_; + /// Field number for the "hasAccessToObject" field. + public const int HasAccessToObjectFieldNumber = 8; + private bool hasAccessToObject_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.MSPContact ManagedBy { - get { return managedBy_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool HasAccessToObject { + get { return hasAccessToObject_; } set { - managedBy_ = value; + hasAccessToObject_ = value; } } - /// Field number for the "addOns" field. - public const int AddOnsFieldNumber = 17; - private static readonly pb::FieldCodec _repeated_addOns_codec - = pb::FieldCodec.ForMessage(138, global::Enterprise.LicenseAddOn.Parser); - private readonly pbc::RepeatedField addOns_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField AddOns { - get { return addOns_; } - } - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as License); + return Equals(other as UserProfileExt); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(License other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserProfileExt other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Paid != other.Paid) return false; - if (NumberOfSeats != other.NumberOfSeats) return false; - if (Expiration != other.Expiration) return false; - if (LicenseKeyId != other.LicenseKeyId) return false; - if (ProductTypeId != other.ProductTypeId) return false; - if (Name != other.Name) return false; - if (EnterpriseLicenseId != other.EnterpriseLicenseId) return false; - if (SeatsAllocated != other.SeatsAllocated) return false; - if (SeatsPending != other.SeatsPending) return false; - if (Tier != other.Tier) return false; - if (FilePlanTypeId != other.FilePlanTypeId) return false; - if (MaxBytes != other.MaxBytes) return false; - if (StorageExpiration != other.StorageExpiration) return false; - if (LicenseStatus != other.LicenseStatus) return false; - if(!mspPool_.Equals(other.mspPool_)) return false; - if (!object.Equals(ManagedBy, other.ManagedBy)) return false; - if(!addOns_.Equals(other.addOns_)) return false; + if (Email != other.Email) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (IsMSPMCAdmin != other.IsMSPMCAdmin) return false; + if (IsInSharedFolder != other.IsInSharedFolder) return false; + if (IsShareAdminForRequestedObject != other.IsShareAdminForRequestedObject) return false; + if (IsShareAdminForSharedFolderOwner != other.IsShareAdminForSharedFolderOwner) return false; + if (HasAccessToObject != other.HasAccessToObject) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Paid != false) hash ^= Paid.GetHashCode(); - if (NumberOfSeats != 0) hash ^= NumberOfSeats.GetHashCode(); - if (Expiration != 0L) hash ^= Expiration.GetHashCode(); - if (LicenseKeyId != 0) hash ^= LicenseKeyId.GetHashCode(); - if (ProductTypeId != 0) hash ^= ProductTypeId.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (EnterpriseLicenseId != 0L) hash ^= EnterpriseLicenseId.GetHashCode(); - if (SeatsAllocated != 0) hash ^= SeatsAllocated.GetHashCode(); - if (SeatsPending != 0) hash ^= SeatsPending.GetHashCode(); - if (Tier != 0) hash ^= Tier.GetHashCode(); - if (FilePlanTypeId != 0) hash ^= FilePlanTypeId.GetHashCode(); - if (MaxBytes != 0L) hash ^= MaxBytes.GetHashCode(); - if (StorageExpiration != 0L) hash ^= StorageExpiration.GetHashCode(); - if (LicenseStatus.Length != 0) hash ^= LicenseStatus.GetHashCode(); - hash ^= mspPool_.GetHashCode(); - if (managedBy_ != null) hash ^= ManagedBy.GetHashCode(); - hash ^= addOns_.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (IsMSPMCAdmin != false) hash ^= IsMSPMCAdmin.GetHashCode(); + if (IsInSharedFolder != false) hash ^= IsInSharedFolder.GetHashCode(); + if (IsShareAdminForRequestedObject != false) hash ^= IsShareAdminForRequestedObject.GetHashCode(); + if (IsShareAdminForSharedFolderOwner != false) hash ^= IsShareAdminForSharedFolderOwner.GetHashCode(); + if (HasAccessToObject != false) hash ^= HasAccessToObject.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9094,129 +38066,125 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Paid != false) { - output.WriteRawTag(8); - output.WriteBool(Paid); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); } - if (NumberOfSeats != 0) { - output.WriteRawTag(16); - output.WriteInt32(NumberOfSeats); + if (FullName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FullName); } - if (Expiration != 0L) { - output.WriteRawTag(24); - output.WriteInt64(Expiration); + if (JobTitle.Length != 0) { + output.WriteRawTag(26); + output.WriteString(JobTitle); } - if (LicenseKeyId != 0) { + if (IsMSPMCAdmin != false) { output.WriteRawTag(32); - output.WriteInt32(LicenseKeyId); + output.WriteBool(IsMSPMCAdmin); } - if (ProductTypeId != 0) { + if (IsInSharedFolder != false) { output.WriteRawTag(40); - output.WriteInt32(ProductTypeId); + output.WriteBool(IsInSharedFolder); } - if (Name.Length != 0) { - output.WriteRawTag(50); - output.WriteString(Name); + if (IsShareAdminForRequestedObject != false) { + output.WriteRawTag(48); + output.WriteBool(IsShareAdminForRequestedObject); } - if (EnterpriseLicenseId != 0L) { + if (IsShareAdminForSharedFolderOwner != false) { output.WriteRawTag(56); - output.WriteInt64(EnterpriseLicenseId); + output.WriteBool(IsShareAdminForSharedFolderOwner); } - if (SeatsAllocated != 0) { + if (HasAccessToObject != false) { output.WriteRawTag(64); - output.WriteInt32(SeatsAllocated); + output.WriteBool(HasAccessToObject); } - if (SeatsPending != 0) { - output.WriteRawTag(72); - output.WriteInt32(SeatsPending); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Tier != 0) { - output.WriteRawTag(80); - output.WriteInt32(Tier); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Email.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Email); } - if (FilePlanTypeId != 0) { - output.WriteRawTag(88); - output.WriteInt32(FilePlanTypeId); + if (FullName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FullName); } - if (MaxBytes != 0L) { - output.WriteRawTag(96); - output.WriteInt64(MaxBytes); + if (JobTitle.Length != 0) { + output.WriteRawTag(26); + output.WriteString(JobTitle); } - if (StorageExpiration != 0L) { - output.WriteRawTag(104); - output.WriteInt64(StorageExpiration); + if (IsMSPMCAdmin != false) { + output.WriteRawTag(32); + output.WriteBool(IsMSPMCAdmin); } - if (LicenseStatus.Length != 0) { - output.WriteRawTag(114); - output.WriteString(LicenseStatus); + if (IsInSharedFolder != false) { + output.WriteRawTag(40); + output.WriteBool(IsInSharedFolder); } - mspPool_.WriteTo(output, _repeated_mspPool_codec); - if (managedBy_ != null) { - output.WriteRawTag(130, 1); - output.WriteMessage(ManagedBy); + if (IsShareAdminForRequestedObject != false) { + output.WriteRawTag(48); + output.WriteBool(IsShareAdminForRequestedObject); + } + if (IsShareAdminForSharedFolderOwner != false) { + output.WriteRawTag(56); + output.WriteBool(IsShareAdminForSharedFolderOwner); + } + if (HasAccessToObject != false) { + output.WriteRawTag(64); + output.WriteBool(HasAccessToObject); } - addOns_.WriteTo(output, _repeated_addOns_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Paid != false) { - size += 1 + 1; - } - if (NumberOfSeats != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(NumberOfSeats); - } - if (Expiration != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); - } - if (LicenseKeyId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(LicenseKeyId); - } - if (ProductTypeId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ProductTypeId); - } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (EnterpriseLicenseId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseLicenseId); - } - if (SeatsAllocated != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SeatsAllocated); + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); } - if (SeatsPending != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SeatsPending); + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); } - if (Tier != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Tier); + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); } - if (FilePlanTypeId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(FilePlanTypeId); + if (IsMSPMCAdmin != false) { + size += 1 + 1; } - if (MaxBytes != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(MaxBytes); + if (IsInSharedFolder != false) { + size += 1 + 1; } - if (StorageExpiration != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(StorageExpiration); + if (IsShareAdminForRequestedObject != false) { + size += 1 + 1; } - if (LicenseStatus.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(LicenseStatus); + if (IsShareAdminForSharedFolderOwner != false) { + size += 1 + 1; } - size += mspPool_.CalculateSize(_repeated_mspPool_codec); - if (managedBy_ != null) { - size += 2 + pb::CodedOutputStream.ComputeMessageSize(ManagedBy); + if (HasAccessToObject != false) { + size += 1 + 1; } - size += addOns_.CalculateSize(_repeated_addOns_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9224,270 +38192,224 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(License other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserProfileExt other) { if (other == null) { return; } - if (other.Paid != false) { - Paid = other.Paid; - } - if (other.NumberOfSeats != 0) { - NumberOfSeats = other.NumberOfSeats; - } - if (other.Expiration != 0L) { - Expiration = other.Expiration; - } - if (other.LicenseKeyId != 0) { - LicenseKeyId = other.LicenseKeyId; - } - if (other.ProductTypeId != 0) { - ProductTypeId = other.ProductTypeId; - } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.EnterpriseLicenseId != 0L) { - EnterpriseLicenseId = other.EnterpriseLicenseId; - } - if (other.SeatsAllocated != 0) { - SeatsAllocated = other.SeatsAllocated; + if (other.Email.Length != 0) { + Email = other.Email; } - if (other.SeatsPending != 0) { - SeatsPending = other.SeatsPending; + if (other.FullName.Length != 0) { + FullName = other.FullName; } - if (other.Tier != 0) { - Tier = other.Tier; + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; } - if (other.FilePlanTypeId != 0) { - FilePlanTypeId = other.FilePlanTypeId; + if (other.IsMSPMCAdmin != false) { + IsMSPMCAdmin = other.IsMSPMCAdmin; } - if (other.MaxBytes != 0L) { - MaxBytes = other.MaxBytes; + if (other.IsInSharedFolder != false) { + IsInSharedFolder = other.IsInSharedFolder; } - if (other.StorageExpiration != 0L) { - StorageExpiration = other.StorageExpiration; + if (other.IsShareAdminForRequestedObject != false) { + IsShareAdminForRequestedObject = other.IsShareAdminForRequestedObject; } - if (other.LicenseStatus.Length != 0) { - LicenseStatus = other.LicenseStatus; + if (other.IsShareAdminForSharedFolderOwner != false) { + IsShareAdminForSharedFolderOwner = other.IsShareAdminForSharedFolderOwner; } - mspPool_.Add(other.mspPool_); - if (other.managedBy_ != null) { - if (managedBy_ == null) { - ManagedBy = new global::Enterprise.MSPContact(); - } - ManagedBy.MergeFrom(other.ManagedBy); + if (other.HasAccessToObject != false) { + HasAccessToObject = other.HasAccessToObject; } - addOns_.Add(other.addOns_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Paid = input.ReadBool(); + case 10: { + Email = input.ReadString(); break; } - case 16: { - NumberOfSeats = input.ReadInt32(); + case 18: { + FullName = input.ReadString(); break; } - case 24: { - Expiration = input.ReadInt64(); + case 26: { + JobTitle = input.ReadString(); break; } case 32: { - LicenseKeyId = input.ReadInt32(); + IsMSPMCAdmin = input.ReadBool(); break; } case 40: { - ProductTypeId = input.ReadInt32(); + IsInSharedFolder = input.ReadBool(); break; } - case 50: { - Name = input.ReadString(); + case 48: { + IsShareAdminForRequestedObject = input.ReadBool(); break; } case 56: { - EnterpriseLicenseId = input.ReadInt64(); + IsShareAdminForSharedFolderOwner = input.ReadBool(); break; } case 64: { - SeatsAllocated = input.ReadInt32(); + HasAccessToObject = input.ReadBool(); break; } - case 72: { - SeatsPending = input.ReadInt32(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 80: { - Tier = input.ReadInt32(); + case 10: { + Email = input.ReadString(); break; } - case 88: { - FilePlanTypeId = input.ReadInt32(); + case 18: { + FullName = input.ReadString(); break; } - case 96: { - MaxBytes = input.ReadInt64(); + case 26: { + JobTitle = input.ReadString(); break; } - case 104: { - StorageExpiration = input.ReadInt64(); + case 32: { + IsMSPMCAdmin = input.ReadBool(); break; } - case 114: { - LicenseStatus = input.ReadString(); + case 40: { + IsInSharedFolder = input.ReadBool(); break; } - case 122: { - mspPool_.AddEntriesFrom(input, _repeated_mspPool_codec); + case 48: { + IsShareAdminForRequestedObject = input.ReadBool(); break; } - case 130: { - if (managedBy_ == null) { - ManagedBy = new global::Enterprise.MSPContact(); - } - input.ReadMessage(ManagedBy); + case 56: { + IsShareAdminForSharedFolderOwner = input.ReadBool(); break; } - case 138: { - addOns_.AddEntriesFrom(input, _repeated_addOns_codec); + case 64: { + HasAccessToObject = input.ReadBool(); break; } } } } + #endif } - public sealed partial class Bridge : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Bridge()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetSharingAdminsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetSharingAdminsResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[44]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[125]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Bridge() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSharingAdminsResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Bridge(Bridge other) : this() { - bridgeId_ = other.bridgeId_; - nodeId_ = other.nodeId_; - wanIpEnforcement_ = other.wanIpEnforcement_; - lanIpEnforcement_ = other.lanIpEnforcement_; - status_ = other.status_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSharingAdminsResponse(GetSharingAdminsResponse other) : this() { + userProfileExts_ = other.userProfileExts_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Bridge Clone() { - return new Bridge(this); - } - - /// Field number for the "bridgeId" field. - public const int BridgeIdFieldNumber = 1; - private long bridgeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long BridgeId { - get { return bridgeId_; } - set { - bridgeId_ = value; - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 2; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } - } - - /// Field number for the "wanIpEnforcement" field. - public const int WanIpEnforcementFieldNumber = 3; - private string wanIpEnforcement_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string WanIpEnforcement { - get { return wanIpEnforcement_; } - set { - wanIpEnforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "lanIpEnforcement" field. - public const int LanIpEnforcementFieldNumber = 4; - private string lanIpEnforcement_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string LanIpEnforcement { - get { return lanIpEnforcement_; } - set { - lanIpEnforcement_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetSharingAdminsResponse Clone() { + return new GetSharingAdminsResponse(this); } - /// Field number for the "status" field. - public const int StatusFieldNumber = 5; - private string status_ = ""; + /// Field number for the "userProfileExts" field. + public const int UserProfileExtsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_userProfileExts_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.UserProfileExt.Parser); + private readonly pbc::RepeatedField userProfileExts_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Status { - get { return status_; } - set { - status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserProfileExts { + get { return userProfileExts_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Bridge); + return Equals(other as GetSharingAdminsResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Bridge other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetSharingAdminsResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (BridgeId != other.BridgeId) return false; - if (NodeId != other.NodeId) return false; - if (WanIpEnforcement != other.WanIpEnforcement) return false; - if (LanIpEnforcement != other.LanIpEnforcement) return false; - if (Status != other.Status) return false; + if(!userProfileExts_.Equals(other.userProfileExts_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (BridgeId != 0L) hash ^= BridgeId.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (WanIpEnforcement.Length != 0) hash ^= WanIpEnforcement.GetHashCode(); - if (LanIpEnforcement.Length != 0) hash ^= LanIpEnforcement.GetHashCode(); - if (Status.Length != 0) hash ^= Status.GetHashCode(); + hash ^= userProfileExts_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9495,55 +38417,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (BridgeId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(BridgeId); - } - if (NodeId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(NodeId); - } - if (WanIpEnforcement.Length != 0) { - output.WriteRawTag(26); - output.WriteString(WanIpEnforcement); - } - if (LanIpEnforcement.Length != 0) { - output.WriteRawTag(34); - output.WriteString(LanIpEnforcement); - } - if (Status.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Status); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + userProfileExts_.WriteTo(output, _repeated_userProfileExts_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + userProfileExts_.WriteTo(ref output, _repeated_userProfileExts_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (BridgeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(BridgeId); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (WanIpEnforcement.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(WanIpEnforcement); - } - if (LanIpEnforcement.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(LanIpEnforcement); - } - if (Status.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); - } + size += userProfileExts_.CalculateSize(_repeated_userProfileExts_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9551,198 +38458,145 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Bridge other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetSharingAdminsResponse other) { if (other == null) { return; } - if (other.BridgeId != 0L) { - BridgeId = other.BridgeId; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.WanIpEnforcement.Length != 0) { - WanIpEnforcement = other.WanIpEnforcement; - } - if (other.LanIpEnforcement.Length != 0) { - LanIpEnforcement = other.LanIpEnforcement; - } - if (other.Status.Length != 0) { - Status = other.Status; - } + userProfileExts_.Add(other.userProfileExts_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - BridgeId = input.ReadInt64(); - break; - } - case 16: { - NodeId = input.ReadInt64(); - break; - } - case 26: { - WanIpEnforcement = input.ReadString(); + case 10: { + userProfileExts_.AddEntriesFrom(input, _repeated_userProfileExts_codec); break; } - case 34: { - LanIpEnforcement = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 42: { - Status = input.ReadString(); + case 10: { + userProfileExts_.AddEntriesFrom(ref input, _repeated_userProfileExts_codec); break; } } } } + #endif } - public sealed partial class Scim : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Scim()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsEnterpriseUsersAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsEnterpriseUsersAddRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[45]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[126]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Scim() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Scim(Scim other) : this() { - scimId_ = other.scimId_; - nodeId_ = other.nodeId_; - status_ = other.status_; - lastSynced_ = other.lastSynced_; - rolePrefix_ = other.rolePrefix_; - uniqueGroups_ = other.uniqueGroups_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddRequest(TeamsEnterpriseUsersAddRequest other) : this() { + teams_ = other.teams_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public Scim Clone() { - return new Scim(this); - } - - /// Field number for the "scimId" field. - public const int ScimIdFieldNumber = 1; - private long scimId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long ScimId { - get { return scimId_; } - set { - scimId_ = value; - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 2; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } - } - - /// Field number for the "status" field. - public const int StatusFieldNumber = 3; - private string status_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Status { - get { return status_; } - set { - status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "lastSynced" field. - public const int LastSyncedFieldNumber = 4; - private long lastSynced_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long LastSynced { - get { return lastSynced_; } - set { - lastSynced_ = value; - } - } - - /// Field number for the "rolePrefix" field. - public const int RolePrefixFieldNumber = 5; - private string rolePrefix_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string RolePrefix { - get { return rolePrefix_; } - set { - rolePrefix_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddRequest Clone() { + return new TeamsEnterpriseUsersAddRequest(this); } - /// Field number for the "uniqueGroups" field. - public const int UniqueGroupsFieldNumber = 6; - private bool uniqueGroups_; + /// Field number for the "teams" field. + public const int TeamsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_teams_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.TeamsEnterpriseUsersAddTeamRequest.Parser); + private readonly pbc::RepeatedField teams_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool UniqueGroups { - get { return uniqueGroups_; } - set { - uniqueGroups_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Teams { + get { return teams_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as Scim); + return Equals(other as TeamsEnterpriseUsersAddRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(Scim other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsEnterpriseUsersAddRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ScimId != other.ScimId) return false; - if (NodeId != other.NodeId) return false; - if (Status != other.Status) return false; - if (LastSynced != other.LastSynced) return false; - if (RolePrefix != other.RolePrefix) return false; - if (UniqueGroups != other.UniqueGroups) return false; + if(!teams_.Equals(other.teams_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ScimId != 0L) hash ^= ScimId.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (Status.Length != 0) hash ^= Status.GetHashCode(); - if (LastSynced != 0L) hash ^= LastSynced.GetHashCode(); - if (RolePrefix.Length != 0) hash ^= RolePrefix.GetHashCode(); - if (UniqueGroups != false) hash ^= UniqueGroups.GetHashCode(); + hash ^= teams_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9750,62 +38604,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ScimId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(ScimId); - } - if (NodeId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(NodeId); - } - if (Status.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Status); - } - if (LastSynced != 0L) { - output.WriteRawTag(32); - output.WriteInt64(LastSynced); - } - if (RolePrefix.Length != 0) { - output.WriteRawTag(42); - output.WriteString(RolePrefix); - } - if (UniqueGroups != false) { - output.WriteRawTag(48); - output.WriteBool(UniqueGroups); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + teams_.WriteTo(output, _repeated_teams_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + teams_.WriteTo(ref output, _repeated_teams_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ScimId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(ScimId); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (Status.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); - } - if (LastSynced != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(LastSynced); - } - if (RolePrefix.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(RolePrefix); - } - if (UniqueGroups != false) { - size += 1 + 1; - } + size += teams_.CalculateSize(_repeated_teams_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -9813,177 +38645,160 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(Scim other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsEnterpriseUsersAddRequest other) { if (other == null) { return; } - if (other.ScimId != 0L) { - ScimId = other.ScimId; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.Status.Length != 0) { - Status = other.Status; - } - if (other.LastSynced != 0L) { - LastSynced = other.LastSynced; - } - if (other.RolePrefix.Length != 0) { - RolePrefix = other.RolePrefix; - } - if (other.UniqueGroups != false) { - UniqueGroups = other.UniqueGroups; - } + teams_.Add(other.teams_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - ScimId = input.ReadInt64(); - break; - } - case 16: { - NodeId = input.ReadInt64(); - break; - } - case 26: { - Status = input.ReadString(); - break; - } - case 32: { - LastSynced = input.ReadInt64(); + case 10: { + teams_.AddEntriesFrom(input, _repeated_teams_codec); break; } - case 42: { - RolePrefix = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 48: { - UniqueGroups = input.ReadBool(); + case 10: { + teams_.AddEntriesFrom(ref input, _repeated_teams_codec); break; } } } } + #endif } - public sealed partial class EmailProvision : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EmailProvision()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsEnterpriseUsersAddTeamRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsEnterpriseUsersAddTeamRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[46]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[127]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EmailProvision() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddTeamRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EmailProvision(EmailProvision other) : this() { - id_ = other.id_; - nodeId_ = other.nodeId_; - domain_ = other.domain_; - method_ = other.method_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddTeamRequest(TeamsEnterpriseUsersAddTeamRequest other) : this() { + teamUid_ = other.teamUid_; + users_ = other.users_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EmailProvision Clone() { - return new EmailProvision(this); - } - - /// Field number for the "id" field. - public const int IdFieldNumber = 1; - private int id_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Id { - get { return id_; } - set { - id_ = value; - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 2; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } - } - - /// Field number for the "domain" field. - public const int DomainFieldNumber = 3; - private string domain_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Domain { - get { return domain_; } - set { - domain_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddTeamRequest Clone() { + return new TeamsEnterpriseUsersAddTeamRequest(this); } - /// Field number for the "method" field. - public const int MethodFieldNumber = 4; - private string method_ = ""; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Method { - get { return method_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - method_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.TeamsEnterpriseUsersAddUserRequest.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EmailProvision); + return Equals(other as TeamsEnterpriseUsersAddTeamRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EmailProvision other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsEnterpriseUsersAddTeamRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Id != other.Id) return false; - if (NodeId != other.NodeId) return false; - if (Domain != other.Domain) return false; - if (Method != other.Method) return false; + if (TeamUid != other.TeamUid) return false; + if(!users_.Equals(other.users_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Id != 0) hash ^= Id.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (Domain.Length != 0) hash ^= Domain.GetHashCode(); - if (Method.Length != 0) hash ^= Method.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + hash ^= users_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -9991,48 +38806,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Id != 0) { - output.WriteRawTag(8); - output.WriteInt32(Id); - } - if (NodeId != 0L) { - output.WriteRawTag(16); - output.WriteInt64(NodeId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); } - if (Domain.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Domain); + users_.WriteTo(output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Method.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Method); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); } + users_.WriteTo(ref output, _repeated_users_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Id != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (Domain.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Domain); - } - if (Method.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Method); + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); } + size += users_.CalculateSize(_repeated_users_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -10040,163 +38858,209 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EmailProvision other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsEnterpriseUsersAddTeamRequest other) { if (other == null) { return; } - if (other.Id != 0) { - Id = other.Id; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.Domain.Length != 0) { - Domain = other.Domain; - } - if (other.Method.Length != 0) { - Method = other.Method; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; } + users_.Add(other.users_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Id = input.ReadInt32(); + case 10: { + TeamUid = input.ReadBytes(); break; } - case 16: { - NodeId = input.ReadInt64(); + case 18: { + users_.AddEntriesFrom(input, _repeated_users_codec); break; } - case 26: { - Domain = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); break; } - case 34: { - Method = input.ReadString(); + case 18: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); break; } } } } + #endif } - public sealed partial class QueuedTeam : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueuedTeam()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsEnterpriseUsersAddUserRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsEnterpriseUsersAddUserRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[47]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[128]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public QueuedTeam() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddUserRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public QueuedTeam(QueuedTeam other) : this() { - teamUid_ = other.teamUid_; - name_ = other.name_; - nodeId_ = other.nodeId_; - encryptedData_ = other.encryptedData_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddUserRequest(TeamsEnterpriseUsersAddUserRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + userType_ = other.userType_; + teamKey_ = other.teamKey_; + typedTeamKey_ = other.typedTeamKey_ != null ? other.typedTeamKey_.Clone() : null; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public QueuedTeam Clone() { - return new QueuedTeam(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddUserRequest Clone() { + return new TeamsEnterpriseUsersAddUserRequest(this); } - /// Field number for the "teamUid" field. - public const int TeamUidFieldNumber = 1; - private pb::ByteString teamUid_ = pb::ByteString.Empty; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString TeamUid { - get { return teamUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; } } - /// Field number for the "name" field. - public const int NameFieldNumber = 2; - private string name_ = ""; + /// Field number for the "userType" field. + public const int UserTypeFieldNumber = 2; + private global::Enterprise.TeamUserType userType_ = global::Enterprise.TeamUserType.User; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TeamUserType UserType { + get { return userType_; } set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + userType_ = value; } } - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 3; - private long nodeId_; + /// Field number for the "teamKey" field. + public const int TeamKeyFieldNumber = 3; + private string teamKey_ = ""; + /// + /// encrypted with the user's public key - KT_ENCRYPTED_BY_PUBLIC_KEY aka RSA + /// + [global::System.ObsoleteAttribute] [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string TeamKey { + get { return teamKey_; } set { - nodeId_ = value; + teamKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedData" field. - public const int EncryptedDataFieldNumber = 4; - private string encryptedData_ = ""; + /// Field number for the "typedTeamKey" field. + public const int TypedTeamKeyFieldNumber = 4; + private global::Enterprise.TypedKey typedTeamKey_; + /// + /// the substitute for teamKey, explicitly specifies key type (primarily will be KT_ENCRYPTED_BY_PUBLIC_KEY_ECC in this case) + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedData { - get { return encryptedData_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.TypedKey TypedTeamKey { + get { return typedTeamKey_; } set { - encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + typedTeamKey_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as QueuedTeam); + return Equals(other as TeamsEnterpriseUsersAddUserRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(QueuedTeam other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsEnterpriseUsersAddUserRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (TeamUid != other.TeamUid) return false; - if (Name != other.Name) return false; - if (NodeId != other.NodeId) return false; - if (EncryptedData != other.EncryptedData) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (UserType != other.UserType) return false; + if (TeamKey != other.TeamKey) return false; + if (!object.Equals(TypedTeamKey, other.TypedTeamKey)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (UserType != global::Enterprise.TeamUserType.User) hash ^= UserType.GetHashCode(); + if (TeamKey.Length != 0) hash ^= TeamKey.GetHashCode(); + if (typedTeamKey_ != null) hash ^= TypedTeamKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10204,47 +39068,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (TeamUid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(TeamUid); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (Name.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Name); + if (UserType != global::Enterprise.TeamUserType.User) { + output.WriteRawTag(16); + output.WriteEnum((int) UserType); } - if (NodeId != 0L) { - output.WriteRawTag(24); - output.WriteInt64(NodeId); + if (TeamKey.Length != 0) { + output.WriteRawTag(26); + output.WriteString(TeamKey); } - if (EncryptedData.Length != 0) { + if (typedTeamKey_ != null) { output.WriteRawTag(34); - output.WriteString(EncryptedData); + output.WriteMessage(TypedTeamKey); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (UserType != global::Enterprise.TeamUserType.User) { + output.WriteRawTag(16); + output.WriteEnum((int) UserType); + } + if (TeamKey.Length != 0) { + output.WriteRawTag(26); + output.WriteString(TeamKey); + } + if (typedTeamKey_ != null) { + output.WriteRawTag(34); + output.WriteMessage(TypedTeamKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (TeamUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + if (UserType != global::Enterprise.TeamUserType.User) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) UserType); } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + if (TeamKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(TeamKey); } - if (EncryptedData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + if (typedTeamKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypedTeamKey); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10253,134 +39150,205 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(QueuedTeam other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsEnterpriseUsersAddUserRequest other) { if (other == null) { return; } - if (other.TeamUid.Length != 0) { - TeamUid = other.TeamUid; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.Name.Length != 0) { - Name = other.Name; + if (other.UserType != global::Enterprise.TeamUserType.User) { + UserType = other.UserType; } - if (other.NodeId != 0L) { - NodeId = other.NodeId; + if (other.TeamKey.Length != 0) { + TeamKey = other.TeamKey; } - if (other.EncryptedData.Length != 0) { - EncryptedData = other.EncryptedData; + if (other.typedTeamKey_ != null) { + if (typedTeamKey_ == null) { + TypedTeamKey = new global::Enterprise.TypedKey(); + } + TypedTeamKey.MergeFrom(other.TypedTeamKey); } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - TeamUid = input.ReadBytes(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } - case 18: { - Name = input.ReadString(); + case 16: { + UserType = (global::Enterprise.TeamUserType) input.ReadEnum(); break; } - case 24: { - NodeId = input.ReadInt64(); + case 26: { + TeamKey = input.ReadString(); + break; + } + case 34: { + if (typedTeamKey_ == null) { + TypedTeamKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(TypedTeamKey); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + UserType = (global::Enterprise.TeamUserType) input.ReadEnum(); + break; + } + case 26: { + TeamKey = input.ReadString(); break; } case 34: { - EncryptedData = input.ReadString(); + if (typedTeamKey_ == null) { + TypedTeamKey = new global::Enterprise.TypedKey(); + } + input.ReadMessage(TypedTeamKey); break; } } } } + #endif } - public sealed partial class QueuedTeamUser : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new QueuedTeamUser()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TypedKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TypedKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[48]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[129]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public QueuedTeamUser() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TypedKey() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public QueuedTeamUser(QueuedTeamUser other) : this() { - teamUid_ = other.teamUid_; - users_ = other.users_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TypedKey(TypedKey other) : this() { + key_ = other.key_; + keyType_ = other.keyType_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public QueuedTeamUser Clone() { - return new QueuedTeamUser(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TypedKey Clone() { + return new TypedKey(this); } - /// Field number for the "teamUid" field. - public const int TeamUidFieldNumber = 1; - private pb::ByteString teamUid_ = pb::ByteString.Empty; + /// Field number for the "key" field. + public const int KeyFieldNumber = 1; + private pb::ByteString key_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString TeamUid { - get { return teamUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Key { + get { return key_; } set { - teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "users" field. - public const int UsersFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_users_codec - = pb::FieldCodec.ForInt64(18); - private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 2; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Users { - get { return users_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as QueuedTeamUser); + return Equals(other as TypedKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(QueuedTeamUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TypedKey other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (TeamUid != other.TeamUid) return false; - if(!users_.Equals(other.users_)) return false; + if (Key != other.Key) return false; + if (KeyType != other.KeyType) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); - hash ^= users_.GetHashCode(); + if (Key.Length != 0) hash ^= Key.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10388,29 +39356,59 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (TeamUid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Key.Length != 0) { output.WriteRawTag(10); - output.WriteBytes(TeamUid); + output.WriteBytes(Key); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) KeyType); } - users_.WriteTo(output, _repeated_users_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Key.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Key); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) KeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (TeamUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + if (Key.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); } - size += users_.CalculateSize(_repeated_users_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -10418,190 +39416,173 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(QueuedTeamUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TypedKey other) { if (other == null) { return; } - if (other.TeamUid.Length != 0) { - TeamUid = other.TeamUid; + if (other.Key.Length != 0) { + Key = other.Key; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; } - users_.Add(other.users_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - TeamUid = input.ReadBytes(); + Key = input.ReadBytes(); break; } - case 18: case 16: { - users_.AddEntriesFrom(input, _repeated_users_codec); + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Key = input.ReadBytes(); + break; + } + case 16: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); break; } } } } + #endif } - public sealed partial class SsoService : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoService()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsEnterpriseUsersAddResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsEnterpriseUsersAddResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[49]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[130]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoService() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoService(SsoService other) : this() { - ssoServiceProviderId_ = other.ssoServiceProviderId_; - nodeId_ = other.nodeId_; - name_ = other.name_; - spUrl_ = other.spUrl_; - inviteNewUsers_ = other.inviteNewUsers_; - active_ = other.active_; - isCloud_ = other.isCloud_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddResponse(TeamsEnterpriseUsersAddResponse other) : this() { + teams_ = other.teams_.Clone(); + revision_ = other.revision_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoService Clone() { - return new SsoService(this); - } - - /// Field number for the "ssoServiceProviderId" field. - public const int SsoServiceProviderIdFieldNumber = 1; - private long ssoServiceProviderId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long SsoServiceProviderId { - get { return ssoServiceProviderId_; } - set { - ssoServiceProviderId_ = value; - } - } - - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 2; - private long nodeId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } - set { - nodeId_ = value; - } - } - - /// Field number for the "name" field. - public const int NameFieldNumber = 3; - private string name_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } - set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "sp_url" field. - public const int SpUrlFieldNumber = 4; - private string spUrl_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string SpUrl { - get { return spUrl_; } - set { - spUrl_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "inviteNewUsers" field. - public const int InviteNewUsersFieldNumber = 5; - private bool inviteNewUsers_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool InviteNewUsers { - get { return inviteNewUsers_; } - set { - inviteNewUsers_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddResponse Clone() { + return new TeamsEnterpriseUsersAddResponse(this); } - /// Field number for the "active" field. - public const int ActiveFieldNumber = 6; - private bool active_; + /// Field number for the "teams" field. + public const int TeamsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_teams_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.TeamsEnterpriseUsersAddTeamResponse.Parser); + private readonly pbc::RepeatedField teams_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Active { - get { return active_; } - set { - active_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Teams { + get { return teams_; } } - /// Field number for the "isCloud" field. - public const int IsCloudFieldNumber = 7; - private bool isCloud_; + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 2; + private long revision_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IsCloud { - get { return isCloud_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } set { - isCloud_ = value; + revision_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SsoService); + return Equals(other as TeamsEnterpriseUsersAddResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoService other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsEnterpriseUsersAddResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (SsoServiceProviderId != other.SsoServiceProviderId) return false; - if (NodeId != other.NodeId) return false; - if (Name != other.Name) return false; - if (SpUrl != other.SpUrl) return false; - if (InviteNewUsers != other.InviteNewUsers) return false; - if (Active != other.Active) return false; - if (IsCloud != other.IsCloud) return false; + if(!teams_.Equals(other.teams_)) return false; + if (Revision != other.Revision) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (SsoServiceProviderId != 0L) hash ^= SsoServiceProviderId.GetHashCode(); - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (SpUrl.Length != 0) hash ^= SpUrl.GetHashCode(); - if (InviteNewUsers != false) hash ^= InviteNewUsers.GetHashCode(); - if (Active != false) hash ^= Active.GetHashCode(); - if (IsCloud != false) hash ^= IsCloud.GetHashCode(); + hash ^= teams_.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10609,68 +39590,50 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (SsoServiceProviderId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(SsoServiceProviderId); - } - if (NodeId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + teams_.WriteTo(output, _repeated_teams_codec); + if (Revision != 0L) { output.WriteRawTag(16); - output.WriteInt64(NodeId); - } - if (Name.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Name); - } - if (SpUrl.Length != 0) { - output.WriteRawTag(34); - output.WriteString(SpUrl); - } - if (InviteNewUsers != false) { - output.WriteRawTag(40); - output.WriteBool(InviteNewUsers); - } - if (Active != false) { - output.WriteRawTag(48); - output.WriteBool(Active); - } - if (IsCloud != false) { - output.WriteRawTag(56); - output.WriteBool(IsCloud); + output.WriteInt64(Revision); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; - if (SsoServiceProviderId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(SsoServiceProviderId); - } - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); - } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (SpUrl.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(SpUrl); - } - if (InviteNewUsers != false) { - size += 1 + 1; + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + teams_.WriteTo(ref output, _repeated_teams_codec); + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); } - if (Active != false) { - size += 1 + 1; + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); } - if (IsCloud != false) { - size += 1 + 1; + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += teams_.CalculateSize(_repeated_teams_codec); + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10679,156 +39642,231 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoService other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsEnterpriseUsersAddResponse other) { if (other == null) { return; } - if (other.SsoServiceProviderId != 0L) { - SsoServiceProviderId = other.SsoServiceProviderId; - } - if (other.NodeId != 0L) { - NodeId = other.NodeId; - } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.SpUrl.Length != 0) { - SpUrl = other.SpUrl; - } - if (other.InviteNewUsers != false) { - InviteNewUsers = other.InviteNewUsers; - } - if (other.Active != false) { - Active = other.Active; - } - if (other.IsCloud != false) { - IsCloud = other.IsCloud; + teams_.Add(other.teams_); + if (other.Revision != 0L) { + Revision = other.Revision; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - SsoServiceProviderId = input.ReadInt64(); + case 10: { + teams_.AddEntriesFrom(input, _repeated_teams_codec); break; } case 16: { - NodeId = input.ReadInt64(); - break; - } - case 26: { - Name = input.ReadString(); - break; - } - case 34: { - SpUrl = input.ReadString(); + Revision = input.ReadInt64(); break; } - case 40: { - InviteNewUsers = input.ReadBool(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 48: { - Active = input.ReadBool(); + case 10: { + teams_.AddEntriesFrom(ref input, _repeated_teams_codec); break; } - case 56: { - IsCloud = input.ReadBool(); + case 16: { + Revision = input.ReadInt64(); break; } } } } + #endif } - public sealed partial class ReportFilterUser : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ReportFilterUser()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsEnterpriseUsersAddTeamResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsEnterpriseUsersAddTeamResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[50]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[131]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ReportFilterUser() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddTeamResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ReportFilterUser(ReportFilterUser other) : this() { - userId_ = other.userId_; - email_ = other.email_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddTeamResponse(TeamsEnterpriseUsersAddTeamResponse other) : this() { + teamUid_ = other.teamUid_; + users_ = other.users_.Clone(); + success_ = other.success_; + message_ = other.message_; + resultCode_ = other.resultCode_; + additionalInfo_ = other.additionalInfo_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ReportFilterUser Clone() { - return new ReportFilterUser(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddTeamResponse Clone() { + return new TeamsEnterpriseUsersAddTeamResponse(this); } - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 1; - private int userId_; + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UserId { - get { return userId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } set { - userId_ = value; + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "email" field. - public const int EmailFieldNumber = 2; - private string email_ = ""; + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(18, global::Enterprise.TeamsEnterpriseUsersAddUserResponse.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Email { - get { return email_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 3; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } set { - email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + success_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "resultCode" field. + public const int ResultCodeFieldNumber = 5; + private string resultCode_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ResultCode { + get { return resultCode_; } + set { + resultCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "additionalInfo" field. + public const int AdditionalInfoFieldNumber = 6; + private string additionalInfo_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AdditionalInfo { + get { return additionalInfo_; } + set { + additionalInfo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ReportFilterUser); + return Equals(other as TeamsEnterpriseUsersAddTeamResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ReportFilterUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsEnterpriseUsersAddTeamResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (UserId != other.UserId) return false; - if (Email != other.Email) return false; + if (TeamUid != other.TeamUid) return false; + if(!users_.Equals(other.users_)) return false; + if (Success != other.Success) return false; + if (Message != other.Message) return false; + if (ResultCode != other.ResultCode) return false; + if (AdditionalInfo != other.AdditionalInfo) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (UserId != 0) hash ^= UserId.GetHashCode(); - if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + hash ^= users_.GetHashCode(); + if (Success != false) hash ^= Success.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (ResultCode.Length != 0) hash ^= ResultCode.GetHashCode(); + if (AdditionalInfo.Length != 0) hash ^= AdditionalInfo.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -10836,33 +39874,94 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (UserId != 0) { - output.WriteRawTag(8); - output.WriteInt32(UserId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); } - if (Email.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Email); + users_.WriteTo(output, _repeated_users_codec); + if (Success != false) { + output.WriteRawTag(24); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (ResultCode.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ResultCode); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(50); + output.WriteString(AdditionalInfo); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + users_.WriteTo(ref output, _repeated_users_codec); + if (Success != false) { + output.WriteRawTag(24); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (ResultCode.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ResultCode); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(50); + output.WriteString(AdditionalInfo); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (UserId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); } - if (Email.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + size += users_.CalculateSize(_repeated_users_codec); + if (Success != false) { + size += 1 + 1; + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (ResultCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ResultCode); + } + if (AdditionalInfo.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AdditionalInfo); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -10871,101 +39970,175 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ReportFilterUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsEnterpriseUsersAddTeamResponse other) { if (other == null) { return; } - if (other.UserId != 0) { - UserId = other.UserId; + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; } - if (other.Email.Length != 0) { - Email = other.Email; + users_.Add(other.users_); + if (other.Success != false) { + Success = other.Success; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.ResultCode.Length != 0) { + ResultCode = other.ResultCode; + } + if (other.AdditionalInfo.Length != 0) { + AdditionalInfo = other.AdditionalInfo; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - UserId = input.ReadInt32(); + case 10: { + TeamUid = input.ReadBytes(); break; } case 18: { - Email = input.ReadString(); + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + case 24: { + Success = input.ReadBool(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + ResultCode = input.ReadString(); + break; + } + case 50: { + AdditionalInfo = input.ReadString(); break; } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + case 24: { + Success = input.ReadBool(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + ResultCode = input.ReadString(); + break; + } + case 50: { + AdditionalInfo = input.ReadString(); + break; + } + } + } + } + #endif + } - public sealed partial class DeviceRequestForAdminApproval : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeviceRequestForAdminApproval()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TeamsEnterpriseUsersAddUserResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TeamsEnterpriseUsersAddUserResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[51]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[132]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceRequestForAdminApproval() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddUserResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceRequestForAdminApproval(DeviceRequestForAdminApproval other) : this() { - deviceId_ = other.deviceId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddUserResponse(TeamsEnterpriseUsersAddUserResponse other) : this() { enterpriseUserId_ = other.enterpriseUserId_; - encryptedDeviceToken_ = other.encryptedDeviceToken_; - devicePublicKey_ = other.devicePublicKey_; - deviceName_ = other.deviceName_; - clientVersion_ = other.clientVersion_; - deviceType_ = other.deviceType_; - date_ = other.date_; - ipAddress_ = other.ipAddress_; - location_ = other.location_; - email_ = other.email_; - accountUid_ = other.accountUid_; + revision_ = other.revision_; + success_ = other.success_; + message_ = other.message_; + resultCode_ = other.resultCode_; + additionalInfo_ = other.additionalInfo_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public DeviceRequestForAdminApproval Clone() { - return new DeviceRequestForAdminApproval(this); - } - - /// Field number for the "deviceId" field. - public const int DeviceIdFieldNumber = 1; - private long deviceId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long DeviceId { - get { return deviceId_; } - set { - deviceId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TeamsEnterpriseUsersAddUserResponse Clone() { + return new TeamsEnterpriseUsersAddUserResponse(this); } /// Field number for the "enterpriseUserId" field. - public const int EnterpriseUserIdFieldNumber = 2; + public const int EnterpriseUserIdFieldNumber = 1; private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long EnterpriseUserId { get { return enterpriseUserId_; } set { @@ -10973,159 +40146,100 @@ public long EnterpriseUserId { } } - /// Field number for the "encryptedDeviceToken" field. - public const int EncryptedDeviceTokenFieldNumber = 3; - private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EncryptedDeviceToken { - get { return encryptedDeviceToken_; } - set { - encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "devicePublicKey" field. - public const int DevicePublicKeyFieldNumber = 4; - private pb::ByteString devicePublicKey_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DevicePublicKey { - get { return devicePublicKey_; } - set { - devicePublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "deviceName" field. - public const int DeviceNameFieldNumber = 5; - private string deviceName_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceName { - get { return deviceName_; } - set { - deviceName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "clientVersion" field. - public const int ClientVersionFieldNumber = 6; - private string clientVersion_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string ClientVersion { - get { return clientVersion_; } - set { - clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "deviceType" field. - public const int DeviceTypeFieldNumber = 7; - private string deviceType_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string DeviceType { - get { return deviceType_; } - set { - deviceType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "date" field. - public const int DateFieldNumber = 8; - private long date_; + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 2; + private long revision_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long Date { - get { return date_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } set { - date_ = value; + revision_ = value; } } - /// Field number for the "ipAddress" field. - public const int IpAddressFieldNumber = 9; - private string ipAddress_ = ""; + /// Field number for the "success" field. + public const int SuccessFieldNumber = 3; + private bool success_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string IpAddress { - get { return ipAddress_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } set { - ipAddress_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + success_ = value; } } - /// Field number for the "location" field. - public const int LocationFieldNumber = 10; - private string location_ = ""; + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Location { - get { return location_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - location_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "email" field. - public const int EmailFieldNumber = 11; - private string email_ = ""; + /// Field number for the "resultCode" field. + public const int ResultCodeFieldNumber = 5; + private string resultCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Email { - get { return email_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ResultCode { + get { return resultCode_; } set { - email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + resultCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "accountUid" field. - public const int AccountUidFieldNumber = 12; - private pb::ByteString accountUid_ = pb::ByteString.Empty; + /// Field number for the "additionalInfo" field. + public const int AdditionalInfoFieldNumber = 6; + private string additionalInfo_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString AccountUid { - get { return accountUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AdditionalInfo { + get { return additionalInfo_; } set { - accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + additionalInfo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as DeviceRequestForAdminApproval); + return Equals(other as TeamsEnterpriseUsersAddUserResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(DeviceRequestForAdminApproval other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TeamsEnterpriseUsersAddUserResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (DeviceId != other.DeviceId) return false; if (EnterpriseUserId != other.EnterpriseUserId) return false; - if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; - if (DevicePublicKey != other.DevicePublicKey) return false; - if (DeviceName != other.DeviceName) return false; - if (ClientVersion != other.ClientVersion) return false; - if (DeviceType != other.DeviceType) return false; - if (Date != other.Date) return false; - if (IpAddress != other.IpAddress) return false; - if (Location != other.Location) return false; - if (Email != other.Email) return false; - if (AccountUid != other.AccountUid) return false; + if (Revision != other.Revision) return false; + if (Success != other.Success) return false; + if (Message != other.Message) return false; + if (ResultCode != other.ResultCode) return false; + if (AdditionalInfo != other.AdditionalInfo) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (DeviceId != 0L) hash ^= DeviceId.GetHashCode(); if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); - if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); - if (DevicePublicKey.Length != 0) hash ^= DevicePublicKey.GetHashCode(); - if (DeviceName.Length != 0) hash ^= DeviceName.GetHashCode(); - if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); - if (DeviceType.Length != 0) hash ^= DeviceType.GetHashCode(); - if (Date != 0L) hash ^= Date.GetHashCode(); - if (IpAddress.Length != 0) hash ^= IpAddress.GetHashCode(); - if (Location.Length != 0) hash ^= Location.GetHashCode(); - if (Email.Length != 0) hash ^= Email.GetHashCode(); - if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (Success != false) hash ^= Success.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (ResultCode.Length != 0) hash ^= ResultCode.GetHashCode(); + if (AdditionalInfo.Length != 0) hash ^= AdditionalInfo.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -11133,312 +40247,355 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (DeviceId != 0L) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { output.WriteRawTag(8); - output.WriteInt64(DeviceId); + output.WriteInt64(EnterpriseUserId); } - if (EnterpriseUserId != 0L) { + if (Revision != 0L) { output.WriteRawTag(16); - output.WriteInt64(EnterpriseUserId); + output.WriteInt64(Revision); } - if (EncryptedDeviceToken.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(EncryptedDeviceToken); + if (Success != false) { + output.WriteRawTag(24); + output.WriteBool(Success); } - if (DevicePublicKey.Length != 0) { + if (Message.Length != 0) { output.WriteRawTag(34); - output.WriteBytes(DevicePublicKey); + output.WriteString(Message); } - if (DeviceName.Length != 0) { + if (ResultCode.Length != 0) { output.WriteRawTag(42); - output.WriteString(DeviceName); + output.WriteString(ResultCode); } - if (ClientVersion.Length != 0) { + if (AdditionalInfo.Length != 0) { output.WriteRawTag(50); - output.WriteString(ClientVersion); + output.WriteString(AdditionalInfo); } - if (DeviceType.Length != 0) { - output.WriteRawTag(58); - output.WriteString(DeviceType); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Date != 0L) { - output.WriteRawTag(64); - output.WriteInt64(Date); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (IpAddress.Length != 0) { - output.WriteRawTag(74); - output.WriteString(IpAddress); + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); } - if (Location.Length != 0) { - output.WriteRawTag(82); - output.WriteString(Location); + if (Success != false) { + output.WriteRawTag(24); + output.WriteBool(Success); } - if (Email.Length != 0) { - output.WriteRawTag(90); - output.WriteString(Email); + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); } - if (AccountUid.Length != 0) { - output.WriteRawTag(98); - output.WriteBytes(AccountUid); + if (ResultCode.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ResultCode); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(50); + output.WriteString(AdditionalInfo); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (DeviceId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeviceId); - } if (EnterpriseUserId != 0L) { size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (EncryptedDeviceToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); - } - if (DevicePublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DevicePublicKey); - } - if (DeviceName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceName); - } - if (ClientVersion.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); - } - if (DeviceType.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceType); - } - if (Date != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(Date); + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); } - if (IpAddress.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(IpAddress); + if (Success != false) { + size += 1 + 1; } - if (Location.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Location); + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); } - if (Email.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + if (ResultCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ResultCode); } - if (AccountUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + if (AdditionalInfo.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AdditionalInfo); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } return size; - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(DeviceRequestForAdminApproval other) { - if (other == null) { - return; - } - if (other.DeviceId != 0L) { - DeviceId = other.DeviceId; - } - if (other.EnterpriseUserId != 0L) { - EnterpriseUserId = other.EnterpriseUserId; - } - if (other.EncryptedDeviceToken.Length != 0) { - EncryptedDeviceToken = other.EncryptedDeviceToken; - } - if (other.DevicePublicKey.Length != 0) { - DevicePublicKey = other.DevicePublicKey; - } - if (other.DeviceName.Length != 0) { - DeviceName = other.DeviceName; - } - if (other.ClientVersion.Length != 0) { - ClientVersion = other.ClientVersion; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TeamsEnterpriseUsersAddUserResponse other) { + if (other == null) { + return; } - if (other.DeviceType.Length != 0) { - DeviceType = other.DeviceType; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.Date != 0L) { - Date = other.Date; + if (other.Revision != 0L) { + Revision = other.Revision; } - if (other.IpAddress.Length != 0) { - IpAddress = other.IpAddress; + if (other.Success != false) { + Success = other.Success; } - if (other.Location.Length != 0) { - Location = other.Location; + if (other.Message.Length != 0) { + Message = other.Message; } - if (other.Email.Length != 0) { - Email = other.Email; + if (other.ResultCode.Length != 0) { + ResultCode = other.ResultCode; } - if (other.AccountUid.Length != 0) { - AccountUid = other.AccountUid; + if (other.AdditionalInfo.Length != 0) { + AdditionalInfo = other.AdditionalInfo; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - DeviceId = input.ReadInt64(); + EnterpriseUserId = input.ReadInt64(); break; } case 16: { - EnterpriseUserId = input.ReadInt64(); + Revision = input.ReadInt64(); break; } - case 26: { - EncryptedDeviceToken = input.ReadBytes(); + case 24: { + Success = input.ReadBool(); break; } case 34: { - DevicePublicKey = input.ReadBytes(); + Message = input.ReadString(); break; } case 42: { - DeviceName = input.ReadString(); + ResultCode = input.ReadString(); break; } case 50: { - ClientVersion = input.ReadString(); + AdditionalInfo = input.ReadString(); break; } - case 58: { - DeviceType = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } - case 64: { - Date = input.ReadInt64(); + case 16: { + Revision = input.ReadInt64(); break; } - case 74: { - IpAddress = input.ReadString(); + case 24: { + Success = input.ReadBool(); break; } - case 82: { - Location = input.ReadString(); + case 34: { + Message = input.ReadString(); break; } - case 90: { - Email = input.ReadString(); + case 42: { + ResultCode = input.ReadString(); break; } - case 98: { - AccountUid = input.ReadBytes(); + case 50: { + AdditionalInfo = input.ReadString(); break; } } } } + #endif } - public sealed partial class EnterpriseData : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseData()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DomainAlias : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainAlias()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[52]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[133]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseData() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAlias() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseData(EnterpriseData other) : this() { - entity_ = other.entity_; - delete_ = other.delete_; - data_ = other.data_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAlias(DomainAlias other) : this() { + domain_ = other.domain_; + alias_ = other.alias_; + status_ = other.status_; + message_ = other.message_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseData Clone() { - return new EnterpriseData(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAlias Clone() { + return new DomainAlias(this); } - /// Field number for the "entity" field. - public const int EntityFieldNumber = 1; - private global::Enterprise.EnterpriseDataEntity entity_ = global::Enterprise.EnterpriseDataEntity.Unknown; + /// Field number for the "domain" field. + public const int DomainFieldNumber = 1; + private string domain_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EnterpriseDataEntity Entity { - get { return entity_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Domain { + get { return domain_; } set { - entity_ = value; + domain_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "delete" field. - public const int DeleteFieldNumber = 2; - private bool delete_; + /// Field number for the "alias" field. + public const int AliasFieldNumber = 2; + private string alias_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Delete { - get { return delete_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Alias { + get { return alias_; } set { - delete_ = value; + alias_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "data" field. - public const int DataFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_data_codec - = pb::FieldCodec.ForBytes(26); - private readonly pbc::RepeatedField data_ = new pbc::RepeatedField(); + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private int status_; /// - /// If delete==false then it's list of entity objects (Node, Users etc...). If delete==true then those objects have only ids but no other info. + ///0-Success else Error /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Data { - get { return data_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseData); + return Equals(other as DomainAlias); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseData other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DomainAlias other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (Entity != other.Entity) return false; - if (Delete != other.Delete) return false; - if(!data_.Equals(other.data_)) return false; + if (Domain != other.Domain) return false; + if (Alias != other.Alias) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) hash ^= Entity.GetHashCode(); - if (Delete != false) hash ^= Delete.GetHashCode(); - hash ^= data_.GetHashCode(); + if (Domain.Length != 0) hash ^= Domain.GetHashCode(); + if (Alias.Length != 0) hash ^= Alias.GetHashCode(); + if (Status != 0) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -11446,36 +40603,81 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { - output.WriteRawTag(8); - output.WriteEnum((int) Entity); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Domain.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Domain); } - if (Delete != false) { - output.WriteRawTag(16); - output.WriteBool(Delete); + if (Alias.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Alias); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); } - data_.WriteTo(output, _repeated_data_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Domain.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Domain); + } + if (Alias.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Alias); + } + if (Status != 0) { + output.WriteRawTag(24); + output.WriteInt32(Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Entity); + if (Domain.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Domain); } - if (Delete != false) { - size += 1 + 1; + if (Alias.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Alias); + } + if (Status != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); } - size += data_.CalculateSize(_repeated_data_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -11483,167 +40685,180 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseData other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DomainAlias other) { if (other == null) { return; } - if (other.Entity != global::Enterprise.EnterpriseDataEntity.Unknown) { - Entity = other.Entity; + if (other.Domain.Length != 0) { + Domain = other.Domain; } - if (other.Delete != false) { - Delete = other.Delete; + if (other.Alias.Length != 0) { + Alias = other.Alias; + } + if (other.Status != 0) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; } - data_.Add(other.data_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - Entity = (global::Enterprise.EnterpriseDataEntity) input.ReadEnum(); + case 10: { + Domain = input.ReadString(); break; } - case 16: { - Delete = input.ReadBool(); + case 18: { + Alias = input.ReadString(); break; } - case 26: { - data_.AddEntriesFrom(input, _repeated_data_codec); + case 24: { + Status = input.ReadInt32(); + break; + } + case 34: { + Message = input.ReadString(); break; } } } + #endif } - } - - public sealed partial class EnterpriseDataResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseDataResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[53]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseDataResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseDataResponse(EnterpriseDataResponse other) : this() { - continuationToken_ = other.continuationToken_; - hasMore_ = other.hasMore_; - cacheStatus_ = other.cacheStatus_; - data_ = other.data_.Clone(); - generalData_ = other.generalData_ != null ? other.generalData_.Clone() : null; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Domain = input.ReadString(); + break; + } + case 18: { + Alias = input.ReadString(); + break; + } + case 24: { + Status = input.ReadInt32(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } } + #endif + + } + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DomainAliasRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainAliasRequest()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseDataResponse Clone() { - return new EnterpriseDataResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[134]; } } - /// Field number for the "continuationToken" field. - public const int ContinuationTokenFieldNumber = 1; - private pb::ByteString continuationToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ContinuationToken { - get { return continuationToken_; } - set { - continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "hasMore" field. - public const int HasMoreFieldNumber = 2; - private bool hasMore_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool HasMore { - get { return hasMore_; } - set { - hasMore_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAliasRequest() { + OnConstruction(); } - /// Field number for the "cacheStatus" field. - public const int CacheStatusFieldNumber = 3; - private global::Enterprise.CacheStatus cacheStatus_ = global::Enterprise.CacheStatus.Keep; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.CacheStatus CacheStatus { - get { return cacheStatus_; } - set { - cacheStatus_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAliasRequest(DomainAliasRequest other) : this() { + domainAlias_ = other.domainAlias_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "data" field. - public const int DataFieldNumber = 4; - private static readonly pb::FieldCodec _repeated_data_codec - = pb::FieldCodec.ForMessage(34, global::Enterprise.EnterpriseData.Parser); - private readonly pbc::RepeatedField data_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Data { - get { return data_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAliasRequest Clone() { + return new DomainAliasRequest(this); } - /// Field number for the "generalData" field. - public const int GeneralDataFieldNumber = 5; - private global::Enterprise.GeneralDataEntity generalData_; + /// Field number for the "domainAlias" field. + public const int DomainAliasFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_domainAlias_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.DomainAlias.Parser); + private readonly pbc::RepeatedField domainAlias_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.GeneralDataEntity GeneralData { - get { return generalData_; } - set { - generalData_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DomainAlias { + get { return domainAlias_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseDataResponse); + return Equals(other as DomainAliasRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseDataResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DomainAliasRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ContinuationToken != other.ContinuationToken) return false; - if (HasMore != other.HasMore) return false; - if (CacheStatus != other.CacheStatus) return false; - if(!data_.Equals(other.data_)) return false; - if (!object.Equals(GeneralData, other.GeneralData)) return false; + if(!domainAlias_.Equals(other.domainAlias_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); - if (HasMore != false) hash ^= HasMore.GetHashCode(); - if (CacheStatus != global::Enterprise.CacheStatus.Keep) hash ^= CacheStatus.GetHashCode(); - hash ^= data_.GetHashCode(); - if (generalData_ != null) hash ^= GeneralData.GetHashCode(); + hash ^= domainAlias_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -11651,50 +40866,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ContinuationToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(ContinuationToken); - } - if (HasMore != false) { - output.WriteRawTag(16); - output.WriteBool(HasMore); - } - if (CacheStatus != global::Enterprise.CacheStatus.Keep) { - output.WriteRawTag(24); - output.WriteEnum((int) CacheStatus); - } - data_.WriteTo(output, _repeated_data_codec); - if (generalData_ != null) { - output.WriteRawTag(42); - output.WriteMessage(GeneralData); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + domainAlias_.WriteTo(output, _repeated_domainAlias_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + domainAlias_.WriteTo(ref output, _repeated_domainAlias_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ContinuationToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); - } - if (HasMore != false) { - size += 1 + 1; - } - if (CacheStatus != global::Enterprise.CacheStatus.Keep) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CacheStatus); - } - size += data_.CalculateSize(_repeated_data_codec); - if (generalData_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(GeneralData); - } + size += domainAlias_.CalculateSize(_repeated_domainAlias_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -11702,132 +40907,145 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseDataResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DomainAliasRequest other) { if (other == null) { return; } - if (other.ContinuationToken.Length != 0) { - ContinuationToken = other.ContinuationToken; - } - if (other.HasMore != false) { - HasMore = other.HasMore; - } - if (other.CacheStatus != global::Enterprise.CacheStatus.Keep) { - CacheStatus = other.CacheStatus; - } - data_.Add(other.data_); - if (other.generalData_ != null) { - if (generalData_ == null) { - GeneralData = new global::Enterprise.GeneralDataEntity(); - } - GeneralData.MergeFrom(other.GeneralData); - } + domainAlias_.Add(other.domainAlias_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - ContinuationToken = input.ReadBytes(); - break; - } - case 16: { - HasMore = input.ReadBool(); - break; - } - case 24: { - CacheStatus = (global::Enterprise.CacheStatus) input.ReadEnum(); + domainAlias_.AddEntriesFrom(input, _repeated_domainAlias_codec); break; } - case 34: { - data_.AddEntriesFrom(input, _repeated_data_codec); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 42: { - if (generalData_ == null) { - GeneralData = new global::Enterprise.GeneralDataEntity(); - } - input.ReadMessage(GeneralData); + case 10: { + domainAlias_.AddEntriesFrom(ref input, _repeated_domainAlias_codec); break; } } } } + #endif } - public sealed partial class BackupRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DomainAliasResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DomainAliasResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[54]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[135]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAliasResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupRequest(BackupRequest other) : this() { - continuationToken_ = other.continuationToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAliasResponse(DomainAliasResponse other) : this() { + domainAlias_ = other.domainAlias_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupRequest Clone() { - return new BackupRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DomainAliasResponse Clone() { + return new DomainAliasResponse(this); } - /// Field number for the "continuationToken" field. - public const int ContinuationTokenFieldNumber = 1; - private pb::ByteString continuationToken_ = pb::ByteString.Empty; + /// Field number for the "domainAlias" field. + public const int DomainAliasFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_domainAlias_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.DomainAlias.Parser); + private readonly pbc::RepeatedField domainAlias_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ContinuationToken { - get { return continuationToken_; } - set { - continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DomainAlias { + get { return domainAlias_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as BackupRequest); + return Equals(other as DomainAliasResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(BackupRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DomainAliasResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (ContinuationToken != other.ContinuationToken) return false; + if(!domainAlias_.Equals(other.domainAlias_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + hash ^= domainAlias_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -11835,27 +41053,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (ContinuationToken.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(ContinuationToken); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + domainAlias_.WriteTo(output, _repeated_domainAlias_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + domainAlias_.WriteTo(ref output, _repeated_domainAlias_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (ContinuationToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); - } + size += domainAlias_.CalculateSize(_repeated_domainAlias_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -11863,184 +41094,160 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(BackupRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DomainAliasResponse other) { if (other == null) { return; } - if (other.ContinuationToken.Length != 0) { - ContinuationToken = other.ContinuationToken; - } + domainAlias_.Add(other.domainAlias_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - ContinuationToken = input.ReadBytes(); + domainAlias_.AddEntriesFrom(input, _repeated_domainAlias_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + domainAlias_.AddEntriesFrom(ref input, _repeated_domainAlias_codec); break; } } } } + #endif } - public sealed partial class BackupRecord : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupRecord()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersProvisionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersProvisionRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[55]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[136]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupRecord() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupRecord(BackupRecord other) : this() { - userId_ = other.userId_; - recordUid_ = other.recordUid_; - key_ = other.key_; - keyType_ = other.keyType_; - version_ = other.version_; - data_ = other.data_; - extra_ = other.extra_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupRecord Clone() { - return new BackupRecord(this); - } - - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 1; - private int userId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UserId { - get { return userId_; } - set { - userId_ = value; - } - } - - /// Field number for the "recordUid" field. - public const int RecordUidFieldNumber = 2; - private pb::ByteString recordUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RecordUid { - get { return recordUid_; } - set { - recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "key" field. - public const int KeyFieldNumber = 3; - private pb::ByteString key_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Key { - get { return key_; } - set { - key_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "keyType" field. - public const int KeyTypeFieldNumber = 4; - private global::Enterprise.BackupKeyType keyType_ = global::Enterprise.BackupKeyType.NoKey; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.BackupKeyType KeyType { - get { return keyType_; } - set { - keyType_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionRequest(EnterpriseUsersProvisionRequest other) : this() { + users_ = other.users_.Clone(); + clientVersion_ = other.clientVersion_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "version" field. - public const int VersionFieldNumber = 5; - private int version_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Version { - get { return version_; } - set { - version_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionRequest Clone() { + return new EnterpriseUsersProvisionRequest(this); } - /// Field number for the "data" field. - public const int DataFieldNumber = 6; - private pb::ByteString data_ = pb::ByteString.Empty; + /// Field number for the "users" field. + public const int UsersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUsersProvision.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Data { - get { return data_; } - set { - data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } } - /// Field number for the "extra" field. - public const int ExtraFieldNumber = 7; - private pb::ByteString extra_ = pb::ByteString.Empty; + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString Extra { - get { return extra_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } set { - extra_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as BackupRecord); + return Equals(other as EnterpriseUsersProvisionRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(BackupRecord other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersProvisionRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (UserId != other.UserId) return false; - if (RecordUid != other.RecordUid) return false; - if (Key != other.Key) return false; - if (KeyType != other.KeyType) return false; - if (Version != other.Version) return false; - if (Data != other.Data) return false; - if (Extra != other.Extra) return false; + if(!users_.Equals(other.users_)) return false; + if (ClientVersion != other.ClientVersion) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (UserId != 0) hash ^= UserId.GetHashCode(); - if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); - if (Key.Length != 0) hash ^= Key.GetHashCode(); - if (KeyType != global::Enterprise.BackupKeyType.NoKey) hash ^= KeyType.GetHashCode(); - if (Version != 0) hash ^= Version.GetHashCode(); - if (Data.Length != 0) hash ^= Data.GetHashCode(); - if (Extra.Length != 0) hash ^= Extra.GetHashCode(); + hash ^= users_.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12048,68 +41255,50 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (UserId != 0) { - output.WriteRawTag(8); - output.WriteInt32(UserId); - } - if (RecordUid.Length != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + users_.WriteTo(output, _repeated_users_codec); + if (ClientVersion.Length != 0) { output.WriteRawTag(18); - output.WriteBytes(RecordUid); - } - if (Key.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(Key); - } - if (KeyType != global::Enterprise.BackupKeyType.NoKey) { - output.WriteRawTag(32); - output.WriteEnum((int) KeyType); - } - if (Version != 0) { - output.WriteRawTag(40); - output.WriteInt32(Version); + output.WriteString(ClientVersion); } - if (Data.Length != 0) { - output.WriteRawTag(50); - output.WriteBytes(Data); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Extra.Length != 0) { - output.WriteRawTag(58); - output.WriteBytes(Extra); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + users_.WriteTo(ref output, _repeated_users_codec); + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (UserId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); - } - if (RecordUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); - } - if (Key.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Key); - } - if (KeyType != global::Enterprise.BackupKeyType.NoKey) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); - } - if (Version != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); - } - if (Data.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); - } - if (Extra.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(Extra); + size += users_.CalculateSize(_repeated_users_codec); + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -12118,156 +41307,391 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(BackupRecord other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersProvisionRequest other) { if (other == null) { return; } - if (other.UserId != 0) { - UserId = other.UserId; + users_.Add(other.users_); + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; } - if (other.RecordUid.Length != 0) { - RecordUid = other.RecordUid; + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - if (other.Key.Length != 0) { - Key = other.Key; + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + } } - if (other.KeyType != global::Enterprise.BackupKeyType.NoKey) { - KeyType = other.KeyType; + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - if (other.Version != 0) { - Version = other.Version; + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + } } - if (other.Data.Length != 0) { - Data = other.Data; + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersProvision : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersProvision()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[137]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvision() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvision(EnterpriseUsersProvision other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + username_ = other.username_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + keyType_ = other.keyType_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + enterpriseUsersDataKey_ = other.enterpriseUsersDataKey_; + authVerifier_ = other.authVerifier_; + encryptionParams_ = other.encryptionParams_; + rsaPublicKey_ = other.rsaPublicKey_; + rsaEncryptedPrivateKey_ = other.rsaEncryptedPrivateKey_; + eccPublicKey_ = other.eccPublicKey_; + eccEncryptedPrivateKey_ = other.eccEncryptedPrivateKey_; + encryptedDeviceToken_ = other.encryptedDeviceToken_; + encryptedClientKey_ = other.encryptedClientKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvision Clone() { + return new EnterpriseUsersProvision(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + /// + /// from enterprise_user_add + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; } - if (other.Extra.Length != 0) { - Extra = other.Extra; + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 3; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 4; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 5; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 6; + private string fullName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { - uint tag; - while ((tag = input.ReadTag()) != 0) { - switch(tag) { - default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); - break; - case 8: { - UserId = input.ReadInt32(); - break; - } - case 18: { - RecordUid = input.ReadBytes(); - break; - } - case 26: { - Key = input.ReadBytes(); - break; - } - case 32: { - KeyType = (global::Enterprise.BackupKeyType) input.ReadEnum(); - break; - } - case 40: { - Version = input.ReadInt32(); - break; - } - case 50: { - Data = input.ReadBytes(); - break; - } - case 58: { - Extra = input.ReadBytes(); - break; - } - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - } + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 7; + private string jobTitle_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } + set { + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } - public sealed partial class BackupKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupKey()); - private pb::UnknownFieldSet _unknownFields; + /// Field number for the "enterpriseUsersDataKey" field. + public const int EnterpriseUsersDataKeyFieldNumber = 8; + private pb::ByteString enterpriseUsersDataKey_ = pb::ByteString.Empty; + /// + /// from set_enterprise_user_data_key_by_admin + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EnterpriseUsersDataKey { + get { return enterpriseUsersDataKey_; } + set { + enterpriseUsersDataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Field number for the "authVerifier" field. + public const int AuthVerifierFieldNumber = 9; + private pb::ByteString authVerifier_ = pb::ByteString.Empty; + /// + /// from APIRequest.CreateUserRequest, used in /authentication/request_create_user + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[56]; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AuthVerifier { + get { return authVerifier_; } + set { + authVerifier_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "encryptionParams" field. + public const int EncryptionParamsFieldNumber = 10; + private pb::ByteString encryptionParams_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptionParams { + get { return encryptionParams_; } + set { + encryptionParams_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "rsaPublicKey" field. + public const int RsaPublicKeyFieldNumber = 11; + private pb::ByteString rsaPublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupKey() { - OnConstruction(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RsaPublicKey { + get { return rsaPublicKey_; } + set { + rsaPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - partial void OnConstruction(); + /// Field number for the "rsaEncryptedPrivateKey" field. + public const int RsaEncryptedPrivateKeyFieldNumber = 12; + private pb::ByteString rsaEncryptedPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RsaEncryptedPrivateKey { + get { return rsaEncryptedPrivateKey_; } + set { + rsaEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + /// Field number for the "eccPublicKey" field. + public const int EccPublicKeyFieldNumber = 13; + private pb::ByteString eccPublicKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupKey(BackupKey other) : this() { - userId_ = other.userId_; - backupKey_ = other.backupKey_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EccPublicKey { + get { return eccPublicKey_; } + set { + eccPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "eccEncryptedPrivateKey" field. + public const int EccEncryptedPrivateKeyFieldNumber = 14; + private pb::ByteString eccEncryptedPrivateKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupKey Clone() { - return new BackupKey(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EccEncryptedPrivateKey { + get { return eccEncryptedPrivateKey_; } + set { + eccEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 1; - private int userId_; + /// Field number for the "encryptedDeviceToken" field. + public const int EncryptedDeviceTokenFieldNumber = 15; + private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UserId { - get { return userId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedDeviceToken { + get { return encryptedDeviceToken_; } set { - userId_ = value; + encryptedDeviceToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "backupKey" field. - public const int BackupKey_FieldNumber = 2; - private pb::ByteString backupKey_ = pb::ByteString.Empty; + /// Field number for the "encryptedClientKey" field. + public const int EncryptedClientKeyFieldNumber = 16; + private pb::ByteString encryptedClientKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString BackupKey_ { - get { return backupKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedClientKey { + get { return encryptedClientKey_; } set { - backupKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + encryptedClientKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as BackupKey); + return Equals(other as EnterpriseUsersProvision); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(BackupKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersProvision other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (UserId != other.UserId) return false; - if (BackupKey_ != other.BackupKey_) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Username != other.Username) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (KeyType != other.KeyType) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (EnterpriseUsersDataKey != other.EnterpriseUsersDataKey) return false; + if (AuthVerifier != other.AuthVerifier) return false; + if (EncryptionParams != other.EncryptionParams) return false; + if (RsaPublicKey != other.RsaPublicKey) return false; + if (RsaEncryptedPrivateKey != other.RsaEncryptedPrivateKey) return false; + if (EccPublicKey != other.EccPublicKey) return false; + if (EccEncryptedPrivateKey != other.EccEncryptedPrivateKey) return false; + if (EncryptedDeviceToken != other.EncryptedDeviceToken) return false; + if (EncryptedClientKey != other.EncryptedClientKey) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (UserId != 0) hash ^= UserId.GetHashCode(); - if (BackupKey_.Length != 0) hash ^= BackupKey_.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (EnterpriseUsersDataKey.Length != 0) hash ^= EnterpriseUsersDataKey.GetHashCode(); + if (AuthVerifier.Length != 0) hash ^= AuthVerifier.GetHashCode(); + if (EncryptionParams.Length != 0) hash ^= EncryptionParams.GetHashCode(); + if (RsaPublicKey.Length != 0) hash ^= RsaPublicKey.GetHashCode(); + if (RsaEncryptedPrivateKey.Length != 0) hash ^= RsaEncryptedPrivateKey.GetHashCode(); + if (EccPublicKey.Length != 0) hash ^= EccPublicKey.GetHashCode(); + if (EccEncryptedPrivateKey.Length != 0) hash ^= EccEncryptedPrivateKey.GetHashCode(); + if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); + if (EncryptedClientKey.Length != 0) hash ^= EncryptedClientKey.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12275,33 +41699,212 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (UserId != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { output.WriteRawTag(8); - output.WriteInt32(UserId); + output.WriteInt64(EnterpriseUserId); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(58); + output.WriteString(JobTitle); + } + if (EnterpriseUsersDataKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(EnterpriseUsersDataKey); + } + if (AuthVerifier.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(EncryptionParams); + } + if (RsaPublicKey.Length != 0) { + output.WriteRawTag(90); + output.WriteBytes(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(114); + output.WriteBytes(EccEncryptedPrivateKey); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(122); + output.WriteBytes(EncryptedDeviceToken); + } + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteBytes(EncryptedClientKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(58); + output.WriteString(JobTitle); + } + if (EnterpriseUsersDataKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(EnterpriseUsersDataKey); + } + if (AuthVerifier.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(EncryptionParams); + } + if (RsaPublicKey.Length != 0) { + output.WriteRawTag(90); + output.WriteBytes(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + output.WriteRawTag(114); + output.WriteBytes(EccEncryptedPrivateKey); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(122); + output.WriteBytes(EncryptedDeviceToken); } - if (BackupKey_.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(BackupKey_); + if (EncryptedClientKey.Length != 0) { + output.WriteRawTag(130, 1); + output.WriteBytes(EncryptedClientKey); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (UserId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (BackupKey_.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(BackupKey_); + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); + } + if (EnterpriseUsersDataKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterpriseUsersDataKey); + } + if (AuthVerifier.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AuthVerifier); + } + if (EncryptionParams.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptionParams); + } + if (RsaPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaPublicKey); + } + if (RsaEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaEncryptedPrivateKey); + } + if (EccPublicKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccPublicKey); + } + if (EccEncryptedPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccEncryptedPrivateKey); + } + if (EncryptedDeviceToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedDeviceToken); + } + if (EncryptedClientKey.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeBytesSize(EncryptedClientKey); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -12310,204 +41913,312 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(BackupKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersProvision other) { if (other == null) { return; } - if (other.UserId != 0) { - UserId = other.UserId; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.BackupKey_.Length != 0) { - BackupKey_ = other.BackupKey_; + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; + } + if (other.FullName.Length != 0) { + FullName = other.FullName; + } + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; + } + if (other.EnterpriseUsersDataKey.Length != 0) { + EnterpriseUsersDataKey = other.EnterpriseUsersDataKey; + } + if (other.AuthVerifier.Length != 0) { + AuthVerifier = other.AuthVerifier; + } + if (other.EncryptionParams.Length != 0) { + EncryptionParams = other.EncryptionParams; + } + if (other.RsaPublicKey.Length != 0) { + RsaPublicKey = other.RsaPublicKey; + } + if (other.RsaEncryptedPrivateKey.Length != 0) { + RsaEncryptedPrivateKey = other.RsaEncryptedPrivateKey; + } + if (other.EccPublicKey.Length != 0) { + EccPublicKey = other.EccPublicKey; + } + if (other.EccEncryptedPrivateKey.Length != 0) { + EccEncryptedPrivateKey = other.EccEncryptedPrivateKey; + } + if (other.EncryptedDeviceToken.Length != 0) { + EncryptedDeviceToken = other.EncryptedDeviceToken; + } + if (other.EncryptedClientKey.Length != 0) { + EncryptedClientKey = other.EncryptedClientKey; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - UserId = input.ReadInt32(); + EnterpriseUserId = input.ReadInt64(); break; } case 18: { - BackupKey_ = input.ReadBytes(); + Username = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 34: { + EncryptedData = input.ReadString(); + break; + } + case 40: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 50: { + FullName = input.ReadString(); + break; + } + case 58: { + JobTitle = input.ReadString(); + break; + } + case 66: { + EnterpriseUsersDataKey = input.ReadBytes(); + break; + } + case 74: { + AuthVerifier = input.ReadBytes(); + break; + } + case 82: { + EncryptionParams = input.ReadBytes(); + break; + } + case 90: { + RsaPublicKey = input.ReadBytes(); + break; + } + case 98: { + RsaEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 106: { + EccPublicKey = input.ReadBytes(); + break; + } + case 114: { + EccEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 122: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 130: { + EncryptedClientKey = input.ReadBytes(); break; } } } + #endif } - } - - public sealed partial class BackupUser : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupUser()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[57]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupUser() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupUser(BackupUser other) : this() { - userId_ = other.userId_; - userName_ = other.userName_; - dataKey_ = other.dataKey_; - dataKeyType_ = other.dataKeyType_; - privateKey_ = other.privateKey_; - treeKey_ = other.treeKey_; - treeKeyType_ = other.treeKeyType_; - backupKeys_ = other.backupKeys_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupUser Clone() { - return new BackupUser(this); - } - - /// Field number for the "userId" field. - public const int UserIdFieldNumber = 1; - private int userId_; + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int UserId { - get { return userId_; } - set { - userId_ = value; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - } - - /// Field number for the "userName" field. - public const int UserNameFieldNumber = 2; - private string userName_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string UserName { - get { return userName_; } - set { - userName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 34: { + EncryptedData = input.ReadString(); + break; + } + case 40: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 50: { + FullName = input.ReadString(); + break; + } + case 58: { + JobTitle = input.ReadString(); + break; + } + case 66: { + EnterpriseUsersDataKey = input.ReadBytes(); + break; + } + case 74: { + AuthVerifier = input.ReadBytes(); + break; + } + case 82: { + EncryptionParams = input.ReadBytes(); + break; + } + case 90: { + RsaPublicKey = input.ReadBytes(); + break; + } + case 98: { + RsaEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 106: { + EccPublicKey = input.ReadBytes(); + break; + } + case 114: { + EccEncryptedPrivateKey = input.ReadBytes(); + break; + } + case 122: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 130: { + EncryptedClientKey = input.ReadBytes(); + break; + } + } } } + #endif - /// Field number for the "dataKey" field. - public const int DataKeyFieldNumber = 3; - private pb::ByteString dataKey_ = pb::ByteString.Empty; + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersProvisionResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersProvisionResponse()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString DataKey { - get { return dataKey_; } - set { - dataKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[138]; } } - /// Field number for the "dataKeyType" field. - public const int DataKeyTypeFieldNumber = 4; - private global::Enterprise.BackupUserDataKeyType dataKeyType_ = global::Enterprise.BackupUserDataKeyType.Own; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.BackupUserDataKeyType DataKeyType { - get { return dataKeyType_; } - set { - dataKeyType_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "privateKey" field. - public const int PrivateKeyFieldNumber = 5; - private pb::ByteString privateKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString PrivateKey { - get { return privateKey_; } - set { - privateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionResponse() { + OnConstruction(); } - /// Field number for the "treeKey" field. - public const int TreeKeyFieldNumber = 6; - private pb::ByteString treeKey_ = pb::ByteString.Empty; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString TreeKey { - get { return treeKey_; } - set { - treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionResponse(EnterpriseUsersProvisionResponse other) : this() { + results_ = other.results_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "treeKeyType" field. - public const int TreeKeyTypeFieldNumber = 7; - private global::Enterprise.BackupKeyType treeKeyType_ = global::Enterprise.BackupKeyType.NoKey; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.BackupKeyType TreeKeyType { - get { return treeKeyType_; } - set { - treeKeyType_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionResponse Clone() { + return new EnterpriseUsersProvisionResponse(this); } - /// Field number for the "backupKeys" field. - public const int BackupKeysFieldNumber = 8; - private static readonly pb::FieldCodec _repeated_backupKeys_codec - = pb::FieldCodec.ForMessage(66, global::Enterprise.BackupKey.Parser); - private readonly pbc::RepeatedField backupKeys_ = new pbc::RepeatedField(); + /// Field number for the "results" field. + public const int ResultsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_results_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUsersProvisionResult.Parser); + private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField BackupKeys { - get { return backupKeys_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Results { + get { return results_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as BackupUser); + return Equals(other as EnterpriseUsersProvisionResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(BackupUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersProvisionResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (UserId != other.UserId) return false; - if (UserName != other.UserName) return false; - if (DataKey != other.DataKey) return false; - if (DataKeyType != other.DataKeyType) return false; - if (PrivateKey != other.PrivateKey) return false; - if (TreeKey != other.TreeKey) return false; - if (TreeKeyType != other.TreeKeyType) return false; - if(!backupKeys_.Equals(other.backupKeys_)) return false; + if(!results_.Equals(other.results_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (UserId != 0) hash ^= UserId.GetHashCode(); - if (UserName.Length != 0) hash ^= UserName.GetHashCode(); - if (DataKey.Length != 0) hash ^= DataKey.GetHashCode(); - if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) hash ^= DataKeyType.GetHashCode(); - if (PrivateKey.Length != 0) hash ^= PrivateKey.GetHashCode(); - if (TreeKey.Length != 0) hash ^= TreeKey.GetHashCode(); - if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) hash ^= TreeKeyType.GetHashCode(); - hash ^= backupKeys_.GetHashCode(); + hash ^= results_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12515,71 +42226,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (UserId != 0) { - output.WriteRawTag(8); - output.WriteInt32(UserId); - } - if (UserName.Length != 0) { - output.WriteRawTag(18); - output.WriteString(UserName); - } - if (DataKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(DataKey); - } - if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { - output.WriteRawTag(32); - output.WriteEnum((int) DataKeyType); - } - if (PrivateKey.Length != 0) { - output.WriteRawTag(42); - output.WriteBytes(PrivateKey); - } - if (TreeKey.Length != 0) { - output.WriteRawTag(50); - output.WriteBytes(TreeKey); - } - if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { - output.WriteRawTag(56); - output.WriteEnum((int) TreeKeyType); - } - backupKeys_.WriteTo(output, _repeated_backupKeys_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + results_.WriteTo(output, _repeated_results_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + results_.WriteTo(ref output, _repeated_results_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (UserId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserId); - } - if (UserName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(UserName); - } - if (DataKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(DataKey); - } - if (DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DataKeyType); - } - if (PrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(PrivateKey); - } - if (TreeKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(TreeKey); - } - if (TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TreeKeyType); - } - size += backupKeys_.CalculateSize(_repeated_backupKeys_codec); + size += results_.CalculateSize(_repeated_results_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -12587,187 +42267,191 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(BackupUser other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersProvisionResponse other) { if (other == null) { return; } - if (other.UserId != 0) { - UserId = other.UserId; - } - if (other.UserName.Length != 0) { - UserName = other.UserName; - } - if (other.DataKey.Length != 0) { - DataKey = other.DataKey; - } - if (other.DataKeyType != global::Enterprise.BackupUserDataKeyType.Own) { - DataKeyType = other.DataKeyType; - } - if (other.PrivateKey.Length != 0) { - PrivateKey = other.PrivateKey; - } - if (other.TreeKey.Length != 0) { - TreeKey = other.TreeKey; - } - if (other.TreeKeyType != global::Enterprise.BackupKeyType.NoKey) { - TreeKeyType = other.TreeKeyType; - } - backupKeys_.Add(other.backupKeys_); + results_.Add(other.results_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - UserId = input.ReadInt32(); - break; - } - case 18: { - UserName = input.ReadString(); - break; - } - case 26: { - DataKey = input.ReadBytes(); - break; - } - case 32: { - DataKeyType = (global::Enterprise.BackupUserDataKeyType) input.ReadEnum(); - break; - } - case 42: { - PrivateKey = input.ReadBytes(); - break; - } - case 50: { - TreeKey = input.ReadBytes(); + case 10: { + results_.AddEntriesFrom(input, _repeated_results_codec); break; } - case 56: { - TreeKeyType = (global::Enterprise.BackupKeyType) input.ReadEnum(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 66: { - backupKeys_.AddEntriesFrom(input, _repeated_backupKeys_codec); + case 10: { + results_.AddEntriesFrom(ref input, _repeated_results_codec); break; } } } } + #endif } - public sealed partial class BackupResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BackupResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersProvisionResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersProvisionResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[58]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[139]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionResult() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupResponse(BackupResponse other) : this() { - enterpriseEccPrivateKey_ = other.enterpriseEccPrivateKey_; - users_ = other.users_.Clone(); - records_ = other.records_.Clone(); - continuationToken_ = other.continuationToken_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionResult(EnterpriseUsersProvisionResult other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + code_ = other.code_; + message_ = other.message_; + additionalInfo_ = other.additionalInfo_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public BackupResponse Clone() { - return new BackupResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersProvisionResult Clone() { + return new EnterpriseUsersProvisionResult(this); } - /// Field number for the "enterpriseEccPrivateKey" field. - public const int EnterpriseEccPrivateKeyFieldNumber = 1; - private pb::ByteString enterpriseEccPrivateKey_ = pb::ByteString.Empty; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EnterpriseEccPrivateKey { - get { return enterpriseEccPrivateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } set { - enterpriseEccPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + enterpriseUserId_ = value; } } - /// Field number for the "users" field. - public const int UsersFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_users_codec - = pb::FieldCodec.ForMessage(18, global::Enterprise.BackupUser.Parser); - private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + /// Field number for the "code" field. + public const int CodeFieldNumber = 2; + private string code_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Users { - get { return users_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Code { + get { return code_; } + set { + code_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "records" field. - public const int RecordsFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_records_codec - = pb::FieldCodec.ForMessage(26, global::Enterprise.BackupRecord.Parser); - private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Records { - get { return records_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "continuationToken" field. - public const int ContinuationTokenFieldNumber = 4; - private pb::ByteString continuationToken_ = pb::ByteString.Empty; + /// Field number for the "additionalInfo" field. + public const int AdditionalInfoFieldNumber = 4; + private string additionalInfo_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString ContinuationToken { - get { return continuationToken_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AdditionalInfo { + get { return additionalInfo_; } set { - continuationToken_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + additionalInfo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as BackupResponse); + return Equals(other as EnterpriseUsersProvisionResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(BackupResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersProvisionResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EnterpriseEccPrivateKey != other.EnterpriseEccPrivateKey) return false; - if(!users_.Equals(other.users_)) return false; - if(!records_.Equals(other.records_)) return false; - if (ContinuationToken != other.ContinuationToken) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Code != other.Code) return false; + if (Message != other.Message) return false; + if (AdditionalInfo != other.AdditionalInfo) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EnterpriseEccPrivateKey.Length != 0) hash ^= EnterpriseEccPrivateKey.GetHashCode(); - hash ^= users_.GetHashCode(); - hash ^= records_.GetHashCode(); - if (ContinuationToken.Length != 0) hash ^= ContinuationToken.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Code.Length != 0) hash ^= Code.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (AdditionalInfo.Length != 0) hash ^= AdditionalInfo.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12775,37 +42459,80 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EnterpriseEccPrivateKey.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(EnterpriseEccPrivateKey); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - users_.WriteTo(output, _repeated_users_codec); - records_.WriteTo(output, _repeated_records_codec); - if (ContinuationToken.Length != 0) { + if (Code.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (AdditionalInfo.Length != 0) { output.WriteRawTag(34); - output.WriteBytes(ContinuationToken); + output.WriteString(AdditionalInfo); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Code.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(34); + output.WriteString(AdditionalInfo); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EnterpriseEccPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EnterpriseEccPrivateKey); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - size += users_.CalculateSize(_repeated_users_codec); - size += records_.CalculateSize(_repeated_records_codec); - if (ContinuationToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ContinuationToken); + if (Code.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Code); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (AdditionalInfo.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AdditionalInfo); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -12814,116 +42541,195 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(BackupResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersProvisionResult other) { if (other == null) { return; } - if (other.EnterpriseEccPrivateKey.Length != 0) { - EnterpriseEccPrivateKey = other.EnterpriseEccPrivateKey; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - users_.Add(other.users_); - records_.Add(other.records_); - if (other.ContinuationToken.Length != 0) { - ContinuationToken = other.ContinuationToken; + if (other.Code.Length != 0) { + Code = other.Code; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.AdditionalInfo.Length != 0) { + AdditionalInfo = other.AdditionalInfo; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - EnterpriseEccPrivateKey = input.ReadBytes(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } case 18: { - users_.AddEntriesFrom(input, _repeated_users_codec); + Code = input.ReadString(); break; } case 26: { - records_.AddEntriesFrom(input, _repeated_records_codec); + Message = input.ReadString(); break; } case 34: { - ContinuationToken = input.ReadBytes(); + AdditionalInfo = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Code = input.ReadString(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + AdditionalInfo = input.ReadString(); break; } } } } + #endif } - public sealed partial class GetEnterpriseDataKeysRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetEnterpriseDataKeysRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersAddRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[59]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[140]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetEnterpriseDataKeysRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetEnterpriseDataKeysRequest(GetEnterpriseDataKeysRequest other) : this() { - roleId_ = other.roleId_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddRequest(EnterpriseUsersAddRequest other) : this() { + users_ = other.users_.Clone(); + clientVersion_ = other.clientVersion_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetEnterpriseDataKeysRequest Clone() { - return new GetEnterpriseDataKeysRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddRequest Clone() { + return new EnterpriseUsersAddRequest(this); } - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_roleId_codec - = pb::FieldCodec.ForInt64(10); - private readonly pbc::RepeatedField roleId_ = new pbc::RepeatedField(); + /// Field number for the "users" field. + public const int UsersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUsersAdd.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField RoleId { - get { return roleId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + /// Field number for the "clientVersion" field. + public const int ClientVersionFieldNumber = 2; + private string clientVersion_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ClientVersion { + get { return clientVersion_; } + set { + clientVersion_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetEnterpriseDataKeysRequest); + return Equals(other as EnterpriseUsersAddRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetEnterpriseDataKeysRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersAddRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!roleId_.Equals(other.roleId_)) return false; + if(!users_.Equals(other.users_)) return false; + if (ClientVersion != other.ClientVersion) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= roleId_.GetHashCode(); + hash ^= users_.GetHashCode(); + if (ClientVersion.Length != 0) hash ^= ClientVersion.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -12931,22 +42737,51 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - roleId_.WriteTo(output, _repeated_roleId_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + users_.WriteTo(output, _repeated_users_codec); + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + users_.WriteTo(ref output, _repeated_users_codec); + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += roleId_.CalculateSize(_repeated_roleId_codec); + size += users_.CalculateSize(_repeated_users_codec); + if (ClientVersion.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ClientVersion); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -12954,153 +42789,307 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetEnterpriseDataKeysRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersAddRequest other) { if (other == null) { return; } - roleId_.Add(other.roleId_); + users_.Add(other.users_); + if (other.ClientVersion.Length != 0) { + ClientVersion = other.ClientVersion; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: - case 8: { - roleId_.AddEntriesFrom(input, _repeated_roleId_codec); + case 10: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + case 18: { + ClientVersion = input.ReadString(); break; } } } } + #endif } - public sealed partial class GetEnterpriseDataKeysResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetEnterpriseDataKeysResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersAdd : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersAdd()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[60]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[141]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetEnterpriseDataKeysResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAdd() { OnConstruction(); } - partial void OnConstruction(); - + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAdd(EnterpriseUsersAdd other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + username_ = other.username_; + nodeId_ = other.nodeId_; + encryptedData_ = other.encryptedData_; + keyType_ = other.keyType_; + fullName_ = other.fullName_; + jobTitle_ = other.jobTitle_; + suppressEmailInvite_ = other.suppressEmailInvite_; + inviteeLocale_ = other.inviteeLocale_; + move_ = other.move_; + roleId_ = other.roleId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAdd Clone() { + return new EnterpriseUsersAdd(this); + } + + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 3; + private long nodeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "encryptedData" field. + public const int EncryptedDataFieldNumber = 4; + private string encryptedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedData { + get { return encryptedData_; } + set { + encryptedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "keyType" field. + public const int KeyTypeFieldNumber = 5; + private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetEnterpriseDataKeysResponse(GetEnterpriseDataKeysResponse other) : this() { - reEncryptedRoleKey_ = other.reEncryptedRoleKey_.Clone(); - roleKey_ = other.roleKey_.Clone(); - mspKey_ = other.mspKey_ != null ? other.mspKey_.Clone() : null; - enterpriseKeys_ = other.enterpriseKeys_ != null ? other.enterpriseKeys_.Clone() : null; - treeKey_ = other.treeKey_ != null ? other.treeKey_.Clone() : null; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.EncryptedKeyType KeyType { + get { return keyType_; } + set { + keyType_ = value; + } } + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 6; + private string fullName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public GetEnterpriseDataKeysResponse Clone() { - return new GetEnterpriseDataKeysResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } + set { + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "reEncryptedRoleKey" field. - public const int ReEncryptedRoleKeyFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_reEncryptedRoleKey_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.ReEncryptedRoleKey.Parser); - private readonly pbc::RepeatedField reEncryptedRoleKey_ = new pbc::RepeatedField(); + /// Field number for the "jobTitle" field. + public const int JobTitleFieldNumber = 7; + private string jobTitle_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField ReEncryptedRoleKey { - get { return reEncryptedRoleKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string JobTitle { + get { return jobTitle_; } + set { + jobTitle_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "roleKey" field. - public const int RoleKeyFieldNumber = 2; - private static readonly pb::FieldCodec _repeated_roleKey_codec - = pb::FieldCodec.ForMessage(18, global::Enterprise.RoleKey.Parser); - private readonly pbc::RepeatedField roleKey_ = new pbc::RepeatedField(); + /// Field number for the "suppressEmailInvite" field. + public const int SuppressEmailInviteFieldNumber = 8; + private bool suppressEmailInvite_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField RoleKey { - get { return roleKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool SuppressEmailInvite { + get { return suppressEmailInvite_; } + set { + suppressEmailInvite_ = value; + } } - /// Field number for the "mspKey" field. - public const int MspKeyFieldNumber = 3; - private global::Enterprise.MspKey mspKey_; + /// Field number for the "inviteeLocale" field. + public const int InviteeLocaleFieldNumber = 9; + private string inviteeLocale_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.MspKey MspKey { - get { return mspKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string InviteeLocale { + get { return inviteeLocale_; } set { - mspKey_ = value; + inviteeLocale_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "enterpriseKeys" field. - public const int EnterpriseKeysFieldNumber = 4; - private global::Enterprise.EnterpriseKeys enterpriseKeys_; + /// Field number for the "move" field. + public const int MoveFieldNumber = 10; + private bool move_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EnterpriseKeys EnterpriseKeys { - get { return enterpriseKeys_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Move { + get { return move_; } set { - enterpriseKeys_ = value; + move_ = value; } } - /// Field number for the "treeKey" field. - public const int TreeKeyFieldNumber = 5; - private global::Enterprise.TreeKey treeKey_; + /// Field number for the "roleId" field. + public const int RoleIdFieldNumber = 11; + private long roleId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.TreeKey TreeKey { - get { return treeKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RoleId { + get { return roleId_; } set { - treeKey_ = value; + roleId_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as GetEnterpriseDataKeysResponse); + return Equals(other as EnterpriseUsersAdd); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(GetEnterpriseDataKeysResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersAdd other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!reEncryptedRoleKey_.Equals(other.reEncryptedRoleKey_)) return false; - if(!roleKey_.Equals(other.roleKey_)) return false; - if (!object.Equals(MspKey, other.MspKey)) return false; - if (!object.Equals(EnterpriseKeys, other.EnterpriseKeys)) return false; - if (!object.Equals(TreeKey, other.TreeKey)) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Username != other.Username) return false; + if (NodeId != other.NodeId) return false; + if (EncryptedData != other.EncryptedData) return false; + if (KeyType != other.KeyType) return false; + if (FullName != other.FullName) return false; + if (JobTitle != other.JobTitle) return false; + if (SuppressEmailInvite != other.SuppressEmailInvite) return false; + if (InviteeLocale != other.InviteeLocale) return false; + if (Move != other.Move) return false; + if (RoleId != other.RoleId) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= reEncryptedRoleKey_.GetHashCode(); - hash ^= roleKey_.GetHashCode(); - if (mspKey_ != null) hash ^= MspKey.GetHashCode(); - if (enterpriseKeys_ != null) hash ^= EnterpriseKeys.GetHashCode(); - if (treeKey_ != null) hash ^= TreeKey.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + if (EncryptedData.Length != 0) hash ^= EncryptedData.GetHashCode(); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (JobTitle.Length != 0) hash ^= JobTitle.GetHashCode(); + if (SuppressEmailInvite != false) hash ^= SuppressEmailInvite.GetHashCode(); + if (InviteeLocale.Length != 0) hash ^= InviteeLocale.GetHashCode(); + if (Move != false) hash ^= Move.GetHashCode(); + if (RoleId != 0L) hash ^= RoleId.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13108,44 +43097,157 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - reEncryptedRoleKey_.WriteTo(output, _repeated_reEncryptedRoleKey_codec); - roleKey_.WriteTo(output, _repeated_roleKey_codec); - if (mspKey_ != null) { - output.WriteRawTag(26); - output.WriteMessage(MspKey); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (enterpriseKeys_ != null) { + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { output.WriteRawTag(34); - output.WriteMessage(EnterpriseKeys); + output.WriteString(EncryptedData); } - if (treeKey_ != null) { - output.WriteRawTag(42); - output.WriteMessage(TreeKey); + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(58); + output.WriteString(JobTitle); + } + if (SuppressEmailInvite != false) { + output.WriteRawTag(64); + output.WriteBool(SuppressEmailInvite); + } + if (InviteeLocale.Length != 0) { + output.WriteRawTag(74); + output.WriteString(InviteeLocale); + } + if (Move != false) { + output.WriteRawTag(80); + output.WriteBool(Move); + } + if (RoleId != 0L) { + output.WriteRawTag(88); + output.WriteInt64(RoleId); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (NodeId != 0L) { + output.WriteRawTag(24); + output.WriteInt64(NodeId); + } + if (EncryptedData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) KeyType); + } + if (FullName.Length != 0) { + output.WriteRawTag(50); + output.WriteString(FullName); + } + if (JobTitle.Length != 0) { + output.WriteRawTag(58); + output.WriteString(JobTitle); + } + if (SuppressEmailInvite != false) { + output.WriteRawTag(64); + output.WriteBool(SuppressEmailInvite); + } + if (InviteeLocale.Length != 0) { + output.WriteRawTag(74); + output.WriteString(InviteeLocale); + } + if (Move != false) { + output.WriteRawTag(80); + output.WriteBool(Move); + } + if (RoleId != 0L) { + output.WriteRawTag(88); + output.WriteInt64(RoleId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += reEncryptedRoleKey_.CalculateSize(_repeated_reEncryptedRoleKey_codec); - size += roleKey_.CalculateSize(_repeated_roleKey_codec); - if (mspKey_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(MspKey); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (enterpriseKeys_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(EnterpriseKeys); + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } - if (treeKey_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(TreeKey); + if (NodeId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + } + if (EncryptedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedData); + } + if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + } + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); + } + if (JobTitle.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(JobTitle); + } + if (SuppressEmailInvite != false) { + size += 1 + 1; + } + if (InviteeLocale.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(InviteeLocale); + } + if (Move != false) { + size += 1 + 1; + } + if (RoleId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13154,170 +43256,317 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(GetEnterpriseDataKeysResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersAdd other) { if (other == null) { return; } - reEncryptedRoleKey_.Add(other.reEncryptedRoleKey_); - roleKey_.Add(other.roleKey_); - if (other.mspKey_ != null) { - if (mspKey_ == null) { - MspKey = new global::Enterprise.MspKey(); - } - MspKey.MergeFrom(other.MspKey); + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.enterpriseKeys_ != null) { - if (enterpriseKeys_ == null) { - EnterpriseKeys = new global::Enterprise.EnterpriseKeys(); - } - EnterpriseKeys.MergeFrom(other.EnterpriseKeys); + if (other.Username.Length != 0) { + Username = other.Username; } - if (other.treeKey_ != null) { - if (treeKey_ == null) { - TreeKey = new global::Enterprise.TreeKey(); + if (other.NodeId != 0L) { + NodeId = other.NodeId; + } + if (other.EncryptedData.Length != 0) { + EncryptedData = other.EncryptedData; + } + if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + KeyType = other.KeyType; + } + if (other.FullName.Length != 0) { + FullName = other.FullName; + } + if (other.JobTitle.Length != 0) { + JobTitle = other.JobTitle; + } + if (other.SuppressEmailInvite != false) { + SuppressEmailInvite = other.SuppressEmailInvite; + } + if (other.InviteeLocale.Length != 0) { + InviteeLocale = other.InviteeLocale; + } + if (other.Move != false) { + Move = other.Move; + } + if (other.RoleId != 0L) { + RoleId = other.RoleId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadInt64(); + break; + } + case 34: { + EncryptedData = input.ReadString(); + break; + } + case 40: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 50: { + FullName = input.ReadString(); + break; + } + case 58: { + JobTitle = input.ReadString(); + break; + } + case 64: { + SuppressEmailInvite = input.ReadBool(); + break; + } + case 74: { + InviteeLocale = input.ReadString(); + break; + } + case 80: { + Move = input.ReadBool(); + break; + } + case 88: { + RoleId = input.ReadInt64(); + break; + } } - TreeKey.MergeFrom(other.TreeKey); } - _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(pb::CodedInputStream input) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: - _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - case 10: { - reEncryptedRoleKey_.AddEntriesFrom(input, _repeated_reEncryptedRoleKey_codec); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } case 18: { - roleKey_.AddEntriesFrom(input, _repeated_roleKey_codec); + Username = input.ReadString(); break; } - case 26: { - if (mspKey_ == null) { - MspKey = new global::Enterprise.MspKey(); - } - input.ReadMessage(MspKey); + case 24: { + NodeId = input.ReadInt64(); break; } case 34: { - if (enterpriseKeys_ == null) { - EnterpriseKeys = new global::Enterprise.EnterpriseKeys(); - } - input.ReadMessage(EnterpriseKeys); + EncryptedData = input.ReadString(); break; } - case 42: { - if (treeKey_ == null) { - TreeKey = new global::Enterprise.TreeKey(); - } - input.ReadMessage(TreeKey); + case 40: { + KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + break; + } + case 50: { + FullName = input.ReadString(); + break; + } + case 58: { + JobTitle = input.ReadString(); + break; + } + case 64: { + SuppressEmailInvite = input.ReadBool(); + break; + } + case 74: { + InviteeLocale = input.ReadString(); + break; + } + case 80: { + Move = input.ReadBool(); + break; + } + case 88: { + RoleId = input.ReadInt64(); break; } } } } + #endif } - public sealed partial class RoleKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RoleKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersAddResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersAddResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[61]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[142]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleKey() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleKey(RoleKey other) : this() { - roleId_ = other.roleId_; - encryptedKey_ = other.encryptedKey_; - keyType_ = other.keyType_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddResponse(EnterpriseUsersAddResponse other) : this() { + results_ = other.results_.Clone(); + success_ = other.success_; + code_ = other.code_; + message_ = other.message_; + additionalInfo_ = other.additionalInfo_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RoleKey Clone() { - return new RoleKey(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddResponse Clone() { + return new EnterpriseUsersAddResponse(this); } - /// Field number for the "roleId" field. - public const int RoleIdFieldNumber = 1; - private long roleId_; + /// Field number for the "results" field. + public const int ResultsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_results_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.EnterpriseUsersAddResult.Parser); + private readonly pbc::RepeatedField results_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long RoleId { - get { return roleId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Results { + get { return results_; } + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 2; + private bool success_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } set { - roleId_ = value; + success_ = value; } } - /// Field number for the "encryptedKey" field. - public const int EncryptedKeyFieldNumber = 2; - private string encryptedKey_ = ""; + /// Field number for the "code" field. + public const int CodeFieldNumber = 3; + private string code_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedKey { - get { return encryptedKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Code { + get { return code_; } set { - encryptedKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + code_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "keyType" field. - public const int KeyTypeFieldNumber = 3; - private global::Enterprise.EncryptedKeyType keyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EncryptedKeyType KeyType { - get { return keyType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - keyType_ = value; + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "additionalInfo" field. + public const int AdditionalInfoFieldNumber = 5; + private string additionalInfo_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AdditionalInfo { + get { return additionalInfo_; } + set { + additionalInfo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as RoleKey); + return Equals(other as EnterpriseUsersAddResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(RoleKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersAddResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RoleId != other.RoleId) return false; - if (EncryptedKey != other.EncryptedKey) return false; - if (KeyType != other.KeyType) return false; + if(!results_.Equals(other.results_)) return false; + if (Success != other.Success) return false; + if (Code != other.Code) return false; + if (Message != other.Message) return false; + if (AdditionalInfo != other.AdditionalInfo) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RoleId != 0L) hash ^= RoleId.GetHashCode(); - if (EncryptedKey.Length != 0) hash ^= EncryptedKey.GetHashCode(); - if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= KeyType.GetHashCode(); + hash ^= results_.GetHashCode(); + if (Success != false) hash ^= Success.GetHashCode(); + if (Code.Length != 0) hash ^= Code.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (AdditionalInfo.Length != 0) hash ^= AdditionalInfo.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13325,40 +43574,83 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RoleId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(RoleId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + results_.WriteTo(output, _repeated_results_codec); + if (Success != false) { + output.WriteRawTag(16); + output.WriteBool(Success); } - if (EncryptedKey.Length != 0) { - output.WriteRawTag(18); - output.WriteString(EncryptedKey); + if (Code.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Code); } - if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { - output.WriteRawTag(24); - output.WriteEnum((int) KeyType); + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(42); + output.WriteString(AdditionalInfo); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + results_.WriteTo(ref output, _repeated_results_codec); + if (Success != false) { + output.WriteRawTag(16); + output.WriteBool(Success); + } + if (Code.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(42); + output.WriteString(AdditionalInfo); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RoleId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(RoleId); + size += results_.CalculateSize(_repeated_results_codec); + if (Success != false) { + size += 1 + 1; } - if (EncryptedKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedKey); + if (Code.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Code); } - if (KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyType); + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (AdditionalInfo.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AdditionalInfo); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13367,128 +43659,265 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(RoleKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersAddResponse other) { if (other == null) { return; } - if (other.RoleId != 0L) { - RoleId = other.RoleId; + results_.Add(other.results_); + if (other.Success != false) { + Success = other.Success; } - if (other.EncryptedKey.Length != 0) { - EncryptedKey = other.EncryptedKey; + if (other.Code.Length != 0) { + Code = other.Code; } - if (other.KeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { - KeyType = other.KeyType; + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.AdditionalInfo.Length != 0) { + AdditionalInfo = other.AdditionalInfo; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 8: { - RoleId = input.ReadInt64(); + case 10: { + results_.AddEntriesFrom(input, _repeated_results_codec); break; } - case 18: { - EncryptedKey = input.ReadString(); + case 16: { + Success = input.ReadBool(); break; } - case 24: { - KeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + case 26: { + Code = input.ReadString(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + AdditionalInfo = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + results_.AddEntriesFrom(ref input, _repeated_results_codec); + break; + } + case 16: { + Success = input.ReadBool(); + break; + } + case 26: { + Code = input.ReadString(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + case 42: { + AdditionalInfo = input.ReadString(); break; } } } } + #endif } - public sealed partial class MspKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new MspKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EnterpriseUsersAddResult : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseUsersAddResult()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[62]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[143]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddResult() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddResult(EnterpriseUsersAddResult other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + success_ = other.success_; + verificationCode_ = other.verificationCode_; + code_ = other.code_; + message_ = other.message_; + additionalInfo_ = other.additionalInfo_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public EnterpriseUsersAddResult Clone() { + return new EnterpriseUsersAddResult(this); } + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } } + /// Field number for the "success" field. + public const int SuccessFieldNumber = 2; + private bool success_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MspKey() { - OnConstruction(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } } - partial void OnConstruction(); - + /// Field number for the "verificationCode" field. + public const int VerificationCodeFieldNumber = 3; + private string verificationCode_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MspKey(MspKey other) : this() { - encryptedMspTreeKey_ = other.encryptedMspTreeKey_; - encryptedMspTreeKeyType_ = other.encryptedMspTreeKeyType_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string VerificationCode { + get { return verificationCode_; } + set { + verificationCode_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } + /// Field number for the "code" field. + public const int CodeFieldNumber = 4; + private string code_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public MspKey Clone() { - return new MspKey(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Code { + get { return code_; } + set { + code_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } } - /// Field number for the "encryptedMspTreeKey" field. - public const int EncryptedMspTreeKeyFieldNumber = 1; - private string encryptedMspTreeKey_ = ""; + /// Field number for the "message" field. + public const int MessageFieldNumber = 5; + private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string EncryptedMspTreeKey { - get { return encryptedMspTreeKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } set { - encryptedMspTreeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "encryptedMspTreeKeyType" field. - public const int EncryptedMspTreeKeyTypeFieldNumber = 2; - private global::Enterprise.EncryptedKeyType encryptedMspTreeKeyType_ = global::Enterprise.EncryptedKeyType.KtNoKey; + /// Field number for the "additionalInfo" field. + public const int AdditionalInfoFieldNumber = 6; + private string additionalInfo_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.EncryptedKeyType EncryptedMspTreeKeyType { - get { return encryptedMspTreeKeyType_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string AdditionalInfo { + get { return additionalInfo_; } set { - encryptedMspTreeKeyType_ = value; + additionalInfo_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as MspKey); + return Equals(other as EnterpriseUsersAddResult); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(MspKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(EnterpriseUsersAddResult other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (EncryptedMspTreeKey != other.EncryptedMspTreeKey) return false; - if (EncryptedMspTreeKeyType != other.EncryptedMspTreeKeyType) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Success != other.Success) return false; + if (VerificationCode != other.VerificationCode) return false; + if (Code != other.Code) return false; + if (Message != other.Message) return false; + if (AdditionalInfo != other.AdditionalInfo) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (EncryptedMspTreeKey.Length != 0) hash ^= EncryptedMspTreeKey.GetHashCode(); - if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) hash ^= EncryptedMspTreeKeyType.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Success != false) hash ^= Success.GetHashCode(); + if (VerificationCode.Length != 0) hash ^= VerificationCode.GetHashCode(); + if (Code.Length != 0) hash ^= Code.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (AdditionalInfo.Length != 0) hash ^= AdditionalInfo.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13496,33 +43925,102 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (EncryptedMspTreeKey.Length != 0) { - output.WriteRawTag(10); - output.WriteString(EncryptedMspTreeKey); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); } - if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { + if (Success != false) { output.WriteRawTag(16); - output.WriteEnum((int) EncryptedMspTreeKeyType); + output.WriteBool(Success); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationCode); + } + if (Code.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Message); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(50); + output.WriteString(AdditionalInfo); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Success != false) { + output.WriteRawTag(16); + output.WriteBool(Success); + } + if (VerificationCode.Length != 0) { + output.WriteRawTag(26); + output.WriteString(VerificationCode); + } + if (Code.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Code); + } + if (Message.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Message); + } + if (AdditionalInfo.Length != 0) { + output.WriteRawTag(50); + output.WriteString(AdditionalInfo); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (EncryptedMspTreeKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedMspTreeKey); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); } - if (EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) EncryptedMspTreeKeyType); + if (Success != false) { + size += 1 + 1; + } + if (VerificationCode.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(VerificationCode); + } + if (Code.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Code); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (AdditionalInfo.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(AdditionalInfo); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13531,149 +44029,279 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(MspKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(EnterpriseUsersAddResult other) { if (other == null) { return; } - if (other.EncryptedMspTreeKey.Length != 0) { - EncryptedMspTreeKey = other.EncryptedMspTreeKey; + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; } - if (other.EncryptedMspTreeKeyType != global::Enterprise.EncryptedKeyType.KtNoKey) { - EncryptedMspTreeKeyType = other.EncryptedMspTreeKeyType; + if (other.Success != false) { + Success = other.Success; + } + if (other.VerificationCode.Length != 0) { + VerificationCode = other.VerificationCode; + } + if (other.Code.Length != 0) { + Code = other.Code; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.AdditionalInfo.Length != 0) { + AdditionalInfo = other.AdditionalInfo; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - EncryptedMspTreeKey = input.ReadString(); + case 8: { + EnterpriseUserId = input.ReadInt64(); break; } case 16: { - EncryptedMspTreeKeyType = (global::Enterprise.EncryptedKeyType) input.ReadEnum(); + Success = input.ReadBool(); + break; + } + case 26: { + VerificationCode = input.ReadString(); + break; + } + case 34: { + Code = input.ReadString(); + break; + } + case 42: { + Message = input.ReadString(); + break; + } + case 50: { + AdditionalInfo = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Success = input.ReadBool(); + break; + } + case 26: { + VerificationCode = input.ReadString(); + break; + } + case 34: { + Code = input.ReadString(); + break; + } + case 42: { + Message = input.ReadString(); + break; + } + case 50: { + AdditionalInfo = input.ReadString(); break; } } } } + #endif } - public sealed partial class EnterpriseKeys : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EnterpriseKeys()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UpdateMSPPermitsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UpdateMSPPermitsRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[63]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[144]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseKeys() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateMSPPermitsRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseKeys(EnterpriseKeys other) : this() { - rsaPublicKey_ = other.rsaPublicKey_; - rsaEncryptedPrivateKey_ = other.rsaEncryptedPrivateKey_; - eccPublicKey_ = other.eccPublicKey_; - eccEncryptedPrivateKey_ = other.eccEncryptedPrivateKey_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateMSPPermitsRequest(UpdateMSPPermitsRequest other) : this() { + mspEnterpriseId_ = other.mspEnterpriseId_; + maxAllowedLicenses_ = other.maxAllowedLicenses_; + allowedMcProducts_ = other.allowedMcProducts_.Clone(); + allowedAddOns_ = other.allowedAddOns_.Clone(); + maxFilePlanType_ = other.maxFilePlanType_; + allowUnlimitedLicenses_ = other.allowUnlimitedLicenses_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public EnterpriseKeys Clone() { - return new EnterpriseKeys(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UpdateMSPPermitsRequest Clone() { + return new UpdateMSPPermitsRequest(this); } - /// Field number for the "rsaPublicKey" field. - public const int RsaPublicKeyFieldNumber = 1; - private pb::ByteString rsaPublicKey_ = pb::ByteString.Empty; + /// Field number for the "mspEnterpriseId" field. + public const int MspEnterpriseIdFieldNumber = 1; + private int mspEnterpriseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RsaPublicKey { - get { return rsaPublicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MspEnterpriseId { + get { return mspEnterpriseId_; } set { - rsaPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + mspEnterpriseId_ = value; } } - /// Field number for the "rsaEncryptedPrivateKey" field. - public const int RsaEncryptedPrivateKeyFieldNumber = 2; - private pb::ByteString rsaEncryptedPrivateKey_ = pb::ByteString.Empty; + /// Field number for the "maxAllowedLicenses" field. + public const int MaxAllowedLicensesFieldNumber = 2; + private int maxAllowedLicenses_; + /// + /// obsolete in favor of allowUnlimitedLicenses + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RsaEncryptedPrivateKey { - get { return rsaEncryptedPrivateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int MaxAllowedLicenses { + get { return maxAllowedLicenses_; } set { - rsaEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + maxAllowedLicenses_ = value; } } - /// Field number for the "eccPublicKey" field. - public const int EccPublicKeyFieldNumber = 3; - private pb::ByteString eccPublicKey_ = pb::ByteString.Empty; + /// Field number for the "allowedMcProducts" field. + public const int AllowedMcProductsFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_allowedMcProducts_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField allowedMcProducts_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EccPublicKey { - get { return eccPublicKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedMcProducts { + get { return allowedMcProducts_; } + } + + /// Field number for the "allowedAddOns" field. + public const int AllowedAddOnsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_allowedAddOns_codec + = pb::FieldCodec.ForString(34); + private readonly pbc::RepeatedField allowedAddOns_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AllowedAddOns { + get { return allowedAddOns_; } + } + + /// Field number for the "maxFilePlanType" field. + public const int MaxFilePlanTypeFieldNumber = 5; + private string maxFilePlanType_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string MaxFilePlanType { + get { return maxFilePlanType_; } set { - eccPublicKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + maxFilePlanType_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "eccEncryptedPrivateKey" field. - public const int EccEncryptedPrivateKeyFieldNumber = 4; - private pb::ByteString eccEncryptedPrivateKey_ = pb::ByteString.Empty; + /// Field number for the "allowUnlimitedLicenses" field. + public const int AllowUnlimitedLicensesFieldNumber = 6; + private bool allowUnlimitedLicenses_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString EccEncryptedPrivateKey { - get { return eccEncryptedPrivateKey_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AllowUnlimitedLicenses { + get { return allowUnlimitedLicenses_; } set { - eccEncryptedPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + allowUnlimitedLicenses_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as EnterpriseKeys); + return Equals(other as UpdateMSPPermitsRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(EnterpriseKeys other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UpdateMSPPermitsRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RsaPublicKey != other.RsaPublicKey) return false; - if (RsaEncryptedPrivateKey != other.RsaEncryptedPrivateKey) return false; - if (EccPublicKey != other.EccPublicKey) return false; - if (EccEncryptedPrivateKey != other.EccEncryptedPrivateKey) return false; + if (MspEnterpriseId != other.MspEnterpriseId) return false; + if (MaxAllowedLicenses != other.MaxAllowedLicenses) return false; + if(!allowedMcProducts_.Equals(other.allowedMcProducts_)) return false; + if(!allowedAddOns_.Equals(other.allowedAddOns_)) return false; + if (MaxFilePlanType != other.MaxFilePlanType) return false; + if (AllowUnlimitedLicenses != other.AllowUnlimitedLicenses) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RsaPublicKey.Length != 0) hash ^= RsaPublicKey.GetHashCode(); - if (RsaEncryptedPrivateKey.Length != 0) hash ^= RsaEncryptedPrivateKey.GetHashCode(); - if (EccPublicKey.Length != 0) hash ^= EccPublicKey.GetHashCode(); - if (EccEncryptedPrivateKey.Length != 0) hash ^= EccEncryptedPrivateKey.GetHashCode(); + if (MspEnterpriseId != 0) hash ^= MspEnterpriseId.GetHashCode(); + if (MaxAllowedLicenses != 0) hash ^= MaxAllowedLicenses.GetHashCode(); + hash ^= allowedMcProducts_.GetHashCode(); + hash ^= allowedAddOns_.GetHashCode(); + if (MaxFilePlanType.Length != 0) hash ^= MaxFilePlanType.GetHashCode(); + if (AllowUnlimitedLicenses != false) hash ^= AllowUnlimitedLicenses.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13681,47 +44309,86 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RsaPublicKey.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(RsaPublicKey); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (MspEnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(MspEnterpriseId); } - if (RsaEncryptedPrivateKey.Length != 0) { - output.WriteRawTag(18); - output.WriteBytes(RsaEncryptedPrivateKey); + if (MaxAllowedLicenses != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxAllowedLicenses); } - if (EccPublicKey.Length != 0) { - output.WriteRawTag(26); - output.WriteBytes(EccPublicKey); + allowedMcProducts_.WriteTo(output, _repeated_allowedMcProducts_codec); + allowedAddOns_.WriteTo(output, _repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + output.WriteRawTag(42); + output.WriteString(MaxFilePlanType); } - if (EccEncryptedPrivateKey.Length != 0) { - output.WriteRawTag(34); - output.WriteBytes(EccEncryptedPrivateKey); + if (AllowUnlimitedLicenses != false) { + output.WriteRawTag(48); + output.WriteBool(AllowUnlimitedLicenses); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MspEnterpriseId != 0) { + output.WriteRawTag(8); + output.WriteInt32(MspEnterpriseId); + } + if (MaxAllowedLicenses != 0) { + output.WriteRawTag(16); + output.WriteInt32(MaxAllowedLicenses); + } + allowedMcProducts_.WriteTo(ref output, _repeated_allowedMcProducts_codec); + allowedAddOns_.WriteTo(ref output, _repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + output.WriteRawTag(42); + output.WriteString(MaxFilePlanType); + } + if (AllowUnlimitedLicenses != false) { + output.WriteRawTag(48); + output.WriteBool(AllowUnlimitedLicenses); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RsaPublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaPublicKey); + if (MspEnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MspEnterpriseId); } - if (RsaEncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RsaEncryptedPrivateKey); + if (MaxAllowedLicenses != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(MaxAllowedLicenses); } - if (EccPublicKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccPublicKey); + size += allowedMcProducts_.CalculateSize(_repeated_allowedMcProducts_codec); + size += allowedAddOns_.CalculateSize(_repeated_allowedAddOns_codec); + if (MaxFilePlanType.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(MaxFilePlanType); } - if (EccEncryptedPrivateKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EccEncryptedPrivateKey); + if (AllowUnlimitedLicenses != false) { + size += 1 + 1; } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -13730,135 +44397,198 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(EnterpriseKeys other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UpdateMSPPermitsRequest other) { if (other == null) { return; } - if (other.RsaPublicKey.Length != 0) { - RsaPublicKey = other.RsaPublicKey; + if (other.MspEnterpriseId != 0) { + MspEnterpriseId = other.MspEnterpriseId; } - if (other.RsaEncryptedPrivateKey.Length != 0) { - RsaEncryptedPrivateKey = other.RsaEncryptedPrivateKey; + if (other.MaxAllowedLicenses != 0) { + MaxAllowedLicenses = other.MaxAllowedLicenses; } - if (other.EccPublicKey.Length != 0) { - EccPublicKey = other.EccPublicKey; + allowedMcProducts_.Add(other.allowedMcProducts_); + allowedAddOns_.Add(other.allowedAddOns_); + if (other.MaxFilePlanType.Length != 0) { + MaxFilePlanType = other.MaxFilePlanType; } - if (other.EccEncryptedPrivateKey.Length != 0) { - EccEncryptedPrivateKey = other.EccEncryptedPrivateKey; + if (other.AllowUnlimitedLicenses != false) { + AllowUnlimitedLicenses = other.AllowUnlimitedLicenses; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - RsaPublicKey = input.ReadBytes(); + case 8: { + MspEnterpriseId = input.ReadInt32(); break; } - case 18: { - RsaEncryptedPrivateKey = input.ReadBytes(); + case 16: { + MaxAllowedLicenses = input.ReadInt32(); break; } case 26: { - EccPublicKey = input.ReadBytes(); + allowedMcProducts_.AddEntriesFrom(input, _repeated_allowedMcProducts_codec); break; } case 34: { - EccEncryptedPrivateKey = input.ReadBytes(); + allowedAddOns_.AddEntriesFrom(input, _repeated_allowedAddOns_codec); + break; + } + case 42: { + MaxFilePlanType = input.ReadString(); + break; + } + case 48: { + AllowUnlimitedLicenses = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MspEnterpriseId = input.ReadInt32(); + break; + } + case 16: { + MaxAllowedLicenses = input.ReadInt32(); + break; + } + case 26: { + allowedMcProducts_.AddEntriesFrom(ref input, _repeated_allowedMcProducts_codec); + break; + } + case 34: { + allowedAddOns_.AddEntriesFrom(ref input, _repeated_allowedAddOns_codec); + break; + } + case 42: { + MaxFilePlanType = input.ReadString(); + break; + } + case 48: { + AllowUnlimitedLicenses = input.ReadBool(); break; } } } } + #endif } - public sealed partial class TreeKey : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TreeKey()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteEnterpriseUsersRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteEnterpriseUsersRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[64]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[145]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TreeKey() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUsersRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TreeKey(TreeKey other) : this() { - treeKey_ = other.treeKey_; - keyTypeId_ = other.keyTypeId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUsersRequest(DeleteEnterpriseUsersRequest other) : this() { + enterpriseUserIds_ = other.enterpriseUserIds_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public TreeKey Clone() { - return new TreeKey(this); - } - - /// Field number for the "treeKey" field. - public const int TreeKey_FieldNumber = 1; - private string treeKey_ = ""; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string TreeKey_ { - get { return treeKey_; } - set { - treeKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUsersRequest Clone() { + return new DeleteEnterpriseUsersRequest(this); } - /// Field number for the "keyTypeId" field. - public const int KeyTypeIdFieldNumber = 2; - private global::Enterprise.BackupKeyType keyTypeId_ = global::Enterprise.BackupKeyType.NoKey; + /// Field number for the "enterpriseUserIds" field. + public const int EnterpriseUserIdsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_enterpriseUserIds_codec + = pb::FieldCodec.ForInt64(10); + private readonly pbc::RepeatedField enterpriseUserIds_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Enterprise.BackupKeyType KeyTypeId { - get { return keyTypeId_; } - set { - keyTypeId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserIds { + get { return enterpriseUserIds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as TreeKey); + return Equals(other as DeleteEnterpriseUsersRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(TreeKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteEnterpriseUsersRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (TreeKey_ != other.TreeKey_) return false; - if (KeyTypeId != other.KeyTypeId) return false; + if(!enterpriseUserIds_.Equals(other.enterpriseUserIds_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (TreeKey_.Length != 0) hash ^= TreeKey_.GetHashCode(); - if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) hash ^= KeyTypeId.GetHashCode(); + hash ^= enterpriseUserIds_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -13866,34 +44596,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (TreeKey_.Length != 0) { - output.WriteRawTag(10); - output.WriteString(TreeKey_); - } - if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { - output.WriteRawTag(16); - output.WriteEnum((int) KeyTypeId); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + enterpriseUserIds_.WriteTo(output, _repeated_enterpriseUserIds_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUserIds_.WriteTo(ref output, _repeated_enterpriseUserIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (TreeKey_.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(TreeKey_); - } - if (KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) KeyTypeId); - } + size += enterpriseUserIds_.CalculateSize(_repeated_enterpriseUserIds_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -13901,106 +44637,169 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(TreeKey other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteEnterpriseUsersRequest other) { if (other == null) { return; } - if (other.TreeKey_.Length != 0) { - TreeKey_ = other.TreeKey_; - } - if (other.KeyTypeId != global::Enterprise.BackupKeyType.NoKey) { - KeyTypeId = other.KeyTypeId; - } + enterpriseUserIds_.Add(other.enterpriseUserIds_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - TreeKey_ = input.ReadString(); + case 10: + case 8: { + enterpriseUserIds_.AddEntriesFrom(input, _repeated_enterpriseUserIds_codec); break; } - case 16: { - KeyTypeId = (global::Enterprise.BackupKeyType) input.ReadEnum(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + enterpriseUserIds_.AddEntriesFrom(ref input, _repeated_enterpriseUserIds_codec); break; } } } } + #endif } - public sealed partial class SharedRecordResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedRecordResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteEnterpriseUserStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteEnterpriseUserStatus()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[65]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[146]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SharedRecordResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUserStatus() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SharedRecordResponse(SharedRecordResponse other) : this() { - events_ = other.events_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUserStatus(DeleteEnterpriseUserStatus other) : this() { + enterpriseUserId_ = other.enterpriseUserId_; + status_ = other.status_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SharedRecordResponse Clone() { - return new SharedRecordResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUserStatus Clone() { + return new DeleteEnterpriseUserStatus(this); } - /// Field number for the "events" field. - public const int EventsFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_events_codec - = pb::FieldCodec.ForMessage(10, global::Enterprise.SharedRecordEvent.Parser); - private readonly pbc::RepeatedField events_ = new pbc::RepeatedField(); + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private long enterpriseUserId_; + /// + ///the enterprise user id + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField Events { - get { return events_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long EnterpriseUserId { + get { return enterpriseUserId_; } + set { + enterpriseUserId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Enterprise.DeleteEnterpriseUsersResult status_ = global::Enterprise.DeleteEnterpriseUsersResult.Success; + /// + ///the delete result + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.DeleteEnterpriseUsersResult Status { + get { return status_; } + set { + status_ = value; + } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SharedRecordResponse); + return Equals(other as DeleteEnterpriseUserStatus); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SharedRecordResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteEnterpriseUserStatus other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if(!events_.Equals(other.events_)) return false; + if (EnterpriseUserId != other.EnterpriseUserId) return false; + if (Status != other.Status) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= events_.GetHashCode(); + if (EnterpriseUserId != 0L) hash ^= EnterpriseUserId.GetHashCode(); + if (Status != global::Enterprise.DeleteEnterpriseUsersResult.Success) hash ^= Status.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14008,22 +44807,59 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - events_.WriteTo(output, _repeated_events_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.DeleteEnterpriseUsersResult.Success) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EnterpriseUserId != 0L) { + output.WriteRawTag(8); + output.WriteInt64(EnterpriseUserId); + } + if (Status != global::Enterprise.DeleteEnterpriseUsersResult.Success) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += events_.CalculateSize(_repeated_events_codec); + if (EnterpriseUserId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(EnterpriseUserId); + } + if (Status != global::Enterprise.DeleteEnterpriseUsersResult.Success) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -14031,157 +44867,158 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SharedRecordResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteEnterpriseUserStatus other) { if (other == null) { return; } - events_.Add(other.events_); + if (other.EnterpriseUserId != 0L) { + EnterpriseUserId = other.EnterpriseUserId; + } + if (other.Status != global::Enterprise.DeleteEnterpriseUsersResult.Success) { + Status = other.Status; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - events_.AddEntriesFrom(input, _repeated_events_codec); + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Status = (global::Enterprise.DeleteEnterpriseUsersResult) input.ReadEnum(); break; } } } + #endif } - } - - public sealed partial class SharedRecordEvent : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedRecordEvent()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[66]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SharedRecordEvent() { - OnConstruction(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + EnterpriseUserId = input.ReadInt64(); + break; + } + case 16: { + Status = (global::Enterprise.DeleteEnterpriseUsersResult) input.ReadEnum(); + break; + } + } + } } + #endif - partial void OnConstruction(); + } + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeleteEnterpriseUsersResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeleteEnterpriseUsersResponse()); + private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SharedRecordEvent(SharedRecordEvent other) : this() { - recordUid_ = other.recordUid_; - userName_ = other.userName_; - canEdit_ = other.canEdit_; - canReshare_ = other.canReshare_; - shareFrom_ = other.shareFrom_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SharedRecordEvent Clone() { - return new SharedRecordEvent(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[147]; } } - /// Field number for the "recordUid" field. - public const int RecordUidFieldNumber = 1; - private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RecordUid { - get { return recordUid_; } - set { - recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "userName" field. - public const int UserNameFieldNumber = 2; - private string userName_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string UserName { - get { return userName_; } - set { - userName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUsersResponse() { + OnConstruction(); } - /// Field number for the "canEdit" field. - public const int CanEditFieldNumber = 3; - private bool canEdit_; + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool CanEdit { - get { return canEdit_; } - set { - canEdit_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUsersResponse(DeleteEnterpriseUsersResponse other) : this() { + deleteStatus_ = other.deleteStatus_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "canReshare" field. - public const int CanReshareFieldNumber = 4; - private bool canReshare_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool CanReshare { - get { return canReshare_; } - set { - canReshare_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeleteEnterpriseUsersResponse Clone() { + return new DeleteEnterpriseUsersResponse(this); } - /// Field number for the "shareFrom" field. - public const int ShareFromFieldNumber = 5; - private int shareFrom_; - /// - ///1 is direct share, 2 share folder, 3 share team folder - /// + /// Field number for the "deleteStatus" field. + public const int DeleteStatusFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_deleteStatus_codec + = pb::FieldCodec.ForMessage(10, global::Enterprise.DeleteEnterpriseUserStatus.Parser); + private readonly pbc::RepeatedField deleteStatus_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int ShareFrom { - get { return shareFrom_; } - set { - shareFrom_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DeleteStatus { + get { return deleteStatus_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SharedRecordEvent); + return Equals(other as DeleteEnterpriseUsersResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SharedRecordEvent other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeleteEnterpriseUsersResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (RecordUid != other.RecordUid) return false; - if (UserName != other.UserName) return false; - if (CanEdit != other.CanEdit) return false; - if (CanReshare != other.CanReshare) return false; - if (ShareFrom != other.ShareFrom) return false; + if(!deleteStatus_.Equals(other.deleteStatus_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); - if (UserName.Length != 0) hash ^= UserName.GetHashCode(); - if (CanEdit != false) hash ^= CanEdit.GetHashCode(); - if (CanReshare != false) hash ^= CanReshare.GetHashCode(); - if (ShareFrom != 0) hash ^= ShareFrom.GetHashCode(); + hash ^= deleteStatus_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14189,55 +45026,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (RecordUid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(RecordUid); - } - if (UserName.Length != 0) { - output.WriteRawTag(18); - output.WriteString(UserName); - } - if (CanEdit != false) { - output.WriteRawTag(24); - output.WriteBool(CanEdit); - } - if (CanReshare != false) { - output.WriteRawTag(32); - output.WriteBool(CanReshare); - } - if (ShareFrom != 0) { - output.WriteRawTag(40); - output.WriteInt32(ShareFrom); - } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + deleteStatus_.WriteTo(output, _repeated_deleteStatus_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + deleteStatus_.WriteTo(ref output, _repeated_deleteStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (RecordUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); - } - if (UserName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(UserName); - } - if (CanEdit != false) { - size += 1 + 1; - } - if (CanReshare != false) { - size += 1 + 1; - } - if (ShareFrom != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(ShareFrom); - } + size += deleteStatus_.CalculateSize(_repeated_deleteStatus_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -14245,128 +45067,175 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SharedRecordEvent other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeleteEnterpriseUsersResponse other) { if (other == null) { return; } - if (other.RecordUid.Length != 0) { - RecordUid = other.RecordUid; - } - if (other.UserName.Length != 0) { - UserName = other.UserName; - } - if (other.CanEdit != false) { - CanEdit = other.CanEdit; - } - if (other.CanReshare != false) { - CanReshare = other.CanReshare; - } - if (other.ShareFrom != 0) { - ShareFrom = other.ShareFrom; - } + deleteStatus_.Add(other.deleteStatus_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 10: { - RecordUid = input.ReadBytes(); - break; - } - case 18: { - UserName = input.ReadString(); - break; - } - case 24: { - CanEdit = input.ReadBool(); + deleteStatus_.AddEntriesFrom(input, _repeated_deleteStatus_codec); break; } - case 32: { - CanReshare = input.ReadBool(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 40: { - ShareFrom = input.ReadInt32(); + case 10: { + deleteStatus_.AddEntriesFrom(ref input, _repeated_deleteStatus_codec); break; } } } } + #endif } - public sealed partial class SetRestrictVisibilityRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SetRestrictVisibilityRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ClearSecurityDataRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ClearSecurityDataRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[67]; } + get { return global::Enterprise.EnterpriseReflection.Descriptor.MessageTypes[148]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetRestrictVisibilityRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ClearSecurityDataRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetRestrictVisibilityRequest(SetRestrictVisibilityRequest other) : this() { - nodeId_ = other.nodeId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ClearSecurityDataRequest(ClearSecurityDataRequest other) : this() { + enterpriseUserId_ = other.enterpriseUserId_.Clone(); + allUsers_ = other.allUsers_; + type_ = other.type_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SetRestrictVisibilityRequest Clone() { - return new SetRestrictVisibilityRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ClearSecurityDataRequest Clone() { + return new ClearSecurityDataRequest(this); } - /// Field number for the "nodeId" field. - public const int NodeIdFieldNumber = 1; - private long nodeId_; + /// Field number for the "enterpriseUserId" field. + public const int EnterpriseUserIdFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_enterpriseUserId_codec + = pb::FieldCodec.ForInt64(10); + private readonly pbc::RepeatedField enterpriseUserId_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public long NodeId { - get { return nodeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField EnterpriseUserId { + get { return enterpriseUserId_; } + } + + /// Field number for the "allUsers" field. + public const int AllUsersFieldNumber = 2; + private bool allUsers_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AllUsers { + get { return allUsers_; } set { - nodeId_ = value; + allUsers_ = value; + } + } + + /// Field number for the "type" field. + public const int TypeFieldNumber = 3; + private global::Enterprise.ClearSecurityDataType type_ = global::Enterprise.ClearSecurityDataType.RecalculateSummaryReport; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Enterprise.ClearSecurityDataType Type { + get { return type_; } + set { + type_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SetRestrictVisibilityRequest); + return Equals(other as ClearSecurityDataRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SetRestrictVisibilityRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ClearSecurityDataRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (NodeId != other.NodeId) return false; + if(!enterpriseUserId_.Equals(other.enterpriseUserId_)) return false; + if (AllUsers != other.AllUsers) return false; + if (Type != other.Type) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (NodeId != 0L) hash ^= NodeId.GetHashCode(); + hash ^= enterpriseUserId_.GetHashCode(); + if (AllUsers != false) hash ^= AllUsers.GetHashCode(); + if (Type != global::Enterprise.ClearSecurityDataType.RecalculateSummaryReport) hash ^= Type.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -14374,26 +45243,61 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (NodeId != 0L) { - output.WriteRawTag(8); - output.WriteInt64(NodeId); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + enterpriseUserId_.WriteTo(output, _repeated_enterpriseUserId_codec); + if (AllUsers != false) { + output.WriteRawTag(16); + output.WriteBool(AllUsers); + } + if (Type != global::Enterprise.ClearSecurityDataType.RecalculateSummaryReport) { + output.WriteRawTag(24); + output.WriteEnum((int) Type); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + enterpriseUserId_.WriteTo(ref output, _repeated_enterpriseUserId_codec); + if (AllUsers != false) { + output.WriteRawTag(16); + output.WriteBool(AllUsers); + } + if (Type != global::Enterprise.ClearSecurityDataType.RecalculateSummaryReport) { + output.WriteRawTag(24); + output.WriteEnum((int) Type); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (NodeId != 0L) { - size += 1 + pb::CodedOutputStream.ComputeInt64Size(NodeId); + size += enterpriseUserId_.CalculateSize(_repeated_enterpriseUserId_codec); + if (AllUsers != false) { + size += 1 + 1; + } + if (Type != global::Enterprise.ClearSecurityDataType.RecalculateSummaryReport) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Type); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -14402,31 +45306,86 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SetRestrictVisibilityRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ClearSecurityDataRequest other) { if (other == null) { return; } - if (other.NodeId != 0L) { - NodeId = other.NodeId; + enterpriseUserId_.Add(other.enterpriseUserId_); + if (other.AllUsers != false) { + AllUsers = other.AllUsers; + } + if (other.Type != global::Enterprise.ClearSecurityDataType.RecalculateSummaryReport) { + Type = other.Type; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; + case 10: case 8: { - NodeId = input.ReadInt64(); + enterpriseUserId_.AddEntriesFrom(input, _repeated_enterpriseUserId_codec); + break; + } + case 16: { + AllUsers = input.ReadBool(); + break; + } + case 24: { + Type = (global::Enterprise.ClearSecurityDataType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + enterpriseUserId_.AddEntriesFrom(ref input, _repeated_enterpriseUserId_codec); + break; + } + case 16: { + AllUsers = input.ReadBool(); + break; + } + case 24: { + Type = (global::Enterprise.ClearSecurityDataType) input.ReadEnum(); break; } } } } + #endif } diff --git a/KeeperSdk/proto/Folder.cs b/KeeperSdk/proto/Folder.cs index 9a12c74..b078aec 100644 --- a/KeeperSdk/proto/Folder.cs +++ b/KeeperSdk/proto/Folder.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: folder.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -24,52 +24,144 @@ public static partial class FolderReflection { static FolderReflection() { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( - "Cgxmb2xkZXIucHJvdG8SBkZvbGRlciJcChBFbmNyeXB0ZWREYXRhS2V5EhQK", - "DGVuY3J5cHRlZEtleRgBIAEoDBIyChBlbmNyeXB0ZWRLZXlUeXBlGAIgASgO", - "MhguRm9sZGVyLkVuY3J5cHRlZEtleVR5cGUiggEKFlNoYXJlZEZvbGRlclJl", - "Y29yZERhdGESEQoJZm9sZGVyVWlkGAEgASgMEhEKCXJlY29yZFVpZBgCIAEo", - "DBIOCgZ1c2VySWQYAyABKAUSMgoQZW5jcnlwdGVkRGF0YUtleRgEIAMoCzIY", - "LkZvbGRlci5FbmNyeXB0ZWREYXRhS2V5IlwKGlNoYXJlZEZvbGRlclJlY29y", - "ZERhdGFMaXN0Ej4KFnNoYXJlZEZvbGRlclJlY29yZERhdGEYASADKAsyHi5G", - "b2xkZXIuU2hhcmVkRm9sZGVyUmVjb3JkRGF0YSJfChVTaGFyZWRGb2xkZXJS", - "ZWNvcmRGaXgSEQoJZm9sZGVyVWlkGAEgASgMEhEKCXJlY29yZFVpZBgCIAEo", - "DBIgChhlbmNyeXB0ZWRSZWNvcmRGb2xkZXJLZXkYAyABKAwiWQoZU2hhcmVk", - "Rm9sZGVyUmVjb3JkRml4TGlzdBI8ChVzaGFyZWRGb2xkZXJSZWNvcmRGaXgY", - "ASADKAsyHS5Gb2xkZXIuU2hhcmVkRm9sZGVyUmVjb3JkRml4IqICCg1SZWNv", - "cmRSZXF1ZXN0EhEKCXJlY29yZFVpZBgBIAEoDBImCgpyZWNvcmRUeXBlGAIg", - "ASgOMhIuRm9sZGVyLlJlY29yZFR5cGUSEgoKcmVjb3JkRGF0YRgDIAEoDBIa", - "ChJlbmNyeXB0ZWRSZWNvcmRLZXkYBCABKAwSJgoKZm9sZGVyVHlwZRgFIAEo", - "DjISLkZvbGRlci5Gb2xkZXJUeXBlEhIKCmhvd0xvbmdBZ28YBiABKAMSEQoJ", - "Zm9sZGVyVWlkGAcgASgMEiAKGGVuY3J5cHRlZFJlY29yZEZvbGRlcktleRgI", - "IAEoDBINCgVleHRyYRgJIAEoDBIVCg1ub25TaGFyZWREYXRhGAogASgMEg8K", - "B2ZpbGVJZHMYCyADKAMiRQoOUmVjb3JkUmVzcG9uc2USEQoJcmVjb3JkVWlk", - "GAEgASgMEhAKCHJldmlzaW9uGAIgASgDEg4KBnN0YXR1cxgDIAEoCSKAAQoS", - "U2hhcmVkRm9sZGVyRmllbGRzEhsKE2VuY3J5cHRlZEZvbGRlck5hbWUYASAB", - "KAwSEwoLbWFuYWdlVXNlcnMYAiABKAgSFQoNbWFuYWdlUmVjb3JkcxgDIAEo", - "CBIPCgdjYW5FZGl0GAQgASgIEhAKCGNhblNoYXJlGAUgASgIIjMKGFNoYXJl", - "ZEZvbGRlckZvbGRlckZpZWxkcxIXCg9zaGFyZWRGb2xkZXJVaWQYASABKAwi", - "jwIKDUZvbGRlclJlcXVlc3QSEQoJZm9sZGVyVWlkGAEgASgMEiYKCmZvbGRl", - "clR5cGUYAiABKA4yEi5Gb2xkZXIuRm9sZGVyVHlwZRIXCg9wYXJlbnRGb2xk", - "ZXJVaWQYAyABKAwSEgoKZm9sZGVyRGF0YRgEIAEoDBIaChJlbmNyeXB0ZWRG", - "b2xkZXJLZXkYBSABKAwSNgoSc2hhcmVkRm9sZGVyRmllbGRzGAYgASgLMhou", - "Rm9sZGVyLlNoYXJlZEZvbGRlckZpZWxkcxJCChhzaGFyZWRGb2xkZXJGb2xk", - "ZXJGaWVsZHMYByABKAsyIC5Gb2xkZXIuU2hhcmVkRm9sZGVyRm9sZGVyRmll", - "bGRzIkUKDkZvbGRlclJlc3BvbnNlEhEKCWZvbGRlclVpZBgBIAEoDBIQCghy", - "ZXZpc2lvbhgCIAEoAxIOCgZzdGF0dXMYAyABKAkidwoZSW1wb3J0Rm9sZGVy", - "UmVjb3JkUmVxdWVzdBIsCg1mb2xkZXJSZXF1ZXN0GAEgAygLMhUuRm9sZGVy", - "LkZvbGRlclJlcXVlc3QSLAoNcmVjb3JkUmVxdWVzdBgCIAMoCzIVLkZvbGRl", - "ci5SZWNvcmRSZXF1ZXN0InwKGkltcG9ydEZvbGRlclJlY29yZFJlc3BvbnNl", - "Ei4KDmZvbGRlclJlc3BvbnNlGAEgAygLMhYuRm9sZGVyLkZvbGRlclJlc3Bv", - "bnNlEi4KDnJlY29yZFJlc3BvbnNlGAIgAygLMhYuRm9sZGVyLlJlY29yZFJl", - "c3BvbnNlKhoKClJlY29yZFR5cGUSDAoIcGFzc3dvcmQQACpeCgpGb2xkZXJU", - "eXBlEhIKDmRlZmF1bHRfZm9sZGVyEAASDwoLdXNlcl9mb2xkZXIQARIRCg1z", - "aGFyZWRfZm9sZGVyEAISGAoUc2hhcmVkX2ZvbGRlcl9mb2xkZXIQAypWChBF", - "bmNyeXB0ZWRLZXlUeXBlEgoKBm5vX2tleRAAEhkKFWVuY3J5cHRlZF9ieV9k", - "YXRhX2tleRABEhsKF2VuY3J5cHRlZF9ieV9wdWJsaWNfa2V5EAJCIgoYY29t", - "LmtlZXBlcnNlY3VyaXR5LnByb3RvQgZGb2xkZXJiBnByb3RvMw==")); + "Cgxmb2xkZXIucHJvdG8SBkZvbGRlchoMcmVjb3JkLnByb3RvIlwKEEVuY3J5", + "cHRlZERhdGFLZXkSFAoMZW5jcnlwdGVkS2V5GAEgASgMEjIKEGVuY3J5cHRl", + "ZEtleVR5cGUYAiABKA4yGC5Gb2xkZXIuRW5jcnlwdGVkS2V5VHlwZSKCAQoW", + "U2hhcmVkRm9sZGVyUmVjb3JkRGF0YRIRCglmb2xkZXJVaWQYASABKAwSEQoJ", + "cmVjb3JkVWlkGAIgASgMEg4KBnVzZXJJZBgDIAEoBRIyChBlbmNyeXB0ZWRE", + "YXRhS2V5GAQgAygLMhguRm9sZGVyLkVuY3J5cHRlZERhdGFLZXkiXAoaU2hh", + "cmVkRm9sZGVyUmVjb3JkRGF0YUxpc3QSPgoWc2hhcmVkRm9sZGVyUmVjb3Jk", + "RGF0YRgBIAMoCzIeLkZvbGRlci5TaGFyZWRGb2xkZXJSZWNvcmREYXRhIl8K", + "FVNoYXJlZEZvbGRlclJlY29yZEZpeBIRCglmb2xkZXJVaWQYASABKAwSEQoJ", + "cmVjb3JkVWlkGAIgASgMEiAKGGVuY3J5cHRlZFJlY29yZEZvbGRlcktleRgD", + "IAEoDCJZChlTaGFyZWRGb2xkZXJSZWNvcmRGaXhMaXN0EjwKFXNoYXJlZEZv", + "bGRlclJlY29yZEZpeBgBIAMoCzIdLkZvbGRlci5TaGFyZWRGb2xkZXJSZWNv", + "cmRGaXgiogIKDVJlY29yZFJlcXVlc3QSEQoJcmVjb3JkVWlkGAEgASgMEiYK", + "CnJlY29yZFR5cGUYAiABKA4yEi5Gb2xkZXIuUmVjb3JkVHlwZRISCgpyZWNv", + "cmREYXRhGAMgASgMEhoKEmVuY3J5cHRlZFJlY29yZEtleRgEIAEoDBImCgpm", + "b2xkZXJUeXBlGAUgASgOMhIuRm9sZGVyLkZvbGRlclR5cGUSEgoKaG93TG9u", + "Z0FnbxgGIAEoAxIRCglmb2xkZXJVaWQYByABKAwSIAoYZW5jcnlwdGVkUmVj", + "b3JkRm9sZGVyS2V5GAggASgMEg0KBWV4dHJhGAkgASgMEhUKDW5vblNoYXJl", + "ZERhdGEYCiABKAwSDwoHZmlsZUlkcxgLIAMoAyJFCg5SZWNvcmRSZXNwb25z", + "ZRIRCglyZWNvcmRVaWQYASABKAwSEAoIcmV2aXNpb24YAiABKAMSDgoGc3Rh", + "dHVzGAMgASgJIoABChJTaGFyZWRGb2xkZXJGaWVsZHMSGwoTZW5jcnlwdGVk", + "Rm9sZGVyTmFtZRgBIAEoDBITCgttYW5hZ2VVc2VycxgCIAEoCBIVCg1tYW5h", + "Z2VSZWNvcmRzGAMgASgIEg8KB2NhbkVkaXQYBCABKAgSEAoIY2FuU2hhcmUY", + "BSABKAgiMwoYU2hhcmVkRm9sZGVyRm9sZGVyRmllbGRzEhcKD3NoYXJlZEZv", + "bGRlclVpZBgBIAEoDCKPAgoNRm9sZGVyUmVxdWVzdBIRCglmb2xkZXJVaWQY", + "ASABKAwSJgoKZm9sZGVyVHlwZRgCIAEoDjISLkZvbGRlci5Gb2xkZXJUeXBl", + "EhcKD3BhcmVudEZvbGRlclVpZBgDIAEoDBISCgpmb2xkZXJEYXRhGAQgASgM", + "EhoKEmVuY3J5cHRlZEZvbGRlcktleRgFIAEoDBI2ChJzaGFyZWRGb2xkZXJG", + "aWVsZHMYBiABKAsyGi5Gb2xkZXIuU2hhcmVkRm9sZGVyRmllbGRzEkIKGHNo", + "YXJlZEZvbGRlckZvbGRlckZpZWxkcxgHIAEoCzIgLkZvbGRlci5TaGFyZWRG", + "b2xkZXJGb2xkZXJGaWVsZHMiRQoORm9sZGVyUmVzcG9uc2USEQoJZm9sZGVy", + "VWlkGAEgASgMEhAKCHJldmlzaW9uGAIgASgDEg4KBnN0YXR1cxgDIAEoCSJ3", + "ChlJbXBvcnRGb2xkZXJSZWNvcmRSZXF1ZXN0EiwKDWZvbGRlclJlcXVlc3QY", + "ASADKAsyFS5Gb2xkZXIuRm9sZGVyUmVxdWVzdBIsCg1yZWNvcmRSZXF1ZXN0", + "GAIgAygLMhUuRm9sZGVyLlJlY29yZFJlcXVlc3QifAoaSW1wb3J0Rm9sZGVy", + "UmVjb3JkUmVzcG9uc2USLgoOZm9sZGVyUmVzcG9uc2UYASADKAsyFi5Gb2xk", + "ZXIuRm9sZGVyUmVzcG9uc2USLgoOcmVjb3JkUmVzcG9uc2UYAiADKAsyFi5G", + "b2xkZXIuUmVjb3JkUmVzcG9uc2UirQIKGFNoYXJlZEZvbGRlclVwZGF0ZVJl", + "Y29yZBIRCglyZWNvcmRVaWQYASABKAwSFwoPc2hhcmVkRm9sZGVyVWlkGAIg", + "ASgMEg8KB3RlYW1VaWQYAyABKAwSKAoHY2FuRWRpdBgEIAEoDjIXLkZvbGRl", + "ci5TZXRCb29sZWFuVmFsdWUSKQoIY2FuU2hhcmUYBSABKA4yFy5Gb2xkZXIu", + "U2V0Qm9vbGVhblZhbHVlEhoKEmVuY3J5cHRlZFJlY29yZEtleRgGIAEoDBIQ", + "CghyZXZpc2lvbhgHIAEoBRISCgpleHBpcmF0aW9uGAggASgSEj0KFXRpbWVy", + "Tm90aWZpY2F0aW9uVHlwZRgJIAEoDjIeLlJlY29yZHMuVGltZXJOb3RpZmlj", + "YXRpb25UeXBlIrACChZTaGFyZWRGb2xkZXJVcGRhdGVVc2VyEhAKCHVzZXJu", + "YW1lGAEgASgJEiwKC21hbmFnZVVzZXJzGAIgASgOMhcuRm9sZGVyLlNldEJv", + "b2xlYW5WYWx1ZRIuCg1tYW5hZ2VSZWNvcmRzGAMgASgOMhcuRm9sZGVyLlNl", + "dEJvb2xlYW5WYWx1ZRIbCg9zaGFyZWRGb2xkZXJLZXkYBCABKAxCAhgBEhIK", + "CmV4cGlyYXRpb24YBSABKBISPQoVdGltZXJOb3RpZmljYXRpb25UeXBlGAYg", + "ASgOMh4uUmVjb3Jkcy5UaW1lck5vdGlmaWNhdGlvblR5cGUSNgoUdHlwZWRT", + "aGFyZWRGb2xkZXJLZXkYByABKAsyGC5Gb2xkZXIuRW5jcnlwdGVkRGF0YUtl", + "eSL9AQoWU2hhcmVkRm9sZGVyVXBkYXRlVGVhbRIPCgd0ZWFtVWlkGAEgASgM", + "EhMKC21hbmFnZVVzZXJzGAIgASgIEhUKDW1hbmFnZVJlY29yZHMYAyABKAgS", + "GwoPc2hhcmVkRm9sZGVyS2V5GAQgASgMQgIYARISCgpleHBpcmF0aW9uGAUg", + "ASgSEj0KFXRpbWVyTm90aWZpY2F0aW9uVHlwZRgGIAEoDjIeLlJlY29yZHMu", + "VGltZXJOb3RpZmljYXRpb25UeXBlEjYKFHR5cGVkU2hhcmVkRm9sZGVyS2V5", + "GAcgASgLMhguRm9sZGVyLkVuY3J5cHRlZERhdGFLZXkijgcKG1NoYXJlZEZv", + "bGRlclVwZGF0ZVYzUmVxdWVzdBIsCiRzaGFyZWRGb2xkZXJVcGRhdGVPcGVy", + "YXRpb25fZG9udF91c2UYASABKAUSFwoPc2hhcmVkRm9sZGVyVWlkGAIgASgM", + "EiEKGWVuY3J5cHRlZFNoYXJlZEZvbGRlck5hbWUYAyABKAwSEAoIcmV2aXNp", + "b24YBCABKAMSEwoLZm9yY2VVcGRhdGUYBSABKAgSEwoLZnJvbVRlYW1VaWQY", + "BiABKAwSMwoSZGVmYXVsdE1hbmFnZVVzZXJzGAcgASgOMhcuRm9sZGVyLlNl", + "dEJvb2xlYW5WYWx1ZRI1ChRkZWZhdWx0TWFuYWdlUmVjb3JkcxgIIAEoDjIX", + "LkZvbGRlci5TZXRCb29sZWFuVmFsdWUSLwoOZGVmYXVsdENhbkVkaXQYCSAB", + "KA4yFy5Gb2xkZXIuU2V0Qm9vbGVhblZhbHVlEjAKD2RlZmF1bHRDYW5TaGFy", + "ZRgKIAEoDjIXLkZvbGRlci5TZXRCb29sZWFuVmFsdWUSPwoVc2hhcmVkRm9s", + "ZGVyQWRkUmVjb3JkGAsgAygLMiAuRm9sZGVyLlNoYXJlZEZvbGRlclVwZGF0", + "ZVJlY29yZBI7ChNzaGFyZWRGb2xkZXJBZGRVc2VyGAwgAygLMh4uRm9sZGVy", + "LlNoYXJlZEZvbGRlclVwZGF0ZVVzZXISOwoTc2hhcmVkRm9sZGVyQWRkVGVh", + "bRgNIAMoCzIeLkZvbGRlci5TaGFyZWRGb2xkZXJVcGRhdGVUZWFtEkIKGHNo", + "YXJlZEZvbGRlclVwZGF0ZVJlY29yZBgOIAMoCzIgLkZvbGRlci5TaGFyZWRG", + "b2xkZXJVcGRhdGVSZWNvcmQSPgoWc2hhcmVkRm9sZGVyVXBkYXRlVXNlchgP", + "IAMoCzIeLkZvbGRlci5TaGFyZWRGb2xkZXJVcGRhdGVVc2VyEj4KFnNoYXJl", + "ZEZvbGRlclVwZGF0ZVRlYW0YECADKAsyHi5Gb2xkZXIuU2hhcmVkRm9sZGVy", + "VXBkYXRlVGVhbRIgChhzaGFyZWRGb2xkZXJSZW1vdmVSZWNvcmQYESADKAwS", + "HgoWc2hhcmVkRm9sZGVyUmVtb3ZlVXNlchgSIAMoCRIeChZzaGFyZWRGb2xk", + "ZXJSZW1vdmVUZWFtGBMgAygMEhkKEXNoYXJlZEZvbGRlck93bmVyGBQgASgJ", + "ImMKHVNoYXJlZEZvbGRlclVwZGF0ZVYzUmVxdWVzdFYyEkIKFXNoYXJlZEZv", + "bGRlcnNVcGRhdGVWMxgBIAMoCzIjLkZvbGRlci5TaGFyZWRGb2xkZXJVcGRh", + "dGVWM1JlcXVlc3QiQwoeU2hhcmVkRm9sZGVyVXBkYXRlUmVjb3JkU3RhdHVz", + "EhEKCXJlY29yZFVpZBgBIAEoDBIOCgZzdGF0dXMYAiABKAkiQAocU2hhcmVk", + "Rm9sZGVyVXBkYXRlVXNlclN0YXR1cxIQCgh1c2VybmFtZRgBIAEoCRIOCgZz", + "dGF0dXMYAiABKAkiPwocU2hhcmVkRm9sZGVyVXBkYXRlVGVhbVN0YXR1cxIP", + "Cgd0ZWFtVWlkGAEgASgMEg4KBnN0YXR1cxgCIAEoCSKIBgocU2hhcmVkRm9s", + "ZGVyVXBkYXRlVjNSZXNwb25zZRIQCghyZXZpc2lvbhgBIAEoAxJLChtzaGFy", + "ZWRGb2xkZXJBZGRSZWNvcmRTdGF0dXMYAiADKAsyJi5Gb2xkZXIuU2hhcmVk", + "Rm9sZGVyVXBkYXRlUmVjb3JkU3RhdHVzEkcKGXNoYXJlZEZvbGRlckFkZFVz", + "ZXJTdGF0dXMYAyADKAsyJC5Gb2xkZXIuU2hhcmVkRm9sZGVyVXBkYXRlVXNl", + "clN0YXR1cxJHChlzaGFyZWRGb2xkZXJBZGRUZWFtU3RhdHVzGAQgAygLMiQu", + "Rm9sZGVyLlNoYXJlZEZvbGRlclVwZGF0ZVRlYW1TdGF0dXMSTgoec2hhcmVk", + "Rm9sZGVyVXBkYXRlUmVjb3JkU3RhdHVzGAUgAygLMiYuRm9sZGVyLlNoYXJl", + "ZEZvbGRlclVwZGF0ZVJlY29yZFN0YXR1cxJKChxzaGFyZWRGb2xkZXJVcGRh", + "dGVVc2VyU3RhdHVzGAYgAygLMiQuRm9sZGVyLlNoYXJlZEZvbGRlclVwZGF0", + "ZVVzZXJTdGF0dXMSSgocc2hhcmVkRm9sZGVyVXBkYXRlVGVhbVN0YXR1cxgH", + "IAMoCzIkLkZvbGRlci5TaGFyZWRGb2xkZXJVcGRhdGVUZWFtU3RhdHVzEk4K", + "HnNoYXJlZEZvbGRlclJlbW92ZVJlY29yZFN0YXR1cxgIIAMoCzImLkZvbGRl", + "ci5TaGFyZWRGb2xkZXJVcGRhdGVSZWNvcmRTdGF0dXMSSgocc2hhcmVkRm9s", + "ZGVyUmVtb3ZlVXNlclN0YXR1cxgJIAMoCzIkLkZvbGRlci5TaGFyZWRGb2xk", + "ZXJVcGRhdGVVc2VyU3RhdHVzEkoKHHNoYXJlZEZvbGRlclJlbW92ZVRlYW1T", + "dGF0dXMYCiADKAsyJC5Gb2xkZXIuU2hhcmVkRm9sZGVyVXBkYXRlVGVhbVN0", + "YXR1cxIXCg9zaGFyZWRGb2xkZXJVaWQYDCABKAwSDgoGc3RhdHVzGA0gASgJ", + "Im0KHlNoYXJlZEZvbGRlclVwZGF0ZVYzUmVzcG9uc2VWMhJLCh1zaGFyZWRG", + "b2xkZXJzVXBkYXRlVjNSZXNwb25zZRgBIAMoCzIkLkZvbGRlci5TaGFyZWRG", + "b2xkZXJVcGRhdGVWM1Jlc3BvbnNlIvoBCilHZXREZWxldGVkU2hhcmVkRm9s", + "ZGVyc0FuZFJlY29yZHNSZXNwb25zZRIyCg1zaGFyZWRGb2xkZXJzGAEgAygL", + "MhsuRm9sZGVyLkRlbGV0ZWRTaGFyZWRGb2xkZXISPgoTc2hhcmVkRm9sZGVy", + "UmVjb3JkcxgCIAMoCzIhLkZvbGRlci5EZWxldGVkU2hhcmVkRm9sZGVyUmVj", + "b3JkEjQKEWRlbGV0ZWRSZWNvcmREYXRhGAMgAygLMhkuRm9sZGVyLkRlbGV0", + "ZWRSZWNvcmREYXRhEiMKCXVzZXJuYW1lcxgEIAMoCzIQLkZvbGRlci5Vc2Vy", + "bmFtZSLRAQoTRGVsZXRlZFNoYXJlZEZvbGRlchIXCg9zaGFyZWRGb2xkZXJV", + "aWQYASABKAwSEQoJZm9sZGVyVWlkGAIgASgMEhEKCXBhcmVudFVpZBgDIAEo", + "DBIXCg9zaGFyZWRGb2xkZXJLZXkYBCABKAwSLQoNZm9sZGVyS2V5VHlwZRgF", + "IAEoDjIWLlJlY29yZHMuUmVjb3JkS2V5VHlwZRIMCgRkYXRhGAYgASgMEhMK", + "C2RhdGVEZWxldGVkGAcgASgDEhAKCHJldmlzaW9uGAggASgDIoEBChlEZWxl", + "dGVkU2hhcmVkRm9sZGVyUmVjb3JkEhEKCWZvbGRlclVpZBgBIAEoDBIRCgly", + "ZWNvcmRVaWQYAiABKAwSFwoPc2hhcmVkUmVjb3JkS2V5GAMgASgMEhMKC2Rh", + "dGVEZWxldGVkGAQgASgDEhAKCHJldmlzaW9uGAUgASgDIoUBChFEZWxldGVk", + "UmVjb3JkRGF0YRIRCglyZWNvcmRVaWQYASABKAwSEAoIb3duZXJVaWQYAiAB", + "KAwSEAoIcmV2aXNpb24YAyABKAMSGgoSY2xpZW50TW9kaWZpZWRUaW1lGAQg", + "ASgDEgwKBGRhdGEYBSABKAwSDwoHdmVyc2lvbhgGIAEoBSIwCghVc2VybmFt", + "ZRISCgphY2NvdW50VWlkGAEgASgMEhAKCHVzZXJuYW1lGAIgASgJIooBCixS", + "ZXN0b3JlRGVsZXRlZFNoYXJlZEZvbGRlcnNBbmRSZWNvcmRzUmVxdWVzdBIs", + "Cgdmb2xkZXJzGAEgAygLMhsuRm9sZGVyLlJlc3RvcmVTaGFyZWRPYmplY3QS", + "LAoHcmVjb3JkcxgCIAMoCzIbLkZvbGRlci5SZXN0b3JlU2hhcmVkT2JqZWN0", + "IjwKE1Jlc3RvcmVTaGFyZWRPYmplY3QSEQoJZm9sZGVyVWlkGAEgASgMEhIK", + "CnJlY29yZFVpZHMYAiADKAwqGgoKUmVjb3JkVHlwZRIMCghwYXNzd29yZBAA", + "Kl4KCkZvbGRlclR5cGUSEgoOZGVmYXVsdF9mb2xkZXIQABIPCgt1c2VyX2Zv", + "bGRlchABEhEKDXNoYXJlZF9mb2xkZXIQAhIYChRzaGFyZWRfZm9sZGVyX2Zv", + "bGRlchADKpYBChBFbmNyeXB0ZWRLZXlUeXBlEgoKBm5vX2tleRAAEhkKFWVu", + "Y3J5cHRlZF9ieV9kYXRhX2tleRABEhsKF2VuY3J5cHRlZF9ieV9wdWJsaWNf", + "a2V5EAISHQoZZW5jcnlwdGVkX2J5X2RhdGFfa2V5X2djbRADEh8KG2VuY3J5", + "cHRlZF9ieV9wdWJsaWNfa2V5X2VjYxAEKk0KD1NldEJvb2xlYW5WYWx1ZRIV", + "ChFCT09MRUFOX05PX0NIQU5HRRAAEhAKDEJPT0xFQU5fVFJVRRABEhEKDUJP", + "T0xFQU5fRkFMU0UQAkIiChhjb20ua2VlcGVyc2VjdXJpdHkucHJvdG9CBkZv", + "bGRlcmIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, - new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Folder.RecordType), typeof(global::Folder.FolderType), typeof(global::Folder.EncryptedKeyType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::FileDescriptor[] { global::Records.RecordReflection.Descriptor, }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Folder.RecordType), typeof(global::Folder.FolderType), typeof(global::Folder.EncryptedKeyType), typeof(global::Folder.SetBooleanValue), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Folder.EncryptedDataKey), global::Folder.EncryptedDataKey.Parser, new[]{ "EncryptedKey", "EncryptedKeyType" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderRecordData), global::Folder.SharedFolderRecordData.Parser, new[]{ "FolderUid", "RecordUid", "UserId", "EncryptedDataKey" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderRecordDataList), global::Folder.SharedFolderRecordDataList.Parser, new[]{ "SharedFolderRecordData" }, null, null, null, null), @@ -82,7 +174,24 @@ static FolderReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::Folder.FolderRequest), global::Folder.FolderRequest.Parser, new[]{ "FolderUid", "FolderType", "ParentFolderUid", "FolderData", "EncryptedFolderKey", "SharedFolderFields", "SharedFolderFolderFields" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Folder.FolderResponse), global::Folder.FolderResponse.Parser, new[]{ "FolderUid", "Revision", "Status" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Folder.ImportFolderRecordRequest), global::Folder.ImportFolderRecordRequest.Parser, new[]{ "FolderRequest", "RecordRequest" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Folder.ImportFolderRecordResponse), global::Folder.ImportFolderRecordResponse.Parser, new[]{ "FolderResponse", "RecordResponse" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.ImportFolderRecordResponse), global::Folder.ImportFolderRecordResponse.Parser, new[]{ "FolderResponse", "RecordResponse" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateRecord), global::Folder.SharedFolderUpdateRecord.Parser, new[]{ "RecordUid", "SharedFolderUid", "TeamUid", "CanEdit", "CanShare", "EncryptedRecordKey", "Revision", "Expiration", "TimerNotificationType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateUser), global::Folder.SharedFolderUpdateUser.Parser, new[]{ "Username", "ManageUsers", "ManageRecords", "SharedFolderKey", "Expiration", "TimerNotificationType", "TypedSharedFolderKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateTeam), global::Folder.SharedFolderUpdateTeam.Parser, new[]{ "TeamUid", "ManageUsers", "ManageRecords", "SharedFolderKey", "Expiration", "TimerNotificationType", "TypedSharedFolderKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateV3Request), global::Folder.SharedFolderUpdateV3Request.Parser, new[]{ "SharedFolderUpdateOperationDontUse", "SharedFolderUid", "EncryptedSharedFolderName", "Revision", "ForceUpdate", "FromTeamUid", "DefaultManageUsers", "DefaultManageRecords", "DefaultCanEdit", "DefaultCanShare", "SharedFolderAddRecord", "SharedFolderAddUser", "SharedFolderAddTeam", "SharedFolderUpdateRecord", "SharedFolderUpdateUser", "SharedFolderUpdateTeam", "SharedFolderRemoveRecord", "SharedFolderRemoveUser", "SharedFolderRemoveTeam", "SharedFolderOwner" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateV3RequestV2), global::Folder.SharedFolderUpdateV3RequestV2.Parser, new[]{ "SharedFoldersUpdateV3" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateRecordStatus), global::Folder.SharedFolderUpdateRecordStatus.Parser, new[]{ "RecordUid", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateUserStatus), global::Folder.SharedFolderUpdateUserStatus.Parser, new[]{ "Username", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateTeamStatus), global::Folder.SharedFolderUpdateTeamStatus.Parser, new[]{ "TeamUid", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateV3Response), global::Folder.SharedFolderUpdateV3Response.Parser, new[]{ "Revision", "SharedFolderAddRecordStatus", "SharedFolderAddUserStatus", "SharedFolderAddTeamStatus", "SharedFolderUpdateRecordStatus", "SharedFolderUpdateUserStatus", "SharedFolderUpdateTeamStatus", "SharedFolderRemoveRecordStatus", "SharedFolderRemoveUserStatus", "SharedFolderRemoveTeamStatus", "SharedFolderUid", "Status" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.SharedFolderUpdateV3ResponseV2), global::Folder.SharedFolderUpdateV3ResponseV2.Parser, new[]{ "SharedFoldersUpdateV3Response" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.GetDeletedSharedFoldersAndRecordsResponse), global::Folder.GetDeletedSharedFoldersAndRecordsResponse.Parser, new[]{ "SharedFolders", "SharedFolderRecords", "DeletedRecordData", "Usernames" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.DeletedSharedFolder), global::Folder.DeletedSharedFolder.Parser, new[]{ "SharedFolderUid", "FolderUid", "ParentUid", "SharedFolderKey", "FolderKeyType", "Data", "DateDeleted", "Revision" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.DeletedSharedFolderRecord), global::Folder.DeletedSharedFolderRecord.Parser, new[]{ "FolderUid", "RecordUid", "SharedRecordKey", "DateDeleted", "Revision" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.DeletedRecordData), global::Folder.DeletedRecordData.Parser, new[]{ "RecordUid", "OwnerUid", "Revision", "ClientModifiedTime", "Data", "Version" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.Username), global::Folder.Username.Parser, new[]{ "AccountUid", "Username_" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.RestoreDeletedSharedFoldersAndRecordsRequest), global::Folder.RestoreDeletedSharedFoldersAndRecordsRequest.Parser, new[]{ "Folders", "Records" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Folder.RestoreSharedObject), global::Folder.RestoreSharedObject.Parser, new[]{ "FolderUid", "RecordUids" }, null, null, null, null) })); } #endregion @@ -104,28 +213,45 @@ public enum EncryptedKeyType { [pbr::OriginalName("no_key")] NoKey = 0, [pbr::OriginalName("encrypted_by_data_key")] EncryptedByDataKey = 1, [pbr::OriginalName("encrypted_by_public_key")] EncryptedByPublicKey = 2, + [pbr::OriginalName("encrypted_by_data_key_gcm")] EncryptedByDataKeyGcm = 3, + [pbr::OriginalName("encrypted_by_public_key_ecc")] EncryptedByPublicKeyEcc = 4, + } + + public enum SetBooleanValue { + [pbr::OriginalName("BOOLEAN_NO_CHANGE")] BooleanNoChange = 0, + [pbr::OriginalName("BOOLEAN_TRUE")] BooleanTrue = 1, + [pbr::OriginalName("BOOLEAN_FALSE")] BooleanFalse = 2, } #endregion #region Messages - public sealed partial class EncryptedDataKey : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class EncryptedDataKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new EncryptedDataKey()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EncryptedDataKey() { OnConstruction(); } @@ -133,6 +259,7 @@ public EncryptedDataKey() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EncryptedDataKey(EncryptedDataKey other) : this() { encryptedKey_ = other.encryptedKey_; encryptedKeyType_ = other.encryptedKeyType_; @@ -140,6 +267,7 @@ public EncryptedDataKey(EncryptedDataKey other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public EncryptedDataKey Clone() { return new EncryptedDataKey(this); } @@ -148,6 +276,7 @@ public EncryptedDataKey Clone() { public const int EncryptedKeyFieldNumber = 1; private pb::ByteString encryptedKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedKey { get { return encryptedKey_; } set { @@ -159,6 +288,7 @@ public EncryptedDataKey Clone() { public const int EncryptedKeyTypeFieldNumber = 2; private global::Folder.EncryptedKeyType encryptedKeyType_ = global::Folder.EncryptedKeyType.NoKey; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Folder.EncryptedKeyType EncryptedKeyType { get { return encryptedKeyType_; } set { @@ -167,11 +297,13 @@ public EncryptedDataKey Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as EncryptedDataKey); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(EncryptedDataKey other) { if (ReferenceEquals(other, null)) { return false; @@ -185,6 +317,7 @@ public bool Equals(EncryptedDataKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedKey.Length != 0) hash ^= EncryptedKey.GetHashCode(); @@ -196,12 +329,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedKey.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedKey); @@ -213,9 +351,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedKey.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedKey); + } + if (EncryptedKeyType != global::Folder.EncryptedKeyType.NoKey) { + output.WriteRawTag(16); + output.WriteEnum((int) EncryptedKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedKey.Length != 0) { @@ -231,6 +389,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(EncryptedDataKey other) { if (other == null) { return; @@ -245,10 +404,18 @@ public void MergeFrom(EncryptedDataKey other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -262,27 +429,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedKey = input.ReadBytes(); + break; + } + case 16: { + EncryptedKeyType = (global::Folder.EncryptedKeyType) input.ReadEnum(); + break; + } + } + } } + #endif } - public sealed partial class SharedFolderRecordData : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderRecordData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderRecordData()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordData() { OnConstruction(); } @@ -290,6 +494,7 @@ public SharedFolderRecordData() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordData(SharedFolderRecordData other) : this() { folderUid_ = other.folderUid_; recordUid_ = other.recordUid_; @@ -299,6 +504,7 @@ public SharedFolderRecordData(SharedFolderRecordData other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordData Clone() { return new SharedFolderRecordData(this); } @@ -307,6 +513,7 @@ public SharedFolderRecordData Clone() { public const int FolderUidFieldNumber = 1; private pb::ByteString folderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString FolderUid { get { return folderUid_; } set { @@ -318,6 +525,7 @@ public SharedFolderRecordData Clone() { public const int RecordUidFieldNumber = 2; private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RecordUid { get { return recordUid_; } set { @@ -329,6 +537,7 @@ public SharedFolderRecordData Clone() { public const int UserIdFieldNumber = 3; private int userId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int UserId { get { return userId_; } set { @@ -345,16 +554,19 @@ public int UserId { ///in the order of encryptedRecordKey, encryptedSharedFolderKey and optional encryptedTeamKey /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField EncryptedDataKey { get { return encryptedDataKey_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SharedFolderRecordData); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SharedFolderRecordData other) { if (ReferenceEquals(other, null)) { return false; @@ -370,6 +582,7 @@ public bool Equals(SharedFolderRecordData other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); @@ -383,12 +596,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (FolderUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(FolderUid); @@ -405,9 +623,34 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (UserId != 0) { + output.WriteRawTag(24); + output.WriteInt32(UserId); + } + encryptedDataKey_.WriteTo(ref output, _repeated_encryptedDataKey_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (FolderUid.Length != 0) { @@ -427,6 +670,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SharedFolderRecordData other) { if (other == null) { return; @@ -445,10 +689,18 @@ public void MergeFrom(SharedFolderRecordData other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -470,27 +722,72 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 24: { + UserId = input.ReadInt32(); + break; + } + case 34: { + encryptedDataKey_.AddEntriesFrom(ref input, _repeated_encryptedDataKey_codec); + break; + } + } + } } + #endif } - public sealed partial class SharedFolderRecordDataList : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderRecordDataList : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderRecordDataList()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordDataList() { OnConstruction(); } @@ -498,12 +795,14 @@ public SharedFolderRecordDataList() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordDataList(SharedFolderRecordDataList other) : this() { sharedFolderRecordData_ = other.sharedFolderRecordData_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordDataList Clone() { return new SharedFolderRecordDataList(this); } @@ -514,16 +813,19 @@ public SharedFolderRecordDataList Clone() { = pb::FieldCodec.ForMessage(10, global::Folder.SharedFolderRecordData.Parser); private readonly pbc::RepeatedField sharedFolderRecordData_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SharedFolderRecordData { get { return sharedFolderRecordData_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SharedFolderRecordDataList); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SharedFolderRecordDataList other) { if (ReferenceEquals(other, null)) { return false; @@ -536,6 +838,7 @@ public bool Equals(SharedFolderRecordDataList other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= sharedFolderRecordData_.GetHashCode(); @@ -546,19 +849,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else sharedFolderRecordData_.WriteTo(output, _repeated_sharedFolderRecordData_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFolderRecordData_.WriteTo(ref output, _repeated_sharedFolderRecordData_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += sharedFolderRecordData_.CalculateSize(_repeated_sharedFolderRecordData_codec); @@ -569,6 +890,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SharedFolderRecordDataList other) { if (other == null) { return; @@ -578,10 +900,18 @@ public void MergeFrom(SharedFolderRecordDataList other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -591,27 +921,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFolderRecordData_.AddEntriesFrom(ref input, _repeated_sharedFolderRecordData_codec); + break; + } + } + } } + #endif } - public sealed partial class SharedFolderRecordFix : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderRecordFix : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderRecordFix()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordFix() { OnConstruction(); } @@ -619,6 +982,7 @@ public SharedFolderRecordFix() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordFix(SharedFolderRecordFix other) : this() { folderUid_ = other.folderUid_; recordUid_ = other.recordUid_; @@ -627,6 +991,7 @@ public SharedFolderRecordFix(SharedFolderRecordFix other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordFix Clone() { return new SharedFolderRecordFix(this); } @@ -635,6 +1000,7 @@ public SharedFolderRecordFix Clone() { public const int FolderUidFieldNumber = 1; private pb::ByteString folderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString FolderUid { get { return folderUid_; } set { @@ -646,6 +1012,7 @@ public SharedFolderRecordFix Clone() { public const int RecordUidFieldNumber = 2; private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RecordUid { get { return recordUid_; } set { @@ -657,6 +1024,7 @@ public SharedFolderRecordFix Clone() { public const int EncryptedRecordFolderKeyFieldNumber = 3; private pb::ByteString encryptedRecordFolderKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedRecordFolderKey { get { return encryptedRecordFolderKey_; } set { @@ -665,11 +1033,13 @@ public SharedFolderRecordFix Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SharedFolderRecordFix); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SharedFolderRecordFix other) { if (ReferenceEquals(other, null)) { return false; @@ -684,6 +1054,7 @@ public bool Equals(SharedFolderRecordFix other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); @@ -696,12 +1067,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (FolderUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(FolderUid); @@ -717,9 +1093,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (EncryptedRecordFolderKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedRecordFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (FolderUid.Length != 0) { @@ -738,6 +1138,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SharedFolderRecordFix other) { if (other == null) { return; @@ -755,10 +1156,18 @@ public void MergeFrom(SharedFolderRecordFix other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -776,27 +1185,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + EncryptedRecordFolderKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class SharedFolderRecordFixList : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderRecordFixList : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderRecordFixList()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordFixList() { OnConstruction(); } @@ -804,12 +1254,14 @@ public SharedFolderRecordFixList() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordFixList(SharedFolderRecordFixList other) : this() { sharedFolderRecordFix_ = other.sharedFolderRecordFix_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderRecordFixList Clone() { return new SharedFolderRecordFixList(this); } @@ -820,16 +1272,19 @@ public SharedFolderRecordFixList Clone() { = pb::FieldCodec.ForMessage(10, global::Folder.SharedFolderRecordFix.Parser); private readonly pbc::RepeatedField sharedFolderRecordFix_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SharedFolderRecordFix { get { return sharedFolderRecordFix_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SharedFolderRecordFixList); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SharedFolderRecordFixList other) { if (ReferenceEquals(other, null)) { return false; @@ -842,6 +1297,7 @@ public bool Equals(SharedFolderRecordFixList other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= sharedFolderRecordFix_.GetHashCode(); @@ -852,19 +1308,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else sharedFolderRecordFix_.WriteTo(output, _repeated_sharedFolderRecordFix_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFolderRecordFix_.WriteTo(ref output, _repeated_sharedFolderRecordFix_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += sharedFolderRecordFix_.CalculateSize(_repeated_sharedFolderRecordFix_codec); @@ -875,6 +1349,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SharedFolderRecordFixList other) { if (other == null) { return; @@ -884,10 +1359,18 @@ public void MergeFrom(SharedFolderRecordFixList other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -897,27 +1380,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFolderRecordFix_.AddEntriesFrom(ref input, _repeated_sharedFolderRecordFix_codec); + break; + } + } + } } + #endif } - public sealed partial class RecordRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RecordRequest() { OnConstruction(); } @@ -925,6 +1441,7 @@ public RecordRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RecordRequest(RecordRequest other) : this() { recordUid_ = other.recordUid_; recordType_ = other.recordType_; @@ -941,6 +1458,7 @@ public RecordRequest(RecordRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public RecordRequest Clone() { return new RecordRequest(this); } @@ -949,6 +1467,7 @@ public RecordRequest Clone() { public const int RecordUidFieldNumber = 1; private pb::ByteString recordUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RecordUid { get { return recordUid_; } set { @@ -960,6 +1479,7 @@ public RecordRequest Clone() { public const int RecordTypeFieldNumber = 2; private global::Folder.RecordType recordType_ = global::Folder.RecordType.Password; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Folder.RecordType RecordType { get { return recordType_; } set { @@ -971,6 +1491,7 @@ public RecordRequest Clone() { public const int RecordDataFieldNumber = 3; private pb::ByteString recordData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString RecordData { get { return recordData_; } set { @@ -982,6 +1503,7 @@ public RecordRequest Clone() { public const int EncryptedRecordKeyFieldNumber = 4; private pb::ByteString encryptedRecordKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedRecordKey { get { return encryptedRecordKey_; } set { @@ -993,6 +1515,7 @@ public RecordRequest Clone() { public const int FolderTypeFieldNumber = 5; private global::Folder.FolderType folderType_ = global::Folder.FolderType.DefaultFolder; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Folder.FolderType FolderType { get { return folderType_; } set { @@ -1004,6 +1527,7 @@ public RecordRequest Clone() { public const int HowLongAgoFieldNumber = 6; private long howLongAgo_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long HowLongAgo { get { return howLongAgo_; } set { @@ -1015,6 +1539,7 @@ public long HowLongAgo { public const int FolderUidFieldNumber = 7; private pb::ByteString folderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString FolderUid { get { return folderUid_; } set { @@ -1026,6 +1551,7 @@ public long HowLongAgo { public const int EncryptedRecordFolderKeyFieldNumber = 8; private pb::ByteString encryptedRecordFolderKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedRecordFolderKey { get { return encryptedRecordFolderKey_; } set { @@ -1037,6 +1563,7 @@ public long HowLongAgo { public const int ExtraFieldNumber = 9; private pb::ByteString extra_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Extra { get { return extra_; } set { @@ -1048,6 +1575,7 @@ public long HowLongAgo { public const int NonSharedDataFieldNumber = 10; private pb::ByteString nonSharedData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString NonSharedData { get { return nonSharedData_; } set { @@ -1061,16 +1589,19 @@ public long HowLongAgo { = pb::FieldCodec.ForInt64(90); private readonly pbc::RepeatedField fileIds_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField FileIds { get { return fileIds_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as RecordRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(RecordRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1093,6 +1624,7 @@ public bool Equals(RecordRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); @@ -1113,12 +1645,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RecordUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(RecordUid); @@ -1163,9 +1700,62 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordType != global::Folder.RecordType.Password) { + output.WriteRawTag(16); + output.WriteEnum((int) RecordType); + } + if (RecordData.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordData); + } + if (EncryptedRecordKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(EncryptedRecordKey); + } + if (FolderType != global::Folder.FolderType.DefaultFolder) { + output.WriteRawTag(40); + output.WriteEnum((int) FolderType); + } + if (HowLongAgo != 0L) { + output.WriteRawTag(48); + output.WriteInt64(HowLongAgo); + } + if (FolderUid.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(FolderUid); + } + if (EncryptedRecordFolderKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(EncryptedRecordFolderKey); + } + if (Extra.Length != 0) { + output.WriteRawTag(74); + output.WriteBytes(Extra); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(82); + output.WriteBytes(NonSharedData); + } + fileIds_.WriteTo(ref output, _repeated_fileIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RecordUid.Length != 0) { @@ -1206,6 +1796,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(RecordRequest other) { if (other == null) { return; @@ -1245,10 +1836,18 @@ public void MergeFrom(RecordRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1299,54 +1898,131 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - } - - public sealed partial class RecordResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::Folder.FolderReflection.Descriptor.MessageTypes[6]; } - } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RecordResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RecordResponse(RecordResponse other) : this() { - recordUid_ = other.recordUid_; - revision_ = other.revision_; - status_ = other.status_; - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public RecordResponse Clone() { - return new RecordResponse(this); - } - - /// Field number for the "recordUid" field. - public const int RecordUidFieldNumber = 1; - private pb::ByteString recordUid_ = pb::ByteString.Empty; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString RecordUid { - get { return recordUid_; } - set { - recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + RecordType = (global::Folder.RecordType) input.ReadEnum(); + break; + } + case 26: { + RecordData = input.ReadBytes(); + break; + } + case 34: { + EncryptedRecordKey = input.ReadBytes(); + break; + } + case 40: { + FolderType = (global::Folder.FolderType) input.ReadEnum(); + break; + } + case 48: { + HowLongAgo = input.ReadInt64(); + break; + } + case 58: { + FolderUid = input.ReadBytes(); + break; + } + case 66: { + EncryptedRecordFolderKey = input.ReadBytes(); + break; + } + case 74: { + Extra = input.ReadBytes(); + break; + } + case 82: { + NonSharedData = input.ReadBytes(); + break; + } + case 90: + case 88: { + fileIds_.AddEntriesFrom(ref input, _repeated_fileIds_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordResponse(RecordResponse other) : this() { + recordUid_ = other.recordUid_; + revision_ = other.revision_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordResponse Clone() { + return new RecordResponse(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } @@ -1354,6 +2030,7 @@ public RecordResponse Clone() { public const int RevisionFieldNumber = 2; private long revision_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Revision { get { return revision_; } set { @@ -1365,6 +2042,7 @@ public long Revision { public const int StatusFieldNumber = 3; private string status_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Status { get { return status_; } set { @@ -1373,11 +2051,13 @@ public string Status { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as RecordResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(RecordResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -1392,6 +2072,7 @@ public bool Equals(RecordResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); @@ -1404,12 +2085,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (RecordUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(RecordUid); @@ -1425,9 +2111,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (RecordUid.Length != 0) { @@ -1446,6 +2156,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(RecordResponse other) { if (other == null) { return; @@ -1463,10 +2174,18 @@ public void MergeFrom(RecordResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1484,27 +2203,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class SharedFolderFields : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderFields : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderFields()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderFields() { OnConstruction(); } @@ -1512,6 +2272,7 @@ public SharedFolderFields() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderFields(SharedFolderFields other) : this() { encryptedFolderName_ = other.encryptedFolderName_; manageUsers_ = other.manageUsers_; @@ -1522,6 +2283,7 @@ public SharedFolderFields(SharedFolderFields other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderFields Clone() { return new SharedFolderFields(this); } @@ -1530,6 +2292,7 @@ public SharedFolderFields Clone() { public const int EncryptedFolderNameFieldNumber = 1; private pb::ByteString encryptedFolderName_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedFolderName { get { return encryptedFolderName_; } set { @@ -1541,6 +2304,7 @@ public SharedFolderFields Clone() { public const int ManageUsersFieldNumber = 2; private bool manageUsers_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ManageUsers { get { return manageUsers_; } set { @@ -1552,6 +2316,7 @@ public bool ManageUsers { public const int ManageRecordsFieldNumber = 3; private bool manageRecords_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ManageRecords { get { return manageRecords_; } set { @@ -1563,6 +2328,7 @@ public bool ManageRecords { public const int CanEditFieldNumber = 4; private bool canEdit_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool CanEdit { get { return canEdit_; } set { @@ -1574,6 +2340,7 @@ public bool CanEdit { public const int CanShareFieldNumber = 5; private bool canShare_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool CanShare { get { return canShare_; } set { @@ -1582,11 +2349,13 @@ public bool CanShare { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SharedFolderFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SharedFolderFields other) { if (ReferenceEquals(other, null)) { return false; @@ -1603,6 +2372,7 @@ public bool Equals(SharedFolderFields other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedFolderName.Length != 0) hash ^= EncryptedFolderName.GetHashCode(); @@ -1617,12 +2387,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedFolderName.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedFolderName); @@ -1646,9 +2421,41 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedFolderName.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedFolderName); + } + if (ManageUsers != false) { + output.WriteRawTag(16); + output.WriteBool(ManageUsers); + } + if (ManageRecords != false) { + output.WriteRawTag(24); + output.WriteBool(ManageRecords); + } + if (CanEdit != false) { + output.WriteRawTag(32); + output.WriteBool(CanEdit); + } + if (CanShare != false) { + output.WriteRawTag(40); + output.WriteBool(CanShare); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedFolderName.Length != 0) { @@ -1673,6 +2480,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SharedFolderFields other) { if (other == null) { return; @@ -1696,10 +2504,18 @@ public void MergeFrom(SharedFolderFields other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1725,27 +2541,76 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedFolderName = input.ReadBytes(); + break; + } + case 16: { + ManageUsers = input.ReadBool(); + break; + } + case 24: { + ManageRecords = input.ReadBool(); + break; + } + case 32: { + CanEdit = input.ReadBool(); + break; + } + case 40: { + CanShare = input.ReadBool(); + break; + } + } + } } + #endif } - public sealed partial class SharedFolderFolderFields : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderFolderFields : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderFolderFields()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[8]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderFolderFields() { OnConstruction(); } @@ -1753,12 +2618,14 @@ public SharedFolderFolderFields() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderFolderFields(SharedFolderFolderFields other) : this() { sharedFolderUid_ = other.sharedFolderUid_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SharedFolderFolderFields Clone() { return new SharedFolderFolderFields(this); } @@ -1767,6 +2634,7 @@ public SharedFolderFolderFields Clone() { public const int SharedFolderUidFieldNumber = 1; private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString SharedFolderUid { get { return sharedFolderUid_; } set { @@ -1775,11 +2643,13 @@ public SharedFolderFolderFields Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SharedFolderFolderFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SharedFolderFolderFields other) { if (ReferenceEquals(other, null)) { return false; @@ -1792,6 +2662,7 @@ public bool Equals(SharedFolderFolderFields other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); @@ -1802,12 +2673,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SharedFolderUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(SharedFolderUid); @@ -1815,9 +2691,25 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SharedFolderUid.Length != 0) { @@ -1830,6 +2722,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SharedFolderFolderFields other) { if (other == null) { return; @@ -1841,10 +2734,18 @@ public void MergeFrom(SharedFolderFolderFields other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1854,27 +2755,60 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class FolderRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FolderRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FolderRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[9]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FolderRequest() { OnConstruction(); } @@ -1882,6 +2816,7 @@ public FolderRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FolderRequest(FolderRequest other) : this() { folderUid_ = other.folderUid_; folderType_ = other.folderType_; @@ -1894,6 +2829,7 @@ public FolderRequest(FolderRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FolderRequest Clone() { return new FolderRequest(this); } @@ -1902,6 +2838,7 @@ public FolderRequest Clone() { public const int FolderUidFieldNumber = 1; private pb::ByteString folderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString FolderUid { get { return folderUid_; } set { @@ -1913,6 +2850,7 @@ public FolderRequest Clone() { public const int FolderTypeFieldNumber = 2; private global::Folder.FolderType folderType_ = global::Folder.FolderType.DefaultFolder; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Folder.FolderType FolderType { get { return folderType_; } set { @@ -1924,6 +2862,7 @@ public FolderRequest Clone() { public const int ParentFolderUidFieldNumber = 3; private pb::ByteString parentFolderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString ParentFolderUid { get { return parentFolderUid_; } set { @@ -1935,6 +2874,7 @@ public FolderRequest Clone() { public const int FolderDataFieldNumber = 4; private pb::ByteString folderData_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString FolderData { get { return folderData_; } set { @@ -1946,6 +2886,7 @@ public FolderRequest Clone() { public const int EncryptedFolderKeyFieldNumber = 5; private pb::ByteString encryptedFolderKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedFolderKey { get { return encryptedFolderKey_; } set { @@ -1957,6 +2898,7 @@ public FolderRequest Clone() { public const int SharedFolderFieldsFieldNumber = 6; private global::Folder.SharedFolderFields sharedFolderFields_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Folder.SharedFolderFields SharedFolderFields { get { return sharedFolderFields_; } set { @@ -1968,6 +2910,7 @@ public FolderRequest Clone() { public const int SharedFolderFolderFieldsFieldNumber = 7; private global::Folder.SharedFolderFolderFields sharedFolderFolderFields_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Folder.SharedFolderFolderFields SharedFolderFolderFields { get { return sharedFolderFolderFields_; } set { @@ -1976,11 +2919,13 @@ public FolderRequest Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FolderRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FolderRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -1999,6 +2944,7 @@ public bool Equals(FolderRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); @@ -2015,12 +2961,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (FolderUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(FolderUid); @@ -2052,45 +3003,86 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (FolderUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + output.WriteRawTag(10); + output.WriteBytes(FolderUid); } if (FolderType != global::Folder.FolderType.DefaultFolder) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FolderType); + output.WriteRawTag(16); + output.WriteEnum((int) FolderType); } if (ParentFolderUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(ParentFolderUid); + output.WriteRawTag(26); + output.WriteBytes(ParentFolderUid); } if (FolderData.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderData); + output.WriteRawTag(34); + output.WriteBytes(FolderData); } if (EncryptedFolderKey.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedFolderKey); + output.WriteRawTag(42); + output.WriteBytes(EncryptedFolderKey); } if (sharedFolderFields_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(SharedFolderFields); + output.WriteRawTag(50); + output.WriteMessage(SharedFolderFields); } if (sharedFolderFolderFields_ != null) { - size += 1 + pb::CodedOutputStream.ComputeMessageSize(SharedFolderFolderFields); + output.WriteRawTag(58); + output.WriteMessage(SharedFolderFolderFields); } if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + _unknownFields.WriteTo(ref output); } - return size; } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(FolderRequest other) { - if (other == null) { - return; - } - if (other.FolderUid.Length != 0) { - FolderUid = other.FolderUid; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (FolderType != global::Folder.FolderType.DefaultFolder) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FolderType); + } + if (ParentFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ParentFolderUid); + } + if (FolderData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderData); + } + if (EncryptedFolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedFolderKey); + } + if (sharedFolderFields_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SharedFolderFields); + } + if (sharedFolderFolderFields_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(SharedFolderFolderFields); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FolderRequest other) { + if (other == null) { + return; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; } if (other.FolderType != global::Folder.FolderType.DefaultFolder) { FolderType = other.FolderType; @@ -2120,10 +3112,18 @@ public void MergeFrom(FolderRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2163,27 +3163,90 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 16: { + FolderType = (global::Folder.FolderType) input.ReadEnum(); + break; + } + case 26: { + ParentFolderUid = input.ReadBytes(); + break; + } + case 34: { + FolderData = input.ReadBytes(); + break; + } + case 42: { + EncryptedFolderKey = input.ReadBytes(); + break; + } + case 50: { + if (sharedFolderFields_ == null) { + SharedFolderFields = new global::Folder.SharedFolderFields(); + } + input.ReadMessage(SharedFolderFields); + break; + } + case 58: { + if (sharedFolderFolderFields_ == null) { + SharedFolderFolderFields = new global::Folder.SharedFolderFolderFields(); + } + input.ReadMessage(SharedFolderFolderFields); + break; + } + } + } } + #endif } - public sealed partial class FolderResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FolderResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FolderResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FolderResponse() { OnConstruction(); } @@ -2191,6 +3254,7 @@ public FolderResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FolderResponse(FolderResponse other) : this() { folderUid_ = other.folderUid_; revision_ = other.revision_; @@ -2199,6 +3263,7 @@ public FolderResponse(FolderResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public FolderResponse Clone() { return new FolderResponse(this); } @@ -2207,6 +3272,7 @@ public FolderResponse Clone() { public const int FolderUidFieldNumber = 1; private pb::ByteString folderUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString FolderUid { get { return folderUid_; } set { @@ -2218,6 +3284,7 @@ public FolderResponse Clone() { public const int RevisionFieldNumber = 2; private long revision_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long Revision { get { return revision_; } set { @@ -2229,6 +3296,7 @@ public long Revision { public const int StatusFieldNumber = 3; private string status_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Status { get { return status_; } set { @@ -2237,11 +3305,13 @@ public string Status { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as FolderResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(FolderResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -2256,6 +3326,7 @@ public bool Equals(FolderResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); @@ -2268,12 +3339,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (FolderUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(FolderUid); @@ -2289,9 +3365,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (FolderUid.Length != 0) { @@ -2310,6 +3410,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(FolderResponse other) { if (other == null) { return; @@ -2327,10 +3428,18 @@ public void MergeFrom(FolderResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2348,27 +3457,68 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class ImportFolderRecordRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ImportFolderRecordRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ImportFolderRecordRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImportFolderRecordRequest() { OnConstruction(); } @@ -2376,6 +3526,7 @@ public ImportFolderRecordRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImportFolderRecordRequest(ImportFolderRecordRequest other) : this() { folderRequest_ = other.folderRequest_.Clone(); recordRequest_ = other.recordRequest_.Clone(); @@ -2383,6 +3534,7 @@ public ImportFolderRecordRequest(ImportFolderRecordRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImportFolderRecordRequest Clone() { return new ImportFolderRecordRequest(this); } @@ -2393,6 +3545,7 @@ public ImportFolderRecordRequest Clone() { = pb::FieldCodec.ForMessage(10, global::Folder.FolderRequest.Parser); private readonly pbc::RepeatedField folderRequest_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField FolderRequest { get { return folderRequest_; } } @@ -2403,16 +3556,19 @@ public ImportFolderRecordRequest Clone() { = pb::FieldCodec.ForMessage(18, global::Folder.RecordRequest.Parser); private readonly pbc::RepeatedField recordRequest_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField RecordRequest { get { return recordRequest_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ImportFolderRecordRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ImportFolderRecordRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2426,6 +3582,7 @@ public bool Equals(ImportFolderRecordRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= folderRequest_.GetHashCode(); @@ -2437,20 +3594,39 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else folderRequest_.WriteTo(output, _repeated_folderRequest_codec); recordRequest_.WriteTo(output, _repeated_recordRequest_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + folderRequest_.WriteTo(ref output, _repeated_folderRequest_codec); + recordRequest_.WriteTo(ref output, _repeated_recordRequest_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += folderRequest_.CalculateSize(_repeated_folderRequest_codec); @@ -2462,6 +3638,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ImportFolderRecordRequest other) { if (other == null) { return; @@ -2472,10 +3649,18 @@ public void MergeFrom(ImportFolderRecordRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2489,27 +3674,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + folderRequest_.AddEntriesFrom(ref input, _repeated_folderRequest_codec); + break; + } + case 18: { + recordRequest_.AddEntriesFrom(ref input, _repeated_recordRequest_codec); + break; + } + } + } } + #endif } - public sealed partial class ImportFolderRecordResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ImportFolderRecordResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ImportFolderRecordResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Folder.FolderReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImportFolderRecordResponse() { OnConstruction(); } @@ -2517,6 +3739,7 @@ public ImportFolderRecordResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImportFolderRecordResponse(ImportFolderRecordResponse other) : this() { folderResponse_ = other.folderResponse_.Clone(); recordResponse_ = other.recordResponse_.Clone(); @@ -2524,6 +3747,7 @@ public ImportFolderRecordResponse(ImportFolderRecordResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ImportFolderRecordResponse Clone() { return new ImportFolderRecordResponse(this); } @@ -2534,6 +3758,7 @@ public ImportFolderRecordResponse Clone() { = pb::FieldCodec.ForMessage(10, global::Folder.FolderResponse.Parser); private readonly pbc::RepeatedField folderResponse_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField FolderResponse { get { return folderResponse_; } } @@ -2544,16 +3769,19 @@ public ImportFolderRecordResponse Clone() { = pb::FieldCodec.ForMessage(18, global::Folder.RecordResponse.Parser); private readonly pbc::RepeatedField recordResponse_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField RecordResponse { get { return recordResponse_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ImportFolderRecordResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ImportFolderRecordResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -2567,6 +3795,7 @@ public bool Equals(ImportFolderRecordResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= folderResponse_.GetHashCode(); @@ -2578,20 +3807,39 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else folderResponse_.WriteTo(output, _repeated_folderResponse_codec); recordResponse_.WriteTo(output, _repeated_recordResponse_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + folderResponse_.WriteTo(ref output, _repeated_folderResponse_codec); + recordResponse_.WriteTo(ref output, _repeated_recordResponse_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += folderResponse_.CalculateSize(_repeated_folderResponse_codec); @@ -2603,6 +3851,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ImportFolderRecordResponse other) { if (other == null) { return; @@ -2613,10 +3862,18 @@ public void MergeFrom(ImportFolderRecordResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2630,7 +3887,5935 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + folderResponse_.AddEntriesFrom(ref input, _repeated_folderResponse_codec); + break; + } + case 18: { + recordResponse_.AddEntriesFrom(ref input, _repeated_recordResponse_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateRecord(SharedFolderUpdateRecord other) : this() { + recordUid_ = other.recordUid_; + sharedFolderUid_ = other.sharedFolderUid_; + teamUid_ = other.teamUid_; + canEdit_ = other.canEdit_; + canShare_ = other.canShare_; + encryptedRecordKey_ = other.encryptedRecordKey_; + revision_ = other.revision_; + expiration_ = other.expiration_; + timerNotificationType_ = other.timerNotificationType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateRecord Clone() { + return new SharedFolderUpdateRecord(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 2; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + /// + ///Only used when adding a record, or updating the permission to a record + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 3; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + /// + ///Only used when adding a record, or updating the permission to a record + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "canEdit" field. + public const int CanEditFieldNumber = 4; + private global::Folder.SetBooleanValue canEdit_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue CanEdit { + get { return canEdit_; } + set { + canEdit_ = value; + } + } + + /// Field number for the "canShare" field. + public const int CanShareFieldNumber = 5; + private global::Folder.SetBooleanValue canShare_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue CanShare { + get { return canShare_; } + set { + canShare_ = value; + } + } + + /// Field number for the "encryptedRecordKey" field. + public const int EncryptedRecordKeyFieldNumber = 6; + private pb::ByteString encryptedRecordKey_ = pb::ByteString.Empty; + /// + /// record key encrypted with the shared folder key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedRecordKey { + get { return encryptedRecordKey_; } + set { + encryptedRecordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 7; + private int revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 8; + private long expiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 9; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if (TeamUid != other.TeamUid) return false; + if (CanEdit != other.CanEdit) return false; + if (CanShare != other.CanShare) return false; + if (EncryptedRecordKey != other.EncryptedRecordKey) return false; + if (Revision != other.Revision) return false; + if (Expiration != other.Expiration) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (CanEdit != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= CanEdit.GetHashCode(); + if (CanShare != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= CanShare.GetHashCode(); + if (EncryptedRecordKey.Length != 0) hash ^= EncryptedRecordKey.GetHashCode(); + if (Revision != 0) hash ^= Revision.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TeamUid); + } + if (CanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(32); + output.WriteEnum((int) CanEdit); + } + if (CanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(40); + output.WriteEnum((int) CanShare); + } + if (EncryptedRecordKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedRecordKey); + } + if (Revision != 0) { + output.WriteRawTag(56); + output.WriteInt32(Revision); + } + if (Expiration != 0L) { + output.WriteRawTag(64); + output.WriteSInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(72); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TeamUid); + } + if (CanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(32); + output.WriteEnum((int) CanEdit); + } + if (CanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(40); + output.WriteEnum((int) CanShare); + } + if (EncryptedRecordKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(EncryptedRecordKey); + } + if (Revision != 0) { + output.WriteRawTag(56); + output.WriteInt32(Revision); + } + if (Expiration != 0L) { + output.WriteRawTag(64); + output.WriteSInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(72); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (CanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CanEdit); + } + if (CanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) CanShare); + } + if (EncryptedRecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedRecordKey); + } + if (Revision != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Revision); + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeSInt64Size(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateRecord other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.CanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + CanEdit = other.CanEdit; + } + if (other.CanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + CanShare = other.CanShare; + } + if (other.EncryptedRecordKey.Length != 0) { + EncryptedRecordKey = other.EncryptedRecordKey; + } + if (other.Revision != 0) { + Revision = other.Revision; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 26: { + TeamUid = input.ReadBytes(); + break; + } + case 32: { + CanEdit = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 40: { + CanShare = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 50: { + EncryptedRecordKey = input.ReadBytes(); + break; + } + case 56: { + Revision = input.ReadInt32(); + break; + } + case 64: { + Expiration = input.ReadSInt64(); + break; + } + case 72: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 26: { + TeamUid = input.ReadBytes(); + break; + } + case 32: { + CanEdit = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 40: { + CanShare = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 50: { + EncryptedRecordKey = input.ReadBytes(); + break; + } + case 56: { + Revision = input.ReadInt32(); + break; + } + case 64: { + Expiration = input.ReadSInt64(); + break; + } + case 72: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateUser(SharedFolderUpdateUser other) : this() { + username_ = other.username_; + manageUsers_ = other.manageUsers_; + manageRecords_ = other.manageRecords_; + sharedFolderKey_ = other.sharedFolderKey_; + expiration_ = other.expiration_; + timerNotificationType_ = other.timerNotificationType_; + typedSharedFolderKey_ = other.typedSharedFolderKey_ != null ? other.typedSharedFolderKey_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateUser Clone() { + return new SharedFolderUpdateUser(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "manageUsers" field. + public const int ManageUsersFieldNumber = 2; + private global::Folder.SetBooleanValue manageUsers_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue ManageUsers { + get { return manageUsers_; } + set { + manageUsers_ = value; + } + } + + /// Field number for the "manageRecords" field. + public const int ManageRecordsFieldNumber = 3; + private global::Folder.SetBooleanValue manageRecords_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue ManageRecords { + get { return manageRecords_; } + set { + manageRecords_ = value; + } + } + + /// Field number for the "sharedFolderKey" field. + public const int SharedFolderKeyFieldNumber = 4; + private pb::ByteString sharedFolderKey_ = pb::ByteString.Empty; + /// + /// shared folder AES key encrypted with user's "key" (for the caller, the user's data key, for a different user, the user's public key) - use typedSharedFolderKey instead + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderKey { + get { return sharedFolderKey_; } + set { + sharedFolderKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 5; + private long expiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 6; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + /// Field number for the "typedSharedFolderKey" field. + public const int TypedSharedFolderKeyFieldNumber = 7; + private global::Folder.EncryptedDataKey typedSharedFolderKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.EncryptedDataKey TypedSharedFolderKey { + get { return typedSharedFolderKey_; } + set { + typedSharedFolderKey_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (ManageUsers != other.ManageUsers) return false; + if (ManageRecords != other.ManageRecords) return false; + if (SharedFolderKey != other.SharedFolderKey) return false; + if (Expiration != other.Expiration) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + if (!object.Equals(TypedSharedFolderKey, other.TypedSharedFolderKey)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (ManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= ManageUsers.GetHashCode(); + if (ManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= ManageRecords.GetHashCode(); + if (SharedFolderKey.Length != 0) hash ^= SharedFolderKey.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (typedSharedFolderKey_ != null) hash ^= TypedSharedFolderKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (ManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(16); + output.WriteEnum((int) ManageUsers); + } + if (ManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(24); + output.WriteEnum((int) ManageRecords); + } + if (SharedFolderKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderKey); + } + if (Expiration != 0L) { + output.WriteRawTag(40); + output.WriteSInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(48); + output.WriteEnum((int) TimerNotificationType); + } + if (typedSharedFolderKey_ != null) { + output.WriteRawTag(58); + output.WriteMessage(TypedSharedFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (ManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(16); + output.WriteEnum((int) ManageUsers); + } + if (ManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(24); + output.WriteEnum((int) ManageRecords); + } + if (SharedFolderKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderKey); + } + if (Expiration != 0L) { + output.WriteRawTag(40); + output.WriteSInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(48); + output.WriteEnum((int) TimerNotificationType); + } + if (typedSharedFolderKey_ != null) { + output.WriteRawTag(58); + output.WriteMessage(TypedSharedFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (ManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ManageUsers); + } + if (ManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ManageRecords); + } + if (SharedFolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderKey); + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeSInt64Size(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (typedSharedFolderKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypedSharedFolderKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateUser other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.ManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + ManageUsers = other.ManageUsers; + } + if (other.ManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + ManageRecords = other.ManageRecords; + } + if (other.SharedFolderKey.Length != 0) { + SharedFolderKey = other.SharedFolderKey; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + if (other.typedSharedFolderKey_ != null) { + if (typedSharedFolderKey_ == null) { + TypedSharedFolderKey = new global::Folder.EncryptedDataKey(); + } + TypedSharedFolderKey.MergeFrom(other.TypedSharedFolderKey); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 16: { + ManageUsers = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 24: { + ManageRecords = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 34: { + SharedFolderKey = input.ReadBytes(); + break; + } + case 40: { + Expiration = input.ReadSInt64(); + break; + } + case 48: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + case 58: { + if (typedSharedFolderKey_ == null) { + TypedSharedFolderKey = new global::Folder.EncryptedDataKey(); + } + input.ReadMessage(TypedSharedFolderKey); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 16: { + ManageUsers = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 24: { + ManageRecords = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 34: { + SharedFolderKey = input.ReadBytes(); + break; + } + case 40: { + Expiration = input.ReadSInt64(); + break; + } + case 48: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + case 58: { + if (typedSharedFolderKey_ == null) { + TypedSharedFolderKey = new global::Folder.EncryptedDataKey(); + } + input.ReadMessage(TypedSharedFolderKey); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateTeam : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateTeam()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateTeam() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateTeam(SharedFolderUpdateTeam other) : this() { + teamUid_ = other.teamUid_; + manageUsers_ = other.manageUsers_; + manageRecords_ = other.manageRecords_; + sharedFolderKey_ = other.sharedFolderKey_; + expiration_ = other.expiration_; + timerNotificationType_ = other.timerNotificationType_; + typedSharedFolderKey_ = other.typedSharedFolderKey_ != null ? other.typedSharedFolderKey_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateTeam Clone() { + return new SharedFolderUpdateTeam(this); + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "manageUsers" field. + public const int ManageUsersFieldNumber = 2; + private bool manageUsers_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ManageUsers { + get { return manageUsers_; } + set { + manageUsers_ = value; + } + } + + /// Field number for the "manageRecords" field. + public const int ManageRecordsFieldNumber = 3; + private bool manageRecords_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ManageRecords { + get { return manageRecords_; } + set { + manageRecords_ = value; + } + } + + /// Field number for the "sharedFolderKey" field. + public const int SharedFolderKeyFieldNumber = 4; + private pb::ByteString sharedFolderKey_ = pb::ByteString.Empty; + /// + /// shared folder AES key encrypted with the team key retrieved from team_get_keys, for team member, which is team key; for a non member, the team's public key - use typedSharedFolderKey instead + /// + [global::System.ObsoleteAttribute] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderKey { + get { return sharedFolderKey_; } + set { + sharedFolderKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 5; + private long expiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 6; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + /// Field number for the "typedSharedFolderKey" field. + public const int TypedSharedFolderKeyFieldNumber = 7; + private global::Folder.EncryptedDataKey typedSharedFolderKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.EncryptedDataKey TypedSharedFolderKey { + get { return typedSharedFolderKey_; } + set { + typedSharedFolderKey_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateTeam); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateTeam other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if (ManageUsers != other.ManageUsers) return false; + if (ManageRecords != other.ManageRecords) return false; + if (SharedFolderKey != other.SharedFolderKey) return false; + if (Expiration != other.Expiration) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + if (!object.Equals(TypedSharedFolderKey, other.TypedSharedFolderKey)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (ManageUsers != false) hash ^= ManageUsers.GetHashCode(); + if (ManageRecords != false) hash ^= ManageRecords.GetHashCode(); + if (SharedFolderKey.Length != 0) hash ^= SharedFolderKey.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (typedSharedFolderKey_ != null) hash ^= TypedSharedFolderKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (ManageUsers != false) { + output.WriteRawTag(16); + output.WriteBool(ManageUsers); + } + if (ManageRecords != false) { + output.WriteRawTag(24); + output.WriteBool(ManageRecords); + } + if (SharedFolderKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderKey); + } + if (Expiration != 0L) { + output.WriteRawTag(40); + output.WriteSInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(48); + output.WriteEnum((int) TimerNotificationType); + } + if (typedSharedFolderKey_ != null) { + output.WriteRawTag(58); + output.WriteMessage(TypedSharedFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (ManageUsers != false) { + output.WriteRawTag(16); + output.WriteBool(ManageUsers); + } + if (ManageRecords != false) { + output.WriteRawTag(24); + output.WriteBool(ManageRecords); + } + if (SharedFolderKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderKey); + } + if (Expiration != 0L) { + output.WriteRawTag(40); + output.WriteSInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(48); + output.WriteEnum((int) TimerNotificationType); + } + if (typedSharedFolderKey_ != null) { + output.WriteRawTag(58); + output.WriteMessage(TypedSharedFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (ManageUsers != false) { + size += 1 + 1; + } + if (ManageRecords != false) { + size += 1 + 1; + } + if (SharedFolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderKey); + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeSInt64Size(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (typedSharedFolderKey_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(TypedSharedFolderKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateTeam other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.ManageUsers != false) { + ManageUsers = other.ManageUsers; + } + if (other.ManageRecords != false) { + ManageRecords = other.ManageRecords; + } + if (other.SharedFolderKey.Length != 0) { + SharedFolderKey = other.SharedFolderKey; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + if (other.typedSharedFolderKey_ != null) { + if (typedSharedFolderKey_ == null) { + TypedSharedFolderKey = new global::Folder.EncryptedDataKey(); + } + TypedSharedFolderKey.MergeFrom(other.TypedSharedFolderKey); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 16: { + ManageUsers = input.ReadBool(); + break; + } + case 24: { + ManageRecords = input.ReadBool(); + break; + } + case 34: { + SharedFolderKey = input.ReadBytes(); + break; + } + case 40: { + Expiration = input.ReadSInt64(); + break; + } + case 48: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + case 58: { + if (typedSharedFolderKey_ == null) { + TypedSharedFolderKey = new global::Folder.EncryptedDataKey(); + } + input.ReadMessage(TypedSharedFolderKey); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 16: { + ManageUsers = input.ReadBool(); + break; + } + case 24: { + ManageRecords = input.ReadBool(); + break; + } + case 34: { + SharedFolderKey = input.ReadBytes(); + break; + } + case 40: { + Expiration = input.ReadSInt64(); + break; + } + case 48: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + case 58: { + if (typedSharedFolderKey_ == null) { + TypedSharedFolderKey = new global::Folder.EncryptedDataKey(); + } + input.ReadMessage(TypedSharedFolderKey); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateV3Request : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateV3Request()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3Request() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3Request(SharedFolderUpdateV3Request other) : this() { + sharedFolderUpdateOperationDontUse_ = other.sharedFolderUpdateOperationDontUse_; + sharedFolderUid_ = other.sharedFolderUid_; + encryptedSharedFolderName_ = other.encryptedSharedFolderName_; + revision_ = other.revision_; + forceUpdate_ = other.forceUpdate_; + fromTeamUid_ = other.fromTeamUid_; + defaultManageUsers_ = other.defaultManageUsers_; + defaultManageRecords_ = other.defaultManageRecords_; + defaultCanEdit_ = other.defaultCanEdit_; + defaultCanShare_ = other.defaultCanShare_; + sharedFolderAddRecord_ = other.sharedFolderAddRecord_.Clone(); + sharedFolderAddUser_ = other.sharedFolderAddUser_.Clone(); + sharedFolderAddTeam_ = other.sharedFolderAddTeam_.Clone(); + sharedFolderUpdateRecord_ = other.sharedFolderUpdateRecord_.Clone(); + sharedFolderUpdateUser_ = other.sharedFolderUpdateUser_.Clone(); + sharedFolderUpdateTeam_ = other.sharedFolderUpdateTeam_.Clone(); + sharedFolderRemoveRecord_ = other.sharedFolderRemoveRecord_.Clone(); + sharedFolderRemoveUser_ = other.sharedFolderRemoveUser_.Clone(); + sharedFolderRemoveTeam_ = other.sharedFolderRemoveTeam_.Clone(); + sharedFolderOwner_ = other.sharedFolderOwner_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3Request Clone() { + return new SharedFolderUpdateV3Request(this); + } + + /// Field number for the "sharedFolderUpdateOperation_dont_use" field. + public const int SharedFolderUpdateOperationDontUseFieldNumber = 1; + private int sharedFolderUpdateOperationDontUse_; + /// + /// obsolete field. we only use this request for shared folder update now. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SharedFolderUpdateOperationDontUse { + get { return sharedFolderUpdateOperationDontUse_; } + set { + sharedFolderUpdateOperationDontUse_ = value; + } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 2; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + /// + /// required + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedSharedFolderName" field. + public const int EncryptedSharedFolderNameFieldNumber = 3; + private pb::ByteString encryptedSharedFolderName_ = pb::ByteString.Empty; + /// + ///shared folder name encrypted with the shared folder key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString EncryptedSharedFolderName { + get { return encryptedSharedFolderName_; } + set { + encryptedSharedFolderName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 4; + private long revision_; + /// + /// clientSharedFolderRevision + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "forceUpdate" field. + public const int ForceUpdateFieldNumber = 5; + private bool forceUpdate_; + /// + /// true if the requestor does not want the revision to be validated for out of sync; either force_update must be true, or revision is required + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ForceUpdate { + get { return forceUpdate_; } + set { + forceUpdate_ = value; + } + } + + /// Field number for the "fromTeamUid" field. + public const int FromTeamUidFieldNumber = 6; + private pb::ByteString fromTeamUid_ = pb::ByteString.Empty; + /// + /// for update/delete only; this is the team that gives you the permission to perform the operations you are trying to perform + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FromTeamUid { + get { return fromTeamUid_; } + set { + fromTeamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "defaultManageUsers" field. + public const int DefaultManageUsersFieldNumber = 7; + private global::Folder.SetBooleanValue defaultManageUsers_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue DefaultManageUsers { + get { return defaultManageUsers_; } + set { + defaultManageUsers_ = value; + } + } + + /// Field number for the "defaultManageRecords" field. + public const int DefaultManageRecordsFieldNumber = 8; + private global::Folder.SetBooleanValue defaultManageRecords_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue DefaultManageRecords { + get { return defaultManageRecords_; } + set { + defaultManageRecords_ = value; + } + } + + /// Field number for the "defaultCanEdit" field. + public const int DefaultCanEditFieldNumber = 9; + private global::Folder.SetBooleanValue defaultCanEdit_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue DefaultCanEdit { + get { return defaultCanEdit_; } + set { + defaultCanEdit_ = value; + } + } + + /// Field number for the "defaultCanShare" field. + public const int DefaultCanShareFieldNumber = 10; + private global::Folder.SetBooleanValue defaultCanShare_ = global::Folder.SetBooleanValue.BooleanNoChange; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Folder.SetBooleanValue DefaultCanShare { + get { return defaultCanShare_; } + set { + defaultCanShare_ = value; + } + } + + /// Field number for the "sharedFolderAddRecord" field. + public const int SharedFolderAddRecordFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_sharedFolderAddRecord_codec + = pb::FieldCodec.ForMessage(90, global::Folder.SharedFolderUpdateRecord.Parser); + private readonly pbc::RepeatedField sharedFolderAddRecord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderAddRecord { + get { return sharedFolderAddRecord_; } + } + + /// Field number for the "sharedFolderAddUser" field. + public const int SharedFolderAddUserFieldNumber = 12; + private static readonly pb::FieldCodec _repeated_sharedFolderAddUser_codec + = pb::FieldCodec.ForMessage(98, global::Folder.SharedFolderUpdateUser.Parser); + private readonly pbc::RepeatedField sharedFolderAddUser_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderAddUser { + get { return sharedFolderAddUser_; } + } + + /// Field number for the "sharedFolderAddTeam" field. + public const int SharedFolderAddTeamFieldNumber = 13; + private static readonly pb::FieldCodec _repeated_sharedFolderAddTeam_codec + = pb::FieldCodec.ForMessage(106, global::Folder.SharedFolderUpdateTeam.Parser); + private readonly pbc::RepeatedField sharedFolderAddTeam_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderAddTeam { + get { return sharedFolderAddTeam_; } + } + + /// Field number for the "sharedFolderUpdateRecord" field. + public const int SharedFolderUpdateRecordFieldNumber = 14; + private static readonly pb::FieldCodec _repeated_sharedFolderUpdateRecord_codec + = pb::FieldCodec.ForMessage(114, global::Folder.SharedFolderUpdateRecord.Parser); + private readonly pbc::RepeatedField sharedFolderUpdateRecord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUpdateRecord { + get { return sharedFolderUpdateRecord_; } + } + + /// Field number for the "sharedFolderUpdateUser" field. + public const int SharedFolderUpdateUserFieldNumber = 15; + private static readonly pb::FieldCodec _repeated_sharedFolderUpdateUser_codec + = pb::FieldCodec.ForMessage(122, global::Folder.SharedFolderUpdateUser.Parser); + private readonly pbc::RepeatedField sharedFolderUpdateUser_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUpdateUser { + get { return sharedFolderUpdateUser_; } + } + + /// Field number for the "sharedFolderUpdateTeam" field. + public const int SharedFolderUpdateTeamFieldNumber = 16; + private static readonly pb::FieldCodec _repeated_sharedFolderUpdateTeam_codec + = pb::FieldCodec.ForMessage(130, global::Folder.SharedFolderUpdateTeam.Parser); + private readonly pbc::RepeatedField sharedFolderUpdateTeam_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUpdateTeam { + get { return sharedFolderUpdateTeam_; } + } + + /// Field number for the "sharedFolderRemoveRecord" field. + public const int SharedFolderRemoveRecordFieldNumber = 17; + private static readonly pb::FieldCodec _repeated_sharedFolderRemoveRecord_codec + = pb::FieldCodec.ForBytes(138); + private readonly pbc::RepeatedField sharedFolderRemoveRecord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRemoveRecord { + get { return sharedFolderRemoveRecord_; } + } + + /// Field number for the "sharedFolderRemoveUser" field. + public const int SharedFolderRemoveUserFieldNumber = 18; + private static readonly pb::FieldCodec _repeated_sharedFolderRemoveUser_codec + = pb::FieldCodec.ForString(146); + private readonly pbc::RepeatedField sharedFolderRemoveUser_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRemoveUser { + get { return sharedFolderRemoveUser_; } + } + + /// Field number for the "sharedFolderRemoveTeam" field. + public const int SharedFolderRemoveTeamFieldNumber = 19; + private static readonly pb::FieldCodec _repeated_sharedFolderRemoveTeam_codec + = pb::FieldCodec.ForBytes(154); + private readonly pbc::RepeatedField sharedFolderRemoveTeam_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRemoveTeam { + get { return sharedFolderRemoveTeam_; } + } + + /// Field number for the "sharedFolderOwner" field. + public const int SharedFolderOwnerFieldNumber = 20; + private string sharedFolderOwner_ = ""; + /// + /// should have a sharing relationship w/ the calling user; ""=No Change(default); "delete"=unset + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SharedFolderOwner { + get { return sharedFolderOwner_; } + set { + sharedFolderOwner_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateV3Request); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateV3Request other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SharedFolderUpdateOperationDontUse != other.SharedFolderUpdateOperationDontUse) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if (EncryptedSharedFolderName != other.EncryptedSharedFolderName) return false; + if (Revision != other.Revision) return false; + if (ForceUpdate != other.ForceUpdate) return false; + if (FromTeamUid != other.FromTeamUid) return false; + if (DefaultManageUsers != other.DefaultManageUsers) return false; + if (DefaultManageRecords != other.DefaultManageRecords) return false; + if (DefaultCanEdit != other.DefaultCanEdit) return false; + if (DefaultCanShare != other.DefaultCanShare) return false; + if(!sharedFolderAddRecord_.Equals(other.sharedFolderAddRecord_)) return false; + if(!sharedFolderAddUser_.Equals(other.sharedFolderAddUser_)) return false; + if(!sharedFolderAddTeam_.Equals(other.sharedFolderAddTeam_)) return false; + if(!sharedFolderUpdateRecord_.Equals(other.sharedFolderUpdateRecord_)) return false; + if(!sharedFolderUpdateUser_.Equals(other.sharedFolderUpdateUser_)) return false; + if(!sharedFolderUpdateTeam_.Equals(other.sharedFolderUpdateTeam_)) return false; + if(!sharedFolderRemoveRecord_.Equals(other.sharedFolderRemoveRecord_)) return false; + if(!sharedFolderRemoveUser_.Equals(other.sharedFolderRemoveUser_)) return false; + if(!sharedFolderRemoveTeam_.Equals(other.sharedFolderRemoveTeam_)) return false; + if (SharedFolderOwner != other.SharedFolderOwner) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SharedFolderUpdateOperationDontUse != 0) hash ^= SharedFolderUpdateOperationDontUse.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (EncryptedSharedFolderName.Length != 0) hash ^= EncryptedSharedFolderName.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (ForceUpdate != false) hash ^= ForceUpdate.GetHashCode(); + if (FromTeamUid.Length != 0) hash ^= FromTeamUid.GetHashCode(); + if (DefaultManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= DefaultManageUsers.GetHashCode(); + if (DefaultManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= DefaultManageRecords.GetHashCode(); + if (DefaultCanEdit != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= DefaultCanEdit.GetHashCode(); + if (DefaultCanShare != global::Folder.SetBooleanValue.BooleanNoChange) hash ^= DefaultCanShare.GetHashCode(); + hash ^= sharedFolderAddRecord_.GetHashCode(); + hash ^= sharedFolderAddUser_.GetHashCode(); + hash ^= sharedFolderAddTeam_.GetHashCode(); + hash ^= sharedFolderUpdateRecord_.GetHashCode(); + hash ^= sharedFolderUpdateUser_.GetHashCode(); + hash ^= sharedFolderUpdateTeam_.GetHashCode(); + hash ^= sharedFolderRemoveRecord_.GetHashCode(); + hash ^= sharedFolderRemoveUser_.GetHashCode(); + hash ^= sharedFolderRemoveTeam_.GetHashCode(); + if (SharedFolderOwner.Length != 0) hash ^= SharedFolderOwner.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUpdateOperationDontUse != 0) { + output.WriteRawTag(8); + output.WriteInt32(SharedFolderUpdateOperationDontUse); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (EncryptedSharedFolderName.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedSharedFolderName); + } + if (Revision != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Revision); + } + if (ForceUpdate != false) { + output.WriteRawTag(40); + output.WriteBool(ForceUpdate); + } + if (FromTeamUid.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(FromTeamUid); + } + if (DefaultManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(56); + output.WriteEnum((int) DefaultManageUsers); + } + if (DefaultManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(64); + output.WriteEnum((int) DefaultManageRecords); + } + if (DefaultCanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(72); + output.WriteEnum((int) DefaultCanEdit); + } + if (DefaultCanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(80); + output.WriteEnum((int) DefaultCanShare); + } + sharedFolderAddRecord_.WriteTo(output, _repeated_sharedFolderAddRecord_codec); + sharedFolderAddUser_.WriteTo(output, _repeated_sharedFolderAddUser_codec); + sharedFolderAddTeam_.WriteTo(output, _repeated_sharedFolderAddTeam_codec); + sharedFolderUpdateRecord_.WriteTo(output, _repeated_sharedFolderUpdateRecord_codec); + sharedFolderUpdateUser_.WriteTo(output, _repeated_sharedFolderUpdateUser_codec); + sharedFolderUpdateTeam_.WriteTo(output, _repeated_sharedFolderUpdateTeam_codec); + sharedFolderRemoveRecord_.WriteTo(output, _repeated_sharedFolderRemoveRecord_codec); + sharedFolderRemoveUser_.WriteTo(output, _repeated_sharedFolderRemoveUser_codec); + sharedFolderRemoveTeam_.WriteTo(output, _repeated_sharedFolderRemoveTeam_codec); + if (SharedFolderOwner.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(SharedFolderOwner); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUpdateOperationDontUse != 0) { + output.WriteRawTag(8); + output.WriteInt32(SharedFolderUpdateOperationDontUse); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (EncryptedSharedFolderName.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(EncryptedSharedFolderName); + } + if (Revision != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Revision); + } + if (ForceUpdate != false) { + output.WriteRawTag(40); + output.WriteBool(ForceUpdate); + } + if (FromTeamUid.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(FromTeamUid); + } + if (DefaultManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(56); + output.WriteEnum((int) DefaultManageUsers); + } + if (DefaultManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(64); + output.WriteEnum((int) DefaultManageRecords); + } + if (DefaultCanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(72); + output.WriteEnum((int) DefaultCanEdit); + } + if (DefaultCanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + output.WriteRawTag(80); + output.WriteEnum((int) DefaultCanShare); + } + sharedFolderAddRecord_.WriteTo(ref output, _repeated_sharedFolderAddRecord_codec); + sharedFolderAddUser_.WriteTo(ref output, _repeated_sharedFolderAddUser_codec); + sharedFolderAddTeam_.WriteTo(ref output, _repeated_sharedFolderAddTeam_codec); + sharedFolderUpdateRecord_.WriteTo(ref output, _repeated_sharedFolderUpdateRecord_codec); + sharedFolderUpdateUser_.WriteTo(ref output, _repeated_sharedFolderUpdateUser_codec); + sharedFolderUpdateTeam_.WriteTo(ref output, _repeated_sharedFolderUpdateTeam_codec); + sharedFolderRemoveRecord_.WriteTo(ref output, _repeated_sharedFolderRemoveRecord_codec); + sharedFolderRemoveUser_.WriteTo(ref output, _repeated_sharedFolderRemoveUser_codec); + sharedFolderRemoveTeam_.WriteTo(ref output, _repeated_sharedFolderRemoveTeam_codec); + if (SharedFolderOwner.Length != 0) { + output.WriteRawTag(162, 1); + output.WriteString(SharedFolderOwner); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SharedFolderUpdateOperationDontUse != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SharedFolderUpdateOperationDontUse); + } + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (EncryptedSharedFolderName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSharedFolderName); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (ForceUpdate != false) { + size += 1 + 1; + } + if (FromTeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FromTeamUid); + } + if (DefaultManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultManageUsers); + } + if (DefaultManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultManageRecords); + } + if (DefaultCanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultCanEdit); + } + if (DefaultCanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) DefaultCanShare); + } + size += sharedFolderAddRecord_.CalculateSize(_repeated_sharedFolderAddRecord_codec); + size += sharedFolderAddUser_.CalculateSize(_repeated_sharedFolderAddUser_codec); + size += sharedFolderAddTeam_.CalculateSize(_repeated_sharedFolderAddTeam_codec); + size += sharedFolderUpdateRecord_.CalculateSize(_repeated_sharedFolderUpdateRecord_codec); + size += sharedFolderUpdateUser_.CalculateSize(_repeated_sharedFolderUpdateUser_codec); + size += sharedFolderUpdateTeam_.CalculateSize(_repeated_sharedFolderUpdateTeam_codec); + size += sharedFolderRemoveRecord_.CalculateSize(_repeated_sharedFolderRemoveRecord_codec); + size += sharedFolderRemoveUser_.CalculateSize(_repeated_sharedFolderRemoveUser_codec); + size += sharedFolderRemoveTeam_.CalculateSize(_repeated_sharedFolderRemoveTeam_codec); + if (SharedFolderOwner.Length != 0) { + size += 2 + pb::CodedOutputStream.ComputeStringSize(SharedFolderOwner); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateV3Request other) { + if (other == null) { + return; + } + if (other.SharedFolderUpdateOperationDontUse != 0) { + SharedFolderUpdateOperationDontUse = other.SharedFolderUpdateOperationDontUse; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + if (other.EncryptedSharedFolderName.Length != 0) { + EncryptedSharedFolderName = other.EncryptedSharedFolderName; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.ForceUpdate != false) { + ForceUpdate = other.ForceUpdate; + } + if (other.FromTeamUid.Length != 0) { + FromTeamUid = other.FromTeamUid; + } + if (other.DefaultManageUsers != global::Folder.SetBooleanValue.BooleanNoChange) { + DefaultManageUsers = other.DefaultManageUsers; + } + if (other.DefaultManageRecords != global::Folder.SetBooleanValue.BooleanNoChange) { + DefaultManageRecords = other.DefaultManageRecords; + } + if (other.DefaultCanEdit != global::Folder.SetBooleanValue.BooleanNoChange) { + DefaultCanEdit = other.DefaultCanEdit; + } + if (other.DefaultCanShare != global::Folder.SetBooleanValue.BooleanNoChange) { + DefaultCanShare = other.DefaultCanShare; + } + sharedFolderAddRecord_.Add(other.sharedFolderAddRecord_); + sharedFolderAddUser_.Add(other.sharedFolderAddUser_); + sharedFolderAddTeam_.Add(other.sharedFolderAddTeam_); + sharedFolderUpdateRecord_.Add(other.sharedFolderUpdateRecord_); + sharedFolderUpdateUser_.Add(other.sharedFolderUpdateUser_); + sharedFolderUpdateTeam_.Add(other.sharedFolderUpdateTeam_); + sharedFolderRemoveRecord_.Add(other.sharedFolderRemoveRecord_); + sharedFolderRemoveUser_.Add(other.sharedFolderRemoveUser_); + sharedFolderRemoveTeam_.Add(other.sharedFolderRemoveTeam_); + if (other.SharedFolderOwner.Length != 0) { + SharedFolderOwner = other.SharedFolderOwner; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + SharedFolderUpdateOperationDontUse = input.ReadInt32(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 26: { + EncryptedSharedFolderName = input.ReadBytes(); + break; + } + case 32: { + Revision = input.ReadInt64(); + break; + } + case 40: { + ForceUpdate = input.ReadBool(); + break; + } + case 50: { + FromTeamUid = input.ReadBytes(); + break; + } + case 56: { + DefaultManageUsers = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 64: { + DefaultManageRecords = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 72: { + DefaultCanEdit = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 80: { + DefaultCanShare = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 90: { + sharedFolderAddRecord_.AddEntriesFrom(input, _repeated_sharedFolderAddRecord_codec); + break; + } + case 98: { + sharedFolderAddUser_.AddEntriesFrom(input, _repeated_sharedFolderAddUser_codec); + break; + } + case 106: { + sharedFolderAddTeam_.AddEntriesFrom(input, _repeated_sharedFolderAddTeam_codec); + break; + } + case 114: { + sharedFolderUpdateRecord_.AddEntriesFrom(input, _repeated_sharedFolderUpdateRecord_codec); + break; + } + case 122: { + sharedFolderUpdateUser_.AddEntriesFrom(input, _repeated_sharedFolderUpdateUser_codec); + break; + } + case 130: { + sharedFolderUpdateTeam_.AddEntriesFrom(input, _repeated_sharedFolderUpdateTeam_codec); + break; + } + case 138: { + sharedFolderRemoveRecord_.AddEntriesFrom(input, _repeated_sharedFolderRemoveRecord_codec); + break; + } + case 146: { + sharedFolderRemoveUser_.AddEntriesFrom(input, _repeated_sharedFolderRemoveUser_codec); + break; + } + case 154: { + sharedFolderRemoveTeam_.AddEntriesFrom(input, _repeated_sharedFolderRemoveTeam_codec); + break; + } + case 162: { + SharedFolderOwner = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SharedFolderUpdateOperationDontUse = input.ReadInt32(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 26: { + EncryptedSharedFolderName = input.ReadBytes(); + break; + } + case 32: { + Revision = input.ReadInt64(); + break; + } + case 40: { + ForceUpdate = input.ReadBool(); + break; + } + case 50: { + FromTeamUid = input.ReadBytes(); + break; + } + case 56: { + DefaultManageUsers = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 64: { + DefaultManageRecords = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 72: { + DefaultCanEdit = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 80: { + DefaultCanShare = (global::Folder.SetBooleanValue) input.ReadEnum(); + break; + } + case 90: { + sharedFolderAddRecord_.AddEntriesFrom(ref input, _repeated_sharedFolderAddRecord_codec); + break; + } + case 98: { + sharedFolderAddUser_.AddEntriesFrom(ref input, _repeated_sharedFolderAddUser_codec); + break; + } + case 106: { + sharedFolderAddTeam_.AddEntriesFrom(ref input, _repeated_sharedFolderAddTeam_codec); + break; + } + case 114: { + sharedFolderUpdateRecord_.AddEntriesFrom(ref input, _repeated_sharedFolderUpdateRecord_codec); + break; + } + case 122: { + sharedFolderUpdateUser_.AddEntriesFrom(ref input, _repeated_sharedFolderUpdateUser_codec); + break; + } + case 130: { + sharedFolderUpdateTeam_.AddEntriesFrom(ref input, _repeated_sharedFolderUpdateTeam_codec); + break; + } + case 138: { + sharedFolderRemoveRecord_.AddEntriesFrom(ref input, _repeated_sharedFolderRemoveRecord_codec); + break; + } + case 146: { + sharedFolderRemoveUser_.AddEntriesFrom(ref input, _repeated_sharedFolderRemoveUser_codec); + break; + } + case 154: { + sharedFolderRemoveTeam_.AddEntriesFrom(ref input, _repeated_sharedFolderRemoveTeam_codec); + break; + } + case 162: { + SharedFolderOwner = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateV3RequestV2 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateV3RequestV2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3RequestV2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3RequestV2(SharedFolderUpdateV3RequestV2 other) : this() { + sharedFoldersUpdateV3_ = other.sharedFoldersUpdateV3_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3RequestV2 Clone() { + return new SharedFolderUpdateV3RequestV2(this); + } + + /// Field number for the "sharedFoldersUpdateV3" field. + public const int SharedFoldersUpdateV3FieldNumber = 1; + private static readonly pb::FieldCodec _repeated_sharedFoldersUpdateV3_codec + = pb::FieldCodec.ForMessage(10, global::Folder.SharedFolderUpdateV3Request.Parser); + private readonly pbc::RepeatedField sharedFoldersUpdateV3_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFoldersUpdateV3 { + get { return sharedFoldersUpdateV3_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateV3RequestV2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateV3RequestV2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!sharedFoldersUpdateV3_.Equals(other.sharedFoldersUpdateV3_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= sharedFoldersUpdateV3_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + sharedFoldersUpdateV3_.WriteTo(output, _repeated_sharedFoldersUpdateV3_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFoldersUpdateV3_.WriteTo(ref output, _repeated_sharedFoldersUpdateV3_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += sharedFoldersUpdateV3_.CalculateSize(_repeated_sharedFoldersUpdateV3_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateV3RequestV2 other) { + if (other == null) { + return; + } + sharedFoldersUpdateV3_.Add(other.sharedFoldersUpdateV3_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + sharedFoldersUpdateV3_.AddEntriesFrom(input, _repeated_sharedFoldersUpdateV3_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFoldersUpdateV3_.AddEntriesFrom(ref input, _repeated_sharedFoldersUpdateV3_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateRecordStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateRecordStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateRecordStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateRecordStatus(SharedFolderUpdateRecordStatus other) : this() { + recordUid_ = other.recordUid_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateRecordStatus Clone() { + return new SharedFolderUpdateRecordStatus(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateRecordStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateRecordStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateRecordStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateUserStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateUserStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateUserStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateUserStatus(SharedFolderUpdateUserStatus other) : this() { + username_ = other.username_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateUserStatus Clone() { + return new SharedFolderUpdateUserStatus(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateUserStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateUserStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateUserStatus other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateTeamStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateTeamStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateTeamStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateTeamStatus(SharedFolderUpdateTeamStatus other) : this() { + teamUid_ = other.teamUid_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateTeamStatus Clone() { + return new SharedFolderUpdateTeamStatus(this); + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateTeamStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateTeamStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateTeamStatus other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateV3Response : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateV3Response()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3Response() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3Response(SharedFolderUpdateV3Response other) : this() { + revision_ = other.revision_; + sharedFolderAddRecordStatus_ = other.sharedFolderAddRecordStatus_.Clone(); + sharedFolderAddUserStatus_ = other.sharedFolderAddUserStatus_.Clone(); + sharedFolderAddTeamStatus_ = other.sharedFolderAddTeamStatus_.Clone(); + sharedFolderUpdateRecordStatus_ = other.sharedFolderUpdateRecordStatus_.Clone(); + sharedFolderUpdateUserStatus_ = other.sharedFolderUpdateUserStatus_.Clone(); + sharedFolderUpdateTeamStatus_ = other.sharedFolderUpdateTeamStatus_.Clone(); + sharedFolderRemoveRecordStatus_ = other.sharedFolderRemoveRecordStatus_.Clone(); + sharedFolderRemoveUserStatus_ = other.sharedFolderRemoveUserStatus_.Clone(); + sharedFolderRemoveTeamStatus_ = other.sharedFolderRemoveTeamStatus_.Clone(); + sharedFolderUid_ = other.sharedFolderUid_; + status_ = other.status_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3Response Clone() { + return new SharedFolderUpdateV3Response(this); + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 1; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "sharedFolderAddRecordStatus" field. + public const int SharedFolderAddRecordStatusFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_sharedFolderAddRecordStatus_codec + = pb::FieldCodec.ForMessage(18, global::Folder.SharedFolderUpdateRecordStatus.Parser); + private readonly pbc::RepeatedField sharedFolderAddRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderAddRecordStatus { + get { return sharedFolderAddRecordStatus_; } + } + + /// Field number for the "sharedFolderAddUserStatus" field. + public const int SharedFolderAddUserStatusFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_sharedFolderAddUserStatus_codec + = pb::FieldCodec.ForMessage(26, global::Folder.SharedFolderUpdateUserStatus.Parser); + private readonly pbc::RepeatedField sharedFolderAddUserStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderAddUserStatus { + get { return sharedFolderAddUserStatus_; } + } + + /// Field number for the "sharedFolderAddTeamStatus" field. + public const int SharedFolderAddTeamStatusFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_sharedFolderAddTeamStatus_codec + = pb::FieldCodec.ForMessage(34, global::Folder.SharedFolderUpdateTeamStatus.Parser); + private readonly pbc::RepeatedField sharedFolderAddTeamStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderAddTeamStatus { + get { return sharedFolderAddTeamStatus_; } + } + + /// Field number for the "sharedFolderUpdateRecordStatus" field. + public const int SharedFolderUpdateRecordStatusFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_sharedFolderUpdateRecordStatus_codec + = pb::FieldCodec.ForMessage(42, global::Folder.SharedFolderUpdateRecordStatus.Parser); + private readonly pbc::RepeatedField sharedFolderUpdateRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUpdateRecordStatus { + get { return sharedFolderUpdateRecordStatus_; } + } + + /// Field number for the "sharedFolderUpdateUserStatus" field. + public const int SharedFolderUpdateUserStatusFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_sharedFolderUpdateUserStatus_codec + = pb::FieldCodec.ForMessage(50, global::Folder.SharedFolderUpdateUserStatus.Parser); + private readonly pbc::RepeatedField sharedFolderUpdateUserStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUpdateUserStatus { + get { return sharedFolderUpdateUserStatus_; } + } + + /// Field number for the "sharedFolderUpdateTeamStatus" field. + public const int SharedFolderUpdateTeamStatusFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_sharedFolderUpdateTeamStatus_codec + = pb::FieldCodec.ForMessage(58, global::Folder.SharedFolderUpdateTeamStatus.Parser); + private readonly pbc::RepeatedField sharedFolderUpdateTeamStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderUpdateTeamStatus { + get { return sharedFolderUpdateTeamStatus_; } + } + + /// Field number for the "sharedFolderRemoveRecordStatus" field. + public const int SharedFolderRemoveRecordStatusFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_sharedFolderRemoveRecordStatus_codec + = pb::FieldCodec.ForMessage(66, global::Folder.SharedFolderUpdateRecordStatus.Parser); + private readonly pbc::RepeatedField sharedFolderRemoveRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRemoveRecordStatus { + get { return sharedFolderRemoveRecordStatus_; } + } + + /// Field number for the "sharedFolderRemoveUserStatus" field. + public const int SharedFolderRemoveUserStatusFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_sharedFolderRemoveUserStatus_codec + = pb::FieldCodec.ForMessage(74, global::Folder.SharedFolderUpdateUserStatus.Parser); + private readonly pbc::RepeatedField sharedFolderRemoveUserStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRemoveUserStatus { + get { return sharedFolderRemoveUserStatus_; } + } + + /// Field number for the "sharedFolderRemoveTeamStatus" field. + public const int SharedFolderRemoveTeamStatusFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_sharedFolderRemoveTeamStatus_codec + = pb::FieldCodec.ForMessage(82, global::Folder.SharedFolderUpdateTeamStatus.Parser); + private readonly pbc::RepeatedField sharedFolderRemoveTeamStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRemoveTeamStatus { + get { return sharedFolderRemoveTeamStatus_; } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 12; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 13; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateV3Response); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateV3Response other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Revision != other.Revision) return false; + if(!sharedFolderAddRecordStatus_.Equals(other.sharedFolderAddRecordStatus_)) return false; + if(!sharedFolderAddUserStatus_.Equals(other.sharedFolderAddUserStatus_)) return false; + if(!sharedFolderAddTeamStatus_.Equals(other.sharedFolderAddTeamStatus_)) return false; + if(!sharedFolderUpdateRecordStatus_.Equals(other.sharedFolderUpdateRecordStatus_)) return false; + if(!sharedFolderUpdateUserStatus_.Equals(other.sharedFolderUpdateUserStatus_)) return false; + if(!sharedFolderUpdateTeamStatus_.Equals(other.sharedFolderUpdateTeamStatus_)) return false; + if(!sharedFolderRemoveRecordStatus_.Equals(other.sharedFolderRemoveRecordStatus_)) return false; + if(!sharedFolderRemoveUserStatus_.Equals(other.sharedFolderRemoveUserStatus_)) return false; + if(!sharedFolderRemoveTeamStatus_.Equals(other.sharedFolderRemoveTeamStatus_)) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if (Status != other.Status) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Revision != 0L) hash ^= Revision.GetHashCode(); + hash ^= sharedFolderAddRecordStatus_.GetHashCode(); + hash ^= sharedFolderAddUserStatus_.GetHashCode(); + hash ^= sharedFolderAddTeamStatus_.GetHashCode(); + hash ^= sharedFolderUpdateRecordStatus_.GetHashCode(); + hash ^= sharedFolderUpdateUserStatus_.GetHashCode(); + hash ^= sharedFolderUpdateTeamStatus_.GetHashCode(); + hash ^= sharedFolderRemoveRecordStatus_.GetHashCode(); + hash ^= sharedFolderRemoveUserStatus_.GetHashCode(); + hash ^= sharedFolderRemoveTeamStatus_.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + sharedFolderAddRecordStatus_.WriteTo(output, _repeated_sharedFolderAddRecordStatus_codec); + sharedFolderAddUserStatus_.WriteTo(output, _repeated_sharedFolderAddUserStatus_codec); + sharedFolderAddTeamStatus_.WriteTo(output, _repeated_sharedFolderAddTeamStatus_codec); + sharedFolderUpdateRecordStatus_.WriteTo(output, _repeated_sharedFolderUpdateRecordStatus_codec); + sharedFolderUpdateUserStatus_.WriteTo(output, _repeated_sharedFolderUpdateUserStatus_codec); + sharedFolderUpdateTeamStatus_.WriteTo(output, _repeated_sharedFolderUpdateTeamStatus_codec); + sharedFolderRemoveRecordStatus_.WriteTo(output, _repeated_sharedFolderRemoveRecordStatus_codec); + sharedFolderRemoveUserStatus_.WriteTo(output, _repeated_sharedFolderRemoveUserStatus_codec); + sharedFolderRemoveTeamStatus_.WriteTo(output, _repeated_sharedFolderRemoveTeamStatus_codec); + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(SharedFolderUid); + } + if (Status.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + sharedFolderAddRecordStatus_.WriteTo(ref output, _repeated_sharedFolderAddRecordStatus_codec); + sharedFolderAddUserStatus_.WriteTo(ref output, _repeated_sharedFolderAddUserStatus_codec); + sharedFolderAddTeamStatus_.WriteTo(ref output, _repeated_sharedFolderAddTeamStatus_codec); + sharedFolderUpdateRecordStatus_.WriteTo(ref output, _repeated_sharedFolderUpdateRecordStatus_codec); + sharedFolderUpdateUserStatus_.WriteTo(ref output, _repeated_sharedFolderUpdateUserStatus_codec); + sharedFolderUpdateTeamStatus_.WriteTo(ref output, _repeated_sharedFolderUpdateTeamStatus_codec); + sharedFolderRemoveRecordStatus_.WriteTo(ref output, _repeated_sharedFolderRemoveRecordStatus_codec); + sharedFolderRemoveUserStatus_.WriteTo(ref output, _repeated_sharedFolderRemoveUserStatus_codec); + sharedFolderRemoveTeamStatus_.WriteTo(ref output, _repeated_sharedFolderRemoveTeamStatus_codec); + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(98); + output.WriteBytes(SharedFolderUid); + } + if (Status.Length != 0) { + output.WriteRawTag(106); + output.WriteString(Status); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + size += sharedFolderAddRecordStatus_.CalculateSize(_repeated_sharedFolderAddRecordStatus_codec); + size += sharedFolderAddUserStatus_.CalculateSize(_repeated_sharedFolderAddUserStatus_codec); + size += sharedFolderAddTeamStatus_.CalculateSize(_repeated_sharedFolderAddTeamStatus_codec); + size += sharedFolderUpdateRecordStatus_.CalculateSize(_repeated_sharedFolderUpdateRecordStatus_codec); + size += sharedFolderUpdateUserStatus_.CalculateSize(_repeated_sharedFolderUpdateUserStatus_codec); + size += sharedFolderUpdateTeamStatus_.CalculateSize(_repeated_sharedFolderUpdateTeamStatus_codec); + size += sharedFolderRemoveRecordStatus_.CalculateSize(_repeated_sharedFolderRemoveRecordStatus_codec); + size += sharedFolderRemoveUserStatus_.CalculateSize(_repeated_sharedFolderRemoveUserStatus_codec); + size += sharedFolderRemoveTeamStatus_.CalculateSize(_repeated_sharedFolderRemoveTeamStatus_codec); + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateV3Response other) { + if (other == null) { + return; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + sharedFolderAddRecordStatus_.Add(other.sharedFolderAddRecordStatus_); + sharedFolderAddUserStatus_.Add(other.sharedFolderAddUserStatus_); + sharedFolderAddTeamStatus_.Add(other.sharedFolderAddTeamStatus_); + sharedFolderUpdateRecordStatus_.Add(other.sharedFolderUpdateRecordStatus_); + sharedFolderUpdateUserStatus_.Add(other.sharedFolderUpdateUserStatus_); + sharedFolderUpdateTeamStatus_.Add(other.sharedFolderUpdateTeamStatus_); + sharedFolderRemoveRecordStatus_.Add(other.sharedFolderRemoveRecordStatus_); + sharedFolderRemoveUserStatus_.Add(other.sharedFolderRemoveUserStatus_); + sharedFolderRemoveTeamStatus_.Add(other.sharedFolderRemoveTeamStatus_); + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Revision = input.ReadInt64(); + break; + } + case 18: { + sharedFolderAddRecordStatus_.AddEntriesFrom(input, _repeated_sharedFolderAddRecordStatus_codec); + break; + } + case 26: { + sharedFolderAddUserStatus_.AddEntriesFrom(input, _repeated_sharedFolderAddUserStatus_codec); + break; + } + case 34: { + sharedFolderAddTeamStatus_.AddEntriesFrom(input, _repeated_sharedFolderAddTeamStatus_codec); + break; + } + case 42: { + sharedFolderUpdateRecordStatus_.AddEntriesFrom(input, _repeated_sharedFolderUpdateRecordStatus_codec); + break; + } + case 50: { + sharedFolderUpdateUserStatus_.AddEntriesFrom(input, _repeated_sharedFolderUpdateUserStatus_codec); + break; + } + case 58: { + sharedFolderUpdateTeamStatus_.AddEntriesFrom(input, _repeated_sharedFolderUpdateTeamStatus_codec); + break; + } + case 66: { + sharedFolderRemoveRecordStatus_.AddEntriesFrom(input, _repeated_sharedFolderRemoveRecordStatus_codec); + break; + } + case 74: { + sharedFolderRemoveUserStatus_.AddEntriesFrom(input, _repeated_sharedFolderRemoveUserStatus_codec); + break; + } + case 82: { + sharedFolderRemoveTeamStatus_.AddEntriesFrom(input, _repeated_sharedFolderRemoveTeamStatus_codec); + break; + } + case 98: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 106: { + Status = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Revision = input.ReadInt64(); + break; + } + case 18: { + sharedFolderAddRecordStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderAddRecordStatus_codec); + break; + } + case 26: { + sharedFolderAddUserStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderAddUserStatus_codec); + break; + } + case 34: { + sharedFolderAddTeamStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderAddTeamStatus_codec); + break; + } + case 42: { + sharedFolderUpdateRecordStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderUpdateRecordStatus_codec); + break; + } + case 50: { + sharedFolderUpdateUserStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderUpdateUserStatus_codec); + break; + } + case 58: { + sharedFolderUpdateTeamStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderUpdateTeamStatus_codec); + break; + } + case 66: { + sharedFolderRemoveRecordStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderRemoveRecordStatus_codec); + break; + } + case 74: { + sharedFolderRemoveUserStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderRemoveUserStatus_codec); + break; + } + case 82: { + sharedFolderRemoveTeamStatus_.AddEntriesFrom(ref input, _repeated_sharedFolderRemoveTeamStatus_codec); + break; + } + case 98: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 106: { + Status = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderUpdateV3ResponseV2 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderUpdateV3ResponseV2()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3ResponseV2() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3ResponseV2(SharedFolderUpdateV3ResponseV2 other) : this() { + sharedFoldersUpdateV3Response_ = other.sharedFoldersUpdateV3Response_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderUpdateV3ResponseV2 Clone() { + return new SharedFolderUpdateV3ResponseV2(this); + } + + /// Field number for the "sharedFoldersUpdateV3Response" field. + public const int SharedFoldersUpdateV3ResponseFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_sharedFoldersUpdateV3Response_codec + = pb::FieldCodec.ForMessage(10, global::Folder.SharedFolderUpdateV3Response.Parser); + private readonly pbc::RepeatedField sharedFoldersUpdateV3Response_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFoldersUpdateV3Response { + get { return sharedFoldersUpdateV3Response_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderUpdateV3ResponseV2); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderUpdateV3ResponseV2 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!sharedFoldersUpdateV3Response_.Equals(other.sharedFoldersUpdateV3Response_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= sharedFoldersUpdateV3Response_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + sharedFoldersUpdateV3Response_.WriteTo(output, _repeated_sharedFoldersUpdateV3Response_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFoldersUpdateV3Response_.WriteTo(ref output, _repeated_sharedFoldersUpdateV3Response_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += sharedFoldersUpdateV3Response_.CalculateSize(_repeated_sharedFoldersUpdateV3Response_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderUpdateV3ResponseV2 other) { + if (other == null) { + return; + } + sharedFoldersUpdateV3Response_.Add(other.sharedFoldersUpdateV3Response_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + sharedFoldersUpdateV3Response_.AddEntriesFrom(input, _repeated_sharedFoldersUpdateV3Response_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFoldersUpdateV3Response_.AddEntriesFrom(ref input, _repeated_sharedFoldersUpdateV3Response_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetDeletedSharedFoldersAndRecordsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetDeletedSharedFoldersAndRecordsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDeletedSharedFoldersAndRecordsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDeletedSharedFoldersAndRecordsResponse(GetDeletedSharedFoldersAndRecordsResponse other) : this() { + sharedFolders_ = other.sharedFolders_.Clone(); + sharedFolderRecords_ = other.sharedFolderRecords_.Clone(); + deletedRecordData_ = other.deletedRecordData_.Clone(); + usernames_ = other.usernames_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetDeletedSharedFoldersAndRecordsResponse Clone() { + return new GetDeletedSharedFoldersAndRecordsResponse(this); + } + + /// Field number for the "sharedFolders" field. + public const int SharedFoldersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_sharedFolders_codec + = pb::FieldCodec.ForMessage(10, global::Folder.DeletedSharedFolder.Parser); + private readonly pbc::RepeatedField sharedFolders_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolders { + get { return sharedFolders_; } + } + + /// Field number for the "sharedFolderRecords" field. + public const int SharedFolderRecordsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_sharedFolderRecords_codec + = pb::FieldCodec.ForMessage(18, global::Folder.DeletedSharedFolderRecord.Parser); + private readonly pbc::RepeatedField sharedFolderRecords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderRecords { + get { return sharedFolderRecords_; } + } + + /// Field number for the "deletedRecordData" field. + public const int DeletedRecordDataFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_deletedRecordData_codec + = pb::FieldCodec.ForMessage(26, global::Folder.DeletedRecordData.Parser); + private readonly pbc::RepeatedField deletedRecordData_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField DeletedRecordData { + get { return deletedRecordData_; } + } + + /// Field number for the "usernames" field. + public const int UsernamesFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_usernames_codec + = pb::FieldCodec.ForMessage(34, global::Folder.Username.Parser); + private readonly pbc::RepeatedField usernames_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Usernames { + get { return usernames_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetDeletedSharedFoldersAndRecordsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetDeletedSharedFoldersAndRecordsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!sharedFolders_.Equals(other.sharedFolders_)) return false; + if(!sharedFolderRecords_.Equals(other.sharedFolderRecords_)) return false; + if(!deletedRecordData_.Equals(other.deletedRecordData_)) return false; + if(!usernames_.Equals(other.usernames_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= sharedFolders_.GetHashCode(); + hash ^= sharedFolderRecords_.GetHashCode(); + hash ^= deletedRecordData_.GetHashCode(); + hash ^= usernames_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + sharedFolders_.WriteTo(output, _repeated_sharedFolders_codec); + sharedFolderRecords_.WriteTo(output, _repeated_sharedFolderRecords_codec); + deletedRecordData_.WriteTo(output, _repeated_deletedRecordData_codec); + usernames_.WriteTo(output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFolders_.WriteTo(ref output, _repeated_sharedFolders_codec); + sharedFolderRecords_.WriteTo(ref output, _repeated_sharedFolderRecords_codec); + deletedRecordData_.WriteTo(ref output, _repeated_deletedRecordData_codec); + usernames_.WriteTo(ref output, _repeated_usernames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += sharedFolders_.CalculateSize(_repeated_sharedFolders_codec); + size += sharedFolderRecords_.CalculateSize(_repeated_sharedFolderRecords_codec); + size += deletedRecordData_.CalculateSize(_repeated_deletedRecordData_codec); + size += usernames_.CalculateSize(_repeated_usernames_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetDeletedSharedFoldersAndRecordsResponse other) { + if (other == null) { + return; + } + sharedFolders_.Add(other.sharedFolders_); + sharedFolderRecords_.Add(other.sharedFolderRecords_); + deletedRecordData_.Add(other.deletedRecordData_); + usernames_.Add(other.usernames_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + sharedFolders_.AddEntriesFrom(input, _repeated_sharedFolders_codec); + break; + } + case 18: { + sharedFolderRecords_.AddEntriesFrom(input, _repeated_sharedFolderRecords_codec); + break; + } + case 26: { + deletedRecordData_.AddEntriesFrom(input, _repeated_deletedRecordData_codec); + break; + } + case 34: { + usernames_.AddEntriesFrom(input, _repeated_usernames_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFolders_.AddEntriesFrom(ref input, _repeated_sharedFolders_codec); + break; + } + case 18: { + sharedFolderRecords_.AddEntriesFrom(ref input, _repeated_sharedFolderRecords_codec); + break; + } + case 26: { + deletedRecordData_.AddEntriesFrom(ref input, _repeated_deletedRecordData_codec); + break; + } + case 34: { + usernames_.AddEntriesFrom(ref input, _repeated_usernames_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeletedSharedFolder : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeletedSharedFolder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[24]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedSharedFolder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedSharedFolder(DeletedSharedFolder other) : this() { + sharedFolderUid_ = other.sharedFolderUid_; + folderUid_ = other.folderUid_; + parentUid_ = other.parentUid_; + sharedFolderKey_ = other.sharedFolderKey_; + folderKeyType_ = other.folderKeyType_; + data_ = other.data_; + dateDeleted_ = other.dateDeleted_; + revision_ = other.revision_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedSharedFolder Clone() { + return new DeletedSharedFolder(this); + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 1; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "folderUid" field. + public const int FolderUidFieldNumber = 2; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "parentUid" field. + public const int ParentUidFieldNumber = 3; + private pb::ByteString parentUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString ParentUid { + get { return parentUid_; } + set { + parentUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sharedFolderKey" field. + public const int SharedFolderKeyFieldNumber = 4; + private pb::ByteString sharedFolderKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderKey { + get { return sharedFolderKey_; } + set { + sharedFolderKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "folderKeyType" field. + public const int FolderKeyTypeFieldNumber = 5; + private global::Records.RecordKeyType folderKeyType_ = global::Records.RecordKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordKeyType FolderKeyType { + get { return folderKeyType_; } + set { + folderKeyType_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 6; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dateDeleted" field. + public const int DateDeletedFieldNumber = 7; + private long dateDeleted_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DateDeleted { + get { return dateDeleted_; } + set { + dateDeleted_ = value; + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 8; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeletedSharedFolder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeletedSharedFolder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SharedFolderUid != other.SharedFolderUid) return false; + if (FolderUid != other.FolderUid) return false; + if (ParentUid != other.ParentUid) return false; + if (SharedFolderKey != other.SharedFolderKey) return false; + if (FolderKeyType != other.FolderKeyType) return false; + if (Data != other.Data) return false; + if (DateDeleted != other.DateDeleted) return false; + if (Revision != other.Revision) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + if (ParentUid.Length != 0) hash ^= ParentUid.GetHashCode(); + if (SharedFolderKey.Length != 0) hash ^= SharedFolderKey.GetHashCode(); + if (FolderKeyType != global::Records.RecordKeyType.NoKey) hash ^= FolderKeyType.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (DateDeleted != 0L) hash ^= DateDeleted.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + if (FolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(FolderUid); + } + if (ParentUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ParentUid); + } + if (SharedFolderKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderKey); + } + if (FolderKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) FolderKeyType); + } + if (Data.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(Data); + } + if (DateDeleted != 0L) { + output.WriteRawTag(56); + output.WriteInt64(DateDeleted); + } + if (Revision != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + if (FolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(FolderUid); + } + if (ParentUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(ParentUid); + } + if (SharedFolderKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderKey); + } + if (FolderKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) FolderKeyType); + } + if (Data.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(Data); + } + if (DateDeleted != 0L) { + output.WriteRawTag(56); + output.WriteInt64(DateDeleted); + } + if (Revision != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (ParentUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(ParentUid); + } + if (SharedFolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderKey); + } + if (FolderKeyType != global::Records.RecordKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FolderKeyType); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (DateDeleted != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DateDeleted); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeletedSharedFolder other) { + if (other == null) { + return; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + if (other.ParentUid.Length != 0) { + ParentUid = other.ParentUid; + } + if (other.SharedFolderKey.Length != 0) { + SharedFolderKey = other.SharedFolderKey; + } + if (other.FolderKeyType != global::Records.RecordKeyType.NoKey) { + FolderKeyType = other.FolderKeyType; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.DateDeleted != 0L) { + DateDeleted = other.DateDeleted; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 18: { + FolderUid = input.ReadBytes(); + break; + } + case 26: { + ParentUid = input.ReadBytes(); + break; + } + case 34: { + SharedFolderKey = input.ReadBytes(); + break; + } + case 40: { + FolderKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 50: { + Data = input.ReadBytes(); + break; + } + case 56: { + DateDeleted = input.ReadInt64(); + break; + } + case 64: { + Revision = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 18: { + FolderUid = input.ReadBytes(); + break; + } + case 26: { + ParentUid = input.ReadBytes(); + break; + } + case 34: { + SharedFolderKey = input.ReadBytes(); + break; + } + case 40: { + FolderKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 50: { + Data = input.ReadBytes(); + break; + } + case 56: { + DateDeleted = input.ReadInt64(); + break; + } + case 64: { + Revision = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeletedSharedFolderRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeletedSharedFolderRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[25]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedSharedFolderRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedSharedFolderRecord(DeletedSharedFolderRecord other) : this() { + folderUid_ = other.folderUid_; + recordUid_ = other.recordUid_; + sharedRecordKey_ = other.sharedRecordKey_; + dateDeleted_ = other.dateDeleted_; + revision_ = other.revision_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedSharedFolderRecord Clone() { + return new DeletedSharedFolderRecord(this); + } + + /// Field number for the "folderUid" field. + public const int FolderUidFieldNumber = 1; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sharedRecordKey" field. + public const int SharedRecordKeyFieldNumber = 3; + private pb::ByteString sharedRecordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedRecordKey { + get { return sharedRecordKey_; } + set { + sharedRecordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "dateDeleted" field. + public const int DateDeletedFieldNumber = 4; + private long dateDeleted_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DateDeleted { + get { return dateDeleted_; } + set { + dateDeleted_ = value; + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 5; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeletedSharedFolderRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeletedSharedFolderRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FolderUid != other.FolderUid) return false; + if (RecordUid != other.RecordUid) return false; + if (SharedRecordKey != other.SharedRecordKey) return false; + if (DateDeleted != other.DateDeleted) return false; + if (Revision != other.Revision) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (SharedRecordKey.Length != 0) hash ^= SharedRecordKey.GetHashCode(); + if (DateDeleted != 0L) hash ^= DateDeleted.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (SharedRecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SharedRecordKey); + } + if (DateDeleted != 0L) { + output.WriteRawTag(32); + output.WriteInt64(DateDeleted); + } + if (Revision != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (SharedRecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(SharedRecordKey); + } + if (DateDeleted != 0L) { + output.WriteRawTag(32); + output.WriteInt64(DateDeleted); + } + if (Revision != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (SharedRecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedRecordKey); + } + if (DateDeleted != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DateDeleted); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeletedSharedFolderRecord other) { + if (other == null) { + return; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.SharedRecordKey.Length != 0) { + SharedRecordKey = other.SharedRecordKey; + } + if (other.DateDeleted != 0L) { + DateDeleted = other.DateDeleted; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + SharedRecordKey = input.ReadBytes(); + break; + } + case 32: { + DateDeleted = input.ReadInt64(); + break; + } + case 40: { + Revision = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + SharedRecordKey = input.ReadBytes(); + break; + } + case 32: { + DateDeleted = input.ReadInt64(); + break; + } + case 40: { + Revision = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class DeletedRecordData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new DeletedRecordData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[26]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedRecordData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedRecordData(DeletedRecordData other) : this() { + recordUid_ = other.recordUid_; + ownerUid_ = other.ownerUid_; + revision_ = other.revision_; + clientModifiedTime_ = other.clientModifiedTime_; + data_ = other.data_; + version_ = other.version_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public DeletedRecordData Clone() { + return new DeletedRecordData(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ownerUid" field. + public const int OwnerUidFieldNumber = 2; + private pb::ByteString ownerUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString OwnerUid { + get { return ownerUid_; } + set { + ownerUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 3; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "clientModifiedTime" field. + public const int ClientModifiedTimeFieldNumber = 4; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 5; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 6; + private int version_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Version { + get { return version_; } + set { + version_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as DeletedRecordData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(DeletedRecordData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (OwnerUid != other.OwnerUid) return false; + if (Revision != other.Revision) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (Data != other.Data) return false; + if (Version != other.Version) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (OwnerUid.Length != 0) hash ^= OwnerUid.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (Version != 0) hash ^= Version.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (OwnerUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(OwnerUid); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ClientModifiedTime); + } + if (Data.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(Data); + } + if (Version != 0) { + output.WriteRawTag(48); + output.WriteInt32(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (OwnerUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(OwnerUid); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(32); + output.WriteInt64(ClientModifiedTime); + } + if (Data.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(Data); + } + if (Version != 0) { + output.WriteRawTag(48); + output.WriteInt32(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (OwnerUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(OwnerUid); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (Version != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(DeletedRecordData other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.OwnerUid.Length != 0) { + OwnerUid = other.OwnerUid; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.Version != 0) { + Version = other.Version; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + OwnerUid = input.ReadBytes(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 32: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 42: { + Data = input.ReadBytes(); + break; + } + case 48: { + Version = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + OwnerUid = input.ReadBytes(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 32: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 42: { + Data = input.ReadBytes(); + break; + } + case 48: { + Version = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Username : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Username()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[27]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Username() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Username(Username other) : this() { + accountUid_ = other.accountUid_; + username_ = other.username_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Username Clone() { + return new Username(this); + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 1; + private pb::ByteString accountUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AccountUid { + get { return accountUid_; } + set { + accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int Username_FieldNumber = 2; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username_ { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Username); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Username other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AccountUid != other.AccountUid) return false; + if (Username_ != other.Username_) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (Username_.Length != 0) hash ^= Username_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AccountUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AccountUid); + } + if (Username_.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AccountUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AccountUid); + } + if (Username_.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username_); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (Username_.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username_); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Username other) { + if (other == null) { + return; + } + if (other.AccountUid.Length != 0) { + AccountUid = other.AccountUid; + } + if (other.Username_.Length != 0) { + Username_ = other.Username_; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + AccountUid = input.ReadBytes(); + break; + } + case 18: { + Username_ = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AccountUid = input.ReadBytes(); + break; + } + case 18: { + Username_ = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RestoreDeletedSharedFoldersAndRecordsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RestoreDeletedSharedFoldersAndRecordsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[28]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RestoreDeletedSharedFoldersAndRecordsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RestoreDeletedSharedFoldersAndRecordsRequest(RestoreDeletedSharedFoldersAndRecordsRequest other) : this() { + folders_ = other.folders_.Clone(); + records_ = other.records_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RestoreDeletedSharedFoldersAndRecordsRequest Clone() { + return new RestoreDeletedSharedFoldersAndRecordsRequest(this); + } + + /// Field number for the "folders" field. + public const int FoldersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_folders_codec + = pb::FieldCodec.ForMessage(10, global::Folder.RestoreSharedObject.Parser); + private readonly pbc::RepeatedField folders_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Folders { + get { return folders_; } + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(18, global::Folder.RestoreSharedObject.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RestoreDeletedSharedFoldersAndRecordsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RestoreDeletedSharedFoldersAndRecordsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!folders_.Equals(other.folders_)) return false; + if(!records_.Equals(other.records_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= folders_.GetHashCode(); + hash ^= records_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + folders_.WriteTo(output, _repeated_folders_codec); + records_.WriteTo(output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + folders_.WriteTo(ref output, _repeated_folders_codec); + records_.WriteTo(ref output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += folders_.CalculateSize(_repeated_folders_codec); + size += records_.CalculateSize(_repeated_records_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RestoreDeletedSharedFoldersAndRecordsRequest other) { + if (other == null) { + return; + } + folders_.Add(other.folders_); + records_.Add(other.records_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + folders_.AddEntriesFrom(input, _repeated_folders_codec); + break; + } + case 18: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + folders_.AddEntriesFrom(ref input, _repeated_folders_codec); + break; + } + case 18: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RestoreSharedObject : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RestoreSharedObject()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Folder.FolderReflection.Descriptor.MessageTypes[29]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RestoreSharedObject() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RestoreSharedObject(RestoreSharedObject other) : this() { + folderUid_ = other.folderUid_; + recordUids_ = other.recordUids_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RestoreSharedObject Clone() { + return new RestoreSharedObject(this); + } + + /// Field number for the "folderUid" field. + public const int FolderUidFieldNumber = 1; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordUids" field. + public const int RecordUidsFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RestoreSharedObject); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RestoreSharedObject other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FolderUid != other.FolderUid) return false; + if(!recordUids_.Equals(other.recordUids_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + hash ^= recordUids_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + recordUids_.WriteTo(output, _repeated_recordUids_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + size += recordUids_.CalculateSize(_repeated_recordUids_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RestoreSharedObject other) { + if (other == null) { + return; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + recordUids_.Add(other.recordUids_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + } + } } + #endif } diff --git a/KeeperSdk/proto/Push.cs b/KeeperSdk/proto/Push.cs index 54f0800..ce66b48 100644 --- a/KeeperSdk/proto/Push.cs +++ b/KeeperSdk/proto/Push.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: push.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -105,23 +105,32 @@ public enum MessageType { /// /// KA registers login/logout /// - public sealed partial class UserRegistrationRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserRegistrationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserRegistrationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Push.PushReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UserRegistrationRequest() { OnConstruction(); } @@ -129,6 +138,7 @@ public UserRegistrationRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UserRegistrationRequest(UserRegistrationRequest other) : this() { messageSessionUid_ = other.messageSessionUid_; userId_ = other.userId_; @@ -137,6 +147,7 @@ public UserRegistrationRequest(UserRegistrationRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public UserRegistrationRequest Clone() { return new UserRegistrationRequest(this); } @@ -145,6 +156,7 @@ public UserRegistrationRequest Clone() { public const int MessageSessionUidFieldNumber = 1; private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString MessageSessionUid { get { return messageSessionUid_; } set { @@ -156,6 +168,7 @@ public UserRegistrationRequest Clone() { public const int UserIdFieldNumber = 2; private int userId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int UserId { get { return userId_; } set { @@ -167,6 +180,7 @@ public int UserId { public const int EnterpriseIdFieldNumber = 3; private int enterpriseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int EnterpriseId { get { return enterpriseId_; } set { @@ -175,11 +189,13 @@ public int EnterpriseId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as UserRegistrationRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(UserRegistrationRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -194,6 +210,7 @@ public bool Equals(UserRegistrationRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); @@ -206,12 +223,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MessageSessionUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(MessageSessionUid); @@ -227,9 +249,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (UserId != 0) { + output.WriteRawTag(16); + output.WriteInt32(UserId); + } + if (EnterpriseId != 0) { + output.WriteRawTag(24); + output.WriteInt32(EnterpriseId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MessageSessionUid.Length != 0) { @@ -248,6 +294,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(UserRegistrationRequest other) { if (other == null) { return; @@ -265,10 +312,18 @@ public void MergeFrom(UserRegistrationRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -286,30 +341,71 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 16: { + UserId = input.ReadInt32(); + break; + } + case 24: { + EnterpriseId = input.ReadInt32(); + break; + } + } + } } + #endif } /// /// KA sends ws message /// - public sealed partial class KAToPushServerRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class KAToPushServerRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new KAToPushServerRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Push.PushReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KAToPushServerRequest() { OnConstruction(); } @@ -317,6 +413,7 @@ public KAToPushServerRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KAToPushServerRequest(KAToPushServerRequest other) : this() { messageType_ = other.messageType_; message_ = other.message_; @@ -328,6 +425,7 @@ public KAToPushServerRequest(KAToPushServerRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public KAToPushServerRequest Clone() { return new KAToPushServerRequest(this); } @@ -336,6 +434,7 @@ public KAToPushServerRequest Clone() { public const int MessageTypeFieldNumber = 1; private global::Push.MessageType messageType_ = global::Push.MessageType.Unknown; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Push.MessageType MessageType { get { return messageType_; } set { @@ -347,6 +446,7 @@ public KAToPushServerRequest Clone() { public const int MessageFieldNumber = 2; private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Message { get { return message_; } set { @@ -358,6 +458,7 @@ public string Message { public const int MessageSessionUidFieldNumber = 3; private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString MessageSessionUid { get { return messageSessionUid_; } set { @@ -374,6 +475,7 @@ public string Message { /// aka platformDeviceToken /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField EncryptedDeviceToken { get { return encryptedDeviceToken_; } } @@ -384,6 +486,7 @@ public string Message { = pb::FieldCodec.ForInt32(42); private readonly pbc::RepeatedField userId_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField UserId { get { return userId_; } } @@ -394,16 +497,19 @@ public string Message { = pb::FieldCodec.ForInt32(50); private readonly pbc::RepeatedField enterpriseId_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField EnterpriseId { get { return enterpriseId_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as KAToPushServerRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(KAToPushServerRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -421,6 +527,7 @@ public bool Equals(KAToPushServerRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MessageType != global::Push.MessageType.Unknown) hash ^= MessageType.GetHashCode(); @@ -436,12 +543,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MessageType != global::Push.MessageType.Unknown) { output.WriteRawTag(8); output.WriteEnum((int) MessageType); @@ -460,9 +572,36 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageType != global::Push.MessageType.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) MessageType); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(MessageSessionUid); + } + encryptedDeviceToken_.WriteTo(ref output, _repeated_encryptedDeviceToken_codec); + userId_.WriteTo(ref output, _repeated_userId_codec); + enterpriseId_.WriteTo(ref output, _repeated_enterpriseId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MessageType != global::Push.MessageType.Unknown) { @@ -484,6 +623,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(KAToPushServerRequest other) { if (other == null) { return; @@ -504,10 +644,18 @@ public void MergeFrom(KAToPushServerRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -539,30 +687,85 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MessageType = (global::Push.MessageType) input.ReadEnum(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + case 26: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 34: { + encryptedDeviceToken_.AddEntriesFrom(ref input, _repeated_encryptedDeviceToken_codec); + break; + } + case 42: + case 40: { + userId_.AddEntriesFrom(ref input, _repeated_userId_codec); + break; + } + case 50: + case 48: { + enterpriseId_.AddEntriesFrom(ref input, _repeated_enterpriseId_codec); + break; + } + } + } } + #endif } /// ///Client sends to push /// - public sealed partial class WssConnectionRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class WssConnectionRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WssConnectionRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Push.PushReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public WssConnectionRequest() { OnConstruction(); } @@ -570,6 +773,7 @@ public WssConnectionRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public WssConnectionRequest(WssConnectionRequest other) : this() { messageSessionUid_ = other.messageSessionUid_; encryptedDeviceToken_ = other.encryptedDeviceToken_; @@ -578,6 +782,7 @@ public WssConnectionRequest(WssConnectionRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public WssConnectionRequest Clone() { return new WssConnectionRequest(this); } @@ -586,6 +791,7 @@ public WssConnectionRequest Clone() { public const int MessageSessionUidFieldNumber = 1; private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString MessageSessionUid { get { return messageSessionUid_; } set { @@ -600,6 +806,7 @@ public WssConnectionRequest Clone() { /// aka platformDeviceToken /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -611,6 +818,7 @@ public WssConnectionRequest Clone() { public const int DeviceTimeStampFieldNumber = 3; private long deviceTimeStamp_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public long DeviceTimeStamp { get { return deviceTimeStamp_; } set { @@ -619,11 +827,13 @@ public long DeviceTimeStamp { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as WssConnectionRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(WssConnectionRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -638,6 +848,7 @@ public bool Equals(WssConnectionRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); @@ -650,12 +861,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MessageSessionUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(MessageSessionUid); @@ -671,9 +887,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(EncryptedDeviceToken); + } + if (DeviceTimeStamp != 0L) { + output.WriteRawTag(24); + output.WriteInt64(DeviceTimeStamp); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MessageSessionUid.Length != 0) { @@ -692,6 +932,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(WssConnectionRequest other) { if (other == null) { return; @@ -709,10 +950,18 @@ public void MergeFrom(WssConnectionRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -730,30 +979,71 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 18: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 24: { + DeviceTimeStamp = input.ReadInt64(); + break; + } + } + } + } + #endif + } /// ///PS sends to clients /// - public sealed partial class WssClientResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class WssClientResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WssClientResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Push.PushReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public WssClientResponse() { OnConstruction(); } @@ -761,6 +1051,7 @@ public WssClientResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public WssClientResponse(WssClientResponse other) : this() { messageType_ = other.messageType_; message_ = other.message_; @@ -768,6 +1059,7 @@ public WssClientResponse(WssClientResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public WssClientResponse Clone() { return new WssClientResponse(this); } @@ -776,6 +1068,7 @@ public WssClientResponse Clone() { public const int MessageTypeFieldNumber = 1; private global::Push.MessageType messageType_ = global::Push.MessageType.Unknown; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Push.MessageType MessageType { get { return messageType_; } set { @@ -787,6 +1080,7 @@ public WssClientResponse Clone() { public const int MessageFieldNumber = 2; private string message_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Message { get { return message_; } set { @@ -795,11 +1089,13 @@ public string Message { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as WssClientResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(WssClientResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -813,6 +1109,7 @@ public bool Equals(WssClientResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MessageType != global::Push.MessageType.Unknown) hash ^= MessageType.GetHashCode(); @@ -824,12 +1121,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MessageType != global::Push.MessageType.Unknown) { output.WriteRawTag(8); output.WriteEnum((int) MessageType); @@ -841,9 +1143,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageType != global::Push.MessageType.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) MessageType); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MessageType != global::Push.MessageType.Unknown) { @@ -859,6 +1181,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(WssClientResponse other) { if (other == null) { return; @@ -873,10 +1196,18 @@ public void MergeFrom(WssClientResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -890,27 +1221,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MessageType = (global::Push.MessageType) input.ReadEnum(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } } + #endif } - public sealed partial class PushServerDeviceRegistrationRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class PushServerDeviceRegistrationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new PushServerDeviceRegistrationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Push.PushReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PushServerDeviceRegistrationRequest() { OnConstruction(); } @@ -918,6 +1286,7 @@ public PushServerDeviceRegistrationRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PushServerDeviceRegistrationRequest(PushServerDeviceRegistrationRequest other) : this() { encryptedDeviceToken_ = other.encryptedDeviceToken_; pushToken_ = other.pushToken_; @@ -927,6 +1296,7 @@ public PushServerDeviceRegistrationRequest(PushServerDeviceRegistrationRequest o } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public PushServerDeviceRegistrationRequest Clone() { return new PushServerDeviceRegistrationRequest(this); } @@ -935,6 +1305,7 @@ public PushServerDeviceRegistrationRequest Clone() { public const int EncryptedDeviceTokenFieldNumber = 1; private pb::ByteString encryptedDeviceToken_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedDeviceToken { get { return encryptedDeviceToken_; } set { @@ -946,6 +1317,7 @@ public PushServerDeviceRegistrationRequest Clone() { public const int PushTokenFieldNumber = 2; private string pushToken_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string PushToken { get { return pushToken_; } set { @@ -957,6 +1329,7 @@ public string PushToken { public const int MobilePushPlatformFieldNumber = 3; private string mobilePushPlatform_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string MobilePushPlatform { get { return mobilePushPlatform_; } set { @@ -968,6 +1341,7 @@ public string MobilePushPlatform { public const int TransmissionKeyFieldNumber = 4; private pb::ByteString transmissionKey_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString TransmissionKey { get { return transmissionKey_; } set { @@ -976,11 +1350,13 @@ public string MobilePushPlatform { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as PushServerDeviceRegistrationRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(PushServerDeviceRegistrationRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -996,6 +1372,7 @@ public bool Equals(PushServerDeviceRegistrationRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (EncryptedDeviceToken.Length != 0) hash ^= EncryptedDeviceToken.GetHashCode(); @@ -1009,12 +1386,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (EncryptedDeviceToken.Length != 0) { output.WriteRawTag(10); output.WriteBytes(EncryptedDeviceToken); @@ -1034,9 +1416,37 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (EncryptedDeviceToken.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(EncryptedDeviceToken); + } + if (PushToken.Length != 0) { + output.WriteRawTag(18); + output.WriteString(PushToken); + } + if (MobilePushPlatform.Length != 0) { + output.WriteRawTag(26); + output.WriteString(MobilePushPlatform); + } + if (TransmissionKey.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(TransmissionKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (EncryptedDeviceToken.Length != 0) { @@ -1058,6 +1468,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(PushServerDeviceRegistrationRequest other) { if (other == null) { return; @@ -1078,10 +1489,18 @@ public void MergeFrom(PushServerDeviceRegistrationRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1103,27 +1522,72 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + EncryptedDeviceToken = input.ReadBytes(); + break; + } + case 18: { + PushToken = input.ReadString(); + break; + } + case 26: { + MobilePushPlatform = input.ReadString(); + break; + } + case 34: { + TransmissionKey = input.ReadBytes(); + break; + } + } + } } + #endif } - public sealed partial class SnsMessage : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SnsMessage : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SnsMessage()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::Push.PushReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SnsMessage() { OnConstruction(); } @@ -1131,6 +1595,7 @@ public SnsMessage() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SnsMessage(SnsMessage other) : this() { messageType_ = other.messageType_; message_ = other.message_; @@ -1138,6 +1603,7 @@ public SnsMessage(SnsMessage other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SnsMessage Clone() { return new SnsMessage(this); } @@ -1146,6 +1612,7 @@ public SnsMessage Clone() { public const int MessageTypeFieldNumber = 1; private global::Push.MessageType messageType_ = global::Push.MessageType.Unknown; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::Push.MessageType MessageType { get { return messageType_; } set { @@ -1157,6 +1624,7 @@ public SnsMessage Clone() { public const int MessageFieldNumber = 2; private pb::ByteString message_ = pb::ByteString.Empty; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Message { get { return message_; } set { @@ -1165,11 +1633,13 @@ public SnsMessage Clone() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SnsMessage); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SnsMessage other) { if (ReferenceEquals(other, null)) { return false; @@ -1183,6 +1653,7 @@ public bool Equals(SnsMessage other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MessageType != global::Push.MessageType.Unknown) hash ^= MessageType.GetHashCode(); @@ -1194,12 +1665,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MessageType != global::Push.MessageType.Unknown) { output.WriteRawTag(8); output.WriteEnum((int) MessageType); @@ -1211,9 +1687,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageType != global::Push.MessageType.Unknown) { + output.WriteRawTag(8); + output.WriteEnum((int) MessageType); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MessageType != global::Push.MessageType.Unknown) { @@ -1229,6 +1725,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SnsMessage other) { if (other == null) { return; @@ -1243,10 +1740,18 @@ public void MergeFrom(SnsMessage other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1260,7 +1765,35 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + MessageType = (global::Push.MessageType) input.ReadEnum(); + break; + } + case 18: { + Message = input.ReadBytes(); + break; + } + } + } } + #endif } diff --git a/KeeperSdk/proto/Record.cs b/KeeperSdk/proto/Record.cs new file mode 100644 index 0000000..c059d98 --- /dev/null +++ b/KeeperSdk/proto/Record.cs @@ -0,0 +1,20902 @@ +// +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: record.proto +// +#pragma warning disable 1591, 0612, 3021, 8981 +#region Designer generated code + +using pb = global::Google.Protobuf; +using pbc = global::Google.Protobuf.Collections; +using pbr = global::Google.Protobuf.Reflection; +using scg = global::System.Collections.Generic; +namespace Records { + + /// Holder for reflection information generated from record.proto + public static partial class RecordReflection { + + #region Descriptor + /// File descriptor for record.proto + public static pbr::FileDescriptor Descriptor { + get { return descriptor; } + } + private static pbr::FileDescriptor descriptor; + + static RecordReflection() { + byte[] descriptorData = global::System.Convert.FromBase64String( + string.Concat( + "CgxyZWNvcmQucHJvdG8SB1JlY29yZHMiXAoKUmVjb3JkVHlwZRIUCgxyZWNv", + "cmRUeXBlSWQYASABKAUSDwoHY29udGVudBgCIAEoCRInCgVzY29wZRgDIAEo", + "DjIYLlJlY29yZHMuUmVjb3JkVHlwZVNjb3BlIlUKElJlY29yZFR5cGVzUmVx", + "dWVzdBIQCghzdGFuZGFyZBgBIAEoCBIMCgR1c2VyGAIgASgIEhIKCmVudGVy", + "cHJpc2UYAyABKAgSCwoDcGFtGAQgASgIIpwBChNSZWNvcmRUeXBlc1Jlc3Bv", + "bnNlEigKC3JlY29yZFR5cGVzGAEgAygLMhMuUmVjb3Jkcy5SZWNvcmRUeXBl", + "EhcKD3N0YW5kYXJkQ291bnRlchgCIAEoBRITCgt1c2VyQ291bnRlchgDIAEo", + "BRIZChFlbnRlcnByaXNlQ291bnRlchgEIAEoBRISCgpwYW1Db3VudGVyGAUg", + "ASgFIkEKGFJlY29yZFR5cGVNb2RpZnlSZXNwb25zZRIUCgxyZWNvcmRUeXBl", + "SWQYASABKAUSDwoHY291bnRlchgCIAEoBSI9ChFSZWNvcmRzR2V0UmVxdWVz", + "dBITCgtyZWNvcmRfdWlkcxgBIAMoDBITCgtjbGllbnRfdGltZRgCIAEoAyLR", + "AQoGUmVjb3JkEhIKCnJlY29yZF91aWQYASABKAwSEgoKcmVjb3JkX2tleRgC", + "IAEoDBIvCg9yZWNvcmRfa2V5X3R5cGUYAyABKA4yFi5SZWNvcmRzLlJlY29y", + "ZEtleVR5cGUSDAoEZGF0YRgEIAEoDBINCgVleHRyYRgFIAEoDBIPCgd2ZXJz", + "aW9uGAYgASgFEhwKFGNsaWVudF9tb2RpZmllZF90aW1lGAcgASgDEhAKCHJl", + "dmlzaW9uGAggASgDEhAKCGZpbGVfaWRzGAkgAygMIk0KD0ZvbGRlclJlY29y", + "ZEtleRISCgpmb2xkZXJfdWlkGAEgASgMEhIKCnJlY29yZF91aWQYAiABKAwS", + "EgoKcmVjb3JkX2tleRgDIAEoDCJhCgZGb2xkZXISEgoKZm9sZGVyX3VpZBgB", + "IAEoDBISCgpmb2xkZXJfa2V5GAIgASgMEi8KD2ZvbGRlcl9rZXlfdHlwZRgD", + "IAEoDjIWLlJlY29yZHMuUmVjb3JkS2V5VHlwZSKVAQoEVGVhbRIQCgh0ZWFt", + "X3VpZBgBIAEoDBIQCgh0ZWFtX2tleRgCIAEoDBIYChB0ZWFtX3ByaXZhdGVf", + "a2V5GAMgASgMEi0KDXRlYW1fa2V5X3R5cGUYBCABKA4yFi5SZWNvcmRzLlJl", + "Y29yZEtleVR5cGUSIAoHZm9sZGVycxgFIAMoCzIPLlJlY29yZHMuRm9sZGVy", + "IqwBChJSZWNvcmRzR2V0UmVzcG9uc2USIAoHcmVjb3JkcxgBIAMoCzIPLlJl", + "Y29yZHMuUmVjb3JkEjQKEmZvbGRlcl9yZWNvcmRfa2V5cxgCIAMoCzIYLlJl", + "Y29yZHMuRm9sZGVyUmVjb3JkS2V5EiAKB2ZvbGRlcnMYAyADKAsyDy5SZWNv", + "cmRzLkZvbGRlchIcCgV0ZWFtcxgEIAMoCzINLlJlY29yZHMuVGVhbSI0CgpS", + "ZWNvcmRMaW5rEhIKCnJlY29yZF91aWQYASABKAwSEgoKcmVjb3JkX2tleRgC", + "IAEoDCIsCgtSZWNvcmRBdWRpdBIPCgd2ZXJzaW9uGAEgASgFEgwKBGRhdGEY", + "AiABKAwioAIKCVJlY29yZEFkZBISCgpyZWNvcmRfdWlkGAEgASgMEhIKCnJl", + "Y29yZF9rZXkYAiABKAwSHAoUY2xpZW50X21vZGlmaWVkX3RpbWUYAyABKAMS", + "DAoEZGF0YRgEIAEoDBIXCg9ub25fc2hhcmVkX2RhdGEYBSABKAwSLgoLZm9s", + "ZGVyX3R5cGUYBiABKA4yGS5SZWNvcmRzLlJlY29yZEZvbGRlclR5cGUSEgoK", + "Zm9sZGVyX3VpZBgHIAEoDBISCgpmb2xkZXJfa2V5GAggASgMEikKDHJlY29y", + "ZF9saW5rcxgJIAMoCzITLlJlY29yZHMuUmVjb3JkTGluaxIjCgVhdWRpdBgK", + "IAEoCzIULlJlY29yZHMuUmVjb3JkQXVkaXQiTQoRUmVjb3Jkc0FkZFJlcXVl", + "c3QSIwoHcmVjb3JkcxgBIAMoCzISLlJlY29yZHMuUmVjb3JkQWRkEhMKC2Ns", + "aWVudF90aW1lGAIgASgDIuoBCgxSZWNvcmRVcGRhdGUSEgoKcmVjb3JkX3Vp", + "ZBgBIAEoDBIcChRjbGllbnRfbW9kaWZpZWRfdGltZRgCIAEoAxIQCghyZXZp", + "c2lvbhgDIAEoAxIMCgRkYXRhGAQgASgMEhcKD25vbl9zaGFyZWRfZGF0YRgF", + "IAEoDBItChByZWNvcmRfbGlua3NfYWRkGAYgAygLMhMuUmVjb3Jkcy5SZWNv", + "cmRMaW5rEhsKE3JlY29yZF9saW5rc19yZW1vdmUYByADKAwSIwoFYXVkaXQY", + "CCABKAsyFC5SZWNvcmRzLlJlY29yZEF1ZGl0IlMKFFJlY29yZHNVcGRhdGVS", + "ZXF1ZXN0EiYKB3JlY29yZHMYASADKAsyFS5SZWNvcmRzLlJlY29yZFVwZGF0", + "ZRITCgtjbGllbnRfdGltZRgCIAEoAyKOAQoXUmVjb3JkRmlsZUZvckNvbnZl", + "cnNpb24SEgoKcmVjb3JkX3VpZBgBIAEoDBIUCgxmaWxlX2ZpbGVfaWQYAiAB", + "KAkSFQoNdGh1bWJfZmlsZV9pZBgDIAEoCRIMCgRkYXRhGAQgASgMEhIKCnJl", + "Y29yZF9rZXkYBSABKAwSEAoIbGlua19rZXkYBiABKAwiSgoZUmVjb3JkRm9s", + "ZGVyRm9yQ29udmVyc2lvbhISCgpmb2xkZXJfdWlkGAEgASgMEhkKEXJlY29y", + "ZF9mb2xkZXJfa2V5GAIgASgMIpICChFSZWNvcmRDb252ZXJ0VG9WMxISCgpy", + "ZWNvcmRfdWlkGAEgASgMEhwKFGNsaWVudF9tb2RpZmllZF90aW1lGAIgASgD", + "EhAKCHJldmlzaW9uGAMgASgDEgwKBGRhdGEYBCABKAwSFwoPbm9uX3NoYXJl", + "ZF9kYXRhGAUgASgMEiMKBWF1ZGl0GAYgASgLMhQuUmVjb3Jkcy5SZWNvcmRB", + "dWRpdBI1CgtyZWNvcmRfZmlsZRgHIAMoCzIgLlJlY29yZHMuUmVjb3JkRmls", + "ZUZvckNvbnZlcnNpb24SNgoKZm9sZGVyX2tleRgIIAMoCzIiLlJlY29yZHMu", + "UmVjb3JkRm9sZGVyRm9yQ29udmVyc2lvbiJdChlSZWNvcmRzQ29udmVydFRv", + "VjNSZXF1ZXN0EisKB3JlY29yZHMYASADKAsyGi5SZWNvcmRzLlJlY29yZENv", + "bnZlcnRUb1YzEhMKC2NsaWVudF90aW1lGAIgASgDIicKFFJlY29yZHNSZW1v", + "dmVSZXF1ZXN0Eg8KB3JlY29yZHMYASADKAwiPgoMUmVjb3JkUmV2ZXJ0EhIK", + "CnJlY29yZF91aWQYASABKAwSGgoScmV2ZXJ0X3RvX3JldmlzaW9uGAIgASgD", + "Ij4KFFJlY29yZHNSZXZlcnRSZXF1ZXN0EiYKB3JlY29yZHMYASADKAsyFS5S", + "ZWNvcmRzLlJlY29yZFJldmVydCJjCg9SZWNvcmRMaW5rRXJyb3ISEgoKcmVj", + "b3JkX3VpZBgBIAEoDBIrCgZzdGF0dXMYAiABKA4yGy5SZWNvcmRzLlJlY29y", + "ZE1vZGlmeVJlc3VsdBIPCgdtZXNzYWdlGAMgASgJIpUBChJSZWNvcmRNb2Rp", + "ZnlTdGF0dXMSEgoKcmVjb3JkX3VpZBgBIAEoDBIrCgZzdGF0dXMYAiABKA4y", + "Gy5SZWNvcmRzLlJlY29yZE1vZGlmeVJlc3VsdBIPCgdtZXNzYWdlGAMgASgJ", + "Ei0KC2xpbmtfZXJyb3JzGAQgAygLMhguUmVjb3Jkcy5SZWNvcmRMaW5rRXJy", + "b3IiVwoVUmVjb3Jkc01vZGlmeVJlc3BvbnNlEiwKB3JlY29yZHMYASADKAsy", + "Gy5SZWNvcmRzLlJlY29yZE1vZGlmeVN0YXR1cxIQCghyZXZpc2lvbhgCIAEo", + "AyJZChJSZWNvcmRBZGRBdWRpdERhdGESEgoKcmVjb3JkX3VpZBgBIAEoDBIQ", + "CghyZXZpc2lvbhgCIAEoAxIMCgRkYXRhGAMgASgMEg8KB3ZlcnNpb24YBCAB", + "KAUiQwoTQWRkQXVkaXREYXRhUmVxdWVzdBIsCgdyZWNvcmRzGAEgAygLMhsu", + "UmVjb3Jkcy5SZWNvcmRBZGRBdWRpdERhdGEidAoERmlsZRISCgpyZWNvcmRf", + "dWlkGAEgASgMEhIKCnJlY29yZF9rZXkYAiABKAwSDAoEZGF0YRgDIAEoDBIQ", + "CghmaWxlU2l6ZRgEIAEoAxIRCgl0aHVtYlNpemUYBSABKAUSEQoJaXNfc2Ny", + "aXB0GAYgASgIIkQKD0ZpbGVzQWRkUmVxdWVzdBIcCgVmaWxlcxgBIAMoCzIN", + "LlJlY29yZHMuRmlsZRITCgtjbGllbnRfdGltZRgCIAEoAyKnAQoNRmlsZUFk", + "ZFN0YXR1cxISCgpyZWNvcmRfdWlkGAEgASgMEiYKBnN0YXR1cxgCIAEoDjIW", + "LlJlY29yZHMuRmlsZUFkZFJlc3VsdBILCgN1cmwYAyABKAkSEgoKcGFyYW1l", + "dGVycxgEIAEoCRIcChR0aHVtYm5haWxfcGFyYW1ldGVycxgFIAEoCRIbChNz", + "dWNjZXNzX3N0YXR1c19jb2RlGAYgASgFIksKEEZpbGVzQWRkUmVzcG9uc2US", + "JQoFZmlsZXMYASADKAsyFi5SZWNvcmRzLkZpbGVBZGRTdGF0dXMSEAoIcmV2", + "aXNpb24YAiABKAMiZgoPRmlsZXNHZXRSZXF1ZXN0EhMKC3JlY29yZF91aWRz", + "GAEgAygMEhYKDmZvcl90aHVtYm5haWxzGAIgASgIEiYKHmVtZXJnZW5jeV9h", + "Y2Nlc3NfYWNjb3VudF9vd25lchgDIAEoCSKiAQoNRmlsZUdldFN0YXR1cxIS", + "CgpyZWNvcmRfdWlkGAEgASgMEiYKBnN0YXR1cxgCIAEoDjIWLlJlY29yZHMu", + "RmlsZUdldFJlc3VsdBILCgN1cmwYAyABKAkSGwoTc3VjY2Vzc19zdGF0dXNf", + "Y29kZRgEIAEoBRIrCgtmaWxlS2V5VHlwZRgFIAEoDjIWLlJlY29yZHMuUmVj", + "b3JkS2V5VHlwZSI5ChBGaWxlc0dldFJlc3BvbnNlEiUKBWZpbGVzGAEgAygL", + "MhYuUmVjb3Jkcy5GaWxlR2V0U3RhdHVzImgKFUFwcGxpY2F0aW9uQWRkUmVx", + "dWVzdBIPCgdhcHBfdWlkGAEgASgMEhIKCnJlY29yZF9rZXkYAiABKAwSHAoU", + "Y2xpZW50X21vZGlmaWVkX3RpbWUYAyABKAMSDAoEZGF0YRgEIAEoDCKIAQoi", + "R2V0UmVjb3JkRGF0YVdpdGhBY2Nlc3NJbmZvUmVxdWVzdBISCgpjbGllbnRU", + "aW1lGAEgASgDEhEKCXJlY29yZFVpZBgCIAMoDBI7ChRyZWNvcmREZXRhaWxz", + "SW5jbHVkZRgDIAEoDjIdLlJlY29yZHMuUmVjb3JkRGV0YWlsc0luY2x1ZGUi", + "6gEKDlVzZXJQZXJtaXNzaW9uEhAKCHVzZXJuYW1lGAEgASgJEg0KBW93bmVy", + "GAIgASgIEhIKCnNoYXJlQWRtaW4YAyABKAgSEAoIc2hhcmFibGUYBCABKAgS", + "EAoIZWRpdGFibGUYBSABKAgSGAoQYXdhaXRpbmdBcHByb3ZhbBgGIAEoCBIS", + "CgpleHBpcmF0aW9uGAcgASgDEhIKCmFjY291bnRVaWQYCCABKAwSPQoVdGlt", + "ZXJOb3RpZmljYXRpb25UeXBlGAkgASgOMh4uUmVjb3Jkcy5UaW1lck5vdGlm", + "aWNhdGlvblR5cGUivAEKFlNoYXJlZEZvbGRlclBlcm1pc3Npb24SFwoPc2hh", + "cmVkRm9sZGVyVWlkGAEgASgMEhIKCnJlc2hhcmFibGUYAiABKAgSEAoIZWRp", + "dGFibGUYAyABKAgSEAoIcmV2aXNpb24YBCABKAMSEgoKZXhwaXJhdGlvbhgF", + "IAEoAxI9ChV0aW1lck5vdGlmaWNhdGlvblR5cGUYBiABKA4yHi5SZWNvcmRz", + "LlRpbWVyTm90aWZpY2F0aW9uVHlwZSLoAgoKUmVjb3JkRGF0YRIQCghyZXZp", + "c2lvbhgBIAEoAxIPCgd2ZXJzaW9uGAIgASgFEg4KBnNoYXJlZBgDIAEoCBIb", + "ChNlbmNyeXB0ZWRSZWNvcmREYXRhGAQgASgJEhoKEmVuY3J5cHRlZEV4dHJh", + "RGF0YRgFIAEoCRIaChJjbGllbnRNb2RpZmllZFRpbWUYBiABKAMSFQoNbm9u", + "U2hhcmVkRGF0YRgHIAEoCRItChBsaW5rZWRSZWNvcmREYXRhGAggAygLMhMu", + "UmVjb3Jkcy5SZWNvcmREYXRhEg4KBmZpbGVJZBgJIAMoDBIQCghmaWxlU2l6", + "ZRgKIAEoAxIVCg10aHVtYm5haWxTaXplGAsgASgDEi0KDXJlY29yZEtleVR5", + "cGUYDCABKA4yFi5SZWNvcmRzLlJlY29yZEtleVR5cGUSEQoJcmVjb3JkS2V5", + "GA0gASgMEhEKCXJlY29yZFVpZBgOIAEoDCLIAQoYUmVjb3JkRGF0YVdpdGhB", + "Y2Nlc3NJbmZvEhEKCXJlY29yZFVpZBgBIAEoDBInCgpyZWNvcmREYXRhGAIg", + "ASgLMhMuUmVjb3Jkcy5SZWNvcmREYXRhEi8KDnVzZXJQZXJtaXNzaW9uGAMg", + "AygLMhcuUmVjb3Jkcy5Vc2VyUGVybWlzc2lvbhI/ChZzaGFyZWRGb2xkZXJQ", + "ZXJtaXNzaW9uGAQgAygLMh8uUmVjb3Jkcy5TaGFyZWRGb2xkZXJQZXJtaXNz", + "aW9uIokBCiNHZXRSZWNvcmREYXRhV2l0aEFjY2Vzc0luZm9SZXNwb25zZRJD", + "ChhyZWNvcmREYXRhV2l0aEFjY2Vzc0luZm8YASADKAsyIS5SZWNvcmRzLlJl", + "Y29yZERhdGFXaXRoQWNjZXNzSW5mbxIdChVub1Blcm1pc3Npb25SZWNvcmRV", + "aWQYAiADKAwiagoSSXNPYmplY3RTaGFyZUFkbWluEgsKA3VpZBgBIAEoDBIP", + "Cgdpc0FkbWluGAIgASgIEjYKCm9iamVjdFR5cGUYAyABKA4yIi5SZWNvcmRz", + "LkNoZWNrU2hhcmVBZG1pbk9iamVjdFR5cGUiSAoNQW1JU2hhcmVBZG1pbhI3", + "ChJpc09iamVjdFNoYXJlQWRtaW4YASADKAsyGy5SZWNvcmRzLklzT2JqZWN0", + "U2hhcmVBZG1pbiK8AQoYUmVjb3JkU2hhcmVVcGRhdGVSZXF1ZXN0Ei4KD2Fk", + "ZFNoYXJlZFJlY29yZBgBIAMoCzIVLlJlY29yZHMuU2hhcmVkUmVjb3JkEjEK", + "EnVwZGF0ZVNoYXJlZFJlY29yZBgCIAMoCzIVLlJlY29yZHMuU2hhcmVkUmVj", + "b3JkEjEKEnJlbW92ZVNoYXJlZFJlY29yZBgDIAMoCzIVLlJlY29yZHMuU2hh", + "cmVkUmVjb3JkEgoKAnB0GAQgASgJIqgCCgxTaGFyZWRSZWNvcmQSEgoKdG9V", + "c2VybmFtZRgBIAEoCRIRCglyZWNvcmRVaWQYAiABKAwSEQoJcmVjb3JkS2V5", + "GAMgASgMEhcKD3NoYXJlZEZvbGRlclVpZBgEIAEoDBIPCgd0ZWFtVWlkGAUg", + "ASgMEhAKCGVkaXRhYmxlGAYgASgIEhEKCXNoYXJlYWJsZRgHIAEoCBIQCgh0", + "cmFuc2ZlchgIIAEoCBIRCgl1c2VFY2NLZXkYCSABKAgSFwoPcmVtb3ZlVmF1", + "bHREYXRhGAogASgIEhIKCmV4cGlyYXRpb24YCyABKAMSPQoVdGltZXJOb3Rp", + "ZmljYXRpb25UeXBlGAwgASgOMh4uUmVjb3Jkcy5UaW1lck5vdGlmaWNhdGlv", + "blR5cGUi1QEKGVJlY29yZFNoYXJlVXBkYXRlUmVzcG9uc2USOgoVYWRkU2hh", + "cmVkUmVjb3JkU3RhdHVzGAEgAygLMhsuUmVjb3Jkcy5TaGFyZWRSZWNvcmRT", + "dGF0dXMSPQoYdXBkYXRlU2hhcmVkUmVjb3JkU3RhdHVzGAIgAygLMhsuUmVj", + "b3Jkcy5TaGFyZWRSZWNvcmRTdGF0dXMSPQoYcmVtb3ZlU2hhcmVkUmVjb3Jk", + "U3RhdHVzGAMgAygLMhsuUmVjb3Jkcy5TaGFyZWRSZWNvcmRTdGF0dXMiWgoS", + "U2hhcmVkUmVjb3JkU3RhdHVzEhEKCXJlY29yZFVpZBgBIAEoDBIOCgZzdGF0", + "dXMYAiABKAkSDwoHbWVzc2FnZRgDIAEoCRIQCgh1c2VybmFtZRgEIAEoCSJH", + "ChtHZXRSZWNvcmRQZXJtaXNzaW9uc1JlcXVlc3QSEgoKcmVjb3JkVWlkcxgB", + "IAMoDBIUCgxpc1NoYXJlQWRtaW4YAiABKAgiVAocR2V0UmVjb3JkUGVybWlz", + "c2lvbnNSZXNwb25zZRI0ChFyZWNvcmRQZXJtaXNzaW9ucxgBIAMoCzIZLlJl", + "Y29yZHMuUmVjb3JkUGVybWlzc2lvbiJsChBSZWNvcmRQZXJtaXNzaW9uEhEK", + "CXJlY29yZFVpZBgBIAEoDBINCgVvd25lchgCIAEoCBIPCgdjYW5FZGl0GAMg", + "ASgIEhAKCGNhblNoYXJlGAQgASgIEhMKC2NhblRyYW5zZmVyGAUgASgIImgK", + "FkdldFNoYXJlT2JqZWN0c1JlcXVlc3QSEQoJc3RhcnRXaXRoGAEgASgJEhAK", + "CGNvbnRhaW5zGAIgASgJEhAKCGZpbHRlcmVkGAMgASgIEhcKD3NoYXJlZEZv", + "bGRlclVpZBgEIAEoDCLnAgoXR2V0U2hhcmVPYmplY3RzUmVzcG9uc2USLgoS", + "c2hhcmVSZWxhdGlvbnNoaXBzGAEgAygLMhIuUmVjb3Jkcy5TaGFyZVVzZXIS", + "LAoQc2hhcmVGYW1pbHlVc2VycxgCIAMoCzISLlJlY29yZHMuU2hhcmVVc2Vy", + "EjAKFHNoYXJlRW50ZXJwcmlzZVVzZXJzGAMgAygLMhIuUmVjb3Jkcy5TaGFy", + "ZVVzZXISJgoKc2hhcmVUZWFtcxgEIAMoCzISLlJlY29yZHMuU2hhcmVUZWFt", + "EigKDHNoYXJlTUNUZWFtcxgFIAMoCzISLlJlY29yZHMuU2hhcmVUZWFtEjIK", + "FnNoYXJlTUNFbnRlcnByaXNlVXNlcnMYBiADKAsyEi5SZWNvcmRzLlNoYXJl", + "VXNlchI2ChRzaGFyZUVudGVycHJpc2VOYW1lcxgHIAMoCzIYLlJlY29yZHMu", + "U2hhcmVFbnRlcnByaXNlIqUBCglTaGFyZVVzZXISEAoIdXNlcm5hbWUYASAB", + "KAkSEAoIZnVsbG5hbWUYAiABKAkSFAoMZW50ZXJwcmlzZUlkGAMgASgFEiQK", + "BnN0YXR1cxgEIAEoDjIULlJlY29yZHMuU2hhcmVTdGF0dXMSFAoMaXNTaGFy", + "ZUFkbWluGAUgASgIEiIKGmlzQWRtaW5PZlNoYXJlZEZvbGRlck93bmVyGAYg", + "ASgIIkQKCVNoYXJlVGVhbRIQCgh0ZWFtbmFtZRgBIAEoCRIUCgxlbnRlcnBy", + "aXNlSWQYAiABKAUSDwoHdGVhbVVpZBgDIAEoDCI/Cg9TaGFyZUVudGVycHJp", + "c2USFgoOZW50ZXJwcmlzZW5hbWUYASABKAkSFAoMZW50ZXJwcmlzZUlkGAIg", + "ASgFIlMKH1JlY29yZHNPbndlcnNoaXBUcmFuc2ZlclJlcXVlc3QSMAoPdHJh", + "bnNmZXJSZWNvcmRzGAEgAygLMhcuUmVjb3Jkcy5UcmFuc2ZlclJlY29yZCJb", + "Cg5UcmFuc2ZlclJlY29yZBIQCgh1c2VybmFtZRgBIAEoCRIRCglyZWNvcmRV", + "aWQYAiABKAwSEQoJcmVjb3JkS2V5GAMgASgMEhEKCXVzZUVjY0tleRgEIAEo", + "CCJfCiBSZWNvcmRzT253ZXJzaGlwVHJhbnNmZXJSZXNwb25zZRI7ChR0cmFu", + "c2ZlclJlY29yZFN0YXR1cxgBIAMoCzIdLlJlY29yZHMuVHJhbnNmZXJSZWNv", + "cmRTdGF0dXMiXAoUVHJhbnNmZXJSZWNvcmRTdGF0dXMSEAoIdXNlcm5hbWUY", + "ASABKAkSEQoJcmVjb3JkVWlkGAIgASgMEg4KBnN0YXR1cxgDIAEoCRIPCgdt", + "ZXNzYWdlGAQgASgJInkKFVJlY29yZHNVbnNoYXJlUmVxdWVzdBI0Cg1zaGFy", + "ZWRGb2xkZXJzGAEgAygLMh0uUmVjb3Jkcy5SZWNvcmRzVW5zaGFyZUZvbGRl", + "chIqCgV1c2VycxgCIAMoCzIbLlJlY29yZHMuUmVjb3Jkc1Vuc2hhcmVVc2Vy", + "IoYBChZSZWNvcmRzVW5zaGFyZVJlc3BvbnNlEjoKDXNoYXJlZEZvbGRlcnMY", + "ASADKAsyIy5SZWNvcmRzLlJlY29yZHNVbnNoYXJlRm9sZGVyU3RhdHVzEjAK", + "BXVzZXJzGAIgAygLMiEuUmVjb3Jkcy5SZWNvcmRzVW5zaGFyZVVzZXJTdGF0", + "dXMiQgoUUmVjb3Jkc1Vuc2hhcmVGb2xkZXISEQoJcmVjb3JkVWlkGAEgASgM", + "EhcKD3NoYXJlZEZvbGRlclVpZBgCIAEoDCI7ChJSZWNvcmRzVW5zaGFyZVVz", + "ZXISEQoJcmVjb3JkVWlkGAEgASgMEhIKCmFjY291bnRVaWQYAiABKAwiSAoa", + "UmVjb3Jkc1Vuc2hhcmVGb2xkZXJTdGF0dXMSEQoJcmVjb3JkVWlkGAEgASgM", + "EhcKD3NoYXJlZEZvbGRlclVpZBgCIAEoDCJBChhSZWNvcmRzVW5zaGFyZVVz", + "ZXJTdGF0dXMSEQoJcmVjb3JkVWlkGAEgASgMEhIKCmFjY291bnRVaWQYAiAB", + "KAwiWwoaVGltZWRBY2Nlc3NDYWxsYmFja1BheWxvYWQSPQoVdGltZUxpbWl0", + "ZWRBY2Nlc3NUeXBlGAEgASgOMh4uUmVjb3Jkcy5UaW1lTGltaXRlZEFjY2Vz", + "c1R5cGUi/QEKGFRpbWVMaW1pdGVkQWNjZXNzUmVxdWVzdBISCgphY2NvdW50", + "VWlkGAEgAygMEg8KB3RlYW1VaWQYAiADKAwSEQoJcmVjb3JkVWlkGAMgAygM", + "EhcKD3NoYXJlZE9iamVjdFVpZBgEIAEoDBI9ChV0aW1lTGltaXRlZEFjY2Vz", + "c1R5cGUYBSABKA4yHi5SZWNvcmRzLlRpbWVMaW1pdGVkQWNjZXNzVHlwZRIS", + "CgpleHBpcmF0aW9uGAYgASgDEj0KFXRpbWVyTm90aWZpY2F0aW9uVHlwZRgH", + "IAEoDjIeLlJlY29yZHMuVGltZXJOb3RpZmljYXRpb25UeXBlIjcKF1RpbWVM", + "aW1pdGVkQWNjZXNzU3RhdHVzEgsKA3VpZBgBIAEoDBIPCgdtZXNzYWdlGAIg", + "ASgJIuMBChlUaW1lTGltaXRlZEFjY2Vzc1Jlc3BvbnNlEhAKCHJldmlzaW9u", + "GAEgASgDEjoKEHVzZXJBY2Nlc3NTdGF0dXMYAiADKAsyIC5SZWNvcmRzLlRp", + "bWVMaW1pdGVkQWNjZXNzU3RhdHVzEjoKEHRlYW1BY2Nlc3NTdGF0dXMYAyAD", + "KAsyIC5SZWNvcmRzLlRpbWVMaW1pdGVkQWNjZXNzU3RhdHVzEjwKEnJlY29y", + "ZEFjY2Vzc1N0YXR1cxgEIAMoCzIgLlJlY29yZHMuVGltZUxpbWl0ZWRBY2Nl", + "c3NTdGF0dXMqaAoPUmVjb3JkVHlwZVNjb3BlEg8KC1JUX1NUQU5EQVJEEAAS", + "CwoHUlRfVVNFUhABEhEKDVJUX0VOVEVSUFJJU0UQAhIKCgZSVF9QQU0QAxIY", + "ChRSVF9QQU1fQ09ORklHVVJBVElPThAEKtEBCg1SZWNvcmRLZXlUeXBlEgoK", + "Bk5PX0tFWRAAEhkKFUVOQ1JZUFRFRF9CWV9EQVRBX0tFWRABEhsKF0VOQ1JZ", + "UFRFRF9CWV9QVUJMSUNfS0VZEAISHQoZRU5DUllQVEVEX0JZX0RBVEFfS0VZ", + "X0dDTRADEh8KG0VOQ1JZUFRFRF9CWV9QVUJMSUNfS0VZX0VDQxAEEh0KGUVO", + "Q1JZUFRFRF9CWV9ST09UX0tFWV9DQkMQBRIdChlFTkNSWVBURURfQllfUk9P", + "VF9LRVlfR0NNEAYqUAoQUmVjb3JkRm9sZGVyVHlwZRIPCgt1c2VyX2ZvbGRl", + "chAAEhEKDXNoYXJlZF9mb2xkZXIQARIYChRzaGFyZWRfZm9sZGVyX2ZvbGRl", + "chACKuwCChJSZWNvcmRNb2RpZnlSZXN1bHQSDgoKUlNfU1VDQ0VTUxAAEhIK", + "DlJTX09VVF9PRl9TWU5DEAESFAoQUlNfQUNDRVNTX0RFTklFRBACEhMKD1JT", + "X1NIQVJFX0RFTklFRBADEhQKEFJTX1JFQ09SRF9FWElTVFMQBBIeChpSU19P", + "TERfUkVDT1JEX1ZFUlNJT05fVFlQRRAFEh4KGlJTX05FV19SRUNPUkRfVkVS", + "U0lPTl9UWVBFEAYSFgoSUlNfRklMRVNfTk9UX01BVENIEAcSGwoXUlNfUkVD", + "T1JEX05PVF9TSEFSRUFCTEUQCBIfChtSU19BVFRBQ0hNRU5UX05PVF9TSEFS", + "RUFCTEUQCRIZChVSU19GSUxFX0xJTUlUX1JFQUNIRUQQChIaChZSU19TSVpF", + "X0VYQ0VFREVEX0xJTUlUEAsSJAogUlNfT05MWV9PV05FUl9DQU5fTU9ESUZZ", + "X1NDUklQVFMQDCotCg1GaWxlQWRkUmVzdWx0Eg4KCkZBX1NVQ0NFU1MQABIM", + "CghGQV9FUlJPUhABKkMKDUZpbGVHZXRSZXN1bHQSDgoKRkdfU1VDQ0VTUxAA", + "EgwKCEZHX0VSUk9SEAESFAoQRkdfQUNDRVNTX0RFTklFRBACKkoKFFJlY29y", + "ZERldGFpbHNJbmNsdWRlEhMKD0RBVEFfUExVU19TSEFSRRAAEg0KCURBVEFf", + "T05MWRABEg4KClNIQVJFX09OTFkQAipiChlDaGVja1NoYXJlQWRtaW5PYmpl", + "Y3RUeXBlEhkKFUNIRUNLX1NBX0lOVkFMSURfVFlQRRAAEhIKDkNIRUNLX1NB", + "X09OX1NGEAESFgoSQ0hFQ0tfU0FfT05fUkVDT1JEEAIqMQoLU2hhcmVTdGF0", + "dXMSCgoGQUNUSVZFEAASCQoFQkxPQ0sQARILCgdJTlZJVEVEEAIqOgoVUmVj", + "b3JkVHJhbnNhY3Rpb25UeXBlEg8KC1JUVF9HRU5FUkFMEAASEAoMUlRUX1JP", + "VEFUSU9OEAEq5gEKFVRpbWVMaW1pdGVkQWNjZXNzVHlwZRIkCiBJTlZBTElE", + "X1RJTUVfTElNSVRFRF9BQ0NFU1NfVFlQRRAAEhkKFVVTRVJfQUNDRVNTX1RP", + "X1JFQ09SRBABEicKI1VTRVJfT1JfVEVBTV9BQ0NFU1NfVE9fU0hBUkVERk9M", + "REVSEAISIQodUkVDT1JEX0FDQ0VTU19UT19TSEFSRURGT0xERVIQAxIfChtV", + "U0VSX0FDQ0VTU19UT19TSEFSRURGT0xERVIQBBIfChtURUFNX0FDQ0VTU19U", + "T19TSEFSRURGT0xERVIQBSpcChVUaW1lck5vdGlmaWNhdGlvblR5cGUSFAoQ", + "Tk9USUZJQ0FUSU9OX09GRhAAEhAKDE5PVElGWV9PV05FUhABEhsKF05PVElG", + "WV9QUklWSUxFR0VEX1VTRVJTEAJCIwoYY29tLmtlZXBlcnNlY3VyaXR5LnBy", + "b3RvQgdSZWNvcmRzYgZwcm90bzM=")); + descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, + new pbr::FileDescriptor[] { }, + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Records.RecordTypeScope), typeof(global::Records.RecordKeyType), typeof(global::Records.RecordFolderType), typeof(global::Records.RecordModifyResult), typeof(global::Records.FileAddResult), typeof(global::Records.FileGetResult), typeof(global::Records.RecordDetailsInclude), typeof(global::Records.CheckShareAdminObjectType), typeof(global::Records.ShareStatus), typeof(global::Records.RecordTransactionType), typeof(global::Records.TimeLimitedAccessType), typeof(global::Records.TimerNotificationType), }, null, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordType), global::Records.RecordType.Parser, new[]{ "RecordTypeId", "Content", "Scope" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordTypesRequest), global::Records.RecordTypesRequest.Parser, new[]{ "Standard", "User", "Enterprise", "Pam" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordTypesResponse), global::Records.RecordTypesResponse.Parser, new[]{ "RecordTypes", "StandardCounter", "UserCounter", "EnterpriseCounter", "PamCounter" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordTypeModifyResponse), global::Records.RecordTypeModifyResponse.Parser, new[]{ "RecordTypeId", "Counter" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsGetRequest), global::Records.RecordsGetRequest.Parser, new[]{ "RecordUids", "ClientTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.Record), global::Records.Record.Parser, new[]{ "RecordUid", "RecordKey", "RecordKeyType", "Data", "Extra", "Version", "ClientModifiedTime", "Revision", "FileIds" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FolderRecordKey), global::Records.FolderRecordKey.Parser, new[]{ "FolderUid", "RecordUid", "RecordKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.Folder), global::Records.Folder.Parser, new[]{ "FolderUid", "FolderKey", "FolderKeyType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.Team), global::Records.Team.Parser, new[]{ "TeamUid", "TeamKey", "TeamPrivateKey", "TeamKeyType", "Folders" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsGetResponse), global::Records.RecordsGetResponse.Parser, new[]{ "Records", "FolderRecordKeys", "Folders", "Teams" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordLink), global::Records.RecordLink.Parser, new[]{ "RecordUid", "RecordKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordAudit), global::Records.RecordAudit.Parser, new[]{ "Version", "Data" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordAdd), global::Records.RecordAdd.Parser, new[]{ "RecordUid", "RecordKey", "ClientModifiedTime", "Data", "NonSharedData", "FolderType", "FolderUid", "FolderKey", "RecordLinks", "Audit" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsAddRequest), global::Records.RecordsAddRequest.Parser, new[]{ "Records", "ClientTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordUpdate), global::Records.RecordUpdate.Parser, new[]{ "RecordUid", "ClientModifiedTime", "Revision", "Data", "NonSharedData", "RecordLinksAdd", "RecordLinksRemove", "Audit" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUpdateRequest), global::Records.RecordsUpdateRequest.Parser, new[]{ "Records", "ClientTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordFileForConversion), global::Records.RecordFileForConversion.Parser, new[]{ "RecordUid", "FileFileId", "ThumbFileId", "Data", "RecordKey", "LinkKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordFolderForConversion), global::Records.RecordFolderForConversion.Parser, new[]{ "FolderUid", "RecordFolderKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordConvertToV3), global::Records.RecordConvertToV3.Parser, new[]{ "RecordUid", "ClientModifiedTime", "Revision", "Data", "NonSharedData", "Audit", "RecordFile", "FolderKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsConvertToV3Request), global::Records.RecordsConvertToV3Request.Parser, new[]{ "Records", "ClientTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsRemoveRequest), global::Records.RecordsRemoveRequest.Parser, new[]{ "Records" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordRevert), global::Records.RecordRevert.Parser, new[]{ "RecordUid", "RevertToRevision" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsRevertRequest), global::Records.RecordsRevertRequest.Parser, new[]{ "Records" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordLinkError), global::Records.RecordLinkError.Parser, new[]{ "RecordUid", "Status", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordModifyStatus), global::Records.RecordModifyStatus.Parser, new[]{ "RecordUid", "Status", "Message", "LinkErrors" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsModifyResponse), global::Records.RecordsModifyResponse.Parser, new[]{ "Records", "Revision" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordAddAuditData), global::Records.RecordAddAuditData.Parser, new[]{ "RecordUid", "Revision", "Data", "Version" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.AddAuditDataRequest), global::Records.AddAuditDataRequest.Parser, new[]{ "Records" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.File), global::Records.File.Parser, new[]{ "RecordUid", "RecordKey", "Data", "FileSize", "ThumbSize", "IsScript" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FilesAddRequest), global::Records.FilesAddRequest.Parser, new[]{ "Files", "ClientTime" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FileAddStatus), global::Records.FileAddStatus.Parser, new[]{ "RecordUid", "Status", "Url", "Parameters", "ThumbnailParameters", "SuccessStatusCode" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FilesAddResponse), global::Records.FilesAddResponse.Parser, new[]{ "Files", "Revision" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FilesGetRequest), global::Records.FilesGetRequest.Parser, new[]{ "RecordUids", "ForThumbnails", "EmergencyAccessAccountOwner" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FileGetStatus), global::Records.FileGetStatus.Parser, new[]{ "RecordUid", "Status", "Url", "SuccessStatusCode", "FileKeyType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.FilesGetResponse), global::Records.FilesGetResponse.Parser, new[]{ "Files" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.ApplicationAddRequest), global::Records.ApplicationAddRequest.Parser, new[]{ "AppUid", "RecordKey", "ClientModifiedTime", "Data" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.GetRecordDataWithAccessInfoRequest), global::Records.GetRecordDataWithAccessInfoRequest.Parser, new[]{ "ClientTime", "RecordUid", "RecordDetailsInclude" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.UserPermission), global::Records.UserPermission.Parser, new[]{ "Username", "Owner", "ShareAdmin", "Sharable", "Editable", "AwaitingApproval", "Expiration", "AccountUid", "TimerNotificationType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.SharedFolderPermission), global::Records.SharedFolderPermission.Parser, new[]{ "SharedFolderUid", "Resharable", "Editable", "Revision", "Expiration", "TimerNotificationType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordData), global::Records.RecordData.Parser, new[]{ "Revision", "Version", "Shared", "EncryptedRecordData", "EncryptedExtraData", "ClientModifiedTime", "NonSharedData", "LinkedRecordData", "FileId", "FileSize", "ThumbnailSize", "RecordKeyType", "RecordKey", "RecordUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordDataWithAccessInfo), global::Records.RecordDataWithAccessInfo.Parser, new[]{ "RecordUid", "RecordData", "UserPermission", "SharedFolderPermission" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.GetRecordDataWithAccessInfoResponse), global::Records.GetRecordDataWithAccessInfoResponse.Parser, new[]{ "RecordDataWithAccessInfo", "NoPermissionRecordUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.IsObjectShareAdmin), global::Records.IsObjectShareAdmin.Parser, new[]{ "Uid", "IsAdmin", "ObjectType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.AmIShareAdmin), global::Records.AmIShareAdmin.Parser, new[]{ "IsObjectShareAdmin" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordShareUpdateRequest), global::Records.RecordShareUpdateRequest.Parser, new[]{ "AddSharedRecord", "UpdateSharedRecord", "RemoveSharedRecord", "Pt" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.SharedRecord), global::Records.SharedRecord.Parser, new[]{ "ToUsername", "RecordUid", "RecordKey", "SharedFolderUid", "TeamUid", "Editable", "Shareable", "Transfer", "UseEccKey", "RemoveVaultData", "Expiration", "TimerNotificationType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordShareUpdateResponse), global::Records.RecordShareUpdateResponse.Parser, new[]{ "AddSharedRecordStatus", "UpdateSharedRecordStatus", "RemoveSharedRecordStatus" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.SharedRecordStatus), global::Records.SharedRecordStatus.Parser, new[]{ "RecordUid", "Status", "Message", "Username" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.GetRecordPermissionsRequest), global::Records.GetRecordPermissionsRequest.Parser, new[]{ "RecordUids", "IsShareAdmin" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.GetRecordPermissionsResponse), global::Records.GetRecordPermissionsResponse.Parser, new[]{ "RecordPermissions" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordPermission), global::Records.RecordPermission.Parser, new[]{ "RecordUid", "Owner", "CanEdit", "CanShare", "CanTransfer" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.GetShareObjectsRequest), global::Records.GetShareObjectsRequest.Parser, new[]{ "StartWith", "Contains", "Filtered", "SharedFolderUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.GetShareObjectsResponse), global::Records.GetShareObjectsResponse.Parser, new[]{ "ShareRelationships", "ShareFamilyUsers", "ShareEnterpriseUsers", "ShareTeams", "ShareMCTeams", "ShareMCEnterpriseUsers", "ShareEnterpriseNames" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.ShareUser), global::Records.ShareUser.Parser, new[]{ "Username", "Fullname", "EnterpriseId", "Status", "IsShareAdmin", "IsAdminOfSharedFolderOwner" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.ShareTeam), global::Records.ShareTeam.Parser, new[]{ "Teamname", "EnterpriseId", "TeamUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.ShareEnterprise), global::Records.ShareEnterprise.Parser, new[]{ "Enterprisename", "EnterpriseId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsOnwershipTransferRequest), global::Records.RecordsOnwershipTransferRequest.Parser, new[]{ "TransferRecords" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.TransferRecord), global::Records.TransferRecord.Parser, new[]{ "Username", "RecordUid", "RecordKey", "UseEccKey" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsOnwershipTransferResponse), global::Records.RecordsOnwershipTransferResponse.Parser, new[]{ "TransferRecordStatus" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.TransferRecordStatus), global::Records.TransferRecordStatus.Parser, new[]{ "Username", "RecordUid", "Status", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUnshareRequest), global::Records.RecordsUnshareRequest.Parser, new[]{ "SharedFolders", "Users" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUnshareResponse), global::Records.RecordsUnshareResponse.Parser, new[]{ "SharedFolders", "Users" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUnshareFolder), global::Records.RecordsUnshareFolder.Parser, new[]{ "RecordUid", "SharedFolderUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUnshareUser), global::Records.RecordsUnshareUser.Parser, new[]{ "RecordUid", "AccountUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUnshareFolderStatus), global::Records.RecordsUnshareFolderStatus.Parser, new[]{ "RecordUid", "SharedFolderUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.RecordsUnshareUserStatus), global::Records.RecordsUnshareUserStatus.Parser, new[]{ "RecordUid", "AccountUid" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.TimedAccessCallbackPayload), global::Records.TimedAccessCallbackPayload.Parser, new[]{ "TimeLimitedAccessType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.TimeLimitedAccessRequest), global::Records.TimeLimitedAccessRequest.Parser, new[]{ "AccountUid", "TeamUid", "RecordUid", "SharedObjectUid", "TimeLimitedAccessType", "Expiration", "TimerNotificationType" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.TimeLimitedAccessStatus), global::Records.TimeLimitedAccessStatus.Parser, new[]{ "Uid", "Message" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Records.TimeLimitedAccessResponse), global::Records.TimeLimitedAccessResponse.Parser, new[]{ "Revision", "UserAccessStatus", "TeamAccessStatus", "RecordAccessStatus" }, null, null, null, null) + })); + } + #endregion + + } + #region Enums + public enum RecordTypeScope { + [pbr::OriginalName("RT_STANDARD")] RtStandard = 0, + [pbr::OriginalName("RT_USER")] RtUser = 1, + [pbr::OriginalName("RT_ENTERPRISE")] RtEnterprise = 2, + [pbr::OriginalName("RT_PAM")] RtPam = 3, + [pbr::OriginalName("RT_PAM_CONFIGURATION")] RtPamConfiguration = 4, + } + + public enum RecordKeyType { + [pbr::OriginalName("NO_KEY")] NoKey = 0, + [pbr::OriginalName("ENCRYPTED_BY_DATA_KEY")] EncryptedByDataKey = 1, + [pbr::OriginalName("ENCRYPTED_BY_PUBLIC_KEY")] EncryptedByPublicKey = 2, + [pbr::OriginalName("ENCRYPTED_BY_DATA_KEY_GCM")] EncryptedByDataKeyGcm = 3, + [pbr::OriginalName("ENCRYPTED_BY_PUBLIC_KEY_ECC")] EncryptedByPublicKeyEcc = 4, + [pbr::OriginalName("ENCRYPTED_BY_ROOT_KEY_CBC")] EncryptedByRootKeyCbc = 5, + [pbr::OriginalName("ENCRYPTED_BY_ROOT_KEY_GCM")] EncryptedByRootKeyGcm = 6, + } + + public enum RecordFolderType { + [pbr::OriginalName("user_folder")] UserFolder = 0, + [pbr::OriginalName("shared_folder")] SharedFolder = 1, + [pbr::OriginalName("shared_folder_folder")] SharedFolderFolder = 2, + } + + public enum RecordModifyResult { + [pbr::OriginalName("RS_SUCCESS")] RsSuccess = 0, + [pbr::OriginalName("RS_OUT_OF_SYNC")] RsOutOfSync = 1, + [pbr::OriginalName("RS_ACCESS_DENIED")] RsAccessDenied = 2, + [pbr::OriginalName("RS_SHARE_DENIED")] RsShareDenied = 3, + [pbr::OriginalName("RS_RECORD_EXISTS")] RsRecordExists = 4, + [pbr::OriginalName("RS_OLD_RECORD_VERSION_TYPE")] RsOldRecordVersionType = 5, + [pbr::OriginalName("RS_NEW_RECORD_VERSION_TYPE")] RsNewRecordVersionType = 6, + [pbr::OriginalName("RS_FILES_NOT_MATCH")] RsFilesNotMatch = 7, + [pbr::OriginalName("RS_RECORD_NOT_SHAREABLE")] RsRecordNotShareable = 8, + [pbr::OriginalName("RS_ATTACHMENT_NOT_SHAREABLE")] RsAttachmentNotShareable = 9, + [pbr::OriginalName("RS_FILE_LIMIT_REACHED")] RsFileLimitReached = 10, + [pbr::OriginalName("RS_SIZE_EXCEEDED_LIMIT")] RsSizeExceededLimit = 11, + [pbr::OriginalName("RS_ONLY_OWNER_CAN_MODIFY_SCRIPTS")] RsOnlyOwnerCanModifyScripts = 12, + } + + public enum FileAddResult { + [pbr::OriginalName("FA_SUCCESS")] FaSuccess = 0, + [pbr::OriginalName("FA_ERROR")] FaError = 1, + } + + public enum FileGetResult { + [pbr::OriginalName("FG_SUCCESS")] FgSuccess = 0, + [pbr::OriginalName("FG_ERROR")] FgError = 1, + [pbr::OriginalName("FG_ACCESS_DENIED")] FgAccessDenied = 2, + } + + public enum RecordDetailsInclude { + [pbr::OriginalName("DATA_PLUS_SHARE")] DataPlusShare = 0, + [pbr::OriginalName("DATA_ONLY")] DataOnly = 1, + [pbr::OriginalName("SHARE_ONLY")] ShareOnly = 2, + } + + public enum CheckShareAdminObjectType { + [pbr::OriginalName("CHECK_SA_INVALID_TYPE")] CheckSaInvalidType = 0, + [pbr::OriginalName("CHECK_SA_ON_SF")] CheckSaOnSf = 1, + [pbr::OriginalName("CHECK_SA_ON_RECORD")] CheckSaOnRecord = 2, + } + + public enum ShareStatus { + [pbr::OriginalName("ACTIVE")] Active = 0, + [pbr::OriginalName("BLOCK")] Block = 1, + [pbr::OriginalName("INVITED")] Invited = 2, + } + + public enum RecordTransactionType { + [pbr::OriginalName("RTT_GENERAL")] RttGeneral = 0, + [pbr::OriginalName("RTT_ROTATION")] RttRotation = 1, + } + + public enum TimeLimitedAccessType { + [pbr::OriginalName("INVALID_TIME_LIMITED_ACCESS_TYPE")] InvalidTimeLimitedAccessType = 0, + [pbr::OriginalName("USER_ACCESS_TO_RECORD")] UserAccessToRecord = 1, + [pbr::OriginalName("USER_OR_TEAM_ACCESS_TO_SHAREDFOLDER")] UserOrTeamAccessToSharedfolder = 2, + [pbr::OriginalName("RECORD_ACCESS_TO_SHAREDFOLDER")] RecordAccessToSharedfolder = 3, + /// + /// used for scheduler callback + /// + [pbr::OriginalName("USER_ACCESS_TO_SHAREDFOLDER")] UserAccessToSharedfolder = 4, + /// + /// used for scheduler callback + /// + [pbr::OriginalName("TEAM_ACCESS_TO_SHAREDFOLDER")] TeamAccessToSharedfolder = 5, + } + + public enum TimerNotificationType { + [pbr::OriginalName("NOTIFICATION_OFF")] NotificationOff = 0, + [pbr::OriginalName("NOTIFY_OWNER")] NotifyOwner = 1, + [pbr::OriginalName("NOTIFY_PRIVILEGED_USERS")] NotifyPrivilegedUsers = 2, + } + + #endregion + + #region Messages + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordType : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordType()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[0]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordType() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordType(RecordType other) : this() { + recordTypeId_ = other.recordTypeId_; + content_ = other.content_; + scope_ = other.scope_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordType Clone() { + return new RecordType(this); + } + + /// Field number for the "recordTypeId" field. + public const int RecordTypeIdFieldNumber = 1; + private int recordTypeId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RecordTypeId { + get { return recordTypeId_; } + set { + recordTypeId_ = value; + } + } + + /// Field number for the "content" field. + public const int ContentFieldNumber = 2; + private string content_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Content { + get { return content_; } + set { + content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "scope" field. + public const int ScopeFieldNumber = 3; + private global::Records.RecordTypeScope scope_ = global::Records.RecordTypeScope.RtStandard; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordTypeScope Scope { + get { return scope_; } + set { + scope_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordType); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordType other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordTypeId != other.RecordTypeId) return false; + if (Content != other.Content) return false; + if (Scope != other.Scope) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordTypeId != 0) hash ^= RecordTypeId.GetHashCode(); + if (Content.Length != 0) hash ^= Content.GetHashCode(); + if (Scope != global::Records.RecordTypeScope.RtStandard) hash ^= Scope.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordTypeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RecordTypeId); + } + if (Content.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Content); + } + if (Scope != global::Records.RecordTypeScope.RtStandard) { + output.WriteRawTag(24); + output.WriteEnum((int) Scope); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordTypeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RecordTypeId); + } + if (Content.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Content); + } + if (Scope != global::Records.RecordTypeScope.RtStandard) { + output.WriteRawTag(24); + output.WriteEnum((int) Scope); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RecordTypeId); + } + if (Content.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Content); + } + if (Scope != global::Records.RecordTypeScope.RtStandard) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Scope); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordType other) { + if (other == null) { + return; + } + if (other.RecordTypeId != 0) { + RecordTypeId = other.RecordTypeId; + } + if (other.Content.Length != 0) { + Content = other.Content; + } + if (other.Scope != global::Records.RecordTypeScope.RtStandard) { + Scope = other.Scope; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RecordTypeId = input.ReadInt32(); + break; + } + case 18: { + Content = input.ReadString(); + break; + } + case 24: { + Scope = (global::Records.RecordTypeScope) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RecordTypeId = input.ReadInt32(); + break; + } + case 18: { + Content = input.ReadString(); + break; + } + case 24: { + Scope = (global::Records.RecordTypeScope) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordTypesRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordTypesRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[1]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypesRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypesRequest(RecordTypesRequest other) : this() { + standard_ = other.standard_; + user_ = other.user_; + enterprise_ = other.enterprise_; + pam_ = other.pam_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypesRequest Clone() { + return new RecordTypesRequest(this); + } + + /// Field number for the "standard" field. + public const int StandardFieldNumber = 1; + private bool standard_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Standard { + get { return standard_; } + set { + standard_ = value; + } + } + + /// Field number for the "user" field. + public const int UserFieldNumber = 2; + private bool user_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool User { + get { return user_; } + set { + user_ = value; + } + } + + /// Field number for the "enterprise" field. + public const int EnterpriseFieldNumber = 3; + private bool enterprise_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Enterprise { + get { return enterprise_; } + set { + enterprise_ = value; + } + } + + /// Field number for the "pam" field. + public const int PamFieldNumber = 4; + private bool pam_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Pam { + get { return pam_; } + set { + pam_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordTypesRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordTypesRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Standard != other.Standard) return false; + if (User != other.User) return false; + if (Enterprise != other.Enterprise) return false; + if (Pam != other.Pam) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Standard != false) hash ^= Standard.GetHashCode(); + if (User != false) hash ^= User.GetHashCode(); + if (Enterprise != false) hash ^= Enterprise.GetHashCode(); + if (Pam != false) hash ^= Pam.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Standard != false) { + output.WriteRawTag(8); + output.WriteBool(Standard); + } + if (User != false) { + output.WriteRawTag(16); + output.WriteBool(User); + } + if (Enterprise != false) { + output.WriteRawTag(24); + output.WriteBool(Enterprise); + } + if (Pam != false) { + output.WriteRawTag(32); + output.WriteBool(Pam); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Standard != false) { + output.WriteRawTag(8); + output.WriteBool(Standard); + } + if (User != false) { + output.WriteRawTag(16); + output.WriteBool(User); + } + if (Enterprise != false) { + output.WriteRawTag(24); + output.WriteBool(Enterprise); + } + if (Pam != false) { + output.WriteRawTag(32); + output.WriteBool(Pam); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Standard != false) { + size += 1 + 1; + } + if (User != false) { + size += 1 + 1; + } + if (Enterprise != false) { + size += 1 + 1; + } + if (Pam != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordTypesRequest other) { + if (other == null) { + return; + } + if (other.Standard != false) { + Standard = other.Standard; + } + if (other.User != false) { + User = other.User; + } + if (other.Enterprise != false) { + Enterprise = other.Enterprise; + } + if (other.Pam != false) { + Pam = other.Pam; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Standard = input.ReadBool(); + break; + } + case 16: { + User = input.ReadBool(); + break; + } + case 24: { + Enterprise = input.ReadBool(); + break; + } + case 32: { + Pam = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Standard = input.ReadBool(); + break; + } + case 16: { + User = input.ReadBool(); + break; + } + case 24: { + Enterprise = input.ReadBool(); + break; + } + case 32: { + Pam = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordTypesResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordTypesResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[2]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypesResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypesResponse(RecordTypesResponse other) : this() { + recordTypes_ = other.recordTypes_.Clone(); + standardCounter_ = other.standardCounter_; + userCounter_ = other.userCounter_; + enterpriseCounter_ = other.enterpriseCounter_; + pamCounter_ = other.pamCounter_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypesResponse Clone() { + return new RecordTypesResponse(this); + } + + /// Field number for the "recordTypes" field. + public const int RecordTypesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordTypes_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordType.Parser); + private readonly pbc::RepeatedField recordTypes_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordTypes { + get { return recordTypes_; } + } + + /// Field number for the "standardCounter" field. + public const int StandardCounterFieldNumber = 2; + private int standardCounter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int StandardCounter { + get { return standardCounter_; } + set { + standardCounter_ = value; + } + } + + /// Field number for the "userCounter" field. + public const int UserCounterFieldNumber = 3; + private int userCounter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int UserCounter { + get { return userCounter_; } + set { + userCounter_ = value; + } + } + + /// Field number for the "enterpriseCounter" field. + public const int EnterpriseCounterFieldNumber = 4; + private int enterpriseCounter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EnterpriseCounter { + get { return enterpriseCounter_; } + set { + enterpriseCounter_ = value; + } + } + + /// Field number for the "pamCounter" field. + public const int PamCounterFieldNumber = 5; + private int pamCounter_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int PamCounter { + get { return pamCounter_; } + set { + pamCounter_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordTypesResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordTypesResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordTypes_.Equals(other.recordTypes_)) return false; + if (StandardCounter != other.StandardCounter) return false; + if (UserCounter != other.UserCounter) return false; + if (EnterpriseCounter != other.EnterpriseCounter) return false; + if (PamCounter != other.PamCounter) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordTypes_.GetHashCode(); + if (StandardCounter != 0) hash ^= StandardCounter.GetHashCode(); + if (UserCounter != 0) hash ^= UserCounter.GetHashCode(); + if (EnterpriseCounter != 0) hash ^= EnterpriseCounter.GetHashCode(); + if (PamCounter != 0) hash ^= PamCounter.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordTypes_.WriteTo(output, _repeated_recordTypes_codec); + if (StandardCounter != 0) { + output.WriteRawTag(16); + output.WriteInt32(StandardCounter); + } + if (UserCounter != 0) { + output.WriteRawTag(24); + output.WriteInt32(UserCounter); + } + if (EnterpriseCounter != 0) { + output.WriteRawTag(32); + output.WriteInt32(EnterpriseCounter); + } + if (PamCounter != 0) { + output.WriteRawTag(40); + output.WriteInt32(PamCounter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordTypes_.WriteTo(ref output, _repeated_recordTypes_codec); + if (StandardCounter != 0) { + output.WriteRawTag(16); + output.WriteInt32(StandardCounter); + } + if (UserCounter != 0) { + output.WriteRawTag(24); + output.WriteInt32(UserCounter); + } + if (EnterpriseCounter != 0) { + output.WriteRawTag(32); + output.WriteInt32(EnterpriseCounter); + } + if (PamCounter != 0) { + output.WriteRawTag(40); + output.WriteInt32(PamCounter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordTypes_.CalculateSize(_repeated_recordTypes_codec); + if (StandardCounter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(StandardCounter); + } + if (UserCounter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(UserCounter); + } + if (EnterpriseCounter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseCounter); + } + if (PamCounter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(PamCounter); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordTypesResponse other) { + if (other == null) { + return; + } + recordTypes_.Add(other.recordTypes_); + if (other.StandardCounter != 0) { + StandardCounter = other.StandardCounter; + } + if (other.UserCounter != 0) { + UserCounter = other.UserCounter; + } + if (other.EnterpriseCounter != 0) { + EnterpriseCounter = other.EnterpriseCounter; + } + if (other.PamCounter != 0) { + PamCounter = other.PamCounter; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordTypes_.AddEntriesFrom(input, _repeated_recordTypes_codec); + break; + } + case 16: { + StandardCounter = input.ReadInt32(); + break; + } + case 24: { + UserCounter = input.ReadInt32(); + break; + } + case 32: { + EnterpriseCounter = input.ReadInt32(); + break; + } + case 40: { + PamCounter = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordTypes_.AddEntriesFrom(ref input, _repeated_recordTypes_codec); + break; + } + case 16: { + StandardCounter = input.ReadInt32(); + break; + } + case 24: { + UserCounter = input.ReadInt32(); + break; + } + case 32: { + EnterpriseCounter = input.ReadInt32(); + break; + } + case 40: { + PamCounter = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordTypeModifyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordTypeModifyResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[3]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypeModifyResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypeModifyResponse(RecordTypeModifyResponse other) : this() { + recordTypeId_ = other.recordTypeId_; + counter_ = other.counter_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordTypeModifyResponse Clone() { + return new RecordTypeModifyResponse(this); + } + + /// Field number for the "recordTypeId" field. + public const int RecordTypeIdFieldNumber = 1; + private int recordTypeId_; + /// + /// record id of the added, updated or removed record + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int RecordTypeId { + get { return recordTypeId_; } + set { + recordTypeId_ = value; + } + } + + /// Field number for the "counter" field. + public const int CounterFieldNumber = 2; + private int counter_; + /// + /// updated counter for the scope affected + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Counter { + get { return counter_; } + set { + counter_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordTypeModifyResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordTypeModifyResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordTypeId != other.RecordTypeId) return false; + if (Counter != other.Counter) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordTypeId != 0) hash ^= RecordTypeId.GetHashCode(); + if (Counter != 0) hash ^= Counter.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordTypeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RecordTypeId); + } + if (Counter != 0) { + output.WriteRawTag(16); + output.WriteInt32(Counter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordTypeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(RecordTypeId); + } + if (Counter != 0) { + output.WriteRawTag(16); + output.WriteInt32(Counter); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(RecordTypeId); + } + if (Counter != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Counter); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordTypeModifyResponse other) { + if (other == null) { + return; + } + if (other.RecordTypeId != 0) { + RecordTypeId = other.RecordTypeId; + } + if (other.Counter != 0) { + Counter = other.Counter; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + RecordTypeId = input.ReadInt32(); + break; + } + case 16: { + Counter = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + RecordTypeId = input.ReadInt32(); + break; + } + case 16: { + Counter = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsGetRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsGetRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[4]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsGetRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsGetRequest(RecordsGetRequest other) : this() { + recordUids_ = other.recordUids_.Clone(); + clientTime_ = other.clientTime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsGetRequest Clone() { + return new RecordsGetRequest(this); + } + + /// Field number for the "record_uids" field. + public const int RecordUidsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } + } + + /// Field number for the "client_time" field. + public const int ClientTimeFieldNumber = 2; + private long clientTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientTime { + get { return clientTime_; } + set { + clientTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsGetRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsGetRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordUids_.Equals(other.recordUids_)) return false; + if (ClientTime != other.ClientTime) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordUids_.GetHashCode(); + if (ClientTime != 0L) hash ^= ClientTime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordUids_.WriteTo(output, _repeated_recordUids_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordUids_.CalculateSize(_repeated_recordUids_codec); + if (ClientTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsGetRequest other) { + if (other == null) { + return; + } + recordUids_.Add(other.recordUids_); + if (other.ClientTime != 0L) { + ClientTime = other.ClientTime; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Record : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Record()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[5]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Record() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Record(Record other) : this() { + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + recordKeyType_ = other.recordKeyType_; + data_ = other.data_; + extra_ = other.extra_; + version_ = other.version_; + clientModifiedTime_ = other.clientModifiedTime_; + revision_ = other.revision_; + fileIds_ = other.fileIds_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Record Clone() { + return new Record(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 2; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key_type" field. + public const int RecordKeyTypeFieldNumber = 3; + private global::Records.RecordKeyType recordKeyType_ = global::Records.RecordKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordKeyType RecordKeyType { + get { return recordKeyType_; } + set { + recordKeyType_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "extra" field. + public const int ExtraFieldNumber = 5; + private pb::ByteString extra_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Extra { + get { return extra_; } + set { + extra_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 6; + private int version_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Version { + get { return version_; } + set { + version_ = value; + } + } + + /// Field number for the "client_modified_time" field. + public const int ClientModifiedTimeFieldNumber = 7; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 8; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "file_ids" field. + public const int FileIdsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_fileIds_codec + = pb::FieldCodec.ForBytes(74); + private readonly pbc::RepeatedField fileIds_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FileIds { + get { return fileIds_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Record); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Record other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + if (RecordKeyType != other.RecordKeyType) return false; + if (Data != other.Data) return false; + if (Extra != other.Extra) return false; + if (Version != other.Version) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (Revision != other.Revision) return false; + if(!fileIds_.Equals(other.fileIds_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (RecordKeyType != global::Records.RecordKeyType.NoKey) hash ^= RecordKeyType.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (Extra.Length != 0) hash ^= Extra.GetHashCode(); + if (Version != 0) hash ^= Version.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + hash ^= fileIds_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (RecordKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) RecordKeyType); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (Extra.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(Extra); + } + if (Version != 0) { + output.WriteRawTag(48); + output.WriteInt32(Version); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(56); + output.WriteInt64(ClientModifiedTime); + } + if (Revision != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Revision); + } + fileIds_.WriteTo(output, _repeated_fileIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (RecordKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) RecordKeyType); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (Extra.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(Extra); + } + if (Version != 0) { + output.WriteRawTag(48); + output.WriteInt32(Version); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(56); + output.WriteInt64(ClientModifiedTime); + } + if (Revision != 0L) { + output.WriteRawTag(64); + output.WriteInt64(Revision); + } + fileIds_.WriteTo(ref output, _repeated_fileIds_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (RecordKeyType != global::Records.RecordKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RecordKeyType); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (Extra.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Extra); + } + if (Version != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + size += fileIds_.CalculateSize(_repeated_fileIds_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Record other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.RecordKeyType != global::Records.RecordKeyType.NoKey) { + RecordKeyType = other.RecordKeyType; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.Extra.Length != 0) { + Extra = other.Extra; + } + if (other.Version != 0) { + Version = other.Version; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + fileIds_.Add(other.fileIds_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + RecordKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + Extra = input.ReadBytes(); + break; + } + case 48: { + Version = input.ReadInt32(); + break; + } + case 56: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 64: { + Revision = input.ReadInt64(); + break; + } + case 74: { + fileIds_.AddEntriesFrom(input, _repeated_fileIds_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + RecordKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + Extra = input.ReadBytes(); + break; + } + case 48: { + Version = input.ReadInt32(); + break; + } + case 56: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 64: { + Revision = input.ReadInt64(); + break; + } + case 74: { + fileIds_.AddEntriesFrom(ref input, _repeated_fileIds_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FolderRecordKey : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FolderRecordKey()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[6]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FolderRecordKey() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FolderRecordKey(FolderRecordKey other) : this() { + folderUid_ = other.folderUid_; + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FolderRecordKey Clone() { + return new FolderRecordKey(this); + } + + /// Field number for the "folder_uid" field. + public const int FolderUidFieldNumber = 1; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 3; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FolderRecordKey); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FolderRecordKey other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FolderUid != other.FolderUid) return false; + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FolderRecordKey other) { + if (other == null) { + return; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + RecordKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + RecordKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Folder : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Folder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[7]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Folder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Folder(Folder other) : this() { + folderUid_ = other.folderUid_; + folderKey_ = other.folderKey_; + folderKeyType_ = other.folderKeyType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Folder Clone() { + return new Folder(this); + } + + /// Field number for the "folder_uid" field. + public const int FolderUidFieldNumber = 1; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "folder_key" field. + public const int FolderKeyFieldNumber = 2; + private pb::ByteString folderKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderKey { + get { return folderKey_; } + set { + folderKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "folder_key_type" field. + public const int FolderKeyTypeFieldNumber = 3; + private global::Records.RecordKeyType folderKeyType_ = global::Records.RecordKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordKeyType FolderKeyType { + get { return folderKeyType_; } + set { + folderKeyType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Folder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Folder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FolderUid != other.FolderUid) return false; + if (FolderKey != other.FolderKey) return false; + if (FolderKeyType != other.FolderKeyType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + if (FolderKey.Length != 0) hash ^= FolderKey.GetHashCode(); + if (FolderKeyType != global::Records.RecordKeyType.NoKey) hash ^= FolderKeyType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (FolderKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(FolderKey); + } + if (FolderKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) FolderKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (FolderKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(FolderKey); + } + if (FolderKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(24); + output.WriteEnum((int) FolderKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (FolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderKey); + } + if (FolderKeyType != global::Records.RecordKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FolderKeyType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Folder other) { + if (other == null) { + return; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + if (other.FolderKey.Length != 0) { + FolderKey = other.FolderKey; + } + if (other.FolderKeyType != global::Records.RecordKeyType.NoKey) { + FolderKeyType = other.FolderKeyType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + FolderKey = input.ReadBytes(); + break; + } + case 24: { + FolderKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + FolderKey = input.ReadBytes(); + break; + } + case 24: { + FolderKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class Team : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new Team()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Team() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Team(Team other) : this() { + teamUid_ = other.teamUid_; + teamKey_ = other.teamKey_; + teamPrivateKey_ = other.teamPrivateKey_; + teamKeyType_ = other.teamKeyType_; + folders_ = other.folders_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public Team Clone() { + return new Team(this); + } + + /// Field number for the "team_uid" field. + public const int TeamUidFieldNumber = 1; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "team_key" field. + public const int TeamKeyFieldNumber = 2; + private pb::ByteString teamKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamKey { + get { return teamKey_; } + set { + teamKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "team_private_key" field. + public const int TeamPrivateKeyFieldNumber = 3; + private pb::ByteString teamPrivateKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamPrivateKey { + get { return teamPrivateKey_; } + set { + teamPrivateKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "team_key_type" field. + public const int TeamKeyTypeFieldNumber = 4; + private global::Records.RecordKeyType teamKeyType_ = global::Records.RecordKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordKeyType TeamKeyType { + get { return teamKeyType_; } + set { + teamKeyType_ = value; + } + } + + /// Field number for the "folders" field. + public const int FoldersFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_folders_codec + = pb::FieldCodec.ForMessage(42, global::Records.Folder.Parser); + private readonly pbc::RepeatedField folders_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Folders { + get { return folders_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as Team); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(Team other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TeamUid != other.TeamUid) return false; + if (TeamKey != other.TeamKey) return false; + if (TeamPrivateKey != other.TeamPrivateKey) return false; + if (TeamKeyType != other.TeamKeyType) return false; + if(!folders_.Equals(other.folders_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (TeamKey.Length != 0) hash ^= TeamKey.GetHashCode(); + if (TeamPrivateKey.Length != 0) hash ^= TeamPrivateKey.GetHashCode(); + if (TeamKeyType != global::Records.RecordKeyType.NoKey) hash ^= TeamKeyType.GetHashCode(); + hash ^= folders_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (TeamKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(TeamKey); + } + if (TeamPrivateKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TeamPrivateKey); + } + if (TeamKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) TeamKeyType); + } + folders_.WriteTo(output, _repeated_folders_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TeamUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(TeamUid); + } + if (TeamKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(TeamKey); + } + if (TeamPrivateKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TeamPrivateKey); + } + if (TeamKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(32); + output.WriteEnum((int) TeamKeyType); + } + folders_.WriteTo(ref output, _repeated_folders_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (TeamKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamKey); + } + if (TeamPrivateKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamPrivateKey); + } + if (TeamKeyType != global::Records.RecordKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TeamKeyType); + } + size += folders_.CalculateSize(_repeated_folders_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(Team other) { + if (other == null) { + return; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.TeamKey.Length != 0) { + TeamKey = other.TeamKey; + } + if (other.TeamPrivateKey.Length != 0) { + TeamPrivateKey = other.TeamPrivateKey; + } + if (other.TeamKeyType != global::Records.RecordKeyType.NoKey) { + TeamKeyType = other.TeamKeyType; + } + folders_.Add(other.folders_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + TeamKey = input.ReadBytes(); + break; + } + case 26: { + TeamPrivateKey = input.ReadBytes(); + break; + } + case 32: { + TeamKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 42: { + folders_.AddEntriesFrom(input, _repeated_folders_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + TeamUid = input.ReadBytes(); + break; + } + case 18: { + TeamKey = input.ReadBytes(); + break; + } + case 26: { + TeamPrivateKey = input.ReadBytes(); + break; + } + case 32: { + TeamKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 42: { + folders_.AddEntriesFrom(ref input, _repeated_folders_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsGetResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsGetResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsGetResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsGetResponse(RecordsGetResponse other) : this() { + records_ = other.records_.Clone(); + folderRecordKeys_ = other.folderRecordKeys_.Clone(); + folders_ = other.folders_.Clone(); + teams_ = other.teams_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsGetResponse Clone() { + return new RecordsGetResponse(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.Record.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "folder_record_keys" field. + public const int FolderRecordKeysFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_folderRecordKeys_codec + = pb::FieldCodec.ForMessage(18, global::Records.FolderRecordKey.Parser); + private readonly pbc::RepeatedField folderRecordKeys_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FolderRecordKeys { + get { return folderRecordKeys_; } + } + + /// Field number for the "folders" field. + public const int FoldersFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_folders_codec + = pb::FieldCodec.ForMessage(26, global::Records.Folder.Parser); + private readonly pbc::RepeatedField folders_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Folders { + get { return folders_; } + } + + /// Field number for the "teams" field. + public const int TeamsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_teams_codec + = pb::FieldCodec.ForMessage(34, global::Records.Team.Parser); + private readonly pbc::RepeatedField teams_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Teams { + get { return teams_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsGetResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsGetResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + if(!folderRecordKeys_.Equals(other.folderRecordKeys_)) return false; + if(!folders_.Equals(other.folders_)) return false; + if(!teams_.Equals(other.teams_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + hash ^= folderRecordKeys_.GetHashCode(); + hash ^= folders_.GetHashCode(); + hash ^= teams_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + folderRecordKeys_.WriteTo(output, _repeated_folderRecordKeys_codec); + folders_.WriteTo(output, _repeated_folders_codec); + teams_.WriteTo(output, _repeated_teams_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + folderRecordKeys_.WriteTo(ref output, _repeated_folderRecordKeys_codec); + folders_.WriteTo(ref output, _repeated_folders_codec); + teams_.WriteTo(ref output, _repeated_teams_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + size += folderRecordKeys_.CalculateSize(_repeated_folderRecordKeys_codec); + size += folders_.CalculateSize(_repeated_folders_codec); + size += teams_.CalculateSize(_repeated_teams_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsGetResponse other) { + if (other == null) { + return; + } + records_.Add(other.records_); + folderRecordKeys_.Add(other.folderRecordKeys_); + folders_.Add(other.folders_); + teams_.Add(other.teams_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 18: { + folderRecordKeys_.AddEntriesFrom(input, _repeated_folderRecordKeys_codec); + break; + } + case 26: { + folders_.AddEntriesFrom(input, _repeated_folders_codec); + break; + } + case 34: { + teams_.AddEntriesFrom(input, _repeated_teams_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 18: { + folderRecordKeys_.AddEntriesFrom(ref input, _repeated_folderRecordKeys_codec); + break; + } + case 26: { + folders_.AddEntriesFrom(ref input, _repeated_folders_codec); + break; + } + case 34: { + teams_.AddEntriesFrom(ref input, _repeated_teams_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordLink : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordLink()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[10]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordLink() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordLink(RecordLink other) : this() { + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordLink Clone() { + return new RecordLink(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 2; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordLink); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordLink other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordLink other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordAudit : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordAudit()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[11]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAudit() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAudit(RecordAudit other) : this() { + version_ = other.version_; + data_ = other.data_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAudit Clone() { + return new RecordAudit(this); + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 1; + private int version_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Version { + get { return version_; } + set { + version_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 2; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordAudit); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordAudit other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Version != other.Version) return false; + if (Data != other.Data) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Version != 0) hash ^= Version.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Version != 0) { + output.WriteRawTag(8); + output.WriteInt32(Version); + } + if (Data.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Version != 0) { + output.WriteRawTag(8); + output.WriteInt32(Version); + } + if (Data.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Version != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordAudit other) { + if (other == null) { + return; + } + if (other.Version != 0) { + Version = other.Version; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Version = input.ReadInt32(); + break; + } + case 18: { + Data = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Version = input.ReadInt32(); + break; + } + case 18: { + Data = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordAdd : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordAdd()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[12]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAdd() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAdd(RecordAdd other) : this() { + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + clientModifiedTime_ = other.clientModifiedTime_; + data_ = other.data_; + nonSharedData_ = other.nonSharedData_; + folderType_ = other.folderType_; + folderUid_ = other.folderUid_; + folderKey_ = other.folderKey_; + recordLinks_ = other.recordLinks_.Clone(); + audit_ = other.audit_ != null ? other.audit_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAdd Clone() { + return new RecordAdd(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 2; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "client_modified_time" field. + public const int ClientModifiedTimeFieldNumber = 3; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "non_shared_data" field. + public const int NonSharedDataFieldNumber = 5; + private pb::ByteString nonSharedData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString NonSharedData { + get { return nonSharedData_; } + set { + nonSharedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "folder_type" field. + public const int FolderTypeFieldNumber = 6; + private global::Records.RecordFolderType folderType_ = global::Records.RecordFolderType.UserFolder; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordFolderType FolderType { + get { return folderType_; } + set { + folderType_ = value; + } + } + + /// Field number for the "folder_uid" field. + public const int FolderUidFieldNumber = 7; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "folder_key" field. + public const int FolderKeyFieldNumber = 8; + private pb::ByteString folderKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderKey { + get { return folderKey_; } + set { + folderKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_links" field. + public const int RecordLinksFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_recordLinks_codec + = pb::FieldCodec.ForMessage(74, global::Records.RecordLink.Parser); + private readonly pbc::RepeatedField recordLinks_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordLinks { + get { return recordLinks_; } + } + + /// Field number for the "audit" field. + public const int AuditFieldNumber = 10; + private global::Records.RecordAudit audit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordAudit Audit { + get { return audit_; } + set { + audit_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordAdd); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordAdd other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (Data != other.Data) return false; + if (NonSharedData != other.NonSharedData) return false; + if (FolderType != other.FolderType) return false; + if (FolderUid != other.FolderUid) return false; + if (FolderKey != other.FolderKey) return false; + if(!recordLinks_.Equals(other.recordLinks_)) return false; + if (!object.Equals(Audit, other.Audit)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (NonSharedData.Length != 0) hash ^= NonSharedData.GetHashCode(); + if (FolderType != global::Records.RecordFolderType.UserFolder) hash ^= FolderType.GetHashCode(); + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + if (FolderKey.Length != 0) hash ^= FolderKey.GetHashCode(); + hash ^= recordLinks_.GetHashCode(); + if (audit_ != null) hash ^= Audit.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(24); + output.WriteInt64(ClientModifiedTime); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(NonSharedData); + } + if (FolderType != global::Records.RecordFolderType.UserFolder) { + output.WriteRawTag(48); + output.WriteEnum((int) FolderType); + } + if (FolderUid.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(FolderUid); + } + if (FolderKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(FolderKey); + } + recordLinks_.WriteTo(output, _repeated_recordLinks_codec); + if (audit_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Audit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(24); + output.WriteInt64(ClientModifiedTime); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(NonSharedData); + } + if (FolderType != global::Records.RecordFolderType.UserFolder) { + output.WriteRawTag(48); + output.WriteEnum((int) FolderType); + } + if (FolderUid.Length != 0) { + output.WriteRawTag(58); + output.WriteBytes(FolderUid); + } + if (FolderKey.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(FolderKey); + } + recordLinks_.WriteTo(ref output, _repeated_recordLinks_codec); + if (audit_ != null) { + output.WriteRawTag(82); + output.WriteMessage(Audit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (NonSharedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(NonSharedData); + } + if (FolderType != global::Records.RecordFolderType.UserFolder) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FolderType); + } + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (FolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderKey); + } + size += recordLinks_.CalculateSize(_repeated_recordLinks_codec); + if (audit_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Audit); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordAdd other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.NonSharedData.Length != 0) { + NonSharedData = other.NonSharedData; + } + if (other.FolderType != global::Records.RecordFolderType.UserFolder) { + FolderType = other.FolderType; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + if (other.FolderKey.Length != 0) { + FolderKey = other.FolderKey; + } + recordLinks_.Add(other.recordLinks_); + if (other.audit_ != null) { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + Audit.MergeFrom(other.Audit); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + NonSharedData = input.ReadBytes(); + break; + } + case 48: { + FolderType = (global::Records.RecordFolderType) input.ReadEnum(); + break; + } + case 58: { + FolderUid = input.ReadBytes(); + break; + } + case 66: { + FolderKey = input.ReadBytes(); + break; + } + case 74: { + recordLinks_.AddEntriesFrom(input, _repeated_recordLinks_codec); + break; + } + case 82: { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + input.ReadMessage(Audit); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + NonSharedData = input.ReadBytes(); + break; + } + case 48: { + FolderType = (global::Records.RecordFolderType) input.ReadEnum(); + break; + } + case 58: { + FolderUid = input.ReadBytes(); + break; + } + case 66: { + FolderKey = input.ReadBytes(); + break; + } + case 74: { + recordLinks_.AddEntriesFrom(ref input, _repeated_recordLinks_codec); + break; + } + case 82: { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + input.ReadMessage(Audit); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsAddRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[13]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsAddRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsAddRequest(RecordsAddRequest other) : this() { + records_ = other.records_.Clone(); + clientTime_ = other.clientTime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsAddRequest Clone() { + return new RecordsAddRequest(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordAdd.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "client_time" field. + public const int ClientTimeFieldNumber = 2; + private long clientTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientTime { + get { return clientTime_; } + set { + clientTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsAddRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsAddRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + if (ClientTime != other.ClientTime) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (ClientTime != 0L) hash ^= ClientTime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (ClientTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsAddRequest other) { + if (other == null) { + return; + } + records_.Add(other.records_); + if (other.ClientTime != 0L) { + ClientTime = other.ClientTime; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordUpdate : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordUpdate()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordUpdate() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordUpdate(RecordUpdate other) : this() { + recordUid_ = other.recordUid_; + clientModifiedTime_ = other.clientModifiedTime_; + revision_ = other.revision_; + data_ = other.data_; + nonSharedData_ = other.nonSharedData_; + recordLinksAdd_ = other.recordLinksAdd_.Clone(); + recordLinksRemove_ = other.recordLinksRemove_.Clone(); + audit_ = other.audit_ != null ? other.audit_.Clone() : null; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordUpdate Clone() { + return new RecordUpdate(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "client_modified_time" field. + public const int ClientModifiedTimeFieldNumber = 2; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 3; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "non_shared_data" field. + public const int NonSharedDataFieldNumber = 5; + private pb::ByteString nonSharedData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString NonSharedData { + get { return nonSharedData_; } + set { + nonSharedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_links_add" field. + public const int RecordLinksAddFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_recordLinksAdd_codec + = pb::FieldCodec.ForMessage(50, global::Records.RecordLink.Parser); + private readonly pbc::RepeatedField recordLinksAdd_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordLinksAdd { + get { return recordLinksAdd_; } + } + + /// Field number for the "record_links_remove" field. + public const int RecordLinksRemoveFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_recordLinksRemove_codec + = pb::FieldCodec.ForBytes(58); + private readonly pbc::RepeatedField recordLinksRemove_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordLinksRemove { + get { return recordLinksRemove_; } + } + + /// Field number for the "audit" field. + public const int AuditFieldNumber = 8; + private global::Records.RecordAudit audit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordAudit Audit { + get { return audit_; } + set { + audit_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordUpdate); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordUpdate other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (Revision != other.Revision) return false; + if (Data != other.Data) return false; + if (NonSharedData != other.NonSharedData) return false; + if(!recordLinksAdd_.Equals(other.recordLinksAdd_)) return false; + if(!recordLinksRemove_.Equals(other.recordLinksRemove_)) return false; + if (!object.Equals(Audit, other.Audit)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (NonSharedData.Length != 0) hash ^= NonSharedData.GetHashCode(); + hash ^= recordLinksAdd_.GetHashCode(); + hash ^= recordLinksRemove_.GetHashCode(); + if (audit_ != null) hash ^= Audit.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientModifiedTime); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(NonSharedData); + } + recordLinksAdd_.WriteTo(output, _repeated_recordLinksAdd_codec); + recordLinksRemove_.WriteTo(output, _repeated_recordLinksRemove_codec); + if (audit_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Audit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientModifiedTime); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(NonSharedData); + } + recordLinksAdd_.WriteTo(ref output, _repeated_recordLinksAdd_codec); + recordLinksRemove_.WriteTo(ref output, _repeated_recordLinksRemove_codec); + if (audit_ != null) { + output.WriteRawTag(66); + output.WriteMessage(Audit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (NonSharedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(NonSharedData); + } + size += recordLinksAdd_.CalculateSize(_repeated_recordLinksAdd_codec); + size += recordLinksRemove_.CalculateSize(_repeated_recordLinksRemove_codec); + if (audit_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Audit); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordUpdate other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.NonSharedData.Length != 0) { + NonSharedData = other.NonSharedData; + } + recordLinksAdd_.Add(other.recordLinksAdd_); + recordLinksRemove_.Add(other.recordLinksRemove_); + if (other.audit_ != null) { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + Audit.MergeFrom(other.Audit); + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + NonSharedData = input.ReadBytes(); + break; + } + case 50: { + recordLinksAdd_.AddEntriesFrom(input, _repeated_recordLinksAdd_codec); + break; + } + case 58: { + recordLinksRemove_.AddEntriesFrom(input, _repeated_recordLinksRemove_codec); + break; + } + case 66: { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + input.ReadMessage(Audit); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + NonSharedData = input.ReadBytes(); + break; + } + case 50: { + recordLinksAdd_.AddEntriesFrom(ref input, _repeated_recordLinksAdd_codec); + break; + } + case 58: { + recordLinksRemove_.AddEntriesFrom(ref input, _repeated_recordLinksRemove_codec); + break; + } + case 66: { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + input.ReadMessage(Audit); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUpdateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[15]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUpdateRequest(RecordsUpdateRequest other) : this() { + records_ = other.records_.Clone(); + clientTime_ = other.clientTime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUpdateRequest Clone() { + return new RecordsUpdateRequest(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordUpdate.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "client_time" field. + public const int ClientTimeFieldNumber = 2; + private long clientTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientTime { + get { return clientTime_; } + set { + clientTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUpdateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + if (ClientTime != other.ClientTime) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (ClientTime != 0L) hash ^= ClientTime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (ClientTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUpdateRequest other) { + if (other == null) { + return; + } + records_.Add(other.records_); + if (other.ClientTime != 0L) { + ClientTime = other.ClientTime; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordFileForConversion : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordFileForConversion()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[16]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordFileForConversion() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordFileForConversion(RecordFileForConversion other) : this() { + recordUid_ = other.recordUid_; + fileFileId_ = other.fileFileId_; + thumbFileId_ = other.thumbFileId_; + data_ = other.data_; + recordKey_ = other.recordKey_; + linkKey_ = other.linkKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordFileForConversion Clone() { + return new RecordFileForConversion(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "file_file_id" field. + public const int FileFileIdFieldNumber = 2; + private string fileFileId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FileFileId { + get { return fileFileId_; } + set { + fileFileId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "thumb_file_id" field. + public const int ThumbFileIdFieldNumber = 3; + private string thumbFileId_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ThumbFileId { + get { return thumbFileId_; } + set { + thumbFileId_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 5; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + /// + /// record_ref + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "link_key" field. + public const int LinkKeyFieldNumber = 6; + private pb::ByteString linkKey_ = pb::ByteString.Empty; + /// + /// record_link + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString LinkKey { + get { return linkKey_; } + set { + linkKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordFileForConversion); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordFileForConversion other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (FileFileId != other.FileFileId) return false; + if (ThumbFileId != other.ThumbFileId) return false; + if (Data != other.Data) return false; + if (RecordKey != other.RecordKey) return false; + if (LinkKey != other.LinkKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (FileFileId.Length != 0) hash ^= FileFileId.GetHashCode(); + if (ThumbFileId.Length != 0) hash ^= ThumbFileId.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (LinkKey.Length != 0) hash ^= LinkKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (FileFileId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FileFileId); + } + if (ThumbFileId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ThumbFileId); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(RecordKey); + } + if (LinkKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(LinkKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (FileFileId.Length != 0) { + output.WriteRawTag(18); + output.WriteString(FileFileId); + } + if (ThumbFileId.Length != 0) { + output.WriteRawTag(26); + output.WriteString(ThumbFileId); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(RecordKey); + } + if (LinkKey.Length != 0) { + output.WriteRawTag(50); + output.WriteBytes(LinkKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (FileFileId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FileFileId); + } + if (ThumbFileId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ThumbFileId); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (LinkKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(LinkKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordFileForConversion other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.FileFileId.Length != 0) { + FileFileId = other.FileFileId; + } + if (other.ThumbFileId.Length != 0) { + ThumbFileId = other.ThumbFileId; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.LinkKey.Length != 0) { + LinkKey = other.LinkKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + FileFileId = input.ReadString(); + break; + } + case 26: { + ThumbFileId = input.ReadString(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + RecordKey = input.ReadBytes(); + break; + } + case 50: { + LinkKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + FileFileId = input.ReadString(); + break; + } + case 26: { + ThumbFileId = input.ReadString(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + RecordKey = input.ReadBytes(); + break; + } + case 50: { + LinkKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordFolderForConversion : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordFolderForConversion()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[17]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordFolderForConversion() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordFolderForConversion(RecordFolderForConversion other) : this() { + folderUid_ = other.folderUid_; + recordFolderKey_ = other.recordFolderKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordFolderForConversion Clone() { + return new RecordFolderForConversion(this); + } + + /// Field number for the "folder_uid" field. + public const int FolderUidFieldNumber = 1; + private pb::ByteString folderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString FolderUid { + get { return folderUid_; } + set { + folderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_folder_key" field. + public const int RecordFolderKeyFieldNumber = 2; + private pb::ByteString recordFolderKey_ = pb::ByteString.Empty; + /// + /// GCM-encrypted shared folder key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordFolderKey { + get { return recordFolderKey_; } + set { + recordFolderKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordFolderForConversion); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordFolderForConversion other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (FolderUid != other.FolderUid) return false; + if (RecordFolderKey != other.RecordFolderKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (FolderUid.Length != 0) hash ^= FolderUid.GetHashCode(); + if (RecordFolderKey.Length != 0) hash ^= RecordFolderKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordFolderKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (FolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(FolderUid); + } + if (RecordFolderKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordFolderKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (FolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(FolderUid); + } + if (RecordFolderKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordFolderKey); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordFolderForConversion other) { + if (other == null) { + return; + } + if (other.FolderUid.Length != 0) { + FolderUid = other.FolderUid; + } + if (other.RecordFolderKey.Length != 0) { + RecordFolderKey = other.RecordFolderKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordFolderKey = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + FolderUid = input.ReadBytes(); + break; + } + case 18: { + RecordFolderKey = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordConvertToV3 : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordConvertToV3()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[18]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordConvertToV3() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordConvertToV3(RecordConvertToV3 other) : this() { + recordUid_ = other.recordUid_; + clientModifiedTime_ = other.clientModifiedTime_; + revision_ = other.revision_; + data_ = other.data_; + nonSharedData_ = other.nonSharedData_; + audit_ = other.audit_ != null ? other.audit_.Clone() : null; + recordFile_ = other.recordFile_.Clone(); + folderKey_ = other.folderKey_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordConvertToV3 Clone() { + return new RecordConvertToV3(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "client_modified_time" field. + public const int ClientModifiedTimeFieldNumber = 2; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 3; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "non_shared_data" field. + public const int NonSharedDataFieldNumber = 5; + private pb::ByteString nonSharedData_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString NonSharedData { + get { return nonSharedData_; } + set { + nonSharedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "audit" field. + public const int AuditFieldNumber = 6; + private global::Records.RecordAudit audit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordAudit Audit { + get { return audit_; } + set { + audit_ = value; + } + } + + /// Field number for the "record_file" field. + public const int RecordFileFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_recordFile_codec + = pb::FieldCodec.ForMessage(58, global::Records.RecordFileForConversion.Parser); + private readonly pbc::RepeatedField recordFile_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordFile { + get { return recordFile_; } + } + + /// Field number for the "folder_key" field. + public const int FolderKeyFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_folderKey_codec + = pb::FieldCodec.ForMessage(66, global::Records.RecordFolderForConversion.Parser); + private readonly pbc::RepeatedField folderKey_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FolderKey { + get { return folderKey_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordConvertToV3); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordConvertToV3 other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (Revision != other.Revision) return false; + if (Data != other.Data) return false; + if (NonSharedData != other.NonSharedData) return false; + if (!object.Equals(Audit, other.Audit)) return false; + if(!recordFile_.Equals(other.recordFile_)) return false; + if(!folderKey_.Equals(other.folderKey_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (NonSharedData.Length != 0) hash ^= NonSharedData.GetHashCode(); + if (audit_ != null) hash ^= Audit.GetHashCode(); + hash ^= recordFile_.GetHashCode(); + hash ^= folderKey_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientModifiedTime); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(NonSharedData); + } + if (audit_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Audit); + } + recordFile_.WriteTo(output, _repeated_recordFile_codec); + folderKey_.WriteTo(output, _repeated_folderKey_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientModifiedTime); + } + if (Revision != 0L) { + output.WriteRawTag(24); + output.WriteInt64(Revision); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(NonSharedData); + } + if (audit_ != null) { + output.WriteRawTag(50); + output.WriteMessage(Audit); + } + recordFile_.WriteTo(ref output, _repeated_recordFile_codec); + folderKey_.WriteTo(ref output, _repeated_folderKey_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (NonSharedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(NonSharedData); + } + if (audit_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Audit); + } + size += recordFile_.CalculateSize(_repeated_recordFile_codec); + size += folderKey_.CalculateSize(_repeated_folderKey_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordConvertToV3 other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.NonSharedData.Length != 0) { + NonSharedData = other.NonSharedData; + } + if (other.audit_ != null) { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + Audit.MergeFrom(other.Audit); + } + recordFile_.Add(other.recordFile_); + folderKey_.Add(other.folderKey_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + NonSharedData = input.ReadBytes(); + break; + } + case 50: { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + input.ReadMessage(Audit); + break; + } + case 58: { + recordFile_.AddEntriesFrom(input, _repeated_recordFile_codec); + break; + } + case 66: { + folderKey_.AddEntriesFrom(input, _repeated_folderKey_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 24: { + Revision = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + case 42: { + NonSharedData = input.ReadBytes(); + break; + } + case 50: { + if (audit_ == null) { + Audit = new global::Records.RecordAudit(); + } + input.ReadMessage(Audit); + break; + } + case 58: { + recordFile_.AddEntriesFrom(ref input, _repeated_recordFile_codec); + break; + } + case 66: { + folderKey_.AddEntriesFrom(ref input, _repeated_folderKey_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsConvertToV3Request : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsConvertToV3Request()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[19]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsConvertToV3Request() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsConvertToV3Request(RecordsConvertToV3Request other) : this() { + records_ = other.records_.Clone(); + clientTime_ = other.clientTime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsConvertToV3Request Clone() { + return new RecordsConvertToV3Request(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordConvertToV3.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "client_time" field. + public const int ClientTimeFieldNumber = 2; + private long clientTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientTime { + get { return clientTime_; } + set { + clientTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsConvertToV3Request); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsConvertToV3Request other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + if (ClientTime != other.ClientTime) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (ClientTime != 0L) hash ^= ClientTime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (ClientTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsConvertToV3Request other) { + if (other == null) { + return; + } + records_.Add(other.records_); + if (other.ClientTime != 0L) { + ClientTime = other.ClientTime; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + /// + /// to be used with records_remove and records_delete + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsRemoveRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsRemoveRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[20]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsRemoveRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsRemoveRequest(RecordsRemoveRequest other) : this() { + records_ = other.records_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsRemoveRequest Clone() { + return new RecordsRemoveRequest(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsRemoveRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsRemoveRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsRemoveRequest other) { + if (other == null) { + return; + } + records_.Add(other.records_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordRevert : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordRevert()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[21]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordRevert() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordRevert(RecordRevert other) : this() { + recordUid_ = other.recordUid_; + revertToRevision_ = other.revertToRevision_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordRevert Clone() { + return new RecordRevert(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "revert_to_revision" field. + public const int RevertToRevisionFieldNumber = 2; + private long revertToRevision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long RevertToRevision { + get { return revertToRevision_; } + set { + revertToRevision_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordRevert); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordRevert other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (RevertToRevision != other.RevertToRevision) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RevertToRevision != 0L) hash ^= RevertToRevision.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RevertToRevision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(RevertToRevision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RevertToRevision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(RevertToRevision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RevertToRevision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(RevertToRevision); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordRevert other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RevertToRevision != 0L) { + RevertToRevision = other.RevertToRevision; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + RevertToRevision = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + RevertToRevision = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsRevertRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsRevertRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[22]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsRevertRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsRevertRequest(RecordsRevertRequest other) : this() { + records_ = other.records_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsRevertRequest Clone() { + return new RecordsRevertRequest(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordRevert.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsRevertRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsRevertRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsRevertRequest other) { + if (other == null) { + return; + } + records_.Add(other.records_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordLinkError : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordLinkError()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordLinkError() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordLinkError(RecordLinkError other) : this() { + recordUid_ = other.recordUid_; + status_ = other.status_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordLinkError Clone() { + return new RecordLinkError(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Records.RecordModifyResult status_ = global::Records.RecordModifyResult.RsSuccess; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordModifyResult Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordLinkError); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordLinkError other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status != global::Records.RecordModifyResult.RsSuccess) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.RecordModifyResult.RsSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.RecordModifyResult.RsSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status != global::Records.RecordModifyResult.RsSuccess) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordLinkError other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status != global::Records.RecordModifyResult.RsSuccess) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.RecordModifyResult) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.RecordModifyResult) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordModifyStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordModifyStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[24]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordModifyStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordModifyStatus(RecordModifyStatus other) : this() { + recordUid_ = other.recordUid_; + status_ = other.status_; + message_ = other.message_; + linkErrors_ = other.linkErrors_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordModifyStatus Clone() { + return new RecordModifyStatus(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Records.RecordModifyResult status_ = global::Records.RecordModifyResult.RsSuccess; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordModifyResult Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "link_errors" field. + public const int LinkErrorsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_linkErrors_codec + = pb::FieldCodec.ForMessage(34, global::Records.RecordLinkError.Parser); + private readonly pbc::RepeatedField linkErrors_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LinkErrors { + get { return linkErrors_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordModifyStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordModifyStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; + if(!linkErrors_.Equals(other.linkErrors_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status != global::Records.RecordModifyResult.RsSuccess) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + hash ^= linkErrors_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.RecordModifyResult.RsSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + linkErrors_.WriteTo(output, _repeated_linkErrors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.RecordModifyResult.RsSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + linkErrors_.WriteTo(ref output, _repeated_linkErrors_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status != global::Records.RecordModifyResult.RsSuccess) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + size += linkErrors_.CalculateSize(_repeated_linkErrors_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordModifyStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status != global::Records.RecordModifyResult.RsSuccess) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + linkErrors_.Add(other.linkErrors_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.RecordModifyResult) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + linkErrors_.AddEntriesFrom(input, _repeated_linkErrors_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.RecordModifyResult) input.ReadEnum(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + linkErrors_.AddEntriesFrom(ref input, _repeated_linkErrors_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsModifyResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsModifyResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[25]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsModifyResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsModifyResponse(RecordsModifyResponse other) : this() { + records_ = other.records_.Clone(); + revision_ = other.revision_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsModifyResponse Clone() { + return new RecordsModifyResponse(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordModifyStatus.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 2; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsModifyResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsModifyResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + if (Revision != other.Revision) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsModifyResponse other) { + if (other == null) { + return; + } + records_.Add(other.records_); + if (other.Revision != 0L) { + Revision = other.Revision; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordAddAuditData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordAddAuditData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[26]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAddAuditData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAddAuditData(RecordAddAuditData other) : this() { + recordUid_ = other.recordUid_; + revision_ = other.revision_; + data_ = other.data_; + version_ = other.version_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordAddAuditData Clone() { + return new RecordAddAuditData(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 2; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 3; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 4; + private int version_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Version { + get { return version_; } + set { + version_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordAddAuditData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordAddAuditData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Revision != other.Revision) return false; + if (Data != other.Data) return false; + if (Version != other.Version) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (Version != 0) hash ^= Version.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (Data.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Data); + } + if (Version != 0) { + output.WriteRawTag(32); + output.WriteInt32(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (Data.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Data); + } + if (Version != 0) { + output.WriteRawTag(32); + output.WriteInt32(Version); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (Version != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordAddAuditData other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.Version != 0) { + Version = other.Version; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + case 26: { + Data = input.ReadBytes(); + break; + } + case 32: { + Version = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + case 26: { + Data = input.ReadBytes(); + break; + } + case 32: { + Version = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AddAuditDataRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AddAuditDataRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[27]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAuditDataRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAuditDataRequest(AddAuditDataRequest other) : this() { + records_ = other.records_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AddAuditDataRequest Clone() { + return new AddAuditDataRequest(this); + } + + /// Field number for the "records" field. + public const int RecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_records_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordAddAuditData.Parser); + private readonly pbc::RepeatedField records_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Records { + get { return records_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AddAuditDataRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AddAuditDataRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!records_.Equals(other.records_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= records_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + records_.WriteTo(output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + records_.WriteTo(ref output, _repeated_records_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += records_.CalculateSize(_repeated_records_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AddAuditDataRequest other) { + if (other == null) { + return; + } + records_.Add(other.records_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + records_.AddEntriesFrom(input, _repeated_records_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + records_.AddEntriesFrom(ref input, _repeated_records_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class File : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new File()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[28]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public File() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public File(File other) : this() { + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + data_ = other.data_; + fileSize_ = other.fileSize_; + thumbSize_ = other.thumbSize_; + isScript_ = other.isScript_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public File Clone() { + return new File(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 2; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 3; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fileSize" field. + public const int FileSizeFieldNumber = 4; + private long fileSize_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FileSize { + get { return fileSize_; } + set { + fileSize_ = value; + } + } + + /// Field number for the "thumbSize" field. + public const int ThumbSizeFieldNumber = 5; + private int thumbSize_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int ThumbSize { + get { return thumbSize_; } + set { + thumbSize_ = value; + } + } + + /// Field number for the "is_script" field. + public const int IsScriptFieldNumber = 6; + private bool isScript_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsScript { + get { return isScript_; } + set { + isScript_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as File); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(File other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + if (Data != other.Data) return false; + if (FileSize != other.FileSize) return false; + if (ThumbSize != other.ThumbSize) return false; + if (IsScript != other.IsScript) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (FileSize != 0L) hash ^= FileSize.GetHashCode(); + if (ThumbSize != 0) hash ^= ThumbSize.GetHashCode(); + if (IsScript != false) hash ^= IsScript.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (Data.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Data); + } + if (FileSize != 0L) { + output.WriteRawTag(32); + output.WriteInt64(FileSize); + } + if (ThumbSize != 0) { + output.WriteRawTag(40); + output.WriteInt32(ThumbSize); + } + if (IsScript != false) { + output.WriteRawTag(48); + output.WriteBool(IsScript); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (Data.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Data); + } + if (FileSize != 0L) { + output.WriteRawTag(32); + output.WriteInt64(FileSize); + } + if (ThumbSize != 0) { + output.WriteRawTag(40); + output.WriteInt32(ThumbSize); + } + if (IsScript != false) { + output.WriteRawTag(48); + output.WriteBool(IsScript); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (FileSize != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FileSize); + } + if (ThumbSize != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(ThumbSize); + } + if (IsScript != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(File other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + if (other.FileSize != 0L) { + FileSize = other.FileSize; + } + if (other.ThumbSize != 0) { + ThumbSize = other.ThumbSize; + } + if (other.IsScript != false) { + IsScript = other.IsScript; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 26: { + Data = input.ReadBytes(); + break; + } + case 32: { + FileSize = input.ReadInt64(); + break; + } + case 40: { + ThumbSize = input.ReadInt32(); + break; + } + case 48: { + IsScript = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 26: { + Data = input.ReadBytes(); + break; + } + case 32: { + FileSize = input.ReadInt64(); + break; + } + case 40: { + ThumbSize = input.ReadInt32(); + break; + } + case 48: { + IsScript = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FilesAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FilesAddRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[29]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesAddRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesAddRequest(FilesAddRequest other) : this() { + files_ = other.files_.Clone(); + clientTime_ = other.clientTime_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesAddRequest Clone() { + return new FilesAddRequest(this); + } + + /// Field number for the "files" field. + public const int FilesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_files_codec + = pb::FieldCodec.ForMessage(10, global::Records.File.Parser); + private readonly pbc::RepeatedField files_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Files { + get { return files_; } + } + + /// Field number for the "client_time" field. + public const int ClientTimeFieldNumber = 2; + private long clientTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientTime { + get { return clientTime_; } + set { + clientTime_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FilesAddRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FilesAddRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!files_.Equals(other.files_)) return false; + if (ClientTime != other.ClientTime) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= files_.GetHashCode(); + if (ClientTime != 0L) hash ^= ClientTime.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + files_.WriteTo(output, _repeated_files_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + files_.WriteTo(ref output, _repeated_files_codec); + if (ClientTime != 0L) { + output.WriteRawTag(16); + output.WriteInt64(ClientTime); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += files_.CalculateSize(_repeated_files_codec); + if (ClientTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTime); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FilesAddRequest other) { + if (other == null) { + return; + } + files_.Add(other.files_); + if (other.ClientTime != 0L) { + ClientTime = other.ClientTime; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + files_.AddEntriesFrom(input, _repeated_files_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + files_.AddEntriesFrom(ref input, _repeated_files_codec); + break; + } + case 16: { + ClientTime = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FileAddStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileAddStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[30]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileAddStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileAddStatus(FileAddStatus other) : this() { + recordUid_ = other.recordUid_; + status_ = other.status_; + url_ = other.url_; + parameters_ = other.parameters_; + thumbnailParameters_ = other.thumbnailParameters_; + successStatusCode_ = other.successStatusCode_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileAddStatus Clone() { + return new FileAddStatus(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Records.FileAddResult status_ = global::Records.FileAddResult.FaSuccess; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.FileAddResult Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "url" field. + public const int UrlFieldNumber = 3; + private string url_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Url { + get { return url_; } + set { + url_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "parameters" field. + public const int ParametersFieldNumber = 4; + private string parameters_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Parameters { + get { return parameters_; } + set { + parameters_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "thumbnail_parameters" field. + public const int ThumbnailParametersFieldNumber = 5; + private string thumbnailParameters_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ThumbnailParameters { + get { return thumbnailParameters_; } + set { + thumbnailParameters_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "success_status_code" field. + public const int SuccessStatusCodeFieldNumber = 6; + private int successStatusCode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SuccessStatusCode { + get { return successStatusCode_; } + set { + successStatusCode_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FileAddStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FileAddStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + if (Url != other.Url) return false; + if (Parameters != other.Parameters) return false; + if (ThumbnailParameters != other.ThumbnailParameters) return false; + if (SuccessStatusCode != other.SuccessStatusCode) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status != global::Records.FileAddResult.FaSuccess) hash ^= Status.GetHashCode(); + if (Url.Length != 0) hash ^= Url.GetHashCode(); + if (Parameters.Length != 0) hash ^= Parameters.GetHashCode(); + if (ThumbnailParameters.Length != 0) hash ^= ThumbnailParameters.GetHashCode(); + if (SuccessStatusCode != 0) hash ^= SuccessStatusCode.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.FileAddResult.FaSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Url.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Url); + } + if (Parameters.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Parameters); + } + if (ThumbnailParameters.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ThumbnailParameters); + } + if (SuccessStatusCode != 0) { + output.WriteRawTag(48); + output.WriteInt32(SuccessStatusCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.FileAddResult.FaSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Url.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Url); + } + if (Parameters.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Parameters); + } + if (ThumbnailParameters.Length != 0) { + output.WriteRawTag(42); + output.WriteString(ThumbnailParameters); + } + if (SuccessStatusCode != 0) { + output.WriteRawTag(48); + output.WriteInt32(SuccessStatusCode); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status != global::Records.FileAddResult.FaSuccess) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Url.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); + } + if (Parameters.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Parameters); + } + if (ThumbnailParameters.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ThumbnailParameters); + } + if (SuccessStatusCode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SuccessStatusCode); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FileAddStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status != global::Records.FileAddResult.FaSuccess) { + Status = other.Status; + } + if (other.Url.Length != 0) { + Url = other.Url; + } + if (other.Parameters.Length != 0) { + Parameters = other.Parameters; + } + if (other.ThumbnailParameters.Length != 0) { + ThumbnailParameters = other.ThumbnailParameters; + } + if (other.SuccessStatusCode != 0) { + SuccessStatusCode = other.SuccessStatusCode; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.FileAddResult) input.ReadEnum(); + break; + } + case 26: { + Url = input.ReadString(); + break; + } + case 34: { + Parameters = input.ReadString(); + break; + } + case 42: { + ThumbnailParameters = input.ReadString(); + break; + } + case 48: { + SuccessStatusCode = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.FileAddResult) input.ReadEnum(); + break; + } + case 26: { + Url = input.ReadString(); + break; + } + case 34: { + Parameters = input.ReadString(); + break; + } + case 42: { + ThumbnailParameters = input.ReadString(); + break; + } + case 48: { + SuccessStatusCode = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FilesAddResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FilesAddResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[31]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesAddResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesAddResponse(FilesAddResponse other) : this() { + files_ = other.files_.Clone(); + revision_ = other.revision_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesAddResponse Clone() { + return new FilesAddResponse(this); + } + + /// Field number for the "files" field. + public const int FilesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_files_codec + = pb::FieldCodec.ForMessage(10, global::Records.FileAddStatus.Parser); + private readonly pbc::RepeatedField files_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Files { + get { return files_; } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 2; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FilesAddResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FilesAddResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!files_.Equals(other.files_)) return false; + if (Revision != other.Revision) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= files_.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + files_.WriteTo(output, _repeated_files_codec); + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + files_.WriteTo(ref output, _repeated_files_codec); + if (Revision != 0L) { + output.WriteRawTag(16); + output.WriteInt64(Revision); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += files_.CalculateSize(_repeated_files_codec); + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FilesAddResponse other) { + if (other == null) { + return; + } + files_.Add(other.files_); + if (other.Revision != 0L) { + Revision = other.Revision; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + files_.AddEntriesFrom(input, _repeated_files_codec); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + files_.AddEntriesFrom(ref input, _repeated_files_codec); + break; + } + case 16: { + Revision = input.ReadInt64(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FilesGetRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FilesGetRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[32]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesGetRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesGetRequest(FilesGetRequest other) : this() { + recordUids_ = other.recordUids_.Clone(); + forThumbnails_ = other.forThumbnails_; + emergencyAccessAccountOwner_ = other.emergencyAccessAccountOwner_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesGetRequest Clone() { + return new FilesGetRequest(this); + } + + /// Field number for the "record_uids" field. + public const int RecordUidsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } + } + + /// Field number for the "for_thumbnails" field. + public const int ForThumbnailsFieldNumber = 2; + private bool forThumbnails_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ForThumbnails { + get { return forThumbnails_; } + set { + forThumbnails_ = value; + } + } + + /// Field number for the "emergency_access_account_owner" field. + public const int EmergencyAccessAccountOwnerFieldNumber = 3; + private string emergencyAccessAccountOwner_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EmergencyAccessAccountOwner { + get { return emergencyAccessAccountOwner_; } + set { + emergencyAccessAccountOwner_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FilesGetRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FilesGetRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordUids_.Equals(other.recordUids_)) return false; + if (ForThumbnails != other.ForThumbnails) return false; + if (EmergencyAccessAccountOwner != other.EmergencyAccessAccountOwner) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordUids_.GetHashCode(); + if (ForThumbnails != false) hash ^= ForThumbnails.GetHashCode(); + if (EmergencyAccessAccountOwner.Length != 0) hash ^= EmergencyAccessAccountOwner.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordUids_.WriteTo(output, _repeated_recordUids_codec); + if (ForThumbnails != false) { + output.WriteRawTag(16); + output.WriteBool(ForThumbnails); + } + if (EmergencyAccessAccountOwner.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EmergencyAccessAccountOwner); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + if (ForThumbnails != false) { + output.WriteRawTag(16); + output.WriteBool(ForThumbnails); + } + if (EmergencyAccessAccountOwner.Length != 0) { + output.WriteRawTag(26); + output.WriteString(EmergencyAccessAccountOwner); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordUids_.CalculateSize(_repeated_recordUids_codec); + if (ForThumbnails != false) { + size += 1 + 1; + } + if (EmergencyAccessAccountOwner.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EmergencyAccessAccountOwner); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FilesGetRequest other) { + if (other == null) { + return; + } + recordUids_.Add(other.recordUids_); + if (other.ForThumbnails != false) { + ForThumbnails = other.ForThumbnails; + } + if (other.EmergencyAccessAccountOwner.Length != 0) { + EmergencyAccessAccountOwner = other.EmergencyAccessAccountOwner; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); + break; + } + case 16: { + ForThumbnails = input.ReadBool(); + break; + } + case 26: { + EmergencyAccessAccountOwner = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + case 16: { + ForThumbnails = input.ReadBool(); + break; + } + case 26: { + EmergencyAccessAccountOwner = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FileGetStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FileGetStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[33]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileGetStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileGetStatus(FileGetStatus other) : this() { + recordUid_ = other.recordUid_; + status_ = other.status_; + url_ = other.url_; + successStatusCode_ = other.successStatusCode_; + fileKeyType_ = other.fileKeyType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FileGetStatus Clone() { + return new FileGetStatus(this); + } + + /// Field number for the "record_uid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private global::Records.FileGetResult status_ = global::Records.FileGetResult.FgSuccess; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.FileGetResult Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "url" field. + public const int UrlFieldNumber = 3; + private string url_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Url { + get { return url_; } + set { + url_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "success_status_code" field. + public const int SuccessStatusCodeFieldNumber = 4; + private int successStatusCode_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SuccessStatusCode { + get { return successStatusCode_; } + set { + successStatusCode_ = value; + } + } + + /// Field number for the "fileKeyType" field. + public const int FileKeyTypeFieldNumber = 5; + private global::Records.RecordKeyType fileKeyType_ = global::Records.RecordKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordKeyType FileKeyType { + get { return fileKeyType_; } + set { + fileKeyType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FileGetStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FileGetStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + if (Url != other.Url) return false; + if (SuccessStatusCode != other.SuccessStatusCode) return false; + if (FileKeyType != other.FileKeyType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status != global::Records.FileGetResult.FgSuccess) hash ^= Status.GetHashCode(); + if (Url.Length != 0) hash ^= Url.GetHashCode(); + if (SuccessStatusCode != 0) hash ^= SuccessStatusCode.GetHashCode(); + if (FileKeyType != global::Records.RecordKeyType.NoKey) hash ^= FileKeyType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.FileGetResult.FgSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Url.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Url); + } + if (SuccessStatusCode != 0) { + output.WriteRawTag(32); + output.WriteInt32(SuccessStatusCode); + } + if (FileKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) FileKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status != global::Records.FileGetResult.FgSuccess) { + output.WriteRawTag(16); + output.WriteEnum((int) Status); + } + if (Url.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Url); + } + if (SuccessStatusCode != 0) { + output.WriteRawTag(32); + output.WriteInt32(SuccessStatusCode); + } + if (FileKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(40); + output.WriteEnum((int) FileKeyType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status != global::Records.FileGetResult.FgSuccess) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (Url.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Url); + } + if (SuccessStatusCode != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SuccessStatusCode); + } + if (FileKeyType != global::Records.RecordKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) FileKeyType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FileGetStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status != global::Records.FileGetResult.FgSuccess) { + Status = other.Status; + } + if (other.Url.Length != 0) { + Url = other.Url; + } + if (other.SuccessStatusCode != 0) { + SuccessStatusCode = other.SuccessStatusCode; + } + if (other.FileKeyType != global::Records.RecordKeyType.NoKey) { + FileKeyType = other.FileKeyType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.FileGetResult) input.ReadEnum(); + break; + } + case 26: { + Url = input.ReadString(); + break; + } + case 32: { + SuccessStatusCode = input.ReadInt32(); + break; + } + case 40: { + FileKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Status = (global::Records.FileGetResult) input.ReadEnum(); + break; + } + case 26: { + Url = input.ReadString(); + break; + } + case 32: { + SuccessStatusCode = input.ReadInt32(); + break; + } + case 40: { + FileKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class FilesGetResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new FilesGetResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[34]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesGetResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesGetResponse(FilesGetResponse other) : this() { + files_ = other.files_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public FilesGetResponse Clone() { + return new FilesGetResponse(this); + } + + /// Field number for the "files" field. + public const int FilesFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_files_codec + = pb::FieldCodec.ForMessage(10, global::Records.FileGetStatus.Parser); + private readonly pbc::RepeatedField files_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Files { + get { return files_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as FilesGetResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(FilesGetResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!files_.Equals(other.files_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= files_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + files_.WriteTo(output, _repeated_files_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + files_.WriteTo(ref output, _repeated_files_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += files_.CalculateSize(_repeated_files_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(FilesGetResponse other) { + if (other == null) { + return; + } + files_.Add(other.files_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + files_.AddEntriesFrom(input, _repeated_files_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + files_.AddEntriesFrom(ref input, _repeated_files_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ApplicationAddRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ApplicationAddRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[35]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApplicationAddRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApplicationAddRequest(ApplicationAddRequest other) : this() { + appUid_ = other.appUid_; + recordKey_ = other.recordKey_; + clientModifiedTime_ = other.clientModifiedTime_; + data_ = other.data_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ApplicationAddRequest Clone() { + return new ApplicationAddRequest(this); + } + + /// Field number for the "app_uid" field. + public const int AppUidFieldNumber = 1; + private pb::ByteString appUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AppUid { + get { return appUid_; } + set { + appUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "record_key" field. + public const int RecordKeyFieldNumber = 2; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "client_modified_time" field. + public const int ClientModifiedTimeFieldNumber = 3; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "data" field. + public const int DataFieldNumber = 4; + private pb::ByteString data_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Data { + get { return data_; } + set { + data_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ApplicationAddRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ApplicationAddRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (AppUid != other.AppUid) return false; + if (RecordKey != other.RecordKey) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (Data != other.Data) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (AppUid.Length != 0) hash ^= AppUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (Data.Length != 0) hash ^= Data.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (AppUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(24); + output.WriteInt64(ClientModifiedTime); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (AppUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(AppUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordKey); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(24); + output.WriteInt64(ClientModifiedTime); + } + if (Data.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(Data); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (AppUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AppUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (Data.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Data); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ApplicationAddRequest other) { + if (other == null) { + return; + } + if (other.AppUid.Length != 0) { + AppUid = other.AppUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.Data.Length != 0) { + Data = other.Data; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + AppUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + AppUid = input.ReadBytes(); + break; + } + case 18: { + RecordKey = input.ReadBytes(); + break; + } + case 24: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 34: { + Data = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetRecordDataWithAccessInfoRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetRecordDataWithAccessInfoRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[36]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordDataWithAccessInfoRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordDataWithAccessInfoRequest(GetRecordDataWithAccessInfoRequest other) : this() { + clientTime_ = other.clientTime_; + recordUid_ = other.recordUid_.Clone(); + recordDetailsInclude_ = other.recordDetailsInclude_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordDataWithAccessInfoRequest Clone() { + return new GetRecordDataWithAccessInfoRequest(this); + } + + /// Field number for the "clientTime" field. + public const int ClientTimeFieldNumber = 1; + private long clientTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientTime { + get { return clientTime_; } + set { + clientTime_ = value; + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_recordUid_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField recordUid_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUid { + get { return recordUid_; } + } + + /// Field number for the "recordDetailsInclude" field. + public const int RecordDetailsIncludeFieldNumber = 3; + private global::Records.RecordDetailsInclude recordDetailsInclude_ = global::Records.RecordDetailsInclude.DataPlusShare; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordDetailsInclude RecordDetailsInclude { + get { return recordDetailsInclude_; } + set { + recordDetailsInclude_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetRecordDataWithAccessInfoRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetRecordDataWithAccessInfoRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ClientTime != other.ClientTime) return false; + if(!recordUid_.Equals(other.recordUid_)) return false; + if (RecordDetailsInclude != other.RecordDetailsInclude) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ClientTime != 0L) hash ^= ClientTime.GetHashCode(); + hash ^= recordUid_.GetHashCode(); + if (RecordDetailsInclude != global::Records.RecordDetailsInclude.DataPlusShare) hash ^= RecordDetailsInclude.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ClientTime != 0L) { + output.WriteRawTag(8); + output.WriteInt64(ClientTime); + } + recordUid_.WriteTo(output, _repeated_recordUid_codec); + if (RecordDetailsInclude != global::Records.RecordDetailsInclude.DataPlusShare) { + output.WriteRawTag(24); + output.WriteEnum((int) RecordDetailsInclude); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ClientTime != 0L) { + output.WriteRawTag(8); + output.WriteInt64(ClientTime); + } + recordUid_.WriteTo(ref output, _repeated_recordUid_codec); + if (RecordDetailsInclude != global::Records.RecordDetailsInclude.DataPlusShare) { + output.WriteRawTag(24); + output.WriteEnum((int) RecordDetailsInclude); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ClientTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientTime); + } + size += recordUid_.CalculateSize(_repeated_recordUid_codec); + if (RecordDetailsInclude != global::Records.RecordDetailsInclude.DataPlusShare) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RecordDetailsInclude); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetRecordDataWithAccessInfoRequest other) { + if (other == null) { + return; + } + if (other.ClientTime != 0L) { + ClientTime = other.ClientTime; + } + recordUid_.Add(other.recordUid_); + if (other.RecordDetailsInclude != global::Records.RecordDetailsInclude.DataPlusShare) { + RecordDetailsInclude = other.RecordDetailsInclude; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + ClientTime = input.ReadInt64(); + break; + } + case 18: { + recordUid_.AddEntriesFrom(input, _repeated_recordUid_codec); + break; + } + case 24: { + RecordDetailsInclude = (global::Records.RecordDetailsInclude) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + ClientTime = input.ReadInt64(); + break; + } + case 18: { + recordUid_.AddEntriesFrom(ref input, _repeated_recordUid_codec); + break; + } + case 24: { + RecordDetailsInclude = (global::Records.RecordDetailsInclude) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class UserPermission : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new UserPermission()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[37]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserPermission() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserPermission(UserPermission other) : this() { + username_ = other.username_; + owner_ = other.owner_; + shareAdmin_ = other.shareAdmin_; + sharable_ = other.sharable_; + editable_ = other.editable_; + awaitingApproval_ = other.awaitingApproval_; + expiration_ = other.expiration_; + accountUid_ = other.accountUid_; + timerNotificationType_ = other.timerNotificationType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public UserPermission Clone() { + return new UserPermission(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "owner" field. + public const int OwnerFieldNumber = 2; + private bool owner_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Owner { + get { return owner_; } + set { + owner_ = value; + } + } + + /// Field number for the "shareAdmin" field. + public const int ShareAdminFieldNumber = 3; + private bool shareAdmin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool ShareAdmin { + get { return shareAdmin_; } + set { + shareAdmin_ = value; + } + } + + /// Field number for the "sharable" field. + public const int SharableFieldNumber = 4; + private bool sharable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Sharable { + get { return sharable_; } + set { + sharable_ = value; + } + } + + /// Field number for the "editable" field. + public const int EditableFieldNumber = 5; + private bool editable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Editable { + get { return editable_; } + set { + editable_ = value; + } + } + + /// Field number for the "awaitingApproval" field. + public const int AwaitingApprovalFieldNumber = 6; + private bool awaitingApproval_; + /// + ///flag indicating if the record is awaiting approval from the user referenced in username + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool AwaitingApproval { + get { return awaitingApproval_; } + set { + awaitingApproval_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 7; + private long expiration_; + /// + ///time limit for the record directly shared to a user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 8; + private pb::ByteString accountUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AccountUid { + get { return accountUid_; } + set { + accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 9; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as UserPermission); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(UserPermission other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (Owner != other.Owner) return false; + if (ShareAdmin != other.ShareAdmin) return false; + if (Sharable != other.Sharable) return false; + if (Editable != other.Editable) return false; + if (AwaitingApproval != other.AwaitingApproval) return false; + if (Expiration != other.Expiration) return false; + if (AccountUid != other.AccountUid) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Owner != false) hash ^= Owner.GetHashCode(); + if (ShareAdmin != false) hash ^= ShareAdmin.GetHashCode(); + if (Sharable != false) hash ^= Sharable.GetHashCode(); + if (Editable != false) hash ^= Editable.GetHashCode(); + if (AwaitingApproval != false) hash ^= AwaitingApproval.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (Owner != false) { + output.WriteRawTag(16); + output.WriteBool(Owner); + } + if (ShareAdmin != false) { + output.WriteRawTag(24); + output.WriteBool(ShareAdmin); + } + if (Sharable != false) { + output.WriteRawTag(32); + output.WriteBool(Sharable); + } + if (Editable != false) { + output.WriteRawTag(40); + output.WriteBool(Editable); + } + if (AwaitingApproval != false) { + output.WriteRawTag(48); + output.WriteBool(AwaitingApproval); + } + if (Expiration != 0L) { + output.WriteRawTag(56); + output.WriteInt64(Expiration); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(AccountUid); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(72); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (Owner != false) { + output.WriteRawTag(16); + output.WriteBool(Owner); + } + if (ShareAdmin != false) { + output.WriteRawTag(24); + output.WriteBool(ShareAdmin); + } + if (Sharable != false) { + output.WriteRawTag(32); + output.WriteBool(Sharable); + } + if (Editable != false) { + output.WriteRawTag(40); + output.WriteBool(Editable); + } + if (AwaitingApproval != false) { + output.WriteRawTag(48); + output.WriteBool(AwaitingApproval); + } + if (Expiration != 0L) { + output.WriteRawTag(56); + output.WriteInt64(Expiration); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(66); + output.WriteBytes(AccountUid); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(72); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Owner != false) { + size += 1 + 1; + } + if (ShareAdmin != false) { + size += 1 + 1; + } + if (Sharable != false) { + size += 1 + 1; + } + if (Editable != false) { + size += 1 + 1; + } + if (AwaitingApproval != false) { + size += 1 + 1; + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + } + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(UserPermission other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Owner != false) { + Owner = other.Owner; + } + if (other.ShareAdmin != false) { + ShareAdmin = other.ShareAdmin; + } + if (other.Sharable != false) { + Sharable = other.Sharable; + } + if (other.Editable != false) { + Editable = other.Editable; + } + if (other.AwaitingApproval != false) { + AwaitingApproval = other.AwaitingApproval; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.AccountUid.Length != 0) { + AccountUid = other.AccountUid; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 16: { + Owner = input.ReadBool(); + break; + } + case 24: { + ShareAdmin = input.ReadBool(); + break; + } + case 32: { + Sharable = input.ReadBool(); + break; + } + case 40: { + Editable = input.ReadBool(); + break; + } + case 48: { + AwaitingApproval = input.ReadBool(); + break; + } + case 56: { + Expiration = input.ReadInt64(); + break; + } + case 66: { + AccountUid = input.ReadBytes(); + break; + } + case 72: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 16: { + Owner = input.ReadBool(); + break; + } + case 24: { + ShareAdmin = input.ReadBool(); + break; + } + case 32: { + Sharable = input.ReadBool(); + break; + } + case 40: { + Editable = input.ReadBool(); + break; + } + case 48: { + AwaitingApproval = input.ReadBool(); + break; + } + case 56: { + Expiration = input.ReadInt64(); + break; + } + case 66: { + AccountUid = input.ReadBytes(); + break; + } + case 72: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedFolderPermission : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedFolderPermission()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[38]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderPermission() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderPermission(SharedFolderPermission other) : this() { + sharedFolderUid_ = other.sharedFolderUid_; + resharable_ = other.resharable_; + editable_ = other.editable_; + revision_ = other.revision_; + expiration_ = other.expiration_; + timerNotificationType_ = other.timerNotificationType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedFolderPermission Clone() { + return new SharedFolderPermission(this); + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 1; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "resharable" field. + public const int ResharableFieldNumber = 2; + private bool resharable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Resharable { + get { return resharable_; } + set { + resharable_ = value; + } + } + + /// Field number for the "editable" field. + public const int EditableFieldNumber = 3; + private bool editable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Editable { + get { return editable_; } + set { + editable_ = value; + } + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 4; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 5; + private long expiration_; + /// + ///time limit for the record in a shared folder + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 6; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedFolderPermission); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedFolderPermission other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SharedFolderUid != other.SharedFolderUid) return false; + if (Resharable != other.Resharable) return false; + if (Editable != other.Editable) return false; + if (Revision != other.Revision) return false; + if (Expiration != other.Expiration) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (Resharable != false) hash ^= Resharable.GetHashCode(); + if (Editable != false) hash ^= Editable.GetHashCode(); + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + if (Resharable != false) { + output.WriteRawTag(16); + output.WriteBool(Resharable); + } + if (Editable != false) { + output.WriteRawTag(24); + output.WriteBool(Editable); + } + if (Revision != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Revision); + } + if (Expiration != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(48); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(SharedFolderUid); + } + if (Resharable != false) { + output.WriteRawTag(16); + output.WriteBool(Resharable); + } + if (Editable != false) { + output.WriteRawTag(24); + output.WriteBool(Editable); + } + if (Revision != 0L) { + output.WriteRawTag(32); + output.WriteInt64(Revision); + } + if (Expiration != 0L) { + output.WriteRawTag(40); + output.WriteInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(48); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (Resharable != false) { + size += 1 + 1; + } + if (Editable != false) { + size += 1 + 1; + } + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedFolderPermission other) { + if (other == null) { + return; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + if (other.Resharable != false) { + Resharable = other.Resharable; + } + if (other.Editable != false) { + Editable = other.Editable; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 16: { + Resharable = input.ReadBool(); + break; + } + case 24: { + Editable = input.ReadBool(); + break; + } + case 32: { + Revision = input.ReadInt64(); + break; + } + case 40: { + Expiration = input.ReadInt64(); + break; + } + case 48: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 16: { + Resharable = input.ReadBool(); + break; + } + case 24: { + Editable = input.ReadBool(); + break; + } + case 32: { + Revision = input.ReadInt64(); + break; + } + case 40: { + Expiration = input.ReadInt64(); + break; + } + case 48: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordData : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordData()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[39]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordData() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordData(RecordData other) : this() { + revision_ = other.revision_; + version_ = other.version_; + shared_ = other.shared_; + encryptedRecordData_ = other.encryptedRecordData_; + encryptedExtraData_ = other.encryptedExtraData_; + clientModifiedTime_ = other.clientModifiedTime_; + nonSharedData_ = other.nonSharedData_; + linkedRecordData_ = other.linkedRecordData_.Clone(); + fileId_ = other.fileId_.Clone(); + fileSize_ = other.fileSize_; + thumbnailSize_ = other.thumbnailSize_; + recordKeyType_ = other.recordKeyType_; + recordKey_ = other.recordKey_; + recordUid_ = other.recordUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordData Clone() { + return new RecordData(this); + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 1; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "version" field. + public const int VersionFieldNumber = 2; + private int version_; + /// + ///ORIGINAL(1), SUPPORTS_EXTRA(2), RECORD_TYPES(3), FILE(4), APP(5); + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Version { + get { return version_; } + set { + version_ = value; + } + } + + /// Field number for the "shared" field. + public const int SharedFieldNumber = 3; + private bool shared_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Shared { + get { return shared_; } + set { + shared_ = value; + } + } + + /// Field number for the "encryptedRecordData" field. + public const int EncryptedRecordDataFieldNumber = 4; + private string encryptedRecordData_ = ""; + /// + ///record data encrypted with the record key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedRecordData { + get { return encryptedRecordData_; } + set { + encryptedRecordData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "encryptedExtraData" field. + public const int EncryptedExtraDataFieldNumber = 5; + private string encryptedExtraData_ = ""; + /// + ///extra record data encrypted with the record key + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string EncryptedExtraData { + get { return encryptedExtraData_; } + set { + encryptedExtraData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "clientModifiedTime" field. + public const int ClientModifiedTimeFieldNumber = 6; + private long clientModifiedTime_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ClientModifiedTime { + get { return clientModifiedTime_; } + set { + clientModifiedTime_ = value; + } + } + + /// Field number for the "nonSharedData" field. + public const int NonSharedDataFieldNumber = 7; + private string nonSharedData_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string NonSharedData { + get { return nonSharedData_; } + set { + nonSharedData_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "linkedRecordData" field. + public const int LinkedRecordDataFieldNumber = 8; + private static readonly pb::FieldCodec _repeated_linkedRecordData_codec + = pb::FieldCodec.ForMessage(66, global::Records.RecordData.Parser); + private readonly pbc::RepeatedField linkedRecordData_ = new pbc::RepeatedField(); + /// + /// a list of child record data + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField LinkedRecordData { + get { return linkedRecordData_; } + } + + /// Field number for the "fileId" field. + public const int FileIdFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_fileId_codec + = pb::FieldCodec.ForBytes(74); + private readonly pbc::RepeatedField fileId_ = new pbc::RepeatedField(); + /// + /// json object of unencrypted data (currently contains only file ids) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField FileId { + get { return fileId_; } + } + + /// Field number for the "fileSize" field. + public const int FileSizeFieldNumber = 10; + private long fileSize_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long FileSize { + get { return fileSize_; } + set { + fileSize_ = value; + } + } + + /// Field number for the "thumbnailSize" field. + public const int ThumbnailSizeFieldNumber = 11; + private long thumbnailSize_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long ThumbnailSize { + get { return thumbnailSize_; } + set { + thumbnailSize_ = value; + } + } + + /// Field number for the "recordKeyType" field. + public const int RecordKeyTypeFieldNumber = 12; + private global::Records.RecordKeyType recordKeyType_ = global::Records.RecordKeyType.NoKey; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordKeyType RecordKeyType { + get { return recordKeyType_; } + set { + recordKeyType_ = value; + } + } + + /// Field number for the "recordKey" field. + public const int RecordKeyFieldNumber = 13; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 14; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordData); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordData other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Revision != other.Revision) return false; + if (Version != other.Version) return false; + if (Shared != other.Shared) return false; + if (EncryptedRecordData != other.EncryptedRecordData) return false; + if (EncryptedExtraData != other.EncryptedExtraData) return false; + if (ClientModifiedTime != other.ClientModifiedTime) return false; + if (NonSharedData != other.NonSharedData) return false; + if(!linkedRecordData_.Equals(other.linkedRecordData_)) return false; + if(!fileId_.Equals(other.fileId_)) return false; + if (FileSize != other.FileSize) return false; + if (ThumbnailSize != other.ThumbnailSize) return false; + if (RecordKeyType != other.RecordKeyType) return false; + if (RecordKey != other.RecordKey) return false; + if (RecordUid != other.RecordUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Revision != 0L) hash ^= Revision.GetHashCode(); + if (Version != 0) hash ^= Version.GetHashCode(); + if (Shared != false) hash ^= Shared.GetHashCode(); + if (EncryptedRecordData.Length != 0) hash ^= EncryptedRecordData.GetHashCode(); + if (EncryptedExtraData.Length != 0) hash ^= EncryptedExtraData.GetHashCode(); + if (ClientModifiedTime != 0L) hash ^= ClientModifiedTime.GetHashCode(); + if (NonSharedData.Length != 0) hash ^= NonSharedData.GetHashCode(); + hash ^= linkedRecordData_.GetHashCode(); + hash ^= fileId_.GetHashCode(); + if (FileSize != 0L) hash ^= FileSize.GetHashCode(); + if (ThumbnailSize != 0L) hash ^= ThumbnailSize.GetHashCode(); + if (RecordKeyType != global::Records.RecordKeyType.NoKey) hash ^= RecordKeyType.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + if (Version != 0) { + output.WriteRawTag(16); + output.WriteInt32(Version); + } + if (Shared != false) { + output.WriteRawTag(24); + output.WriteBool(Shared); + } + if (EncryptedRecordData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedRecordData); + } + if (EncryptedExtraData.Length != 0) { + output.WriteRawTag(42); + output.WriteString(EncryptedExtraData); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(48); + output.WriteInt64(ClientModifiedTime); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(58); + output.WriteString(NonSharedData); + } + linkedRecordData_.WriteTo(output, _repeated_linkedRecordData_codec); + fileId_.WriteTo(output, _repeated_fileId_codec); + if (FileSize != 0L) { + output.WriteRawTag(80); + output.WriteInt64(FileSize); + } + if (ThumbnailSize != 0L) { + output.WriteRawTag(88); + output.WriteInt64(ThumbnailSize); + } + if (RecordKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(96); + output.WriteEnum((int) RecordKeyType); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(RecordKey); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(114); + output.WriteBytes(RecordUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + if (Version != 0) { + output.WriteRawTag(16); + output.WriteInt32(Version); + } + if (Shared != false) { + output.WriteRawTag(24); + output.WriteBool(Shared); + } + if (EncryptedRecordData.Length != 0) { + output.WriteRawTag(34); + output.WriteString(EncryptedRecordData); + } + if (EncryptedExtraData.Length != 0) { + output.WriteRawTag(42); + output.WriteString(EncryptedExtraData); + } + if (ClientModifiedTime != 0L) { + output.WriteRawTag(48); + output.WriteInt64(ClientModifiedTime); + } + if (NonSharedData.Length != 0) { + output.WriteRawTag(58); + output.WriteString(NonSharedData); + } + linkedRecordData_.WriteTo(ref output, _repeated_linkedRecordData_codec); + fileId_.WriteTo(ref output, _repeated_fileId_codec); + if (FileSize != 0L) { + output.WriteRawTag(80); + output.WriteInt64(FileSize); + } + if (ThumbnailSize != 0L) { + output.WriteRawTag(88); + output.WriteInt64(ThumbnailSize); + } + if (RecordKeyType != global::Records.RecordKeyType.NoKey) { + output.WriteRawTag(96); + output.WriteEnum((int) RecordKeyType); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(106); + output.WriteBytes(RecordKey); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(114); + output.WriteBytes(RecordUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + if (Version != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Version); + } + if (Shared != false) { + size += 1 + 1; + } + if (EncryptedRecordData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedRecordData); + } + if (EncryptedExtraData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(EncryptedExtraData); + } + if (ClientModifiedTime != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ClientModifiedTime); + } + if (NonSharedData.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(NonSharedData); + } + size += linkedRecordData_.CalculateSize(_repeated_linkedRecordData_codec); + size += fileId_.CalculateSize(_repeated_fileId_codec); + if (FileSize != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(FileSize); + } + if (ThumbnailSize != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(ThumbnailSize); + } + if (RecordKeyType != global::Records.RecordKeyType.NoKey) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) RecordKeyType); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordData other) { + if (other == null) { + return; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + if (other.Version != 0) { + Version = other.Version; + } + if (other.Shared != false) { + Shared = other.Shared; + } + if (other.EncryptedRecordData.Length != 0) { + EncryptedRecordData = other.EncryptedRecordData; + } + if (other.EncryptedExtraData.Length != 0) { + EncryptedExtraData = other.EncryptedExtraData; + } + if (other.ClientModifiedTime != 0L) { + ClientModifiedTime = other.ClientModifiedTime; + } + if (other.NonSharedData.Length != 0) { + NonSharedData = other.NonSharedData; + } + linkedRecordData_.Add(other.linkedRecordData_); + fileId_.Add(other.fileId_); + if (other.FileSize != 0L) { + FileSize = other.FileSize; + } + if (other.ThumbnailSize != 0L) { + ThumbnailSize = other.ThumbnailSize; + } + if (other.RecordKeyType != global::Records.RecordKeyType.NoKey) { + RecordKeyType = other.RecordKeyType; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Revision = input.ReadInt64(); + break; + } + case 16: { + Version = input.ReadInt32(); + break; + } + case 24: { + Shared = input.ReadBool(); + break; + } + case 34: { + EncryptedRecordData = input.ReadString(); + break; + } + case 42: { + EncryptedExtraData = input.ReadString(); + break; + } + case 48: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 58: { + NonSharedData = input.ReadString(); + break; + } + case 66: { + linkedRecordData_.AddEntriesFrom(input, _repeated_linkedRecordData_codec); + break; + } + case 74: { + fileId_.AddEntriesFrom(input, _repeated_fileId_codec); + break; + } + case 80: { + FileSize = input.ReadInt64(); + break; + } + case 88: { + ThumbnailSize = input.ReadInt64(); + break; + } + case 96: { + RecordKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 106: { + RecordKey = input.ReadBytes(); + break; + } + case 114: { + RecordUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Revision = input.ReadInt64(); + break; + } + case 16: { + Version = input.ReadInt32(); + break; + } + case 24: { + Shared = input.ReadBool(); + break; + } + case 34: { + EncryptedRecordData = input.ReadString(); + break; + } + case 42: { + EncryptedExtraData = input.ReadString(); + break; + } + case 48: { + ClientModifiedTime = input.ReadInt64(); + break; + } + case 58: { + NonSharedData = input.ReadString(); + break; + } + case 66: { + linkedRecordData_.AddEntriesFrom(ref input, _repeated_linkedRecordData_codec); + break; + } + case 74: { + fileId_.AddEntriesFrom(ref input, _repeated_fileId_codec); + break; + } + case 80: { + FileSize = input.ReadInt64(); + break; + } + case 88: { + ThumbnailSize = input.ReadInt64(); + break; + } + case 96: { + RecordKeyType = (global::Records.RecordKeyType) input.ReadEnum(); + break; + } + case 106: { + RecordKey = input.ReadBytes(); + break; + } + case 114: { + RecordUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordDataWithAccessInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordDataWithAccessInfo()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[40]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordDataWithAccessInfo() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordDataWithAccessInfo(RecordDataWithAccessInfo other) : this() { + recordUid_ = other.recordUid_; + recordData_ = other.recordData_ != null ? other.recordData_.Clone() : null; + userPermission_ = other.userPermission_.Clone(); + sharedFolderPermission_ = other.sharedFolderPermission_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordDataWithAccessInfo Clone() { + return new RecordDataWithAccessInfo(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordData" field. + public const int RecordDataFieldNumber = 2; + private global::Records.RecordData recordData_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.RecordData RecordData { + get { return recordData_; } + set { + recordData_ = value; + } + } + + /// Field number for the "userPermission" field. + public const int UserPermissionFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_userPermission_codec + = pb::FieldCodec.ForMessage(26, global::Records.UserPermission.Parser); + private readonly pbc::RepeatedField userPermission_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserPermission { + get { return userPermission_; } + } + + /// Field number for the "sharedFolderPermission" field. + public const int SharedFolderPermissionFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_sharedFolderPermission_codec + = pb::FieldCodec.ForMessage(34, global::Records.SharedFolderPermission.Parser); + private readonly pbc::RepeatedField sharedFolderPermission_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolderPermission { + get { return sharedFolderPermission_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordDataWithAccessInfo); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordDataWithAccessInfo other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (!object.Equals(RecordData, other.RecordData)) return false; + if(!userPermission_.Equals(other.userPermission_)) return false; + if(!sharedFolderPermission_.Equals(other.sharedFolderPermission_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (recordData_ != null) hash ^= RecordData.GetHashCode(); + hash ^= userPermission_.GetHashCode(); + hash ^= sharedFolderPermission_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (recordData_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RecordData); + } + userPermission_.WriteTo(output, _repeated_userPermission_codec); + sharedFolderPermission_.WriteTo(output, _repeated_sharedFolderPermission_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (recordData_ != null) { + output.WriteRawTag(18); + output.WriteMessage(RecordData); + } + userPermission_.WriteTo(ref output, _repeated_userPermission_codec); + sharedFolderPermission_.WriteTo(ref output, _repeated_sharedFolderPermission_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (recordData_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(RecordData); + } + size += userPermission_.CalculateSize(_repeated_userPermission_codec); + size += sharedFolderPermission_.CalculateSize(_repeated_sharedFolderPermission_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordDataWithAccessInfo other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.recordData_ != null) { + if (recordData_ == null) { + RecordData = new global::Records.RecordData(); + } + RecordData.MergeFrom(other.RecordData); + } + userPermission_.Add(other.userPermission_); + sharedFolderPermission_.Add(other.sharedFolderPermission_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + if (recordData_ == null) { + RecordData = new global::Records.RecordData(); + } + input.ReadMessage(RecordData); + break; + } + case 26: { + userPermission_.AddEntriesFrom(input, _repeated_userPermission_codec); + break; + } + case 34: { + sharedFolderPermission_.AddEntriesFrom(input, _repeated_sharedFolderPermission_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + if (recordData_ == null) { + RecordData = new global::Records.RecordData(); + } + input.ReadMessage(RecordData); + break; + } + case 26: { + userPermission_.AddEntriesFrom(ref input, _repeated_userPermission_codec); + break; + } + case 34: { + sharedFolderPermission_.AddEntriesFrom(ref input, _repeated_sharedFolderPermission_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetRecordDataWithAccessInfoResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetRecordDataWithAccessInfoResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[41]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordDataWithAccessInfoResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordDataWithAccessInfoResponse(GetRecordDataWithAccessInfoResponse other) : this() { + recordDataWithAccessInfo_ = other.recordDataWithAccessInfo_.Clone(); + noPermissionRecordUid_ = other.noPermissionRecordUid_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordDataWithAccessInfoResponse Clone() { + return new GetRecordDataWithAccessInfoResponse(this); + } + + /// Field number for the "recordDataWithAccessInfo" field. + public const int RecordDataWithAccessInfoFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordDataWithAccessInfo_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordDataWithAccessInfo.Parser); + private readonly pbc::RepeatedField recordDataWithAccessInfo_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordDataWithAccessInfo { + get { return recordDataWithAccessInfo_; } + } + + /// Field number for the "noPermissionRecordUid" field. + public const int NoPermissionRecordUidFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_noPermissionRecordUid_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField noPermissionRecordUid_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField NoPermissionRecordUid { + get { return noPermissionRecordUid_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetRecordDataWithAccessInfoResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetRecordDataWithAccessInfoResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordDataWithAccessInfo_.Equals(other.recordDataWithAccessInfo_)) return false; + if(!noPermissionRecordUid_.Equals(other.noPermissionRecordUid_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordDataWithAccessInfo_.GetHashCode(); + hash ^= noPermissionRecordUid_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordDataWithAccessInfo_.WriteTo(output, _repeated_recordDataWithAccessInfo_codec); + noPermissionRecordUid_.WriteTo(output, _repeated_noPermissionRecordUid_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordDataWithAccessInfo_.WriteTo(ref output, _repeated_recordDataWithAccessInfo_codec); + noPermissionRecordUid_.WriteTo(ref output, _repeated_noPermissionRecordUid_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordDataWithAccessInfo_.CalculateSize(_repeated_recordDataWithAccessInfo_codec); + size += noPermissionRecordUid_.CalculateSize(_repeated_noPermissionRecordUid_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetRecordDataWithAccessInfoResponse other) { + if (other == null) { + return; + } + recordDataWithAccessInfo_.Add(other.recordDataWithAccessInfo_); + noPermissionRecordUid_.Add(other.noPermissionRecordUid_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordDataWithAccessInfo_.AddEntriesFrom(input, _repeated_recordDataWithAccessInfo_codec); + break; + } + case 18: { + noPermissionRecordUid_.AddEntriesFrom(input, _repeated_noPermissionRecordUid_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordDataWithAccessInfo_.AddEntriesFrom(ref input, _repeated_recordDataWithAccessInfo_codec); + break; + } + case 18: { + noPermissionRecordUid_.AddEntriesFrom(ref input, _repeated_noPermissionRecordUid_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class IsObjectShareAdmin : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new IsObjectShareAdmin()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[42]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IsObjectShareAdmin() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IsObjectShareAdmin(IsObjectShareAdmin other) : this() { + uid_ = other.uid_; + isAdmin_ = other.isAdmin_; + objectType_ = other.objectType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public IsObjectShareAdmin Clone() { + return new IsObjectShareAdmin(this); + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 1; + private pb::ByteString uid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "isAdmin" field. + public const int IsAdminFieldNumber = 2; + private bool isAdmin_; + /// + /// used in the response + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsAdmin { + get { return isAdmin_; } + set { + isAdmin_ = value; + } + } + + /// Field number for the "objectType" field. + public const int ObjectTypeFieldNumber = 3; + private global::Records.CheckShareAdminObjectType objectType_ = global::Records.CheckShareAdminObjectType.CheckSaInvalidType; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.CheckShareAdminObjectType ObjectType { + get { return objectType_; } + set { + objectType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as IsObjectShareAdmin); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(IsObjectShareAdmin other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Uid != other.Uid) return false; + if (IsAdmin != other.IsAdmin) return false; + if (ObjectType != other.ObjectType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (IsAdmin != false) hash ^= IsAdmin.GetHashCode(); + if (ObjectType != global::Records.CheckShareAdminObjectType.CheckSaInvalidType) hash ^= ObjectType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (IsAdmin != false) { + output.WriteRawTag(16); + output.WriteBool(IsAdmin); + } + if (ObjectType != global::Records.CheckShareAdminObjectType.CheckSaInvalidType) { + output.WriteRawTag(24); + output.WriteEnum((int) ObjectType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (IsAdmin != false) { + output.WriteRawTag(16); + output.WriteBool(IsAdmin); + } + if (ObjectType != global::Records.CheckShareAdminObjectType.CheckSaInvalidType) { + output.WriteRawTag(24); + output.WriteEnum((int) ObjectType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); + } + if (IsAdmin != false) { + size += 1 + 1; + } + if (ObjectType != global::Records.CheckShareAdminObjectType.CheckSaInvalidType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ObjectType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(IsObjectShareAdmin other) { + if (other == null) { + return; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.IsAdmin != false) { + IsAdmin = other.IsAdmin; + } + if (other.ObjectType != global::Records.CheckShareAdminObjectType.CheckSaInvalidType) { + ObjectType = other.ObjectType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 16: { + IsAdmin = input.ReadBool(); + break; + } + case 24: { + ObjectType = (global::Records.CheckShareAdminObjectType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 16: { + IsAdmin = input.ReadBool(); + break; + } + case 24: { + ObjectType = (global::Records.CheckShareAdminObjectType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + /// + /// used for both request and response + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class AmIShareAdmin : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new AmIShareAdmin()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[43]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AmIShareAdmin() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AmIShareAdmin(AmIShareAdmin other) : this() { + isObjectShareAdmin_ = other.isObjectShareAdmin_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public AmIShareAdmin Clone() { + return new AmIShareAdmin(this); + } + + /// Field number for the "isObjectShareAdmin" field. + public const int IsObjectShareAdminFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_isObjectShareAdmin_codec + = pb::FieldCodec.ForMessage(10, global::Records.IsObjectShareAdmin.Parser); + private readonly pbc::RepeatedField isObjectShareAdmin_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField IsObjectShareAdmin { + get { return isObjectShareAdmin_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as AmIShareAdmin); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(AmIShareAdmin other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!isObjectShareAdmin_.Equals(other.isObjectShareAdmin_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= isObjectShareAdmin_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + isObjectShareAdmin_.WriteTo(output, _repeated_isObjectShareAdmin_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + isObjectShareAdmin_.WriteTo(ref output, _repeated_isObjectShareAdmin_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += isObjectShareAdmin_.CalculateSize(_repeated_isObjectShareAdmin_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(AmIShareAdmin other) { + if (other == null) { + return; + } + isObjectShareAdmin_.Add(other.isObjectShareAdmin_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + isObjectShareAdmin_.AddEntriesFrom(input, _repeated_isObjectShareAdmin_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + isObjectShareAdmin_.AddEntriesFrom(ref input, _repeated_isObjectShareAdmin_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordShareUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordShareUpdateRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[44]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordShareUpdateRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordShareUpdateRequest(RecordShareUpdateRequest other) : this() { + addSharedRecord_ = other.addSharedRecord_.Clone(); + updateSharedRecord_ = other.updateSharedRecord_.Clone(); + removeSharedRecord_ = other.removeSharedRecord_.Clone(); + pt_ = other.pt_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordShareUpdateRequest Clone() { + return new RecordShareUpdateRequest(this); + } + + /// Field number for the "addSharedRecord" field. + public const int AddSharedRecordFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_addSharedRecord_codec + = pb::FieldCodec.ForMessage(10, global::Records.SharedRecord.Parser); + private readonly pbc::RepeatedField addSharedRecord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AddSharedRecord { + get { return addSharedRecord_; } + } + + /// Field number for the "updateSharedRecord" field. + public const int UpdateSharedRecordFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_updateSharedRecord_codec + = pb::FieldCodec.ForMessage(18, global::Records.SharedRecord.Parser); + private readonly pbc::RepeatedField updateSharedRecord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UpdateSharedRecord { + get { return updateSharedRecord_; } + } + + /// Field number for the "removeSharedRecord" field. + public const int RemoveSharedRecordFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_removeSharedRecord_codec + = pb::FieldCodec.ForMessage(26, global::Records.SharedRecord.Parser); + private readonly pbc::RepeatedField removeSharedRecord_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RemoveSharedRecord { + get { return removeSharedRecord_; } + } + + /// Field number for the "pt" field. + public const int PtFieldNumber = 4; + private string pt_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Pt { + get { return pt_; } + set { + pt_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordShareUpdateRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordShareUpdateRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!addSharedRecord_.Equals(other.addSharedRecord_)) return false; + if(!updateSharedRecord_.Equals(other.updateSharedRecord_)) return false; + if(!removeSharedRecord_.Equals(other.removeSharedRecord_)) return false; + if (Pt != other.Pt) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= addSharedRecord_.GetHashCode(); + hash ^= updateSharedRecord_.GetHashCode(); + hash ^= removeSharedRecord_.GetHashCode(); + if (Pt.Length != 0) hash ^= Pt.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + addSharedRecord_.WriteTo(output, _repeated_addSharedRecord_codec); + updateSharedRecord_.WriteTo(output, _repeated_updateSharedRecord_codec); + removeSharedRecord_.WriteTo(output, _repeated_removeSharedRecord_codec); + if (Pt.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Pt); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + addSharedRecord_.WriteTo(ref output, _repeated_addSharedRecord_codec); + updateSharedRecord_.WriteTo(ref output, _repeated_updateSharedRecord_codec); + removeSharedRecord_.WriteTo(ref output, _repeated_removeSharedRecord_codec); + if (Pt.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Pt); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += addSharedRecord_.CalculateSize(_repeated_addSharedRecord_codec); + size += updateSharedRecord_.CalculateSize(_repeated_updateSharedRecord_codec); + size += removeSharedRecord_.CalculateSize(_repeated_removeSharedRecord_codec); + if (Pt.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Pt); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordShareUpdateRequest other) { + if (other == null) { + return; + } + addSharedRecord_.Add(other.addSharedRecord_); + updateSharedRecord_.Add(other.updateSharedRecord_); + removeSharedRecord_.Add(other.removeSharedRecord_); + if (other.Pt.Length != 0) { + Pt = other.Pt; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + addSharedRecord_.AddEntriesFrom(input, _repeated_addSharedRecord_codec); + break; + } + case 18: { + updateSharedRecord_.AddEntriesFrom(input, _repeated_updateSharedRecord_codec); + break; + } + case 26: { + removeSharedRecord_.AddEntriesFrom(input, _repeated_removeSharedRecord_codec); + break; + } + case 34: { + Pt = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + addSharedRecord_.AddEntriesFrom(ref input, _repeated_addSharedRecord_codec); + break; + } + case 18: { + updateSharedRecord_.AddEntriesFrom(ref input, _repeated_updateSharedRecord_codec); + break; + } + case 26: { + removeSharedRecord_.AddEntriesFrom(ref input, _repeated_removeSharedRecord_codec); + break; + } + case 34: { + Pt = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[45]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecord(SharedRecord other) : this() { + toUsername_ = other.toUsername_; + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + sharedFolderUid_ = other.sharedFolderUid_; + teamUid_ = other.teamUid_; + editable_ = other.editable_; + shareable_ = other.shareable_; + transfer_ = other.transfer_; + useEccKey_ = other.useEccKey_; + removeVaultData_ = other.removeVaultData_; + expiration_ = other.expiration_; + timerNotificationType_ = other.timerNotificationType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecord Clone() { + return new SharedRecord(this); + } + + /// Field number for the "toUsername" field. + public const int ToUsernameFieldNumber = 1; + private string toUsername_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string ToUsername { + get { return toUsername_; } + set { + toUsername_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordKey" field. + public const int RecordKeyFieldNumber = 3; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 4; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 5; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "editable" field. + public const int EditableFieldNumber = 6; + private bool editable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Editable { + get { return editable_; } + set { + editable_ = value; + } + } + + /// Field number for the "shareable" field. + public const int ShareableFieldNumber = 7; + private bool shareable_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Shareable { + get { return shareable_; } + set { + shareable_ = value; + } + } + + /// Field number for the "transfer" field. + public const int TransferFieldNumber = 8; + private bool transfer_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Transfer { + get { return transfer_; } + set { + transfer_ = value; + } + } + + /// Field number for the "useEccKey" field. + public const int UseEccKeyFieldNumber = 9; + private bool useEccKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UseEccKey { + get { return useEccKey_; } + set { + useEccKey_ = value; + } + } + + /// Field number for the "removeVaultData" field. + public const int RemoveVaultDataFieldNumber = 10; + private bool removeVaultData_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool RemoveVaultData { + get { return removeVaultData_; } + set { + removeVaultData_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 11; + private long expiration_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 12; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (ToUsername != other.ToUsername) return false; + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + if (TeamUid != other.TeamUid) return false; + if (Editable != other.Editable) return false; + if (Shareable != other.Shareable) return false; + if (Transfer != other.Transfer) return false; + if (UseEccKey != other.UseEccKey) return false; + if (RemoveVaultData != other.RemoveVaultData) return false; + if (Expiration != other.Expiration) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (ToUsername.Length != 0) hash ^= ToUsername.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (Editable != false) hash ^= Editable.GetHashCode(); + if (Shareable != false) hash ^= Shareable.GetHashCode(); + if (Transfer != false) hash ^= Transfer.GetHashCode(); + if (UseEccKey != false) hash ^= UseEccKey.GetHashCode(); + if (RemoveVaultData != false) hash ^= RemoveVaultData.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (ToUsername.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ToUsername); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordKey); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderUid); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(TeamUid); + } + if (Editable != false) { + output.WriteRawTag(48); + output.WriteBool(Editable); + } + if (Shareable != false) { + output.WriteRawTag(56); + output.WriteBool(Shareable); + } + if (Transfer != false) { + output.WriteRawTag(64); + output.WriteBool(Transfer); + } + if (UseEccKey != false) { + output.WriteRawTag(72); + output.WriteBool(UseEccKey); + } + if (RemoveVaultData != false) { + output.WriteRawTag(80); + output.WriteBool(RemoveVaultData); + } + if (Expiration != 0L) { + output.WriteRawTag(88); + output.WriteInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(96); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ToUsername.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ToUsername); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordKey); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderUid); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(TeamUid); + } + if (Editable != false) { + output.WriteRawTag(48); + output.WriteBool(Editable); + } + if (Shareable != false) { + output.WriteRawTag(56); + output.WriteBool(Shareable); + } + if (Transfer != false) { + output.WriteRawTag(64); + output.WriteBool(Transfer); + } + if (UseEccKey != false) { + output.WriteRawTag(72); + output.WriteBool(UseEccKey); + } + if (RemoveVaultData != false) { + output.WriteRawTag(80); + output.WriteBool(RemoveVaultData); + } + if (Expiration != 0L) { + output.WriteRawTag(88); + output.WriteInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(96); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (ToUsername.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ToUsername); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (Editable != false) { + size += 1 + 1; + } + if (Shareable != false) { + size += 1 + 1; + } + if (Transfer != false) { + size += 1 + 1; + } + if (UseEccKey != false) { + size += 1 + 1; + } + if (RemoveVaultData != false) { + size += 1 + 1; + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedRecord other) { + if (other == null) { + return; + } + if (other.ToUsername.Length != 0) { + ToUsername = other.ToUsername; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + if (other.Editable != false) { + Editable = other.Editable; + } + if (other.Shareable != false) { + Shareable = other.Shareable; + } + if (other.Transfer != false) { + Transfer = other.Transfer; + } + if (other.UseEccKey != false) { + UseEccKey = other.UseEccKey; + } + if (other.RemoveVaultData != false) { + RemoveVaultData = other.RemoveVaultData; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + ToUsername = input.ReadString(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + RecordKey = input.ReadBytes(); + break; + } + case 34: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 42: { + TeamUid = input.ReadBytes(); + break; + } + case 48: { + Editable = input.ReadBool(); + break; + } + case 56: { + Shareable = input.ReadBool(); + break; + } + case 64: { + Transfer = input.ReadBool(); + break; + } + case 72: { + UseEccKey = input.ReadBool(); + break; + } + case 80: { + RemoveVaultData = input.ReadBool(); + break; + } + case 88: { + Expiration = input.ReadInt64(); + break; + } + case 96: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ToUsername = input.ReadString(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + RecordKey = input.ReadBytes(); + break; + } + case 34: { + SharedFolderUid = input.ReadBytes(); + break; + } + case 42: { + TeamUid = input.ReadBytes(); + break; + } + case 48: { + Editable = input.ReadBool(); + break; + } + case 56: { + Shareable = input.ReadBool(); + break; + } + case 64: { + Transfer = input.ReadBool(); + break; + } + case 72: { + UseEccKey = input.ReadBool(); + break; + } + case 80: { + RemoveVaultData = input.ReadBool(); + break; + } + case 88: { + Expiration = input.ReadInt64(); + break; + } + case 96: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordShareUpdateResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordShareUpdateResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[46]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordShareUpdateResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordShareUpdateResponse(RecordShareUpdateResponse other) : this() { + addSharedRecordStatus_ = other.addSharedRecordStatus_.Clone(); + updateSharedRecordStatus_ = other.updateSharedRecordStatus_.Clone(); + removeSharedRecordStatus_ = other.removeSharedRecordStatus_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordShareUpdateResponse Clone() { + return new RecordShareUpdateResponse(this); + } + + /// Field number for the "addSharedRecordStatus" field. + public const int AddSharedRecordStatusFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_addSharedRecordStatus_codec + = pb::FieldCodec.ForMessage(10, global::Records.SharedRecordStatus.Parser); + private readonly pbc::RepeatedField addSharedRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AddSharedRecordStatus { + get { return addSharedRecordStatus_; } + } + + /// Field number for the "updateSharedRecordStatus" field. + public const int UpdateSharedRecordStatusFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_updateSharedRecordStatus_codec + = pb::FieldCodec.ForMessage(18, global::Records.SharedRecordStatus.Parser); + private readonly pbc::RepeatedField updateSharedRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UpdateSharedRecordStatus { + get { return updateSharedRecordStatus_; } + } + + /// Field number for the "removeSharedRecordStatus" field. + public const int RemoveSharedRecordStatusFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_removeSharedRecordStatus_codec + = pb::FieldCodec.ForMessage(26, global::Records.SharedRecordStatus.Parser); + private readonly pbc::RepeatedField removeSharedRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RemoveSharedRecordStatus { + get { return removeSharedRecordStatus_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordShareUpdateResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordShareUpdateResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!addSharedRecordStatus_.Equals(other.addSharedRecordStatus_)) return false; + if(!updateSharedRecordStatus_.Equals(other.updateSharedRecordStatus_)) return false; + if(!removeSharedRecordStatus_.Equals(other.removeSharedRecordStatus_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= addSharedRecordStatus_.GetHashCode(); + hash ^= updateSharedRecordStatus_.GetHashCode(); + hash ^= removeSharedRecordStatus_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + addSharedRecordStatus_.WriteTo(output, _repeated_addSharedRecordStatus_codec); + updateSharedRecordStatus_.WriteTo(output, _repeated_updateSharedRecordStatus_codec); + removeSharedRecordStatus_.WriteTo(output, _repeated_removeSharedRecordStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + addSharedRecordStatus_.WriteTo(ref output, _repeated_addSharedRecordStatus_codec); + updateSharedRecordStatus_.WriteTo(ref output, _repeated_updateSharedRecordStatus_codec); + removeSharedRecordStatus_.WriteTo(ref output, _repeated_removeSharedRecordStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += addSharedRecordStatus_.CalculateSize(_repeated_addSharedRecordStatus_codec); + size += updateSharedRecordStatus_.CalculateSize(_repeated_updateSharedRecordStatus_codec); + size += removeSharedRecordStatus_.CalculateSize(_repeated_removeSharedRecordStatus_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordShareUpdateResponse other) { + if (other == null) { + return; + } + addSharedRecordStatus_.Add(other.addSharedRecordStatus_); + updateSharedRecordStatus_.Add(other.updateSharedRecordStatus_); + removeSharedRecordStatus_.Add(other.removeSharedRecordStatus_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + addSharedRecordStatus_.AddEntriesFrom(input, _repeated_addSharedRecordStatus_codec); + break; + } + case 18: { + updateSharedRecordStatus_.AddEntriesFrom(input, _repeated_updateSharedRecordStatus_codec); + break; + } + case 26: { + removeSharedRecordStatus_.AddEntriesFrom(input, _repeated_removeSharedRecordStatus_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + addSharedRecordStatus_.AddEntriesFrom(ref input, _repeated_addSharedRecordStatus_codec); + break; + } + case 18: { + updateSharedRecordStatus_.AddEntriesFrom(ref input, _repeated_updateSharedRecordStatus_codec); + break; + } + case 26: { + removeSharedRecordStatus_.AddEntriesFrom(ref input, _repeated_removeSharedRecordStatus_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SharedRecordStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SharedRecordStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[47]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordStatus(SharedRecordStatus other) : this() { + recordUid_ = other.recordUid_; + status_ = other.status_; + message_ = other.message_; + username_ = other.username_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SharedRecordStatus Clone() { + return new SharedRecordStatus(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 2; + private string status_ = ""; + /// + /// success, pending_accept, user_not_found, already_shared, not_allowed_to_share, access_denied, not_allowed_to_set_permission + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 3; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 4; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SharedRecordStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SharedRecordStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; + if (Username != other.Username) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (Username.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Status); + } + if (Message.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Message); + } + if (Username.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Username); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SharedRecordStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + Username = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + Status = input.ReadString(); + break; + } + case 26: { + Message = input.ReadString(); + break; + } + case 34: { + Username = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetRecordPermissionsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetRecordPermissionsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[48]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordPermissionsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordPermissionsRequest(GetRecordPermissionsRequest other) : this() { + recordUids_ = other.recordUids_.Clone(); + isShareAdmin_ = other.isShareAdmin_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordPermissionsRequest Clone() { + return new GetRecordPermissionsRequest(this); + } + + /// Field number for the "recordUids" field. + public const int RecordUidsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordUids_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField recordUids_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUids { + get { return recordUids_; } + } + + /// Field number for the "isShareAdmin" field. + public const int IsShareAdminFieldNumber = 2; + private bool isShareAdmin_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShareAdmin { + get { return isShareAdmin_; } + set { + isShareAdmin_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetRecordPermissionsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetRecordPermissionsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordUids_.Equals(other.recordUids_)) return false; + if (IsShareAdmin != other.IsShareAdmin) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordUids_.GetHashCode(); + if (IsShareAdmin != false) hash ^= IsShareAdmin.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordUids_.WriteTo(output, _repeated_recordUids_codec); + if (IsShareAdmin != false) { + output.WriteRawTag(16); + output.WriteBool(IsShareAdmin); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordUids_.WriteTo(ref output, _repeated_recordUids_codec); + if (IsShareAdmin != false) { + output.WriteRawTag(16); + output.WriteBool(IsShareAdmin); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordUids_.CalculateSize(_repeated_recordUids_codec); + if (IsShareAdmin != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetRecordPermissionsRequest other) { + if (other == null) { + return; + } + recordUids_.Add(other.recordUids_); + if (other.IsShareAdmin != false) { + IsShareAdmin = other.IsShareAdmin; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordUids_.AddEntriesFrom(input, _repeated_recordUids_codec); + break; + } + case 16: { + IsShareAdmin = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordUids_.AddEntriesFrom(ref input, _repeated_recordUids_codec); + break; + } + case 16: { + IsShareAdmin = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetRecordPermissionsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetRecordPermissionsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[49]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordPermissionsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordPermissionsResponse(GetRecordPermissionsResponse other) : this() { + recordPermissions_ = other.recordPermissions_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetRecordPermissionsResponse Clone() { + return new GetRecordPermissionsResponse(this); + } + + /// Field number for the "recordPermissions" field. + public const int RecordPermissionsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_recordPermissions_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordPermission.Parser); + private readonly pbc::RepeatedField recordPermissions_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordPermissions { + get { return recordPermissions_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetRecordPermissionsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetRecordPermissionsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!recordPermissions_.Equals(other.recordPermissions_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= recordPermissions_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + recordPermissions_.WriteTo(output, _repeated_recordPermissions_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + recordPermissions_.WriteTo(ref output, _repeated_recordPermissions_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += recordPermissions_.CalculateSize(_repeated_recordPermissions_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetRecordPermissionsResponse other) { + if (other == null) { + return; + } + recordPermissions_.Add(other.recordPermissions_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + recordPermissions_.AddEntriesFrom(input, _repeated_recordPermissions_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + recordPermissions_.AddEntriesFrom(ref input, _repeated_recordPermissions_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordPermission : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordPermission()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[50]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordPermission() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordPermission(RecordPermission other) : this() { + recordUid_ = other.recordUid_; + owner_ = other.owner_; + canEdit_ = other.canEdit_; + canShare_ = other.canShare_; + canTransfer_ = other.canTransfer_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordPermission Clone() { + return new RecordPermission(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "owner" field. + public const int OwnerFieldNumber = 2; + private bool owner_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Owner { + get { return owner_; } + set { + owner_ = value; + } + } + + /// Field number for the "canEdit" field. + public const int CanEditFieldNumber = 3; + private bool canEdit_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CanEdit { + get { return canEdit_; } + set { + canEdit_ = value; + } + } + + /// Field number for the "canShare" field. + public const int CanShareFieldNumber = 4; + private bool canShare_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CanShare { + get { return canShare_; } + set { + canShare_ = value; + } + } + + /// Field number for the "canTransfer" field. + public const int CanTransferFieldNumber = 5; + private bool canTransfer_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool CanTransfer { + get { return canTransfer_; } + set { + canTransfer_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordPermission); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordPermission other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (Owner != other.Owner) return false; + if (CanEdit != other.CanEdit) return false; + if (CanShare != other.CanShare) return false; + if (CanTransfer != other.CanTransfer) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Owner != false) hash ^= Owner.GetHashCode(); + if (CanEdit != false) hash ^= CanEdit.GetHashCode(); + if (CanShare != false) hash ^= CanShare.GetHashCode(); + if (CanTransfer != false) hash ^= CanTransfer.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Owner != false) { + output.WriteRawTag(16); + output.WriteBool(Owner); + } + if (CanEdit != false) { + output.WriteRawTag(24); + output.WriteBool(CanEdit); + } + if (CanShare != false) { + output.WriteRawTag(32); + output.WriteBool(CanShare); + } + if (CanTransfer != false) { + output.WriteRawTag(40); + output.WriteBool(CanTransfer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (Owner != false) { + output.WriteRawTag(16); + output.WriteBool(Owner); + } + if (CanEdit != false) { + output.WriteRawTag(24); + output.WriteBool(CanEdit); + } + if (CanShare != false) { + output.WriteRawTag(32); + output.WriteBool(CanShare); + } + if (CanTransfer != false) { + output.WriteRawTag(40); + output.WriteBool(CanTransfer); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Owner != false) { + size += 1 + 1; + } + if (CanEdit != false) { + size += 1 + 1; + } + if (CanShare != false) { + size += 1 + 1; + } + if (CanTransfer != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordPermission other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Owner != false) { + Owner = other.Owner; + } + if (other.CanEdit != false) { + CanEdit = other.CanEdit; + } + if (other.CanShare != false) { + CanShare = other.CanShare; + } + if (other.CanTransfer != false) { + CanTransfer = other.CanTransfer; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Owner = input.ReadBool(); + break; + } + case 24: { + CanEdit = input.ReadBool(); + break; + } + case 32: { + CanShare = input.ReadBool(); + break; + } + case 40: { + CanTransfer = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 16: { + Owner = input.ReadBool(); + break; + } + case 24: { + CanEdit = input.ReadBool(); + break; + } + case 32: { + CanShare = input.ReadBool(); + break; + } + case 40: { + CanTransfer = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetShareObjectsRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetShareObjectsRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[51]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetShareObjectsRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetShareObjectsRequest(GetShareObjectsRequest other) : this() { + startWith_ = other.startWith_; + contains_ = other.contains_; + filtered_ = other.filtered_; + sharedFolderUid_ = other.sharedFolderUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetShareObjectsRequest Clone() { + return new GetShareObjectsRequest(this); + } + + /// Field number for the "startWith" field. + public const int StartWithFieldNumber = 1; + private string startWith_ = ""; + /// + ///return share objects that start with this value + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string StartWith { + get { return startWith_; } + set { + startWith_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "contains" field. + public const int ContainsFieldNumber = 2; + private string contains_ = ""; + /// + ///return share objects that contains this value + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Contains { + get { return contains_; } + set { + contains_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "filtered" field. + public const int FilteredFieldNumber = 3; + private bool filtered_; + /// + ///users with status != ACTIVE will not be returned if true - used for autoshare, false - used for manage share relationships + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Filtered { + get { return filtered_; } + set { + filtered_ = value; + } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 4; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + /// + ///the shared folder uid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetShareObjectsRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetShareObjectsRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (StartWith != other.StartWith) return false; + if (Contains != other.Contains) return false; + if (Filtered != other.Filtered) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (StartWith.Length != 0) hash ^= StartWith.GetHashCode(); + if (Contains.Length != 0) hash ^= Contains.GetHashCode(); + if (Filtered != false) hash ^= Filtered.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (StartWith.Length != 0) { + output.WriteRawTag(10); + output.WriteString(StartWith); + } + if (Contains.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Contains); + } + if (Filtered != false) { + output.WriteRawTag(24); + output.WriteBool(Filtered); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (StartWith.Length != 0) { + output.WriteRawTag(10); + output.WriteString(StartWith); + } + if (Contains.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Contains); + } + if (Filtered != false) { + output.WriteRawTag(24); + output.WriteBool(Filtered); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (StartWith.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(StartWith); + } + if (Contains.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Contains); + } + if (Filtered != false) { + size += 1 + 1; + } + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetShareObjectsRequest other) { + if (other == null) { + return; + } + if (other.StartWith.Length != 0) { + StartWith = other.StartWith; + } + if (other.Contains.Length != 0) { + Contains = other.Contains; + } + if (other.Filtered != false) { + Filtered = other.Filtered; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + StartWith = input.ReadString(); + break; + } + case 18: { + Contains = input.ReadString(); + break; + } + case 24: { + Filtered = input.ReadBool(); + break; + } + case 34: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + StartWith = input.ReadString(); + break; + } + case 18: { + Contains = input.ReadString(); + break; + } + case 24: { + Filtered = input.ReadBool(); + break; + } + case 34: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class GetShareObjectsResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new GetShareObjectsResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[52]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetShareObjectsResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetShareObjectsResponse(GetShareObjectsResponse other) : this() { + shareRelationships_ = other.shareRelationships_.Clone(); + shareFamilyUsers_ = other.shareFamilyUsers_.Clone(); + shareEnterpriseUsers_ = other.shareEnterpriseUsers_.Clone(); + shareTeams_ = other.shareTeams_.Clone(); + shareMCTeams_ = other.shareMCTeams_.Clone(); + shareMCEnterpriseUsers_ = other.shareMCEnterpriseUsers_.Clone(); + shareEnterpriseNames_ = other.shareEnterpriseNames_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public GetShareObjectsResponse Clone() { + return new GetShareObjectsResponse(this); + } + + /// Field number for the "shareRelationships" field. + public const int ShareRelationshipsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_shareRelationships_codec + = pb::FieldCodec.ForMessage(10, global::Records.ShareUser.Parser); + private readonly pbc::RepeatedField shareRelationships_ = new pbc::RepeatedField(); + /// + ///for user sharing relationships + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareRelationships { + get { return shareRelationships_; } + } + + /// Field number for the "shareFamilyUsers" field. + public const int ShareFamilyUsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_shareFamilyUsers_codec + = pb::FieldCodec.ForMessage(18, global::Records.ShareUser.Parser); + private readonly pbc::RepeatedField shareFamilyUsers_ = new pbc::RepeatedField(); + /// + ///for family + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareFamilyUsers { + get { return shareFamilyUsers_; } + } + + /// Field number for the "shareEnterpriseUsers" field. + public const int ShareEnterpriseUsersFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_shareEnterpriseUsers_codec + = pb::FieldCodec.ForMessage(26, global::Records.ShareUser.Parser); + private readonly pbc::RepeatedField shareEnterpriseUsers_ = new pbc::RepeatedField(); + /// + ///for visible users of enterprise + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareEnterpriseUsers { + get { return shareEnterpriseUsers_; } + } + + /// Field number for the "shareTeams" field. + public const int ShareTeamsFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_shareTeams_codec + = pb::FieldCodec.ForMessage(34, global::Records.ShareTeam.Parser); + private readonly pbc::RepeatedField shareTeams_ = new pbc::RepeatedField(); + /// + ///for visible teams of enterprise + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareTeams { + get { return shareTeams_; } + } + + /// Field number for the "shareMCTeams" field. + public const int ShareMCTeamsFieldNumber = 5; + private static readonly pb::FieldCodec _repeated_shareMCTeams_codec + = pb::FieldCodec.ForMessage(42, global::Records.ShareTeam.Parser); + private readonly pbc::RepeatedField shareMCTeams_ = new pbc::RepeatedField(); + /// + ///only for mc admins, teams associated with the MC + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareMCTeams { + get { return shareMCTeams_; } + } + + /// Field number for the "shareMCEnterpriseUsers" field. + public const int ShareMCEnterpriseUsersFieldNumber = 6; + private static readonly pb::FieldCodec _repeated_shareMCEnterpriseUsers_codec + = pb::FieldCodec.ForMessage(50, global::Records.ShareUser.Parser); + private readonly pbc::RepeatedField shareMCEnterpriseUsers_ = new pbc::RepeatedField(); + /// + ///only for mc admins + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareMCEnterpriseUsers { + get { return shareMCEnterpriseUsers_; } + } + + /// Field number for the "shareEnterpriseNames" field. + public const int ShareEnterpriseNamesFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_shareEnterpriseNames_codec + = pb::FieldCodec.ForMessage(58, global::Records.ShareEnterprise.Parser); + private readonly pbc::RepeatedField shareEnterpriseNames_ = new pbc::RepeatedField(); + /// + ///to send the names of enterprises in which the users are members of + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ShareEnterpriseNames { + get { return shareEnterpriseNames_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as GetShareObjectsResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(GetShareObjectsResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!shareRelationships_.Equals(other.shareRelationships_)) return false; + if(!shareFamilyUsers_.Equals(other.shareFamilyUsers_)) return false; + if(!shareEnterpriseUsers_.Equals(other.shareEnterpriseUsers_)) return false; + if(!shareTeams_.Equals(other.shareTeams_)) return false; + if(!shareMCTeams_.Equals(other.shareMCTeams_)) return false; + if(!shareMCEnterpriseUsers_.Equals(other.shareMCEnterpriseUsers_)) return false; + if(!shareEnterpriseNames_.Equals(other.shareEnterpriseNames_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= shareRelationships_.GetHashCode(); + hash ^= shareFamilyUsers_.GetHashCode(); + hash ^= shareEnterpriseUsers_.GetHashCode(); + hash ^= shareTeams_.GetHashCode(); + hash ^= shareMCTeams_.GetHashCode(); + hash ^= shareMCEnterpriseUsers_.GetHashCode(); + hash ^= shareEnterpriseNames_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + shareRelationships_.WriteTo(output, _repeated_shareRelationships_codec); + shareFamilyUsers_.WriteTo(output, _repeated_shareFamilyUsers_codec); + shareEnterpriseUsers_.WriteTo(output, _repeated_shareEnterpriseUsers_codec); + shareTeams_.WriteTo(output, _repeated_shareTeams_codec); + shareMCTeams_.WriteTo(output, _repeated_shareMCTeams_codec); + shareMCEnterpriseUsers_.WriteTo(output, _repeated_shareMCEnterpriseUsers_codec); + shareEnterpriseNames_.WriteTo(output, _repeated_shareEnterpriseNames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + shareRelationships_.WriteTo(ref output, _repeated_shareRelationships_codec); + shareFamilyUsers_.WriteTo(ref output, _repeated_shareFamilyUsers_codec); + shareEnterpriseUsers_.WriteTo(ref output, _repeated_shareEnterpriseUsers_codec); + shareTeams_.WriteTo(ref output, _repeated_shareTeams_codec); + shareMCTeams_.WriteTo(ref output, _repeated_shareMCTeams_codec); + shareMCEnterpriseUsers_.WriteTo(ref output, _repeated_shareMCEnterpriseUsers_codec); + shareEnterpriseNames_.WriteTo(ref output, _repeated_shareEnterpriseNames_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += shareRelationships_.CalculateSize(_repeated_shareRelationships_codec); + size += shareFamilyUsers_.CalculateSize(_repeated_shareFamilyUsers_codec); + size += shareEnterpriseUsers_.CalculateSize(_repeated_shareEnterpriseUsers_codec); + size += shareTeams_.CalculateSize(_repeated_shareTeams_codec); + size += shareMCTeams_.CalculateSize(_repeated_shareMCTeams_codec); + size += shareMCEnterpriseUsers_.CalculateSize(_repeated_shareMCEnterpriseUsers_codec); + size += shareEnterpriseNames_.CalculateSize(_repeated_shareEnterpriseNames_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(GetShareObjectsResponse other) { + if (other == null) { + return; + } + shareRelationships_.Add(other.shareRelationships_); + shareFamilyUsers_.Add(other.shareFamilyUsers_); + shareEnterpriseUsers_.Add(other.shareEnterpriseUsers_); + shareTeams_.Add(other.shareTeams_); + shareMCTeams_.Add(other.shareMCTeams_); + shareMCEnterpriseUsers_.Add(other.shareMCEnterpriseUsers_); + shareEnterpriseNames_.Add(other.shareEnterpriseNames_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + shareRelationships_.AddEntriesFrom(input, _repeated_shareRelationships_codec); + break; + } + case 18: { + shareFamilyUsers_.AddEntriesFrom(input, _repeated_shareFamilyUsers_codec); + break; + } + case 26: { + shareEnterpriseUsers_.AddEntriesFrom(input, _repeated_shareEnterpriseUsers_codec); + break; + } + case 34: { + shareTeams_.AddEntriesFrom(input, _repeated_shareTeams_codec); + break; + } + case 42: { + shareMCTeams_.AddEntriesFrom(input, _repeated_shareMCTeams_codec); + break; + } + case 50: { + shareMCEnterpriseUsers_.AddEntriesFrom(input, _repeated_shareMCEnterpriseUsers_codec); + break; + } + case 58: { + shareEnterpriseNames_.AddEntriesFrom(input, _repeated_shareEnterpriseNames_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + shareRelationships_.AddEntriesFrom(ref input, _repeated_shareRelationships_codec); + break; + } + case 18: { + shareFamilyUsers_.AddEntriesFrom(ref input, _repeated_shareFamilyUsers_codec); + break; + } + case 26: { + shareEnterpriseUsers_.AddEntriesFrom(ref input, _repeated_shareEnterpriseUsers_codec); + break; + } + case 34: { + shareTeams_.AddEntriesFrom(ref input, _repeated_shareTeams_codec); + break; + } + case 42: { + shareMCTeams_.AddEntriesFrom(ref input, _repeated_shareMCTeams_codec); + break; + } + case 50: { + shareMCEnterpriseUsers_.AddEntriesFrom(ref input, _repeated_shareMCEnterpriseUsers_codec); + break; + } + case 58: { + shareEnterpriseNames_.AddEntriesFrom(ref input, _repeated_shareEnterpriseNames_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShareUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShareUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[53]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareUser(ShareUser other) : this() { + username_ = other.username_; + fullname_ = other.fullname_; + enterpriseId_ = other.enterpriseId_; + status_ = other.status_; + isShareAdmin_ = other.isShareAdmin_; + isAdminOfSharedFolderOwner_ = other.isAdminOfSharedFolderOwner_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareUser Clone() { + return new ShareUser(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "fullname" field. + public const int FullnameFieldNumber = 2; + private string fullname_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Fullname { + get { return fullname_; } + set { + fullname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseId" field. + public const int EnterpriseIdFieldNumber = 3; + private int enterpriseId_; + /// + /// only for enterprise user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EnterpriseId { + get { return enterpriseId_; } + set { + enterpriseId_ = value; + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 4; + private global::Records.ShareStatus status_ = global::Records.ShareStatus.Active; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.ShareStatus Status { + get { return status_; } + set { + status_ = value; + } + } + + /// Field number for the "isShareAdmin" field. + public const int IsShareAdminFieldNumber = 5; + private bool isShareAdmin_; + /// + /// only for enterprise user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShareAdmin { + get { return isShareAdmin_; } + set { + isShareAdmin_ = value; + } + } + + /// Field number for the "isAdminOfSharedFolderOwner" field. + public const int IsAdminOfSharedFolderOwnerFieldNumber = 6; + private bool isAdminOfSharedFolderOwner_; + /// + /// only used for enterprise user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsAdminOfSharedFolderOwner { + get { return isAdminOfSharedFolderOwner_; } + set { + isAdminOfSharedFolderOwner_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ShareUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShareUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (Fullname != other.Fullname) return false; + if (EnterpriseId != other.EnterpriseId) return false; + if (Status != other.Status) return false; + if (IsShareAdmin != other.IsShareAdmin) return false; + if (IsAdminOfSharedFolderOwner != other.IsAdminOfSharedFolderOwner) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Fullname.Length != 0) hash ^= Fullname.GetHashCode(); + if (EnterpriseId != 0) hash ^= EnterpriseId.GetHashCode(); + if (Status != global::Records.ShareStatus.Active) hash ^= Status.GetHashCode(); + if (IsShareAdmin != false) hash ^= IsShareAdmin.GetHashCode(); + if (IsAdminOfSharedFolderOwner != false) hash ^= IsAdminOfSharedFolderOwner.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (Fullname.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Fullname); + } + if (EnterpriseId != 0) { + output.WriteRawTag(24); + output.WriteInt32(EnterpriseId); + } + if (Status != global::Records.ShareStatus.Active) { + output.WriteRawTag(32); + output.WriteEnum((int) Status); + } + if (IsShareAdmin != false) { + output.WriteRawTag(40); + output.WriteBool(IsShareAdmin); + } + if (IsAdminOfSharedFolderOwner != false) { + output.WriteRawTag(48); + output.WriteBool(IsAdminOfSharedFolderOwner); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (Fullname.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Fullname); + } + if (EnterpriseId != 0) { + output.WriteRawTag(24); + output.WriteInt32(EnterpriseId); + } + if (Status != global::Records.ShareStatus.Active) { + output.WriteRawTag(32); + output.WriteEnum((int) Status); + } + if (IsShareAdmin != false) { + output.WriteRawTag(40); + output.WriteBool(IsShareAdmin); + } + if (IsAdminOfSharedFolderOwner != false) { + output.WriteRawTag(48); + output.WriteBool(IsAdminOfSharedFolderOwner); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Fullname.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Fullname); + } + if (EnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseId); + } + if (Status != global::Records.ShareStatus.Active) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Status); + } + if (IsShareAdmin != false) { + size += 1 + 1; + } + if (IsAdminOfSharedFolderOwner != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShareUser other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Fullname.Length != 0) { + Fullname = other.Fullname; + } + if (other.EnterpriseId != 0) { + EnterpriseId = other.EnterpriseId; + } + if (other.Status != global::Records.ShareStatus.Active) { + Status = other.Status; + } + if (other.IsShareAdmin != false) { + IsShareAdmin = other.IsShareAdmin; + } + if (other.IsAdminOfSharedFolderOwner != false) { + IsAdminOfSharedFolderOwner = other.IsAdminOfSharedFolderOwner; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + Fullname = input.ReadString(); + break; + } + case 24: { + EnterpriseId = input.ReadInt32(); + break; + } + case 32: { + Status = (global::Records.ShareStatus) input.ReadEnum(); + break; + } + case 40: { + IsShareAdmin = input.ReadBool(); + break; + } + case 48: { + IsAdminOfSharedFolderOwner = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + Fullname = input.ReadString(); + break; + } + case 24: { + EnterpriseId = input.ReadInt32(); + break; + } + case 32: { + Status = (global::Records.ShareStatus) input.ReadEnum(); + break; + } + case 40: { + IsShareAdmin = input.ReadBool(); + break; + } + case 48: { + IsAdminOfSharedFolderOwner = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShareTeam : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShareTeam()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[54]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareTeam() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareTeam(ShareTeam other) : this() { + teamname_ = other.teamname_; + enterpriseId_ = other.enterpriseId_; + teamUid_ = other.teamUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareTeam Clone() { + return new ShareTeam(this); + } + + /// Field number for the "teamname" field. + public const int TeamnameFieldNumber = 1; + private string teamname_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Teamname { + get { return teamname_; } + set { + teamname_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseId" field. + public const int EnterpriseIdFieldNumber = 2; + private int enterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EnterpriseId { + get { return enterpriseId_; } + set { + enterpriseId_ = value; + } + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 3; + private pb::ByteString teamUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString TeamUid { + get { return teamUid_; } + set { + teamUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ShareTeam); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShareTeam other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Teamname != other.Teamname) return false; + if (EnterpriseId != other.EnterpriseId) return false; + if (TeamUid != other.TeamUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Teamname.Length != 0) hash ^= Teamname.GetHashCode(); + if (EnterpriseId != 0) hash ^= EnterpriseId.GetHashCode(); + if (TeamUid.Length != 0) hash ^= TeamUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Teamname.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Teamname); + } + if (EnterpriseId != 0) { + output.WriteRawTag(16); + output.WriteInt32(EnterpriseId); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TeamUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Teamname.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Teamname); + } + if (EnterpriseId != 0) { + output.WriteRawTag(16); + output.WriteInt32(EnterpriseId); + } + if (TeamUid.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(TeamUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Teamname.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Teamname); + } + if (EnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseId); + } + if (TeamUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(TeamUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShareTeam other) { + if (other == null) { + return; + } + if (other.Teamname.Length != 0) { + Teamname = other.Teamname; + } + if (other.EnterpriseId != 0) { + EnterpriseId = other.EnterpriseId; + } + if (other.TeamUid.Length != 0) { + TeamUid = other.TeamUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Teamname = input.ReadString(); + break; + } + case 16: { + EnterpriseId = input.ReadInt32(); + break; + } + case 26: { + TeamUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Teamname = input.ReadString(); + break; + } + case 16: { + EnterpriseId = input.ReadInt32(); + break; + } + case 26: { + TeamUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ShareEnterprise : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ShareEnterprise()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[55]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareEnterprise() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareEnterprise(ShareEnterprise other) : this() { + enterprisename_ = other.enterprisename_; + enterpriseId_ = other.enterpriseId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ShareEnterprise Clone() { + return new ShareEnterprise(this); + } + + /// Field number for the "enterprisename" field. + public const int EnterprisenameFieldNumber = 1; + private string enterprisename_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Enterprisename { + get { return enterprisename_; } + set { + enterprisename_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "enterpriseId" field. + public const int EnterpriseIdFieldNumber = 2; + private int enterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int EnterpriseId { + get { return enterpriseId_; } + set { + enterpriseId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ShareEnterprise); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ShareEnterprise other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Enterprisename != other.Enterprisename) return false; + if (EnterpriseId != other.EnterpriseId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Enterprisename.Length != 0) hash ^= Enterprisename.GetHashCode(); + if (EnterpriseId != 0) hash ^= EnterpriseId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Enterprisename.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Enterprisename); + } + if (EnterpriseId != 0) { + output.WriteRawTag(16); + output.WriteInt32(EnterpriseId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Enterprisename.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Enterprisename); + } + if (EnterpriseId != 0) { + output.WriteRawTag(16); + output.WriteInt32(EnterpriseId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Enterprisename.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Enterprisename); + } + if (EnterpriseId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(EnterpriseId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ShareEnterprise other) { + if (other == null) { + return; + } + if (other.Enterprisename.Length != 0) { + Enterprisename = other.Enterprisename; + } + if (other.EnterpriseId != 0) { + EnterpriseId = other.EnterpriseId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Enterprisename = input.ReadString(); + break; + } + case 16: { + EnterpriseId = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Enterprisename = input.ReadString(); + break; + } + case 16: { + EnterpriseId = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsOnwershipTransferRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsOnwershipTransferRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[56]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsOnwershipTransferRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsOnwershipTransferRequest(RecordsOnwershipTransferRequest other) : this() { + transferRecords_ = other.transferRecords_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsOnwershipTransferRequest Clone() { + return new RecordsOnwershipTransferRequest(this); + } + + /// Field number for the "transferRecords" field. + public const int TransferRecordsFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_transferRecords_codec + = pb::FieldCodec.ForMessage(10, global::Records.TransferRecord.Parser); + private readonly pbc::RepeatedField transferRecords_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TransferRecords { + get { return transferRecords_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsOnwershipTransferRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsOnwershipTransferRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!transferRecords_.Equals(other.transferRecords_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= transferRecords_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + transferRecords_.WriteTo(output, _repeated_transferRecords_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + transferRecords_.WriteTo(ref output, _repeated_transferRecords_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += transferRecords_.CalculateSize(_repeated_transferRecords_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsOnwershipTransferRequest other) { + if (other == null) { + return; + } + transferRecords_.Add(other.transferRecords_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + transferRecords_.AddEntriesFrom(input, _repeated_transferRecords_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + transferRecords_.AddEntriesFrom(ref input, _repeated_transferRecords_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TransferRecord : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TransferRecord()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[57]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransferRecord() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransferRecord(TransferRecord other) : this() { + username_ = other.username_; + recordUid_ = other.recordUid_; + recordKey_ = other.recordKey_; + useEccKey_ = other.useEccKey_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransferRecord Clone() { + return new TransferRecord(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordKey" field. + public const int RecordKeyFieldNumber = 3; + private pb::ByteString recordKey_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordKey { + get { return recordKey_; } + set { + recordKey_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "useEccKey" field. + public const int UseEccKeyFieldNumber = 4; + private bool useEccKey_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool UseEccKey { + get { return useEccKey_; } + set { + useEccKey_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TransferRecord); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TransferRecord other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (RecordUid != other.RecordUid) return false; + if (RecordKey != other.RecordKey) return false; + if (UseEccKey != other.UseEccKey) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (RecordKey.Length != 0) hash ^= RecordKey.GetHashCode(); + if (UseEccKey != false) hash ^= UseEccKey.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordKey); + } + if (UseEccKey != false) { + output.WriteRawTag(32); + output.WriteBool(UseEccKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (RecordKey.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(RecordKey); + } + if (UseEccKey != false) { + output.WriteRawTag(32); + output.WriteBool(UseEccKey); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (RecordKey.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordKey); + } + if (UseEccKey != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TransferRecord other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.RecordKey.Length != 0) { + RecordKey = other.RecordKey; + } + if (other.UseEccKey != false) { + UseEccKey = other.UseEccKey; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + RecordKey = input.ReadBytes(); + break; + } + case 32: { + UseEccKey = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + RecordKey = input.ReadBytes(); + break; + } + case 32: { + UseEccKey = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsOnwershipTransferResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsOnwershipTransferResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[58]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsOnwershipTransferResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsOnwershipTransferResponse(RecordsOnwershipTransferResponse other) : this() { + transferRecordStatus_ = other.transferRecordStatus_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsOnwershipTransferResponse Clone() { + return new RecordsOnwershipTransferResponse(this); + } + + /// Field number for the "transferRecordStatus" field. + public const int TransferRecordStatusFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_transferRecordStatus_codec + = pb::FieldCodec.ForMessage(10, global::Records.TransferRecordStatus.Parser); + private readonly pbc::RepeatedField transferRecordStatus_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TransferRecordStatus { + get { return transferRecordStatus_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsOnwershipTransferResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsOnwershipTransferResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!transferRecordStatus_.Equals(other.transferRecordStatus_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= transferRecordStatus_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + transferRecordStatus_.WriteTo(output, _repeated_transferRecordStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + transferRecordStatus_.WriteTo(ref output, _repeated_transferRecordStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += transferRecordStatus_.CalculateSize(_repeated_transferRecordStatus_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsOnwershipTransferResponse other) { + if (other == null) { + return; + } + transferRecordStatus_.Add(other.transferRecordStatus_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + transferRecordStatus_.AddEntriesFrom(input, _repeated_transferRecordStatus_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + transferRecordStatus_.AddEntriesFrom(ref input, _repeated_transferRecordStatus_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TransferRecordStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TransferRecordStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[59]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransferRecordStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransferRecordStatus(TransferRecordStatus other) : this() { + username_ = other.username_; + recordUid_ = other.recordUid_; + status_ = other.status_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TransferRecordStatus Clone() { + return new TransferRecordStatus(this); + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 1; + private string username_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 2; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "status" field. + public const int StatusFieldNumber = 3; + private string status_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Status { + get { return status_; } + set { + status_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 4; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TransferRecordStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TransferRecordStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Username != other.Username) return false; + if (RecordUid != other.RecordUid) return false; + if (Status != other.Status) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (Status.Length != 0) hash ^= Status.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Username.Length != 0) { + output.WriteRawTag(10); + output.WriteString(Username); + } + if (RecordUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(RecordUid); + } + if (Status.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Status); + } + if (Message.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (Status.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Status); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TransferRecordStatus other) { + if (other == null) { + return; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.Status.Length != 0) { + Status = other.Status; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Username = input.ReadString(); + break; + } + case 18: { + RecordUid = input.ReadBytes(); + break; + } + case 26: { + Status = input.ReadString(); + break; + } + case 34: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUnshareRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUnshareRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[60]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareRequest(RecordsUnshareRequest other) : this() { + sharedFolders_ = other.sharedFolders_.Clone(); + users_ = other.users_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareRequest Clone() { + return new RecordsUnshareRequest(this); + } + + /// Field number for the "sharedFolders" field. + public const int SharedFoldersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_sharedFolders_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordsUnshareFolder.Parser); + private readonly pbc::RepeatedField sharedFolders_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolders { + get { return sharedFolders_; } + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(18, global::Records.RecordsUnshareUser.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUnshareRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUnshareRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!sharedFolders_.Equals(other.sharedFolders_)) return false; + if(!users_.Equals(other.users_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= sharedFolders_.GetHashCode(); + hash ^= users_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + sharedFolders_.WriteTo(output, _repeated_sharedFolders_codec); + users_.WriteTo(output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFolders_.WriteTo(ref output, _repeated_sharedFolders_codec); + users_.WriteTo(ref output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += sharedFolders_.CalculateSize(_repeated_sharedFolders_codec); + size += users_.CalculateSize(_repeated_users_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUnshareRequest other) { + if (other == null) { + return; + } + sharedFolders_.Add(other.sharedFolders_); + users_.Add(other.users_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + sharedFolders_.AddEntriesFrom(input, _repeated_sharedFolders_codec); + break; + } + case 18: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFolders_.AddEntriesFrom(ref input, _repeated_sharedFolders_codec); + break; + } + case 18: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUnshareResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUnshareResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[61]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareResponse(RecordsUnshareResponse other) : this() { + sharedFolders_ = other.sharedFolders_.Clone(); + users_ = other.users_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareResponse Clone() { + return new RecordsUnshareResponse(this); + } + + /// Field number for the "sharedFolders" field. + public const int SharedFoldersFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_sharedFolders_codec + = pb::FieldCodec.ForMessage(10, global::Records.RecordsUnshareFolderStatus.Parser); + private readonly pbc::RepeatedField sharedFolders_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedFolders { + get { return sharedFolders_; } + } + + /// Field number for the "users" field. + public const int UsersFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_users_codec + = pb::FieldCodec.ForMessage(18, global::Records.RecordsUnshareUserStatus.Parser); + private readonly pbc::RepeatedField users_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField Users { + get { return users_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUnshareResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUnshareResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!sharedFolders_.Equals(other.sharedFolders_)) return false; + if(!users_.Equals(other.users_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= sharedFolders_.GetHashCode(); + hash ^= users_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + sharedFolders_.WriteTo(output, _repeated_sharedFolders_codec); + users_.WriteTo(output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + sharedFolders_.WriteTo(ref output, _repeated_sharedFolders_codec); + users_.WriteTo(ref output, _repeated_users_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += sharedFolders_.CalculateSize(_repeated_sharedFolders_codec); + size += users_.CalculateSize(_repeated_users_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUnshareResponse other) { + if (other == null) { + return; + } + sharedFolders_.Add(other.sharedFolders_); + users_.Add(other.users_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + sharedFolders_.AddEntriesFrom(input, _repeated_sharedFolders_codec); + break; + } + case 18: { + users_.AddEntriesFrom(input, _repeated_users_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + sharedFolders_.AddEntriesFrom(ref input, _repeated_sharedFolders_codec); + break; + } + case 18: { + users_.AddEntriesFrom(ref input, _repeated_users_codec); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUnshareFolder : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUnshareFolder()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[62]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareFolder() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareFolder(RecordsUnshareFolder other) : this() { + recordUid_ = other.recordUid_; + sharedFolderUid_ = other.sharedFolderUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareFolder Clone() { + return new RecordsUnshareFolder(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 2; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUnshareFolder); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUnshareFolder other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUnshareFolder other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUnshareUser : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUnshareUser()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[63]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareUser() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareUser(RecordsUnshareUser other) : this() { + recordUid_ = other.recordUid_; + accountUid_ = other.accountUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareUser Clone() { + return new RecordsUnshareUser(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 2; + private pb::ByteString accountUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AccountUid { + get { return accountUid_; } + set { + accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUnshareUser); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUnshareUser other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (AccountUid != other.AccountUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUnshareUser other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.AccountUid.Length != 0) { + AccountUid = other.AccountUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUnshareFolderStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUnshareFolderStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[64]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareFolderStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareFolderStatus(RecordsUnshareFolderStatus other) : this() { + recordUid_ = other.recordUid_; + sharedFolderUid_ = other.sharedFolderUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareFolderStatus Clone() { + return new RecordsUnshareFolderStatus(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "sharedFolderUid" field. + public const int SharedFolderUidFieldNumber = 2; + private pb::ByteString sharedFolderUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedFolderUid { + get { return sharedFolderUid_; } + set { + sharedFolderUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUnshareFolderStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUnshareFolderStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (SharedFolderUid != other.SharedFolderUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (SharedFolderUid.Length != 0) hash ^= SharedFolderUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (SharedFolderUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(SharedFolderUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (SharedFolderUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedFolderUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUnshareFolderStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.SharedFolderUid.Length != 0) { + SharedFolderUid = other.SharedFolderUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + SharedFolderUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class RecordsUnshareUserStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new RecordsUnshareUserStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[65]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareUserStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareUserStatus(RecordsUnshareUserStatus other) : this() { + recordUid_ = other.recordUid_; + accountUid_ = other.accountUid_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public RecordsUnshareUserStatus Clone() { + return new RecordsUnshareUserStatus(this); + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 1; + private pb::ByteString recordUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString RecordUid { + get { return recordUid_; } + set { + recordUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 2; + private pb::ByteString accountUid_ = pb::ByteString.Empty; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString AccountUid { + get { return accountUid_; } + set { + accountUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as RecordsUnshareUserStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(RecordsUnshareUserStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (RecordUid != other.RecordUid) return false; + if (AccountUid != other.AccountUid) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (RecordUid.Length != 0) hash ^= RecordUid.GetHashCode(); + if (AccountUid.Length != 0) hash ^= AccountUid.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (RecordUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(RecordUid); + } + if (AccountUid.Length != 0) { + output.WriteRawTag(18); + output.WriteBytes(AccountUid); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (RecordUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(RecordUid); + } + if (AccountUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(AccountUid); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(RecordsUnshareUserStatus other) { + if (other == null) { + return; + } + if (other.RecordUid.Length != 0) { + RecordUid = other.RecordUid; + } + if (other.AccountUid.Length != 0) { + AccountUid = other.AccountUid; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + RecordUid = input.ReadBytes(); + break; + } + case 18: { + AccountUid = input.ReadBytes(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TimedAccessCallbackPayload : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TimedAccessCallbackPayload()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[66]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimedAccessCallbackPayload() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimedAccessCallbackPayload(TimedAccessCallbackPayload other) : this() { + timeLimitedAccessType_ = other.timeLimitedAccessType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimedAccessCallbackPayload Clone() { + return new TimedAccessCallbackPayload(this); + } + + /// Field number for the "timeLimitedAccessType" field. + public const int TimeLimitedAccessTypeFieldNumber = 1; + private global::Records.TimeLimitedAccessType timeLimitedAccessType_ = global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimeLimitedAccessType TimeLimitedAccessType { + get { return timeLimitedAccessType_; } + set { + timeLimitedAccessType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TimedAccessCallbackPayload); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TimedAccessCallbackPayload other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (TimeLimitedAccessType != other.TimeLimitedAccessType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) hash ^= TimeLimitedAccessType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + output.WriteRawTag(8); + output.WriteEnum((int) TimeLimitedAccessType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + output.WriteRawTag(8); + output.WriteEnum((int) TimeLimitedAccessType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimeLimitedAccessType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TimedAccessCallbackPayload other) { + if (other == null) { + return; + } + if (other.TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + TimeLimitedAccessType = other.TimeLimitedAccessType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + TimeLimitedAccessType = (global::Records.TimeLimitedAccessType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + TimeLimitedAccessType = (global::Records.TimeLimitedAccessType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TimeLimitedAccessRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TimeLimitedAccessRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[67]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessRequest(TimeLimitedAccessRequest other) : this() { + accountUid_ = other.accountUid_.Clone(); + teamUid_ = other.teamUid_.Clone(); + recordUid_ = other.recordUid_.Clone(); + sharedObjectUid_ = other.sharedObjectUid_; + timeLimitedAccessType_ = other.timeLimitedAccessType_; + expiration_ = other.expiration_; + timerNotificationType_ = other.timerNotificationType_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessRequest Clone() { + return new TimeLimitedAccessRequest(this); + } + + /// Field number for the "accountUid" field. + public const int AccountUidFieldNumber = 1; + private static readonly pb::FieldCodec _repeated_accountUid_codec + = pb::FieldCodec.ForBytes(10); + private readonly pbc::RepeatedField accountUid_ = new pbc::RepeatedField(); + /// + ///list of users that have access to a record or shared folder + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField AccountUid { + get { return accountUid_; } + } + + /// Field number for the "teamUid" field. + public const int TeamUidFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_teamUid_codec + = pb::FieldCodec.ForBytes(18); + private readonly pbc::RepeatedField teamUid_ = new pbc::RepeatedField(); + /// + ///list of teams that have access to a shared folder + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TeamUid { + get { return teamUid_; } + } + + /// Field number for the "recordUid" field. + public const int RecordUidFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_recordUid_codec + = pb::FieldCodec.ForBytes(26); + private readonly pbc::RepeatedField recordUid_ = new pbc::RepeatedField(); + /// + ///list of records that have access to a shared folder (aka that are shared via a shared folder) + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordUid { + get { return recordUid_; } + } + + /// Field number for the "sharedObjectUid" field. + public const int SharedObjectUidFieldNumber = 4; + private pb::ByteString sharedObjectUid_ = pb::ByteString.Empty; + /// + ///recordUid or sharedFolderUid of which the timer will be set or deleted + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString SharedObjectUid { + get { return sharedObjectUid_; } + set { + sharedObjectUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "timeLimitedAccessType" field. + public const int TimeLimitedAccessTypeFieldNumber = 5; + private global::Records.TimeLimitedAccessType timeLimitedAccessType_ = global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimeLimitedAccessType TimeLimitedAccessType { + get { return timeLimitedAccessType_; } + set { + timeLimitedAccessType_ = value; + } + } + + /// Field number for the "expiration" field. + public const int ExpirationFieldNumber = 6; + private long expiration_; + /// + ///delete timer when expiration==0 + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Expiration { + get { return expiration_; } + set { + expiration_ = value; + } + } + + /// Field number for the "timerNotificationType" field. + public const int TimerNotificationTypeFieldNumber = 7; + private global::Records.TimerNotificationType timerNotificationType_ = global::Records.TimerNotificationType.NotificationOff; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Records.TimerNotificationType TimerNotificationType { + get { return timerNotificationType_; } + set { + timerNotificationType_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TimeLimitedAccessRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TimeLimitedAccessRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if(!accountUid_.Equals(other.accountUid_)) return false; + if(!teamUid_.Equals(other.teamUid_)) return false; + if(!recordUid_.Equals(other.recordUid_)) return false; + if (SharedObjectUid != other.SharedObjectUid) return false; + if (TimeLimitedAccessType != other.TimeLimitedAccessType) return false; + if (Expiration != other.Expiration) return false; + if (TimerNotificationType != other.TimerNotificationType) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + hash ^= accountUid_.GetHashCode(); + hash ^= teamUid_.GetHashCode(); + hash ^= recordUid_.GetHashCode(); + if (SharedObjectUid.Length != 0) hash ^= SharedObjectUid.GetHashCode(); + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) hash ^= TimeLimitedAccessType.GetHashCode(); + if (Expiration != 0L) hash ^= Expiration.GetHashCode(); + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) hash ^= TimerNotificationType.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + accountUid_.WriteTo(output, _repeated_accountUid_codec); + teamUid_.WriteTo(output, _repeated_teamUid_codec); + recordUid_.WriteTo(output, _repeated_recordUid_codec); + if (SharedObjectUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedObjectUid); + } + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + output.WriteRawTag(40); + output.WriteEnum((int) TimeLimitedAccessType); + } + if (Expiration != 0L) { + output.WriteRawTag(48); + output.WriteInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(56); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + accountUid_.WriteTo(ref output, _repeated_accountUid_codec); + teamUid_.WriteTo(ref output, _repeated_teamUid_codec); + recordUid_.WriteTo(ref output, _repeated_recordUid_codec); + if (SharedObjectUid.Length != 0) { + output.WriteRawTag(34); + output.WriteBytes(SharedObjectUid); + } + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + output.WriteRawTag(40); + output.WriteEnum((int) TimeLimitedAccessType); + } + if (Expiration != 0L) { + output.WriteRawTag(48); + output.WriteInt64(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + output.WriteRawTag(56); + output.WriteEnum((int) TimerNotificationType); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + size += accountUid_.CalculateSize(_repeated_accountUid_codec); + size += teamUid_.CalculateSize(_repeated_teamUid_codec); + size += recordUid_.CalculateSize(_repeated_recordUid_codec); + if (SharedObjectUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(SharedObjectUid); + } + if (TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimeLimitedAccessType); + } + if (Expiration != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Expiration); + } + if (TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) TimerNotificationType); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TimeLimitedAccessRequest other) { + if (other == null) { + return; + } + accountUid_.Add(other.accountUid_); + teamUid_.Add(other.teamUid_); + recordUid_.Add(other.recordUid_); + if (other.SharedObjectUid.Length != 0) { + SharedObjectUid = other.SharedObjectUid; + } + if (other.TimeLimitedAccessType != global::Records.TimeLimitedAccessType.InvalidTimeLimitedAccessType) { + TimeLimitedAccessType = other.TimeLimitedAccessType; + } + if (other.Expiration != 0L) { + Expiration = other.Expiration; + } + if (other.TimerNotificationType != global::Records.TimerNotificationType.NotificationOff) { + TimerNotificationType = other.TimerNotificationType; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + accountUid_.AddEntriesFrom(input, _repeated_accountUid_codec); + break; + } + case 18: { + teamUid_.AddEntriesFrom(input, _repeated_teamUid_codec); + break; + } + case 26: { + recordUid_.AddEntriesFrom(input, _repeated_recordUid_codec); + break; + } + case 34: { + SharedObjectUid = input.ReadBytes(); + break; + } + case 40: { + TimeLimitedAccessType = (global::Records.TimeLimitedAccessType) input.ReadEnum(); + break; + } + case 48: { + Expiration = input.ReadInt64(); + break; + } + case 56: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + accountUid_.AddEntriesFrom(ref input, _repeated_accountUid_codec); + break; + } + case 18: { + teamUid_.AddEntriesFrom(ref input, _repeated_teamUid_codec); + break; + } + case 26: { + recordUid_.AddEntriesFrom(ref input, _repeated_recordUid_codec); + break; + } + case 34: { + SharedObjectUid = input.ReadBytes(); + break; + } + case 40: { + TimeLimitedAccessType = (global::Records.TimeLimitedAccessType) input.ReadEnum(); + break; + } + case 48: { + Expiration = input.ReadInt64(); + break; + } + case 56: { + TimerNotificationType = (global::Records.TimerNotificationType) input.ReadEnum(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TimeLimitedAccessStatus : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TimeLimitedAccessStatus()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[68]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessStatus() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessStatus(TimeLimitedAccessStatus other) : this() { + uid_ = other.uid_; + message_ = other.message_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessStatus Clone() { + return new TimeLimitedAccessStatus(this); + } + + /// Field number for the "uid" field. + public const int UidFieldNumber = 1; + private pb::ByteString uid_ = pb::ByteString.Empty; + /// + /// accountUid or teamUid or recordUid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Uid { + get { return uid_; } + set { + uid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private string message_ = ""; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TimeLimitedAccessStatus); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TimeLimitedAccessStatus other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Uid != other.Uid) return false; + if (Message != other.Message) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Uid.Length != 0) hash ^= Uid.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Uid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(Uid); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Uid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Uid); + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TimeLimitedAccessStatus other) { + if (other == null) { + return; + } + if (other.Uid.Length != 0) { + Uid = other.Uid; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Uid = input.ReadBytes(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + } + } + } + #endif + + } + + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class TimeLimitedAccessResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new TimeLimitedAccessResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::Records.RecordReflection.Descriptor.MessageTypes[69]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessResponse(TimeLimitedAccessResponse other) : this() { + revision_ = other.revision_; + userAccessStatus_ = other.userAccessStatus_.Clone(); + teamAccessStatus_ = other.teamAccessStatus_.Clone(); + recordAccessStatus_ = other.recordAccessStatus_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public TimeLimitedAccessResponse Clone() { + return new TimeLimitedAccessResponse(this); + } + + /// Field number for the "revision" field. + public const int RevisionFieldNumber = 1; + private long revision_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long Revision { + get { return revision_; } + set { + revision_ = value; + } + } + + /// Field number for the "userAccessStatus" field. + public const int UserAccessStatusFieldNumber = 2; + private static readonly pb::FieldCodec _repeated_userAccessStatus_codec + = pb::FieldCodec.ForMessage(18, global::Records.TimeLimitedAccessStatus.Parser); + private readonly pbc::RepeatedField userAccessStatus_ = new pbc::RepeatedField(); + /// + /// uid is accountUid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UserAccessStatus { + get { return userAccessStatus_; } + } + + /// Field number for the "teamAccessStatus" field. + public const int TeamAccessStatusFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_teamAccessStatus_codec + = pb::FieldCodec.ForMessage(26, global::Records.TimeLimitedAccessStatus.Parser); + private readonly pbc::RepeatedField teamAccessStatus_ = new pbc::RepeatedField(); + /// + /// uid is teamUid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField TeamAccessStatus { + get { return teamAccessStatus_; } + } + + /// Field number for the "recordAccessStatus" field. + public const int RecordAccessStatusFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_recordAccessStatus_codec + = pb::FieldCodec.ForMessage(34, global::Records.TimeLimitedAccessStatus.Parser); + private readonly pbc::RepeatedField recordAccessStatus_ = new pbc::RepeatedField(); + /// + /// uid is recordUid + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField RecordAccessStatus { + get { return recordAccessStatus_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as TimeLimitedAccessResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(TimeLimitedAccessResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Revision != other.Revision) return false; + if(!userAccessStatus_.Equals(other.userAccessStatus_)) return false; + if(!teamAccessStatus_.Equals(other.teamAccessStatus_)) return false; + if(!recordAccessStatus_.Equals(other.recordAccessStatus_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Revision != 0L) hash ^= Revision.GetHashCode(); + hash ^= userAccessStatus_.GetHashCode(); + hash ^= teamAccessStatus_.GetHashCode(); + hash ^= recordAccessStatus_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + userAccessStatus_.WriteTo(output, _repeated_userAccessStatus_codec); + teamAccessStatus_.WriteTo(output, _repeated_teamAccessStatus_codec); + recordAccessStatus_.WriteTo(output, _repeated_recordAccessStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Revision != 0L) { + output.WriteRawTag(8); + output.WriteInt64(Revision); + } + userAccessStatus_.WriteTo(ref output, _repeated_userAccessStatus_codec); + teamAccessStatus_.WriteTo(ref output, _repeated_teamAccessStatus_codec); + recordAccessStatus_.WriteTo(ref output, _repeated_recordAccessStatus_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Revision != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(Revision); + } + size += userAccessStatus_.CalculateSize(_repeated_userAccessStatus_codec); + size += teamAccessStatus_.CalculateSize(_repeated_teamAccessStatus_codec); + size += recordAccessStatus_.CalculateSize(_repeated_recordAccessStatus_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(TimeLimitedAccessResponse other) { + if (other == null) { + return; + } + if (other.Revision != 0L) { + Revision = other.Revision; + } + userAccessStatus_.Add(other.userAccessStatus_); + teamAccessStatus_.Add(other.teamAccessStatus_); + recordAccessStatus_.Add(other.recordAccessStatus_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Revision = input.ReadInt64(); + break; + } + case 18: { + userAccessStatus_.AddEntriesFrom(input, _repeated_userAccessStatus_codec); + break; + } + case 26: { + teamAccessStatus_.AddEntriesFrom(input, _repeated_teamAccessStatus_codec); + break; + } + case 34: { + recordAccessStatus_.AddEntriesFrom(input, _repeated_recordAccessStatus_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Revision = input.ReadInt64(); + break; + } + case 18: { + userAccessStatus_.AddEntriesFrom(ref input, _repeated_userAccessStatus_codec); + break; + } + case 26: { + teamAccessStatus_.AddEntriesFrom(ref input, _repeated_teamAccessStatus_codec); + break; + } + case 34: { + recordAccessStatus_.AddEntriesFrom(ref input, _repeated_recordAccessStatus_codec); + break; + } + } + } + } + #endif + + } + + #endregion + +} + +#endregion Designer generated code diff --git a/KeeperSdk/proto/Ssocloud.cs b/KeeperSdk/proto/Ssocloud.cs index e534606..ab02548 100644 --- a/KeeperSdk/proto/Ssocloud.cs +++ b/KeeperSdk/proto/Ssocloud.cs @@ -2,7 +2,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: ssocloud.proto // -#pragma warning disable 1591, 0612, 3021 +#pragma warning disable 1591, 0612, 3021, 8981 #region Designer generated code using pb = global::Google.Protobuf; @@ -37,75 +37,103 @@ static SsocloudReflection() { "dmlkZXJJZBgBIAEoBBIcChRzc29TcENvbmZpZ3VyYXRpb25JZBgCIAEoBBIM", "CgRuYW1lGAMgASgJEjcKE3Nzb0F1dGhQcm90b2NvbFR5cGUYBCABKA4yGi5T", "c29DbG91ZC5BdXRoUHJvdG9jb2xUeXBlEj4KFXNzb0Nsb3VkU2V0dGluZ0Fj", - "dGlvbhgFIAMoCzIfLlNzb0Nsb3VkLlNzb0Nsb3VkU2V0dGluZ0FjdGlvbiLl", - "AQodU3NvQ2xvdWRDb25maWd1cmF0aW9uUmVzcG9uc2USHAoUc3NvU2Vydmlj", - "ZVByb3ZpZGVySWQYASABKAQSHAoUc3NvU3BDb25maWd1cmF0aW9uSWQYAiAB", - "KAQSFAoMZW50ZXJwcmlzZUlkGAMgASgEEgwKBG5hbWUYBCABKAkSEAoIcHJv", - "dG9jb2wYBSABKAkSFAoMbGFzdE1vZGlmaWVkGAYgASgJEjwKFHNzb0Nsb3Vk", - "U2V0dGluZ1ZhbHVlGAcgAygLMh4uU3NvQ2xvdWQuU3NvQ2xvdWRTZXR0aW5n", - "VmFsdWUiRQoRU3NvSWRwVHlwZVJlcXVlc3QSFAoMc3NvSWRwVHlwZUlkGAEg", - "ASgNEgsKA3RhZxgCIAEoCRINCgVsYWJlbBgDIAEoCSJGChJTc29JZHBUeXBl", - "UmVzcG9uc2USFAoMc3NvSWRwVHlwZUlkGAEgASgFEgsKA3RhZxgCIAEoBRIN", - "CgVsYWJlbBgDIAEoBSI2ChZTc29DbG91ZFNBTUxMb2dSZXF1ZXN0EhwKFHNz", - "b1NlcnZpY2VQcm92aWRlcklkGAEgASgEItwBChRTc29DbG91ZFNBTUxMb2dF", - "bnRyeRISCgpzZXJ2ZXJUaW1lGAEgASgJEhEKCWRpcmVjdGlvbhgCIAEoCRIT", - "CgttZXNzYWdlVHlwZRgDIAEoCRIVCg1tZXNzYWdlSXNzdWVkGAQgASgJEhQK", - "DGZyb21FbnRpdHlJZBgFIAEoCRISCgpzYW1sU3RhdHVzGAYgASgJEhIKCnJl", - "bGF5U3RhdGUYByABKAkSEwoLc2FtbENvbnRlbnQYCCABKAkSEAoIaXNTaWdu", - "ZWQYCSABKAgSDAoEaXNPSxgKIAEoCCJmChdTc29DbG91ZFNBTUxMb2dSZXNw", - "b25zZRIcChRzc29TZXJ2aWNlUHJvdmlkZXJJZBgBIAEoBBItCgVlbnRyeRgC", - "IAMoCzIeLlNzb0Nsb3VkLlNzb0Nsb3VkU0FNTExvZ0VudHJ5ImIKJFNzb0Ns", - "b3VkU2VydmljZVByb3ZpZGVyVXBkYXRlUmVxdWVzdBIcChRzc29TZXJ2aWNl", - "UHJvdmlkZXJJZBgBIAEoBBIcChRzc29TcENvbmZpZ3VyYXRpb25JZBgCIAEo", - "BCJdChpTc29DbG91ZElkcE1ldGFkYXRhUmVxdWVzdBIcChRzc29TcENvbmZp", - "Z3VyYXRpb25JZBgBIAEoBBIQCghmaWxlbmFtZRgCIAEoCRIPCgdjb250ZW50", - "GAMgASgMIkYKJlNzb0Nsb3VkQ29uZmlndXJhdGlvblZhbGlkYXRpb25SZXF1", - "ZXN0EhwKFHNzb1NwQ29uZmlndXJhdGlvbklkGAEgAygEIl0KEVZhbGlkYXRp", - "b25Db250ZW50EhwKFHNzb1NwQ29uZmlndXJhdGlvbklkGAEgASgEEhQKDGlz", - "U3VjY2Vzc2Z1bBgCIAEoCBIUCgxlcnJvck1lc3NhZ2UYAyADKAkiYQonU3Nv", - "Q2xvdWRDb25maWd1cmF0aW9uVmFsaWRhdGlvblJlc3BvbnNlEjYKEXZhbGlk", - "YXRpb25Db250ZW50GAEgAygLMhsuU3NvQ2xvdWQuVmFsaWRhdGlvbkNvbnRl", - "bnQiTwovU3NvQ2xvdWRTZXJ2aWNlUHJvdmlkZXJDb25maWd1cmF0aW9uTGlz", - "dFJlcXVlc3QSHAoUc3NvU2VydmljZVByb3ZpZGVySWQYASABKAQiVwoVQ29u", - "ZmlndXJhdGlvbkxpc3RJdGVtEhwKFHNzb1NwQ29uZmlndXJhdGlvbklkGAEg", - "ASgEEgwKBG5hbWUYAiABKAkSEgoKaXNTZWxlY3RlZBgDIAEoCCJuCjBTc29D", - "bG91ZFNlcnZpY2VQcm92aWRlckNvbmZpZ3VyYXRpb25MaXN0UmVzcG9uc2US", - "OgoRY29uZmlndXJhdGlvbkl0ZW0YASADKAsyHy5Tc29DbG91ZC5Db25maWd1", - "cmF0aW9uTGlzdEl0ZW0irQEKD1Nzb0Nsb3VkUmVxdWVzdBIZChFtZXNzYWdl", - "U2Vzc2lvblVpZBgBIAEoDBIVCg1jbGllbnRWZXJzaW9uGAIgASgJEhAKCGVt", - "YmVkZGVkGAMgASgIEgwKBGpzb24YBCABKAgSDAoEZGVzdBgFIAEoCRIUCgxp", - "ZHBTZXNzaW9uSWQYBiABKAkSEgoKZm9yY2VMb2dpbhgHIAEoCBIQCgh1c2Vy", - "bmFtZRgIIAEoCSLJAQoQU3NvQ2xvdWRSZXNwb25zZRIPCgdjb21tYW5kGAEg", - "ASgJEhkKEW1lc3NhZ2VTZXNzaW9uVWlkGAIgASgMEg0KBWVtYWlsGAMgASgJ", - "EhsKE2VuY3J5cHRlZExvZ2luVG9rZW4YBCABKAwSFAoMcHJvdmlkZXJOYW1l", - "GAUgASgJEhQKDGlkcFNlc3Npb25JZBgGIAEoCRIdChVlbmNyeXB0ZWRTZXNz", - "aW9uVG9rZW4YByABKAwSEgoKZXJyb3JUb2tlbhgIIAEoCSJaChJTc29DbG91", - "ZExvZ1JlcXVlc3QSHAoUc3NvU2VydmljZVByb3ZpZGVySWQYASABKAQSEwoL", - "c2VydmljZU5hbWUYAiABKAkSEQoJc2VydmljZUlkGAMgASgNIuQBCg5TYW1s", - "UmVsYXlTdGF0ZRIZChFtZXNzYWdlU2Vzc2lvblVpZBgBIAEoDBIQCgh1c2Vy", - "bmFtZRgCIAEoCRIQCghlbWJlZGRlZBgDIAEoCBIMCgRqc29uGAQgASgIEg4K", - "BmRlc3RJZBgFIAEoDRINCgVrZXlJZBgGIAEoBRI8ChFzdXBwb3J0ZWRMYW5n", - "dWFnZRgHIAEoDjIhLkF1dGhlbnRpY2F0aW9uLlN1cHBvcnRlZExhbmd1YWdl", - "EhAKCGNoZWNrc3VtGAggASgEEhYKDmlzR2VuZXJhdGVkVWlkGAkgASgIKh0K", - "EEF1dGhQcm90b2NvbFR5cGUSCQoFU0FNTDIQACrnAQoIRGF0YVR5cGUSBwoD", - "QU5ZEAASCwoHQk9PTEVBThABEgsKB0lOVEVHRVIQAhIKCgZTVFJJTkcQAxIJ", - "CgVCWVRFUxAEEgcKA1VSTBAFEi4KKmNvbV9rZWVwZXJzZWN1cml0eV9wcm90", - "b19Tc29DbG91ZF9EYXRhVHlwZRAGEjYKMmNvbV9rZWVwZXJzZWN1cml0eV9w", - "cm90b19Tc29DbG91ZF9BdXRoUHJvdG9jb2xUeXBlEAcSMAosY29tX2tlZXBl", - "cnNlY3VyaXR5X3Byb3RvX1Nzb0Nsb3VkX1Nzb0lkcFR5cGUQCCpSChxTc29D", - "bG91ZFNldHRpbmdPcGVyYXRpb25UeXBlEgcKA1NFVBAAEgcKA0dFVBABEgoK", - "BkRFTEVURRACEhQKEFJFU0VUX1RPX0RFRkFVTFQQAyqCAQoKU3NvSWRwVHlw", - "ZRINCglYWF9VTlVTRUQQABILCgdHRU5FUklDEAESBgoCRjUQAhIKCgZHT09H", - "TEUQAxIICgRPS1RBEAQSCAoEQURGUxAFEgkKBUFaVVJFEAYSDAoIT05FTE9H", - "SU4QBxIICgRQSU5HEAgSDQoJSlVNUENMT1VEEAlCJAoYY29tLmtlZXBlcnNl", - "Y3VyaXR5LnByb3RvQghTc29DbG91ZGIGcHJvdG8z")); + "dGlvbhgFIAMoCzIfLlNzb0Nsb3VkLlNzb0Nsb3VkU2V0dGluZ0FjdGlvbiJk", + "ChNTc29TaGFyZWRDb25maWdJdGVtEhwKFHNzb1NwQ29uZmlndXJhdGlvbklk", + "GAEgASgEEhwKFHNzb1NlcnZpY2VQcm92aWRlcklkGAIgASgEEhEKCXNzb05v", + "ZGVJZBgDIAEoBCKtAgodU3NvQ2xvdWRDb25maWd1cmF0aW9uUmVzcG9uc2US", + "HAoUc3NvU2VydmljZVByb3ZpZGVySWQYASABKAQSHAoUc3NvU3BDb25maWd1", + "cmF0aW9uSWQYAiABKAQSFAoMZW50ZXJwcmlzZUlkGAMgASgEEgwKBG5hbWUY", + "BCABKAkSEAoIcHJvdG9jb2wYBSABKAkSFAoMbGFzdE1vZGlmaWVkGAYgASgJ", + "EjwKFHNzb0Nsb3VkU2V0dGluZ1ZhbHVlGAcgAygLMh4uU3NvQ2xvdWQuU3Nv", + "Q2xvdWRTZXR0aW5nVmFsdWUSEAoIaXNTaGFyZWQYCCABKAgSNAoNc2hhcmVk", + "Q29uZmlncxgJIAMoCzIdLlNzb0Nsb3VkLlNzb1NoYXJlZENvbmZpZ0l0ZW0i", + "RQoRU3NvSWRwVHlwZVJlcXVlc3QSFAoMc3NvSWRwVHlwZUlkGAEgASgNEgsK", + "A3RhZxgCIAEoCRINCgVsYWJlbBgDIAEoCSJGChJTc29JZHBUeXBlUmVzcG9u", + "c2USFAoMc3NvSWRwVHlwZUlkGAEgASgFEgsKA3RhZxgCIAEoBRINCgVsYWJl", + "bBgDIAEoBSI2ChZTc29DbG91ZFNBTUxMb2dSZXF1ZXN0EhwKFHNzb1NlcnZp", + "Y2VQcm92aWRlcklkGAEgASgEItwBChRTc29DbG91ZFNBTUxMb2dFbnRyeRIS", + "CgpzZXJ2ZXJUaW1lGAEgASgJEhEKCWRpcmVjdGlvbhgCIAEoCRITCgttZXNz", + "YWdlVHlwZRgDIAEoCRIVCg1tZXNzYWdlSXNzdWVkGAQgASgJEhQKDGZyb21F", + "bnRpdHlJZBgFIAEoCRISCgpzYW1sU3RhdHVzGAYgASgJEhIKCnJlbGF5U3Rh", + "dGUYByABKAkSEwoLc2FtbENvbnRlbnQYCCABKAkSEAoIaXNTaWduZWQYCSAB", + "KAgSDAoEaXNPSxgKIAEoCCJmChdTc29DbG91ZFNBTUxMb2dSZXNwb25zZRIc", + "ChRzc29TZXJ2aWNlUHJvdmlkZXJJZBgBIAEoBBItCgVlbnRyeRgCIAMoCzIe", + "LlNzb0Nsb3VkLlNzb0Nsb3VkU0FNTExvZ0VudHJ5ImIKJFNzb0Nsb3VkU2Vy", + "dmljZVByb3ZpZGVyVXBkYXRlUmVxdWVzdBIcChRzc29TZXJ2aWNlUHJvdmlk", + "ZXJJZBgBIAEoBBIcChRzc29TcENvbmZpZ3VyYXRpb25JZBgCIAEoBCJdChpT", + "c29DbG91ZElkcE1ldGFkYXRhUmVxdWVzdBIcChRzc29TcENvbmZpZ3VyYXRp", + "b25JZBgBIAEoBBIQCghmaWxlbmFtZRgCIAEoCRIPCgdjb250ZW50GAMgASgM", + "IpsBCiFTc29DbG91ZElkcE1ldGFkYXRhU3VwcG9ydFJlcXVlc3QSHAoUc3Nv", + "U2VydmljZVByb3ZpZGVySWQYASABKAQSHAoUc3NvU3BDb25maWd1cmF0aW9u", + "SWQYAiABKAQSFwoPc3NvRW50ZXJwcmlzZUlkGAMgASgEEhAKCGZpbGVuYW1l", + "GAQgASgJEg8KB2NvbnRlbnQYBSABKAwiRgomU3NvQ2xvdWRDb25maWd1cmF0", + "aW9uVmFsaWRhdGlvblJlcXVlc3QSHAoUc3NvU3BDb25maWd1cmF0aW9uSWQY", + "ASADKAQiXQoRVmFsaWRhdGlvbkNvbnRlbnQSHAoUc3NvU3BDb25maWd1cmF0", + "aW9uSWQYASABKAQSFAoMaXNTdWNjZXNzZnVsGAIgASgIEhQKDGVycm9yTWVz", + "c2FnZRgDIAMoCSJhCidTc29DbG91ZENvbmZpZ3VyYXRpb25WYWxpZGF0aW9u", + "UmVzcG9uc2USNgoRdmFsaWRhdGlvbkNvbnRlbnQYASADKAsyGy5Tc29DbG91", + "ZC5WYWxpZGF0aW9uQ29udGVudCJPCi9Tc29DbG91ZFNlcnZpY2VQcm92aWRl", + "ckNvbmZpZ3VyYXRpb25MaXN0UmVxdWVzdBIcChRzc29TZXJ2aWNlUHJvdmlk", + "ZXJJZBgBIAEoBCJ1ChVDb25maWd1cmF0aW9uTGlzdEl0ZW0SHAoUc3NvU3BD", + "b25maWd1cmF0aW9uSWQYASABKAQSDAoEbmFtZRgCIAEoCRISCgppc1NlbGVj", + "dGVkGAMgASgIEhwKFHNzb1NlcnZpY2VQcm92aWRlcklkGAQgAygEIm4KMFNz", + "b0Nsb3VkU2VydmljZVByb3ZpZGVyQ29uZmlndXJhdGlvbkxpc3RSZXNwb25z", + "ZRI6ChFjb25maWd1cmF0aW9uSXRlbRgBIAMoCzIfLlNzb0Nsb3VkLkNvbmZp", + "Z3VyYXRpb25MaXN0SXRlbSK/AQoPU3NvQ2xvdWRSZXF1ZXN0EhkKEW1lc3Nh", + "Z2VTZXNzaW9uVWlkGAEgASgMEhUKDWNsaWVudFZlcnNpb24YAiABKAkSEAoI", + "ZW1iZWRkZWQYAyABKAgSDAoEanNvbhgEIAEoCBIMCgRkZXN0GAUgASgJEhQK", + "DGlkcFNlc3Npb25JZBgGIAEoCRISCgpmb3JjZUxvZ2luGAcgASgIEhAKCHVz", + "ZXJuYW1lGAggASgJEhAKCGRldGFjaGVkGAkgASgIIskBChBTc29DbG91ZFJl", + "c3BvbnNlEg8KB2NvbW1hbmQYASABKAkSGQoRbWVzc2FnZVNlc3Npb25VaWQY", + "AiABKAwSDQoFZW1haWwYAyABKAkSGwoTZW5jcnlwdGVkTG9naW5Ub2tlbhgE", + "IAEoDBIUCgxwcm92aWRlck5hbWUYBSABKAkSFAoMaWRwU2Vzc2lvbklkGAYg", + "ASgJEh0KFWVuY3J5cHRlZFNlc3Npb25Ub2tlbhgHIAEoDBISCgplcnJvclRv", + "a2VuGAggASgJIloKElNzb0Nsb3VkTG9nUmVxdWVzdBIcChRzc29TZXJ2aWNl", + "UHJvdmlkZXJJZBgBIAEoBBITCgtzZXJ2aWNlTmFtZRgCIAEoCRIRCglzZXJ2", + "aWNlSWQYAyABKA0iiAIKDlNhbWxSZWxheVN0YXRlEhkKEW1lc3NhZ2VTZXNz", + "aW9uVWlkGAEgASgMEhAKCHVzZXJuYW1lGAIgASgJEhAKCGVtYmVkZGVkGAMg", + "ASgIEgwKBGpzb24YBCABKAgSDgoGZGVzdElkGAUgASgNEg0KBWtleUlkGAYg", + "ASgFEjwKEXN1cHBvcnRlZExhbmd1YWdlGAcgASgOMiEuQXV0aGVudGljYXRp", + "b24uU3VwcG9ydGVkTGFuZ3VhZ2USEAoIY2hlY2tzdW0YCCABKAQSFgoOaXNH", + "ZW5lcmF0ZWRVaWQYCSABKAgSEAoIZGV2aWNlSWQYCiABKAMSEAoIZGV0YWNo", + "ZWQYCyABKAgicQoeU3NvQ2xvdWRNaWdyYXRpb25TdGF0dXNSZXF1ZXN0Eg4K", + "Bm5vZGVJZBgBIAEoBBISCgpmdWxsU3RhdHVzGAIgASgIEhwKFGluY2x1ZGVN", + "aWdyYXRlZFVzZXJzGAMgASgIEg0KBWxpbWl0GAQgASgFIugCCh9Tc29DbG91", + "ZE1pZ3JhdGlvblN0YXR1c1Jlc3BvbnNlEg8KB3N1Y2Nlc3MYASABKAgSDwoH", + "bWVzc2FnZRgCIAEoCRIOCgZub2RlSWQYAyABKAQSFAoMc3NvQ29ubmVjdElk", + "GAQgASgEEhYKDnNzb0Nvbm5lY3ROYW1lGAUgASgJEhkKEXNzb0Nvbm5lY3RD", + "bG91ZElkGAYgASgEEhsKE3Nzb0Nvbm5lY3RDbG91ZE5hbWUYByABKAkSFwoP", + "dG90YWxVc2Vyc0NvdW50GAggASgNEhoKEnVzZXJzTWlncmF0ZWRDb3VudBgJ", + "IAEoDRI6Cg1taWdyYXRlZFVzZXJzGAogAygLMiMuU3NvQ2xvdWQuU3NvQ2xv", + "dWRNaWdyYXRpb25Vc2VySW5mbxI8Cg91bm1pZ3JhdGVkVXNlcnMYCyADKAsy", + "Iy5Tc29DbG91ZC5Tc29DbG91ZE1pZ3JhdGlvblVzZXJJbmZvImAKGVNzb0Ns", + "b3VkTWlncmF0aW9uVXNlckluZm8SDgoGdXNlcklkGAEgASgNEg0KBWVtYWls", + "GAIgASgJEhAKCGZ1bGxOYW1lGAMgASgJEhIKCmlzTWlncmF0ZWQYBCABKAgq", + "HQoQQXV0aFByb3RvY29sVHlwZRIJCgVTQU1MMhAAKoACCghEYXRhVHlwZRIH", + "CgNBTlkQABILCgdCT09MRUFOEAESCwoHSU5URUdFUhACEgoKBlNUUklORxAD", + "EgkKBUJZVEVTEAQSBwoDVVJMEAUSLgoqY29tX2tlZXBlcnNlY3VyaXR5X3By", + "b3RvX1Nzb0Nsb3VkX0RhdGFUeXBlEAYSNgoyY29tX2tlZXBlcnNlY3VyaXR5", + "X3Byb3RvX1Nzb0Nsb3VkX0F1dGhQcm90b2NvbFR5cGUQBxIwCixjb21fa2Vl", + "cGVyc2VjdXJpdHlfcHJvdG9fU3NvQ2xvdWRfU3NvSWRwVHlwZRAIEggKBExP", + "TkcQCRINCglUSU1FU1RBTVAQCipSChxTc29DbG91ZFNldHRpbmdPcGVyYXRp", + "b25UeXBlEgcKA1NFVBAAEgcKA0dFVBABEgoKBkRFTEVURRACEhQKEFJFU0VU", + "X1RPX0RFRkFVTFQQAyrQAgoKU3NvSWRwVHlwZRINCglYWF9VTlVTRUQQABIL", + "CgdHRU5FUklDEAESBgoCRjUQAhIKCgZHT09HTEUQAxIICgRPS1RBEAQSCAoE", + "QURGUxAFEgkKBUFaVVJFEAYSDAoIT05FTE9HSU4QBxIHCgNBV1MQCBIMCghD", + "RU5UUklGWRAJEgcKA0RVTxAKEgcKA0lCTRALEg0KCUpVTVBDTE9VRBAMEggK", + "BFBJTkcQDRILCgdQSU5HT05FEA4SBwoDUlNBEA8SDgoKU0VDVVJFQVVUSBAQ", + "EgoKBlRIQUxFUxAREgkKBUFVVEgwEBISCgoGQkVZT05EEBMSCAoESFlQUhAU", + "EgoKBlBVUkVJRBAVEgcKA1NETxAWEgkKBVRSQUlUEBcSDAoIVFJBTlNNSVQQ", + "GBILCgdUUlVTT05BEBkSDAoIVkVSSURJVU0QGhIHCgNDQVMQG0IkChhjb20u", + "a2VlcGVyc2VjdXJpdHkucHJvdG9CCFNzb0Nsb3VkYgZwcm90bzM=")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { global::Authentication.APIRequestReflection.Descriptor, }, new pbr::GeneratedClrTypeInfo(new[] {typeof(global::SsoCloud.AuthProtocolType), typeof(global::SsoCloud.DataType), typeof(global::SsoCloud.SsoCloudSettingOperationType), typeof(global::SsoCloud.SsoIdpType), }, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudSettingValue), global::SsoCloud.SsoCloudSettingValue.Parser, new[]{ "SettingId", "SettingName", "Label", "Value", "ValueType", "LastModified", "IsFromFile", "IsEditable", "IsRequired" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudSettingAction), global::SsoCloud.SsoCloudSettingAction.Parser, new[]{ "SettingId", "SettingName", "Operation", "Value" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudConfigurationRequest), global::SsoCloud.SsoCloudConfigurationRequest.Parser, new[]{ "SsoServiceProviderId", "SsoSpConfigurationId", "Name", "SsoAuthProtocolType", "SsoCloudSettingAction" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudConfigurationResponse), global::SsoCloud.SsoCloudConfigurationResponse.Parser, new[]{ "SsoServiceProviderId", "SsoSpConfigurationId", "EnterpriseId", "Name", "Protocol", "LastModified", "SsoCloudSettingValue" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoSharedConfigItem), global::SsoCloud.SsoSharedConfigItem.Parser, new[]{ "SsoSpConfigurationId", "SsoServiceProviderId", "SsoNodeId" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudConfigurationResponse), global::SsoCloud.SsoCloudConfigurationResponse.Parser, new[]{ "SsoServiceProviderId", "SsoSpConfigurationId", "EnterpriseId", "Name", "Protocol", "LastModified", "SsoCloudSettingValue", "IsShared", "SharedConfigs" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoIdpTypeRequest), global::SsoCloud.SsoIdpTypeRequest.Parser, new[]{ "SsoIdpTypeId", "Tag", "Label" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoIdpTypeResponse), global::SsoCloud.SsoIdpTypeResponse.Parser, new[]{ "SsoIdpTypeId", "Tag", "Label" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudSAMLLogRequest), global::SsoCloud.SsoCloudSAMLLogRequest.Parser, new[]{ "SsoServiceProviderId" }, null, null, null, null), @@ -113,16 +141,20 @@ static SsocloudReflection() { new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudSAMLLogResponse), global::SsoCloud.SsoCloudSAMLLogResponse.Parser, new[]{ "SsoServiceProviderId", "Entry" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudServiceProviderUpdateRequest), global::SsoCloud.SsoCloudServiceProviderUpdateRequest.Parser, new[]{ "SsoServiceProviderId", "SsoSpConfigurationId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudIdpMetadataRequest), global::SsoCloud.SsoCloudIdpMetadataRequest.Parser, new[]{ "SsoSpConfigurationId", "Filename", "Content" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudIdpMetadataSupportRequest), global::SsoCloud.SsoCloudIdpMetadataSupportRequest.Parser, new[]{ "SsoServiceProviderId", "SsoSpConfigurationId", "SsoEnterpriseId", "Filename", "Content" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudConfigurationValidationRequest), global::SsoCloud.SsoCloudConfigurationValidationRequest.Parser, new[]{ "SsoSpConfigurationId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.ValidationContent), global::SsoCloud.ValidationContent.Parser, new[]{ "SsoSpConfigurationId", "IsSuccessful", "ErrorMessage" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudConfigurationValidationResponse), global::SsoCloud.SsoCloudConfigurationValidationResponse.Parser, new[]{ "ValidationContent" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudServiceProviderConfigurationListRequest), global::SsoCloud.SsoCloudServiceProviderConfigurationListRequest.Parser, new[]{ "SsoServiceProviderId" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.ConfigurationListItem), global::SsoCloud.ConfigurationListItem.Parser, new[]{ "SsoSpConfigurationId", "Name", "IsSelected" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.ConfigurationListItem), global::SsoCloud.ConfigurationListItem.Parser, new[]{ "SsoSpConfigurationId", "Name", "IsSelected", "SsoServiceProviderId" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudServiceProviderConfigurationListResponse), global::SsoCloud.SsoCloudServiceProviderConfigurationListResponse.Parser, new[]{ "ConfigurationItem" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudRequest), global::SsoCloud.SsoCloudRequest.Parser, new[]{ "MessageSessionUid", "ClientVersion", "Embedded", "Json", "Dest", "IdpSessionId", "ForceLogin", "Username" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudRequest), global::SsoCloud.SsoCloudRequest.Parser, new[]{ "MessageSessionUid", "ClientVersion", "Embedded", "Json", "Dest", "IdpSessionId", "ForceLogin", "Username", "Detached" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudResponse), global::SsoCloud.SsoCloudResponse.Parser, new[]{ "Command", "MessageSessionUid", "Email", "EncryptedLoginToken", "ProviderName", "IdpSessionId", "EncryptedSessionToken", "ErrorToken" }, null, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudLogRequest), global::SsoCloud.SsoCloudLogRequest.Parser, new[]{ "SsoServiceProviderId", "ServiceName", "ServiceId" }, null, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SamlRelayState), global::SsoCloud.SamlRelayState.Parser, new[]{ "MessageSessionUid", "Username", "Embedded", "Json", "DestId", "KeyId", "SupportedLanguage", "Checksum", "IsGeneratedUid" }, null, null, null, null) + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SamlRelayState), global::SsoCloud.SamlRelayState.Parser, new[]{ "MessageSessionUid", "Username", "Embedded", "Json", "DestId", "KeyId", "SupportedLanguage", "Checksum", "IsGeneratedUid", "DeviceId", "Detached" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudMigrationStatusRequest), global::SsoCloud.SsoCloudMigrationStatusRequest.Parser, new[]{ "NodeId", "FullStatus", "IncludeMigratedUsers", "Limit" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudMigrationStatusResponse), global::SsoCloud.SsoCloudMigrationStatusResponse.Parser, new[]{ "Success", "Message", "NodeId", "SsoConnectId", "SsoConnectName", "SsoConnectCloudId", "SsoConnectCloudName", "TotalUsersCount", "UsersMigratedCount", "MigratedUsers", "UnmigratedUsers" }, null, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::SsoCloud.SsoCloudMigrationUserInfo), global::SsoCloud.SsoCloudMigrationUserInfo.Parser, new[]{ "UserId", "Email", "FullName", "IsMigrated" }, null, null, null, null) })); } #endregion @@ -143,6 +175,9 @@ public enum AuthProtocolType { ///* Datatypes of SsoCloudSettings /// public enum DataType { + /// + /// This is actually type 11 in the DB + /// [pbr::OriginalName("ANY")] Any = 0, [pbr::OriginalName("BOOLEAN")] Boolean = 1, [pbr::OriginalName("INTEGER")] Integer = 2, @@ -152,6 +187,8 @@ public enum DataType { [pbr::OriginalName("com_keepersecurity_proto_SsoCloud_DataType")] ComKeepersecurityProtoSsoCloudDataType = 6, [pbr::OriginalName("com_keepersecurity_proto_SsoCloud_AuthProtocolType")] ComKeepersecurityProtoSsoCloudAuthProtocolType = 7, [pbr::OriginalName("com_keepersecurity_proto_SsoCloud_SsoIdpType")] ComKeepersecurityProtoSsoCloudSsoIdpType = 8, + [pbr::OriginalName("LONG")] Long = 9, + [pbr::OriginalName("TIMESTAMP")] Timestamp = 10, } /// @@ -191,8 +228,26 @@ public enum SsoIdpType { [pbr::OriginalName("ADFS")] Adfs = 5, [pbr::OriginalName("AZURE")] Azure = 6, [pbr::OriginalName("ONELOGIN")] Onelogin = 7, - [pbr::OriginalName("PING")] Ping = 8, - [pbr::OriginalName("JUMPCLOUD")] Jumpcloud = 9, + [pbr::OriginalName("AWS")] Aws = 8, + [pbr::OriginalName("CENTRIFY")] Centrify = 9, + [pbr::OriginalName("DUO")] Duo = 10, + [pbr::OriginalName("IBM")] Ibm = 11, + [pbr::OriginalName("JUMPCLOUD")] Jumpcloud = 12, + [pbr::OriginalName("PING")] Ping = 13, + [pbr::OriginalName("PINGONE")] Pingone = 14, + [pbr::OriginalName("RSA")] Rsa = 15, + [pbr::OriginalName("SECUREAUTH")] Secureauth = 16, + [pbr::OriginalName("THALES")] Thales = 17, + [pbr::OriginalName("AUTH0")] Auth0 = 18, + [pbr::OriginalName("BEYOND")] Beyond = 19, + [pbr::OriginalName("HYPR")] Hypr = 20, + [pbr::OriginalName("PUREID")] Pureid = 21, + [pbr::OriginalName("SDO")] Sdo = 22, + [pbr::OriginalName("TRAIT")] Trait = 23, + [pbr::OriginalName("TRANSMIT")] Transmit = 24, + [pbr::OriginalName("TRUSONA")] Trusona = 25, + [pbr::OriginalName("VERIDIUM")] Veridium = 26, + [pbr::OriginalName("CAS")] Cas = 27, } #endregion @@ -201,23 +256,32 @@ public enum SsoIdpType { /// ///* This is the value of a Configuration setting /// - public sealed partial class SsoCloudSettingValue : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudSettingValue : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSettingValue()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[0]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSettingValue() { OnConstruction(); } @@ -225,6 +289,7 @@ public SsoCloudSettingValue() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSettingValue(SsoCloudSettingValue other) : this() { settingId_ = other.settingId_; settingName_ = other.settingName_; @@ -239,6 +304,7 @@ public SsoCloudSettingValue(SsoCloudSettingValue other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSettingValue Clone() { return new SsoCloudSettingValue(this); } @@ -250,6 +316,7 @@ public SsoCloudSettingValue Clone() { /// The sso_cloud_setting_value_id /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SettingId { get { return settingId_; } set { @@ -264,6 +331,7 @@ public ulong SettingId { /// A string such as sso_signing_key /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SettingName { get { return settingName_; } set { @@ -278,6 +346,7 @@ public string SettingName { /// A translated label; the name of the setting /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Label { get { return label_; } set { @@ -292,6 +361,7 @@ public string Label { /// The value of the setting, as a string /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Value { get { return value_; } set { @@ -303,6 +373,7 @@ public string Value { public const int ValueTypeFieldNumber = 5; private global::SsoCloud.DataType valueType_ = global::SsoCloud.DataType.Any; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::SsoCloud.DataType ValueType { get { return valueType_; } set { @@ -317,6 +388,7 @@ public string Value { /// Will be formatted for the Locale /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string LastModified { get { return lastModified_; } set { @@ -328,6 +400,7 @@ public string LastModified { public const int IsFromFileFieldNumber = 8; private bool isFromFile_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsFromFile { get { return isFromFile_; } set { @@ -339,6 +412,7 @@ public bool IsFromFile { public const int IsEditableFieldNumber = 9; private bool isEditable_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsEditable { get { return isEditable_; } set { @@ -350,6 +424,7 @@ public bool IsEditable { public const int IsRequiredFieldNumber = 10; private bool isRequired_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsRequired { get { return isRequired_; } set { @@ -358,11 +433,13 @@ public bool IsRequired { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudSettingValue); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudSettingValue other) { if (ReferenceEquals(other, null)) { return false; @@ -383,6 +460,7 @@ public bool Equals(SsoCloudSettingValue other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SettingId != 0UL) hash ^= SettingId.GetHashCode(); @@ -401,12 +479,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SettingId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SettingId); @@ -446,9 +529,57 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SettingId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SettingId); + } + if (SettingName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SettingName); + } + if (Label.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Label); + } + if (Value.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Value); + } + if (ValueType != global::SsoCloud.DataType.Any) { + output.WriteRawTag(40); + output.WriteEnum((int) ValueType); + } + if (LastModified.Length != 0) { + output.WriteRawTag(58); + output.WriteString(LastModified); + } + if (IsFromFile != false) { + output.WriteRawTag(64); + output.WriteBool(IsFromFile); + } + if (IsEditable != false) { + output.WriteRawTag(72); + output.WriteBool(IsEditable); + } + if (IsRequired != false) { + output.WriteRawTag(80); + output.WriteBool(IsRequired); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SettingId != 0UL) { @@ -485,6 +616,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudSettingValue other) { if (other == null) { return; @@ -520,10 +652,18 @@ public void MergeFrom(SsoCloudSettingValue other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -565,30 +705,95 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SettingId = input.ReadUInt64(); + break; + } + case 18: { + SettingName = input.ReadString(); + break; + } + case 26: { + Label = input.ReadString(); + break; + } + case 34: { + Value = input.ReadString(); + break; + } + case 40: { + ValueType = (global::SsoCloud.DataType) input.ReadEnum(); + break; + } + case 58: { + LastModified = input.ReadString(); + break; + } + case 64: { + IsFromFile = input.ReadBool(); + break; + } + case 72: { + IsEditable = input.ReadBool(); + break; + } + case 80: { + IsRequired = input.ReadBool(); + break; + } + } + } } + #endif } /// ///* This performs an edit operation on a Configuration setting /// - public sealed partial class SsoCloudSettingAction : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudSettingAction : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSettingAction()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[1]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSettingAction() { OnConstruction(); } @@ -596,6 +801,7 @@ public SsoCloudSettingAction() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSettingAction(SsoCloudSettingAction other) : this() { settingId_ = other.settingId_; settingName_ = other.settingName_; @@ -605,6 +811,7 @@ public SsoCloudSettingAction(SsoCloudSettingAction other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSettingAction Clone() { return new SsoCloudSettingAction(this); } @@ -616,6 +823,7 @@ public SsoCloudSettingAction Clone() { /// The sso_cloud_setting_value_id to modify. You can use settingId or settingName to identify a value. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SettingId { get { return settingId_; } set { @@ -630,6 +838,7 @@ public ulong SettingId { /// A string-based ID such as sso_signing_key that alternatively identifies the setting to change. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SettingName { get { return settingName_; } set { @@ -644,6 +853,7 @@ public string SettingName { /// Set, Reset to Default, etc. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::SsoCloud.SsoCloudSettingOperationType Operation { get { return operation_; } set { @@ -658,6 +868,7 @@ public string SettingName { /// The value of the setting, as a string. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Value { get { return value_; } set { @@ -666,11 +877,13 @@ public string Value { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudSettingAction); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudSettingAction other) { if (ReferenceEquals(other, null)) { return false; @@ -686,6 +899,7 @@ public bool Equals(SsoCloudSettingAction other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SettingId != 0UL) hash ^= SettingId.GetHashCode(); @@ -699,12 +913,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SettingId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SettingId); @@ -724,9 +943,37 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SettingId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SettingId); + } + if (SettingName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(SettingName); + } + if (Operation != global::SsoCloud.SsoCloudSettingOperationType.Set) { + output.WriteRawTag(24); + output.WriteEnum((int) Operation); + } + if (Value.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Value); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SettingId != 0UL) { @@ -748,6 +995,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudSettingAction other) { if (other == null) { return; @@ -768,10 +1016,18 @@ public void MergeFrom(SsoCloudSettingAction other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -793,30 +1049,75 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SettingId = input.ReadUInt64(); + break; + } + case 18: { + SettingName = input.ReadString(); + break; + } + case 24: { + Operation = (global::SsoCloud.SsoCloudSettingOperationType) input.ReadEnum(); + break; + } + case 34: { + Value = input.ReadString(); + break; + } + } + } } + #endif } /// ///* Requesting the value of or a change to an SSO Configuration /// - public sealed partial class SsoCloudConfigurationRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudConfigurationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudConfigurationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[2]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudConfigurationRequest() { OnConstruction(); } @@ -824,6 +1125,7 @@ public SsoCloudConfigurationRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudConfigurationRequest(SsoCloudConfigurationRequest other) : this() { ssoServiceProviderId_ = other.ssoServiceProviderId_; ssoSpConfigurationId_ = other.ssoSpConfigurationId_; @@ -834,6 +1136,7 @@ public SsoCloudConfigurationRequest(SsoCloudConfigurationRequest other) : this() } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudConfigurationRequest Clone() { return new SsoCloudConfigurationRequest(this); } @@ -842,6 +1145,7 @@ public SsoCloudConfigurationRequest Clone() { public const int SsoServiceProviderIdFieldNumber = 1; private ulong ssoServiceProviderId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoServiceProviderId { get { return ssoServiceProviderId_; } set { @@ -853,6 +1157,7 @@ public ulong SsoServiceProviderId { public const int SsoSpConfigurationIdFieldNumber = 2; private ulong ssoSpConfigurationId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoSpConfigurationId { get { return ssoSpConfigurationId_; } set { @@ -867,6 +1172,7 @@ public ulong SsoSpConfigurationId { /// Name of the configuration /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -878,6 +1184,7 @@ public string Name { public const int SsoAuthProtocolTypeFieldNumber = 4; private global::SsoCloud.AuthProtocolType ssoAuthProtocolType_ = global::SsoCloud.AuthProtocolType.Saml2; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public global::SsoCloud.AuthProtocolType SsoAuthProtocolType { get { return ssoAuthProtocolType_; } set { @@ -891,16 +1198,19 @@ public string Name { = pb::FieldCodec.ForMessage(42, global::SsoCloud.SsoCloudSettingAction.Parser); private readonly pbc::RepeatedField ssoCloudSettingAction_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField SsoCloudSettingAction { get { return ssoCloudSettingAction_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudConfigurationRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudConfigurationRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -917,6 +1227,7 @@ public bool Equals(SsoCloudConfigurationRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); @@ -931,12 +1242,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoServiceProviderId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoServiceProviderId); @@ -957,9 +1273,38 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoSpConfigurationId); + } + if (Name.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Name); + } + if (SsoAuthProtocolType != global::SsoCloud.AuthProtocolType.Saml2) { + output.WriteRawTag(32); + output.WriteEnum((int) SsoAuthProtocolType); + } + ssoCloudSettingAction_.WriteTo(ref output, _repeated_ssoCloudSettingAction_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoServiceProviderId != 0UL) { @@ -982,6 +1327,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudConfigurationRequest other) { if (other == null) { return; @@ -1003,10 +1349,18 @@ public void MergeFrom(SsoCloudConfigurationRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -1032,68 +1386,105 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 16: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 26: { + Name = input.ReadString(); + break; + } + case 32: { + SsoAuthProtocolType = (global::SsoCloud.AuthProtocolType) input.ReadEnum(); + break; + } + case 42: { + ssoCloudSettingAction_.AddEntriesFrom(ref input, _repeated_ssoCloudSettingAction_codec); + break; + } + } + } } + #endif } /// - ///* This is the response to an SsoConfigurationRequest + ///* This represents the providers that share a given configuration /// - public sealed partial class SsoCloudConfigurationResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudConfigurationResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoSharedConfigItem : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoSharedConfigItem()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[3]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudConfigurationResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoSharedConfigItem() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudConfigurationResponse(SsoCloudConfigurationResponse other) : this() { - ssoServiceProviderId_ = other.ssoServiceProviderId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoSharedConfigItem(SsoSharedConfigItem other) : this() { ssoSpConfigurationId_ = other.ssoSpConfigurationId_; - enterpriseId_ = other.enterpriseId_; - name_ = other.name_; - protocol_ = other.protocol_; - lastModified_ = other.lastModified_; - ssoCloudSettingValue_ = other.ssoCloudSettingValue_.Clone(); + ssoServiceProviderId_ = other.ssoServiceProviderId_; + ssoNodeId_ = other.ssoNodeId_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudConfigurationResponse Clone() { - return new SsoCloudConfigurationResponse(this); - } - - /// Field number for the "ssoServiceProviderId" field. - public const int SsoServiceProviderIdFieldNumber = 1; - private ulong ssoServiceProviderId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ulong SsoServiceProviderId { - get { return ssoServiceProviderId_; } - set { - ssoServiceProviderId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoSharedConfigItem Clone() { + return new SsoSharedConfigItem(this); } /// Field number for the "ssoSpConfigurationId" field. - public const int SsoSpConfigurationIdFieldNumber = 2; + public const int SsoSpConfigurationIdFieldNumber = 1; private ulong ssoSpConfigurationId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoSpConfigurationId { get { return ssoSpConfigurationId_; } set { @@ -1101,102 +1492,58 @@ public ulong SsoSpConfigurationId { } } - /// Field number for the "enterpriseId" field. - public const int EnterpriseIdFieldNumber = 3; - private ulong enterpriseId_; + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 2; + private ulong ssoServiceProviderId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ulong EnterpriseId { - get { return enterpriseId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoServiceProviderId { + get { return ssoServiceProviderId_; } set { - enterpriseId_ = value; + ssoServiceProviderId_ = value; } } - /// Field number for the "name" field. - public const int NameFieldNumber = 4; - private string name_ = ""; - /// - /// Name of the configuration - /// + /// Field number for the "ssoNodeId" field. + public const int SsoNodeIdFieldNumber = 3; + private ulong ssoNodeId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Name { - get { return name_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoNodeId { + get { return ssoNodeId_; } set { - name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + ssoNodeId_ = value; } } - /// Field number for the "protocol" field. - public const int ProtocolFieldNumber = 5; - private string protocol_ = ""; - /// - /// For now, will always be SAML2 - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Protocol { - get { return protocol_; } - set { - protocol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "lastModified" field. - public const int LastModifiedFieldNumber = 6; - private string lastModified_ = ""; - /// - /// Will be formatted for the Locale - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string LastModified { - get { return lastModified_; } - set { - lastModified_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } - } - - /// Field number for the "ssoCloudSettingValue" field. - public const int SsoCloudSettingValueFieldNumber = 7; - private static readonly pb::FieldCodec _repeated_ssoCloudSettingValue_codec - = pb::FieldCodec.ForMessage(58, global::SsoCloud.SsoCloudSettingValue.Parser); - private readonly pbc::RepeatedField ssoCloudSettingValue_ = new pbc::RepeatedField(); - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField SsoCloudSettingValue { - get { return ssoCloudSettingValue_; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as SsoCloudConfigurationResponse); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoSharedConfigItem); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoCloudConfigurationResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoSharedConfigItem other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (SsoServiceProviderId != other.SsoServiceProviderId) return false; if (SsoSpConfigurationId != other.SsoSpConfigurationId) return false; - if (EnterpriseId != other.EnterpriseId) return false; - if (Name != other.Name) return false; - if (Protocol != other.Protocol) return false; - if (LastModified != other.LastModified) return false; - if(!ssoCloudSettingValue_.Equals(other.ssoCloudSettingValue_)) return false; + if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + if (SsoNodeId != other.SsoNodeId) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); - if (EnterpriseId != 0UL) hash ^= EnterpriseId.GetHashCode(); - if (Name.Length != 0) hash ^= Name.GetHashCode(); - if (Protocol.Length != 0) hash ^= Protocol.GetHashCode(); - if (LastModified.Length != 0) hash ^= LastModified.GetHashCode(); - hash ^= ssoCloudSettingValue_.GetHashCode(); + if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); + if (SsoNodeId != 0UL) hash ^= SsoNodeId.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1204,64 +1551,70 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (SsoServiceProviderId != 0UL) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoSpConfigurationId != 0UL) { output.WriteRawTag(8); - output.WriteUInt64(SsoServiceProviderId); + output.WriteUInt64(SsoSpConfigurationId); } - if (SsoSpConfigurationId != 0UL) { + if (SsoServiceProviderId != 0UL) { output.WriteRawTag(16); - output.WriteUInt64(SsoSpConfigurationId); + output.WriteUInt64(SsoServiceProviderId); } - if (EnterpriseId != 0UL) { + if (SsoNodeId != 0UL) { output.WriteRawTag(24); - output.WriteUInt64(EnterpriseId); + output.WriteUInt64(SsoNodeId); } - if (Name.Length != 0) { - output.WriteRawTag(34); - output.WriteString(Name); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (Protocol.Length != 0) { - output.WriteRawTag(42); - output.WriteString(Protocol); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoSpConfigurationId); } - if (LastModified.Length != 0) { - output.WriteRawTag(50); - output.WriteString(LastModified); + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoServiceProviderId); + } + if (SsoNodeId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(SsoNodeId); } - ssoCloudSettingValue_.WriteTo(output, _repeated_ssoCloudSettingValue_codec); if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (SsoServiceProviderId != 0UL) { - size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); - } if (SsoSpConfigurationId != 0UL) { size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoSpConfigurationId); } - if (EnterpriseId != 0UL) { - size += 1 + pb::CodedOutputStream.ComputeUInt64Size(EnterpriseId); - } - if (Name.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); - } - if (Protocol.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Protocol); + if (SsoServiceProviderId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); } - if (LastModified.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(LastModified); + if (SsoNodeId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoNodeId); } - size += ssoCloudSettingValue_.CalculateSize(_repeated_ssoCloudSettingValue_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1269,180 +1622,303 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoCloudConfigurationResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoSharedConfigItem other) { if (other == null) { return; } - if (other.SsoServiceProviderId != 0UL) { - SsoServiceProviderId = other.SsoServiceProviderId; - } if (other.SsoSpConfigurationId != 0UL) { SsoSpConfigurationId = other.SsoSpConfigurationId; } - if (other.EnterpriseId != 0UL) { - EnterpriseId = other.EnterpriseId; - } - if (other.Name.Length != 0) { - Name = other.Name; - } - if (other.Protocol.Length != 0) { - Protocol = other.Protocol; + if (other.SsoServiceProviderId != 0UL) { + SsoServiceProviderId = other.SsoServiceProviderId; } - if (other.LastModified.Length != 0) { - LastModified = other.LastModified; + if (other.SsoNodeId != 0UL) { + SsoNodeId = other.SsoNodeId; } - ssoCloudSettingValue_.Add(other.ssoCloudSettingValue_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - SsoServiceProviderId = input.ReadUInt64(); + SsoSpConfigurationId = input.ReadUInt64(); break; } case 16: { - SsoSpConfigurationId = input.ReadUInt64(); + SsoServiceProviderId = input.ReadUInt64(); break; } case 24: { - EnterpriseId = input.ReadUInt64(); + SsoNodeId = input.ReadUInt64(); break; } - case 34: { - Name = input.ReadString(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 42: { - Protocol = input.ReadString(); + case 8: { + SsoSpConfigurationId = input.ReadUInt64(); break; } - case 50: { - LastModified = input.ReadString(); + case 16: { + SsoServiceProviderId = input.ReadUInt64(); break; } - case 58: { - ssoCloudSettingValue_.AddEntriesFrom(input, _repeated_ssoCloudSettingValue_codec); + case 24: { + SsoNodeId = input.ReadUInt64(); break; } } } } + #endif } /// - ///* This is a request to the IdpType API. + ///* This is the response to an SsoConfigurationRequest /// - public sealed partial class SsoIdpTypeRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoIdpTypeRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudConfigurationResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudConfigurationResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[4]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoIdpTypeRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudConfigurationResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoIdpTypeRequest(SsoIdpTypeRequest other) : this() { - ssoIdpTypeId_ = other.ssoIdpTypeId_; - tag_ = other.tag_; - label_ = other.label_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudConfigurationResponse(SsoCloudConfigurationResponse other) : this() { + ssoServiceProviderId_ = other.ssoServiceProviderId_; + ssoSpConfigurationId_ = other.ssoSpConfigurationId_; + enterpriseId_ = other.enterpriseId_; + name_ = other.name_; + protocol_ = other.protocol_; + lastModified_ = other.lastModified_; + ssoCloudSettingValue_ = other.ssoCloudSettingValue_.Clone(); + isShared_ = other.isShared_; + sharedConfigs_ = other.sharedConfigs_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoIdpTypeRequest Clone() { - return new SsoIdpTypeRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudConfigurationResponse Clone() { + return new SsoCloudConfigurationResponse(this); } - /// Field number for the "ssoIdpTypeId" field. - public const int SsoIdpTypeIdFieldNumber = 1; - private uint ssoIdpTypeId_; + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 1; + private ulong ssoServiceProviderId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoServiceProviderId { + get { return ssoServiceProviderId_; } + set { + ssoServiceProviderId_ = value; + } + } + + /// Field number for the "ssoSpConfigurationId" field. + public const int SsoSpConfigurationIdFieldNumber = 2; + private ulong ssoSpConfigurationId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoSpConfigurationId { + get { return ssoSpConfigurationId_; } + set { + ssoSpConfigurationId_ = value; + } + } + + /// Field number for the "enterpriseId" field. + public const int EnterpriseIdFieldNumber = 3; + private ulong enterpriseId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong EnterpriseId { + get { return enterpriseId_; } + set { + enterpriseId_ = value; + } + } + + /// Field number for the "name" field. + public const int NameFieldNumber = 4; + private string name_ = ""; /// - /// The caller can use the ID or the tag to identify the IdpType to operate on. + /// Name of the configuration /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint SsoIdpTypeId { - get { return ssoIdpTypeId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Name { + get { return name_; } set { - ssoIdpTypeId_ = value; + name_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "tag" field. - public const int TagFieldNumber = 2; - private string tag_ = ""; + /// Field number for the "protocol" field. + public const int ProtocolFieldNumber = 5; + private string protocol_ = ""; /// - /// If both are specified, the ID takes precedence + /// For now, will always be SAML2 /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Tag { - get { return tag_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Protocol { + get { return protocol_; } set { - tag_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + protocol_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "label" field. - public const int LabelFieldNumber = 3; - private string label_ = ""; + /// Field number for the "lastModified" field. + public const int LastModifiedFieldNumber = 6; + private string lastModified_ = ""; /// - /// Used when adding a new IdPType or renaming one. + /// Will be formatted for the Locale /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Label { - get { return label_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string LastModified { + get { return lastModified_; } set { - label_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + lastModified_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } + /// Field number for the "ssoCloudSettingValue" field. + public const int SsoCloudSettingValueFieldNumber = 7; + private static readonly pb::FieldCodec _repeated_ssoCloudSettingValue_codec + = pb::FieldCodec.ForMessage(58, global::SsoCloud.SsoCloudSettingValue.Parser); + private readonly pbc::RepeatedField ssoCloudSettingValue_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as SsoIdpTypeRequest); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SsoCloudSettingValue { + get { return ssoCloudSettingValue_; } } + /// Field number for the "isShared" field. + public const int IsSharedFieldNumber = 8; + private bool isShared_; + /// + /// If true, this configuration is in use by multiple service providers + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoIdpTypeRequest other) { - if (ReferenceEquals(other, null)) { - return false; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsShared { + get { return isShared_; } + set { + isShared_ = value; } - if (ReferenceEquals(other, this)) { - return true; + } + + /// Field number for the "sharedConfigs" field. + public const int SharedConfigsFieldNumber = 9; + private static readonly pb::FieldCodec _repeated_sharedConfigs_codec + = pb::FieldCodec.ForMessage(74, global::SsoCloud.SsoSharedConfigItem.Parser); + private readonly pbc::RepeatedField sharedConfigs_ = new pbc::RepeatedField(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SharedConfigs { + get { return sharedConfigs_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoCloudConfigurationResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudConfigurationResponse other) { + if (ReferenceEquals(other, null)) { + return false; } - if (SsoIdpTypeId != other.SsoIdpTypeId) return false; - if (Tag != other.Tag) return false; - if (Label != other.Label) return false; + if (ReferenceEquals(other, this)) { + return true; + } + if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + if (SsoSpConfigurationId != other.SsoSpConfigurationId) return false; + if (EnterpriseId != other.EnterpriseId) return false; + if (Name != other.Name) return false; + if (Protocol != other.Protocol) return false; + if (LastModified != other.LastModified) return false; + if(!ssoCloudSettingValue_.Equals(other.ssoCloudSettingValue_)) return false; + if (IsShared != other.IsShared) return false; + if(!sharedConfigs_.Equals(other.sharedConfigs_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (SsoIdpTypeId != 0) hash ^= SsoIdpTypeId.GetHashCode(); - if (Tag.Length != 0) hash ^= Tag.GetHashCode(); - if (Label.Length != 0) hash ^= Label.GetHashCode(); + if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); + if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); + if (EnterpriseId != 0UL) hash ^= EnterpriseId.GetHashCode(); + if (Name.Length != 0) hash ^= Name.GetHashCode(); + if (Protocol.Length != 0) hash ^= Protocol.GetHashCode(); + if (LastModified.Length != 0) hash ^= LastModified.GetHashCode(); + hash ^= ssoCloudSettingValue_.GetHashCode(); + if (IsShared != false) hash ^= IsShared.GetHashCode(); + hash ^= sharedConfigs_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1450,41 +1926,120 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (SsoIdpTypeId != 0) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoServiceProviderId != 0UL) { output.WriteRawTag(8); - output.WriteUInt32(SsoIdpTypeId); + output.WriteUInt64(SsoServiceProviderId); } - if (Tag.Length != 0) { - output.WriteRawTag(18); - output.WriteString(Tag); + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoSpConfigurationId); } - if (Label.Length != 0) { - output.WriteRawTag(26); - output.WriteString(Label); + if (EnterpriseId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(EnterpriseId); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (Protocol.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Protocol); + } + if (LastModified.Length != 0) { + output.WriteRawTag(50); + output.WriteString(LastModified); + } + ssoCloudSettingValue_.WriteTo(output, _repeated_ssoCloudSettingValue_codec); + if (IsShared != false) { + output.WriteRawTag(64); + output.WriteBool(IsShared); } + sharedConfigs_.WriteTo(output, _repeated_sharedConfigs_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoSpConfigurationId); + } + if (EnterpriseId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(EnterpriseId); + } + if (Name.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Name); + } + if (Protocol.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Protocol); + } + if (LastModified.Length != 0) { + output.WriteRawTag(50); + output.WriteString(LastModified); + } + ssoCloudSettingValue_.WriteTo(ref output, _repeated_ssoCloudSettingValue_codec); + if (IsShared != false) { + output.WriteRawTag(64); + output.WriteBool(IsShared); + } + sharedConfigs_.WriteTo(ref output, _repeated_sharedConfigs_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (SsoIdpTypeId != 0) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SsoIdpTypeId); + if (SsoServiceProviderId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); } - if (Tag.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Tag); + if (SsoSpConfigurationId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoSpConfigurationId); } - if (Label.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Label); + if (EnterpriseId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(EnterpriseId); + } + if (Name.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Name); + } + if (Protocol.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Protocol); + } + if (LastModified.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(LastModified); } + size += ssoCloudSettingValue_.CalculateSize(_repeated_ssoCloudSettingValue_codec); + if (IsShared != false) { + size += 1 + 1; + } + size += sharedConfigs_.CalculateSize(_repeated_sharedConfigs_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -1492,76 +2047,189 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoIdpTypeRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudConfigurationResponse other) { if (other == null) { return; } - if (other.SsoIdpTypeId != 0) { - SsoIdpTypeId = other.SsoIdpTypeId; + if (other.SsoServiceProviderId != 0UL) { + SsoServiceProviderId = other.SsoServiceProviderId; } - if (other.Tag.Length != 0) { - Tag = other.Tag; + if (other.SsoSpConfigurationId != 0UL) { + SsoSpConfigurationId = other.SsoSpConfigurationId; } - if (other.Label.Length != 0) { - Label = other.Label; + if (other.EnterpriseId != 0UL) { + EnterpriseId = other.EnterpriseId; + } + if (other.Name.Length != 0) { + Name = other.Name; + } + if (other.Protocol.Length != 0) { + Protocol = other.Protocol; + } + if (other.LastModified.Length != 0) { + LastModified = other.LastModified; + } + ssoCloudSettingValue_.Add(other.ssoCloudSettingValue_); + if (other.IsShared != false) { + IsShared = other.IsShared; } + sharedConfigs_.Add(other.sharedConfigs_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - SsoIdpTypeId = input.ReadUInt32(); + SsoServiceProviderId = input.ReadUInt64(); break; } - case 18: { - Tag = input.ReadString(); + case 16: { + SsoSpConfigurationId = input.ReadUInt64(); break; } - case 26: { - Label = input.ReadString(); + case 24: { + EnterpriseId = input.ReadUInt64(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + case 42: { + Protocol = input.ReadString(); + break; + } + case 50: { + LastModified = input.ReadString(); + break; + } + case 58: { + ssoCloudSettingValue_.AddEntriesFrom(input, _repeated_ssoCloudSettingValue_codec); + break; + } + case 64: { + IsShared = input.ReadBool(); + break; + } + case 74: { + sharedConfigs_.AddEntriesFrom(input, _repeated_sharedConfigs_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 16: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 24: { + EnterpriseId = input.ReadUInt64(); + break; + } + case 34: { + Name = input.ReadString(); + break; + } + case 42: { + Protocol = input.ReadString(); + break; + } + case 50: { + LastModified = input.ReadString(); + break; + } + case 58: { + ssoCloudSettingValue_.AddEntriesFrom(ref input, _repeated_ssoCloudSettingValue_codec); + break; + } + case 64: { + IsShared = input.ReadBool(); + break; + } + case 74: { + sharedConfigs_.AddEntriesFrom(ref input, _repeated_sharedConfigs_codec); break; } } } } + #endif } /// - ///* This is a response from the IdpType API calls. + ///* This is a request to the IdpType API. /// - public sealed partial class SsoIdpTypeResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoIdpTypeResponse()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoIdpTypeRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoIdpTypeRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[5]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoIdpTypeResponse() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoIdpTypeRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoIdpTypeResponse(SsoIdpTypeResponse other) : this() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoIdpTypeRequest(SsoIdpTypeRequest other) : this() { ssoIdpTypeId_ = other.ssoIdpTypeId_; tag_ = other.tag_; label_ = other.label_; @@ -1569,18 +2237,20 @@ public SsoIdpTypeResponse(SsoIdpTypeResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoIdpTypeResponse Clone() { - return new SsoIdpTypeResponse(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoIdpTypeRequest Clone() { + return new SsoIdpTypeRequest(this); } /// Field number for the "ssoIdpTypeId" field. public const int SsoIdpTypeIdFieldNumber = 1; - private int ssoIdpTypeId_; + private uint ssoIdpTypeId_; /// - /// unique ID + /// The caller can use the ID or the tag to identify the IdpType to operate on. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int SsoIdpTypeId { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint SsoIdpTypeId { get { return ssoIdpTypeId_; } set { ssoIdpTypeId_ = value; @@ -1589,39 +2259,43 @@ public int SsoIdpTypeId { /// Field number for the "tag" field. public const int TagFieldNumber = 2; - private int tag_; + private string tag_ = ""; /// - /// Internal tag + /// If both are specified, the ID takes precedence /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Tag { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Tag { get { return tag_; } set { - tag_ = value; + tag_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } /// Field number for the "label" field. public const int LabelFieldNumber = 3; - private int label_; + private string label_ = ""; /// - /// User-friendly display name + /// Used when adding a new IdPType or renaming one. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int Label { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Label { get { return label_; } set { - label_ = value; + label_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SsoIdpTypeResponse); + return Equals(other as SsoIdpTypeRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoIdpTypeResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoIdpTypeRequest other) { if (ReferenceEquals(other, null)) { return false; } @@ -1635,11 +2309,12 @@ public bool Equals(SsoIdpTypeResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoIdpTypeId != 0) hash ^= SsoIdpTypeId.GetHashCode(); - if (Tag != 0) hash ^= Tag.GetHashCode(); - if (Label != 0) hash ^= Label.GetHashCode(); + if (Tag.Length != 0) hash ^= Tag.GetHashCode(); + if (Label.Length != 0) hash ^= Label.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1647,40 +2322,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoIdpTypeId != 0) { output.WriteRawTag(8); - output.WriteInt32(SsoIdpTypeId); + output.WriteUInt32(SsoIdpTypeId); } - if (Tag != 0) { - output.WriteRawTag(16); - output.WriteInt32(Tag); + if (Tag.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Tag); } - if (Label != 0) { - output.WriteRawTag(24); - output.WriteInt32(Label); + if (Label.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Label); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoIdpTypeId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(SsoIdpTypeId); + } + if (Tag.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Tag); + } + if (Label.Length != 0) { + output.WriteRawTag(26); + output.WriteString(Label); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoIdpTypeId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(SsoIdpTypeId); + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(SsoIdpTypeId); } - if (Tag != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Tag); + if (Tag.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Tag); } - if (Label != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(Label); + if (Label.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Label); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1689,117 +2393,212 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoIdpTypeResponse other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoIdpTypeRequest other) { if (other == null) { return; } if (other.SsoIdpTypeId != 0) { SsoIdpTypeId = other.SsoIdpTypeId; } - if (other.Tag != 0) { + if (other.Tag.Length != 0) { Tag = other.Tag; } - if (other.Label != 0) { + if (other.Label.Length != 0) { Label = other.Label; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - SsoIdpTypeId = input.ReadInt32(); + SsoIdpTypeId = input.ReadUInt32(); break; } - case 16: { - Tag = input.ReadInt32(); + case 18: { + Tag = input.ReadString(); break; } - case 24: { - Label = input.ReadInt32(); + case 26: { + Label = input.ReadString(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoIdpTypeId = input.ReadUInt32(); + break; + } + case 18: { + Tag = input.ReadString(); + break; + } + case 26: { + Label = input.ReadString(); break; } } } } + #endif } /// - ///* This is the request for the SAML logs of a service provider. Used for both saml_log_get and saml_log_clear + ///* This is a response from the IdpType API calls. /// - public sealed partial class SsoCloudSAMLLogRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSAMLLogRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoIdpTypeResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoIdpTypeResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[6]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudSAMLLogRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoIdpTypeResponse() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudSAMLLogRequest(SsoCloudSAMLLogRequest other) : this() { - ssoServiceProviderId_ = other.ssoServiceProviderId_; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoIdpTypeResponse(SsoIdpTypeResponse other) : this() { + ssoIdpTypeId_ = other.ssoIdpTypeId_; + tag_ = other.tag_; + label_ = other.label_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudSAMLLogRequest Clone() { - return new SsoCloudSAMLLogRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoIdpTypeResponse Clone() { + return new SsoIdpTypeResponse(this); } - /// Field number for the "ssoServiceProviderId" field. - public const int SsoServiceProviderIdFieldNumber = 1; - private ulong ssoServiceProviderId_; + /// Field number for the "ssoIdpTypeId" field. + public const int SsoIdpTypeIdFieldNumber = 1; + private int ssoIdpTypeId_; + /// + /// unique ID + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ulong SsoServiceProviderId { - get { return ssoServiceProviderId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int SsoIdpTypeId { + get { return ssoIdpTypeId_; } set { - ssoServiceProviderId_ = value; + ssoIdpTypeId_ = value; + } + } + + /// Field number for the "tag" field. + public const int TagFieldNumber = 2; + private int tag_; + /// + /// Internal tag + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Tag { + get { return tag_; } + set { + tag_ = value; + } + } + + /// Field number for the "label" field. + public const int LabelFieldNumber = 3; + private int label_; + /// + /// User-friendly display name + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Label { + get { return label_; } + set { + label_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SsoCloudSAMLLogRequest); + return Equals(other as SsoIdpTypeResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoCloudSAMLLogRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoIdpTypeResponse other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + if (SsoIdpTypeId != other.SsoIdpTypeId) return false; + if (Tag != other.Tag) return false; + if (Label != other.Label) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); + if (SsoIdpTypeId != 0) hash ^= SsoIdpTypeId.GetHashCode(); + if (Tag != 0) hash ^= Tag.GetHashCode(); + if (Label != 0) hash ^= Label.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -1807,26 +2606,69 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (SsoServiceProviderId != 0UL) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoIdpTypeId != 0) { output.WriteRawTag(8); - output.WriteUInt64(SsoServiceProviderId); + output.WriteInt32(SsoIdpTypeId); + } + if (Tag != 0) { + output.WriteRawTag(16); + output.WriteInt32(Tag); + } + if (Label != 0) { + output.WriteRawTag(24); + output.WriteInt32(Label); } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoIdpTypeId != 0) { + output.WriteRawTag(8); + output.WriteInt32(SsoIdpTypeId); + } + if (Tag != 0) { + output.WriteRawTag(16); + output.WriteInt32(Tag); + } + if (Label != 0) { + output.WriteRawTag(24); + output.WriteInt32(Label); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (SsoServiceProviderId != 0UL) { - size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); + if (SsoIdpTypeId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(SsoIdpTypeId); + } + if (Tag != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Tag); + } + if (Label != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Label); } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); @@ -1835,54 +2677,319 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoCloudSAMLLogRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoIdpTypeResponse other) { if (other == null) { return; } - if (other.SsoServiceProviderId != 0UL) { - SsoServiceProviderId = other.SsoServiceProviderId; + if (other.SsoIdpTypeId != 0) { + SsoIdpTypeId = other.SsoIdpTypeId; + } + if (other.Tag != 0) { + Tag = other.Tag; + } + if (other.Label != 0) { + Label = other.Label; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; case 8: { - SsoServiceProviderId = input.ReadUInt64(); + SsoIdpTypeId = input.ReadInt32(); + break; + } + case 16: { + Tag = input.ReadInt32(); + break; + } + case 24: { + Label = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoIdpTypeId = input.ReadInt32(); + break; + } + case 16: { + Tag = input.ReadInt32(); + break; + } + case 24: { + Label = input.ReadInt32(); break; } } } } + #endif } /// - ///* This represents one SAML message in the log. + ///* This is the request for the SAML logs of a service provider. Used for both saml_log_get and saml_log_clear /// - public sealed partial class SsoCloudSAMLLogEntry : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSAMLLogEntry()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudSAMLLogRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSAMLLogRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[7]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudSAMLLogRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudSAMLLogRequest(SsoCloudSAMLLogRequest other) : this() { + ssoServiceProviderId_ = other.ssoServiceProviderId_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudSAMLLogRequest Clone() { + return new SsoCloudSAMLLogRequest(this); + } + + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 1; + private ulong ssoServiceProviderId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoServiceProviderId { + get { return ssoServiceProviderId_; } + set { + ssoServiceProviderId_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoCloudSAMLLogRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudSAMLLogRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SsoServiceProviderId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudSAMLLogRequest other) { + if (other == null) { + return; + } + if (other.SsoServiceProviderId != 0UL) { + SsoServiceProviderId = other.SsoServiceProviderId; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + } + } + } + #endif + + } + + /// + ///* This represents one SAML message in the log. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudSAMLLogEntry : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSAMLLogEntry()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[8]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSAMLLogEntry() { OnConstruction(); } @@ -1890,6 +2997,7 @@ public SsoCloudSAMLLogEntry() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSAMLLogEntry(SsoCloudSAMLLogEntry other) : this() { serverTime_ = other.serverTime_; direction_ = other.direction_; @@ -1905,6 +3013,7 @@ public SsoCloudSAMLLogEntry(SsoCloudSAMLLogEntry other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudSAMLLogEntry Clone() { return new SsoCloudSAMLLogEntry(this); } @@ -1913,6 +3022,7 @@ public SsoCloudSAMLLogEntry Clone() { public const int ServerTimeFieldNumber = 1; private string serverTime_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ServerTime { get { return serverTime_; } set { @@ -1924,6 +3034,7 @@ public string ServerTime { public const int DirectionFieldNumber = 2; private string direction_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Direction { get { return direction_; } set { @@ -1935,6 +3046,7 @@ public string Direction { public const int MessageTypeFieldNumber = 3; private string messageType_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string MessageType { get { return messageType_; } set { @@ -1946,6 +3058,7 @@ public string MessageType { public const int MessageIssuedFieldNumber = 4; private string messageIssued_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string MessageIssued { get { return messageIssued_; } set { @@ -1957,6 +3070,7 @@ public string MessageIssued { public const int FromEntityIdFieldNumber = 5; private string fromEntityId_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string FromEntityId { get { return fromEntityId_; } set { @@ -1968,6 +3082,7 @@ public string FromEntityId { public const int SamlStatusFieldNumber = 6; private string samlStatus_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SamlStatus { get { return samlStatus_; } set { @@ -1979,6 +3094,7 @@ public string SamlStatus { public const int RelayStateFieldNumber = 7; private string relayState_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string RelayState { get { return relayState_; } set { @@ -1990,6 +3106,7 @@ public string RelayState { public const int SamlContentFieldNumber = 8; private string samlContent_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string SamlContent { get { return samlContent_; } set { @@ -2001,6 +3118,7 @@ public string SamlContent { public const int IsSignedFieldNumber = 9; private bool isSigned_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsSigned { get { return isSigned_; } set { @@ -2012,6 +3130,7 @@ public bool IsSigned { public const int IsOKFieldNumber = 10; private bool isOK_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsOK { get { return isOK_; } set { @@ -2020,11 +3139,13 @@ public bool IsOK { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudSAMLLogEntry); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudSAMLLogEntry other) { if (ReferenceEquals(other, null)) { return false; @@ -2046,6 +3167,7 @@ public bool Equals(SsoCloudSAMLLogEntry other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (ServerTime.Length != 0) hash ^= ServerTime.GetHashCode(); @@ -2065,12 +3187,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (ServerTime.Length != 0) { output.WriteRawTag(10); output.WriteString(ServerTime); @@ -2114,9 +3241,61 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (ServerTime.Length != 0) { + output.WriteRawTag(10); + output.WriteString(ServerTime); + } + if (Direction.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Direction); + } + if (MessageType.Length != 0) { + output.WriteRawTag(26); + output.WriteString(MessageType); + } + if (MessageIssued.Length != 0) { + output.WriteRawTag(34); + output.WriteString(MessageIssued); + } + if (FromEntityId.Length != 0) { + output.WriteRawTag(42); + output.WriteString(FromEntityId); + } + if (SamlStatus.Length != 0) { + output.WriteRawTag(50); + output.WriteString(SamlStatus); + } + if (RelayState.Length != 0) { + output.WriteRawTag(58); + output.WriteString(RelayState); + } + if (SamlContent.Length != 0) { + output.WriteRawTag(66); + output.WriteString(SamlContent); + } + if (IsSigned != false) { + output.WriteRawTag(72); + output.WriteBool(IsSigned); + } + if (IsOK != false) { + output.WriteRawTag(80); + output.WriteBool(IsOK); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (ServerTime.Length != 0) { @@ -2156,6 +3335,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudSAMLLogEntry other) { if (other == null) { return; @@ -2194,10 +3374,18 @@ public void MergeFrom(SsoCloudSAMLLogEntry other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2243,58 +3431,130 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif } - } - - /// - ///* This represents an array of SAML responses from the log. - /// - public sealed partial class SsoCloudSAMLLogResponse : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSAMLLogResponse()); - private pb::UnknownFieldSet _unknownFields; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[8]; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - pbr::MessageDescriptor pb::IMessage.Descriptor { - get { return Descriptor; } - } - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudSAMLLogResponse() { - OnConstruction(); - } - - partial void OnConstruction(); - - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudSAMLLogResponse(SsoCloudSAMLLogResponse other) : this() { - ssoServiceProviderId_ = other.ssoServiceProviderId_; - entry_ = other.entry_.Clone(); - _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); - } - + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudSAMLLogResponse Clone() { - return new SsoCloudSAMLLogResponse(this); - } - - /// Field number for the "ssoServiceProviderId" field. - public const int SsoServiceProviderIdFieldNumber = 1; - private ulong ssoServiceProviderId_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ulong SsoServiceProviderId { - get { return ssoServiceProviderId_; } - set { - ssoServiceProviderId_ = value; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; } - } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + ServerTime = input.ReadString(); + break; + } + case 18: { + Direction = input.ReadString(); + break; + } + case 26: { + MessageType = input.ReadString(); + break; + } + case 34: { + MessageIssued = input.ReadString(); + break; + } + case 42: { + FromEntityId = input.ReadString(); + break; + } + case 50: { + SamlStatus = input.ReadString(); + break; + } + case 58: { + RelayState = input.ReadString(); + break; + } + case 66: { + SamlContent = input.ReadString(); + break; + } + case 72: { + IsSigned = input.ReadBool(); + break; + } + case 80: { + IsOK = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + ///* This represents an array of SAML responses from the log. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudSAMLLogResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudSAMLLogResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[9]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudSAMLLogResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudSAMLLogResponse(SsoCloudSAMLLogResponse other) : this() { + ssoServiceProviderId_ = other.ssoServiceProviderId_; + entry_ = other.entry_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudSAMLLogResponse Clone() { + return new SsoCloudSAMLLogResponse(this); + } + + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 1; + private ulong ssoServiceProviderId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoServiceProviderId { + get { return ssoServiceProviderId_; } + set { + ssoServiceProviderId_ = value; + } + } /// Field number for the "entry" field. public const int EntryFieldNumber = 2; @@ -2302,16 +3562,19 @@ public ulong SsoServiceProviderId { = pb::FieldCodec.ForMessage(18, global::SsoCloud.SsoCloudSAMLLogEntry.Parser); private readonly pbc::RepeatedField entry_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField Entry { get { return entry_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudSAMLLogResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudSAMLLogResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -2325,6 +3588,7 @@ public bool Equals(SsoCloudSAMLLogResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); @@ -2336,12 +3600,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoServiceProviderId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoServiceProviderId); @@ -2350,9 +3619,26 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + entry_.WriteTo(ref output, _repeated_entry_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoServiceProviderId != 0UL) { @@ -2366,6 +3652,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudSAMLLogResponse other) { if (other == null) { return; @@ -2378,10 +3665,18 @@ public void MergeFrom(SsoCloudSAMLLogResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2395,7 +3690,35 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 18: { + entry_.AddEntriesFrom(ref input, _repeated_entry_codec); + break; + } + } + } } + #endif } @@ -2404,23 +3727,32 @@ public void MergeFrom(pb::CodedInputStream input) { /// This is a request to set the SSO Configuration for an SSO Service Provider, by ID. /// The response is an instance of SsoCloudConfigurationRequest. /// - public sealed partial class SsoCloudServiceProviderUpdateRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudServiceProviderUpdateRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudServiceProviderUpdateRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[9]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[10]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderUpdateRequest() { OnConstruction(); } @@ -2428,6 +3760,7 @@ public SsoCloudServiceProviderUpdateRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderUpdateRequest(SsoCloudServiceProviderUpdateRequest other) : this() { ssoServiceProviderId_ = other.ssoServiceProviderId_; ssoSpConfigurationId_ = other.ssoSpConfigurationId_; @@ -2435,6 +3768,7 @@ public SsoCloudServiceProviderUpdateRequest(SsoCloudServiceProviderUpdateRequest } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderUpdateRequest Clone() { return new SsoCloudServiceProviderUpdateRequest(this); } @@ -2443,6 +3777,7 @@ public SsoCloudServiceProviderUpdateRequest Clone() { public const int SsoServiceProviderIdFieldNumber = 1; private ulong ssoServiceProviderId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoServiceProviderId { get { return ssoServiceProviderId_; } set { @@ -2454,6 +3789,7 @@ public ulong SsoServiceProviderId { public const int SsoSpConfigurationIdFieldNumber = 2; private ulong ssoSpConfigurationId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoSpConfigurationId { get { return ssoSpConfigurationId_; } set { @@ -2462,11 +3798,13 @@ public ulong SsoSpConfigurationId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudServiceProviderUpdateRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudServiceProviderUpdateRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2480,6 +3818,7 @@ public bool Equals(SsoCloudServiceProviderUpdateRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); @@ -2491,12 +3830,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoServiceProviderId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoServiceProviderId); @@ -2508,9 +3852,29 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoSpConfigurationId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoServiceProviderId != 0UL) { @@ -2526,6 +3890,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudServiceProviderUpdateRequest other) { if (other == null) { return; @@ -2540,10 +3905,18 @@ public void MergeFrom(SsoCloudServiceProviderUpdateRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2557,7 +3930,35 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 16: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + } + } } + #endif } @@ -2566,23 +3967,32 @@ public void MergeFrom(pb::CodedInputStream input) { /// This request is to upload the IdP metadata file as its UTF-8 byte content. /// The response is an SsoCloudConfigurationValidationResponse. /// - public sealed partial class SsoCloudIdpMetadataRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudIdpMetadataRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudIdpMetadataRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[10]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[11]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudIdpMetadataRequest() { OnConstruction(); } @@ -2590,6 +4000,7 @@ public SsoCloudIdpMetadataRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudIdpMetadataRequest(SsoCloudIdpMetadataRequest other) : this() { ssoSpConfigurationId_ = other.ssoSpConfigurationId_; filename_ = other.filename_; @@ -2598,6 +4009,7 @@ public SsoCloudIdpMetadataRequest(SsoCloudIdpMetadataRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudIdpMetadataRequest Clone() { return new SsoCloudIdpMetadataRequest(this); } @@ -2606,6 +4018,7 @@ public SsoCloudIdpMetadataRequest Clone() { public const int SsoSpConfigurationIdFieldNumber = 1; private ulong ssoSpConfigurationId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoSpConfigurationId { get { return ssoSpConfigurationId_; } set { @@ -2617,6 +4030,7 @@ public ulong SsoSpConfigurationId { public const int FilenameFieldNumber = 2; private string filename_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Filename { get { return filename_; } set { @@ -2631,6 +4045,7 @@ public string Filename { /// UTF-8 bytes of the file content /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString Content { get { return content_; } set { @@ -2639,11 +4054,13 @@ public string Filename { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudIdpMetadataRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudIdpMetadataRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -2658,6 +4075,7 @@ public bool Equals(SsoCloudIdpMetadataRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); @@ -2670,12 +4088,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoSpConfigurationId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoSpConfigurationId); @@ -2691,9 +4114,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoSpConfigurationId); + } + if (Filename.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Filename); + } + if (Content.Length != 0) { + output.WriteRawTag(26); + output.WriteBytes(Content); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoSpConfigurationId != 0UL) { @@ -2712,6 +4159,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudIdpMetadataRequest other) { if (other == null) { return; @@ -2729,10 +4177,18 @@ public void MergeFrom(SsoCloudIdpMetadataRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -2750,80 +4206,191 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 18: { + Filename = input.ReadString(); + break; + } + case 26: { + Content = input.ReadBytes(); + break; + } + } + } } + #endif } /// ///* - /// Request validation of one or more SsoCloudConfigurations. - /// The response is SsoCloudConfigurationValidationResponse. + /// This request is by the API Test Tool to upload the IdP metadata file as its UTF-8 byte content. + /// The response is an SsoCloudConfigurationValidationResponse. /// - public sealed partial class SsoCloudConfigurationValidationRequest : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudConfigurationValidationRequest()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudIdpMetadataSupportRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudIdpMetadataSupportRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[11]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[12]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudConfigurationValidationRequest() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudIdpMetadataSupportRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudConfigurationValidationRequest(SsoCloudConfigurationValidationRequest other) : this() { - ssoSpConfigurationId_ = other.ssoSpConfigurationId_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudIdpMetadataSupportRequest(SsoCloudIdpMetadataSupportRequest other) : this() { + ssoServiceProviderId_ = other.ssoServiceProviderId_; + ssoSpConfigurationId_ = other.ssoSpConfigurationId_; + ssoEnterpriseId_ = other.ssoEnterpriseId_; + filename_ = other.filename_; + content_ = other.content_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SsoCloudConfigurationValidationRequest Clone() { - return new SsoCloudConfigurationValidationRequest(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudIdpMetadataSupportRequest Clone() { + return new SsoCloudIdpMetadataSupportRequest(this); } - /// Field number for the "ssoSpConfigurationId" field. - public const int SsoSpConfigurationIdFieldNumber = 1; - private static readonly pb::FieldCodec _repeated_ssoSpConfigurationId_codec - = pb::FieldCodec.ForUInt64(10); - private readonly pbc::RepeatedField ssoSpConfigurationId_ = new pbc::RepeatedField(); + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 1; + private ulong ssoServiceProviderId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField SsoSpConfigurationId { - get { return ssoSpConfigurationId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoServiceProviderId { + get { return ssoServiceProviderId_; } + set { + ssoServiceProviderId_ = value; + } } + /// Field number for the "ssoSpConfigurationId" field. + public const int SsoSpConfigurationIdFieldNumber = 2; + private ulong ssoSpConfigurationId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public override bool Equals(object other) { - return Equals(other as SsoCloudConfigurationValidationRequest); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoSpConfigurationId { + get { return ssoSpConfigurationId_; } + set { + ssoSpConfigurationId_ = value; + } } + /// Field number for the "ssoEnterpriseId" field. + public const int SsoEnterpriseIdFieldNumber = 3; + private ulong ssoEnterpriseId_; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SsoCloudConfigurationValidationRequest other) { - if (ReferenceEquals(other, null)) { - return false; - } - if (ReferenceEquals(other, this)) { - return true; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoEnterpriseId { + get { return ssoEnterpriseId_; } + set { + ssoEnterpriseId_ = value; } - if(!ssoSpConfigurationId_.Equals(other.ssoSpConfigurationId_)) return false; - return Equals(_unknownFields, other._unknownFields); } + /// Field number for the "filename" field. + public const int FilenameFieldNumber = 4; + private string filename_ = ""; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Filename { + get { return filename_; } + set { + filename_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "content" field. + public const int ContentFieldNumber = 5; + private pb::ByteString content_ = pb::ByteString.Empty; + /// + /// UTF-8 bytes of the file content + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString Content { + get { return content_; } + set { + content_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoCloudIdpMetadataSupportRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudIdpMetadataSupportRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SsoServiceProviderId != other.SsoServiceProviderId) return false; + if (SsoSpConfigurationId != other.SsoSpConfigurationId) return false; + if (SsoEnterpriseId != other.SsoEnterpriseId) return false; + if (Filename != other.Filename) return false; + if (Content != other.Content) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - hash ^= ssoSpConfigurationId_.GetHashCode(); + if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); + if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); + if (SsoEnterpriseId != 0UL) hash ^= SsoEnterpriseId.GetHashCode(); + if (Filename.Length != 0) hash ^= Filename.GetHashCode(); + if (Content.Length != 0) hash ^= Content.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2831,22 +4398,92 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - ssoSpConfigurationId_.WriteTo(output, _repeated_ssoSpConfigurationId_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoSpConfigurationId); + } + if (SsoEnterpriseId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(SsoEnterpriseId); + } + if (Filename.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filename); + } + if (Content.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(Content); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(16); + output.WriteUInt64(SsoSpConfigurationId); + } + if (SsoEnterpriseId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(SsoEnterpriseId); + } + if (Filename.Length != 0) { + output.WriteRawTag(34); + output.WriteString(Filename); + } + if (Content.Length != 0) { + output.WriteRawTag(42); + output.WriteBytes(Content); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - size += ssoSpConfigurationId_.CalculateSize(_repeated_ssoSpConfigurationId_codec); + if (SsoServiceProviderId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); + } + if (SsoSpConfigurationId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoSpConfigurationId); + } + if (SsoEnterpriseId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoEnterpriseId); + } + if (Filename.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Filename); + } + if (Content.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(Content); + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -2854,133 +4491,196 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoCloudConfigurationValidationRequest other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudIdpMetadataSupportRequest other) { if (other == null) { return; } - ssoSpConfigurationId_.Add(other.ssoSpConfigurationId_); + if (other.SsoServiceProviderId != 0UL) { + SsoServiceProviderId = other.SsoServiceProviderId; + } + if (other.SsoSpConfigurationId != 0UL) { + SsoSpConfigurationId = other.SsoSpConfigurationId; + } + if (other.SsoEnterpriseId != 0UL) { + SsoEnterpriseId = other.SsoEnterpriseId; + } + if (other.Filename.Length != 0) { + Filename = other.Filename; + } + if (other.Content.Length != 0) { + Content = other.Content; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: case 8: { - ssoSpConfigurationId_.AddEntriesFrom(input, _repeated_ssoSpConfigurationId_codec); + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 16: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 24: { + SsoEnterpriseId = input.ReadUInt64(); + break; + } + case 34: { + Filename = input.ReadString(); + break; + } + case 42: { + Content = input.ReadBytes(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 16: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 24: { + SsoEnterpriseId = input.ReadUInt64(); + break; + } + case 34: { + Filename = input.ReadString(); + break; + } + case 42: { + Content = input.ReadBytes(); break; } } } } + #endif } /// ///* - /// This is part of SsoCloudConfigurationValidationResponse. + /// Request validation of one or more SsoCloudConfigurations. + /// The response is SsoCloudConfigurationValidationResponse. /// - public sealed partial class ValidationContent : pb::IMessage { - private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidationContent()); + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudConfigurationValidationRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudConfigurationValidationRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public static pb::MessageParser Parser { get { return _parser; } } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[12]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[13]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidationContent() { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudConfigurationValidationRequest() { OnConstruction(); } partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidationContent(ValidationContent other) : this() { - ssoSpConfigurationId_ = other.ssoSpConfigurationId_; - isSuccessful_ = other.isSuccessful_; - errorMessage_ = other.errorMessage_.Clone(); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudConfigurationValidationRequest(SsoCloudConfigurationValidationRequest other) : this() { + ssoSpConfigurationId_ = other.ssoSpConfigurationId_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ValidationContent Clone() { - return new ValidationContent(this); + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudConfigurationValidationRequest Clone() { + return new SsoCloudConfigurationValidationRequest(this); } /// Field number for the "ssoSpConfigurationId" field. public const int SsoSpConfigurationIdFieldNumber = 1; - private ulong ssoSpConfigurationId_; + private static readonly pb::FieldCodec _repeated_ssoSpConfigurationId_codec + = pb::FieldCodec.ForUInt64(10); + private readonly pbc::RepeatedField ssoSpConfigurationId_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ulong SsoSpConfigurationId { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SsoSpConfigurationId { get { return ssoSpConfigurationId_; } - set { - ssoSpConfigurationId_ = value; - } - } - - /// Field number for the "isSuccessful" field. - public const int IsSuccessfulFieldNumber = 2; - private bool isSuccessful_; - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IsSuccessful { - get { return isSuccessful_; } - set { - isSuccessful_ = value; - } - } - - /// Field number for the "errorMessage" field. - public const int ErrorMessageFieldNumber = 3; - private static readonly pb::FieldCodec _repeated_errorMessage_codec - = pb::FieldCodec.ForString(26); - private readonly pbc::RepeatedField errorMessage_ = new pbc::RepeatedField(); - /// - /// will be null or empty if isSuccessful is true - /// - [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pbc::RepeatedField ErrorMessage { - get { return errorMessage_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as ValidationContent); + return Equals(other as SsoCloudConfigurationValidationRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(ValidationContent other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudConfigurationValidationRequest other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (SsoSpConfigurationId != other.SsoSpConfigurationId) return false; - if (IsSuccessful != other.IsSuccessful) return false; - if(!errorMessage_.Equals(other.errorMessage_)) return false; + if(!ssoSpConfigurationId_.Equals(other.ssoSpConfigurationId_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); - if (IsSuccessful != false) hash ^= IsSuccessful.GetHashCode(); - hash ^= errorMessage_.GetHashCode(); + hash ^= ssoSpConfigurationId_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -2988,36 +4688,40 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (SsoSpConfigurationId != 0UL) { - output.WriteRawTag(8); - output.WriteUInt64(SsoSpConfigurationId); - } - if (IsSuccessful != false) { - output.WriteRawTag(16); - output.WriteBool(IsSuccessful); - } - errorMessage_.WriteTo(output, _repeated_errorMessage_codec); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + ssoSpConfigurationId_.WriteTo(output, _repeated_ssoSpConfigurationId_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + ssoSpConfigurationId_.WriteTo(ref output, _repeated_ssoSpConfigurationId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (SsoSpConfigurationId != 0UL) { - size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoSpConfigurationId); - } - if (IsSuccessful != false) { - size += 1 + 1; - } - size += errorMessage_.CalculateSize(_repeated_errorMessage_codec); + size += ssoSpConfigurationId_.CalculateSize(_repeated_ssoSpConfigurationId_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3025,7 +4729,256 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(ValidationContent other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudConfigurationValidationRequest other) { + if (other == null) { + return; + } + ssoSpConfigurationId_.Add(other.ssoSpConfigurationId_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: + case 8: { + ssoSpConfigurationId_.AddEntriesFrom(input, _repeated_ssoSpConfigurationId_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: + case 8: { + ssoSpConfigurationId_.AddEntriesFrom(ref input, _repeated_ssoSpConfigurationId_codec); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// This is part of SsoCloudConfigurationValidationResponse. + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ValidationContent : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValidationContent()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[14]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidationContent() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidationContent(ValidationContent other) : this() { + ssoSpConfigurationId_ = other.ssoSpConfigurationId_; + isSuccessful_ = other.isSuccessful_; + errorMessage_ = other.errorMessage_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ValidationContent Clone() { + return new ValidationContent(this); + } + + /// Field number for the "ssoSpConfigurationId" field. + public const int SsoSpConfigurationIdFieldNumber = 1; + private ulong ssoSpConfigurationId_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoSpConfigurationId { + get { return ssoSpConfigurationId_; } + set { + ssoSpConfigurationId_ = value; + } + } + + /// Field number for the "isSuccessful" field. + public const int IsSuccessfulFieldNumber = 2; + private bool isSuccessful_; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsSuccessful { + get { return isSuccessful_; } + set { + isSuccessful_ = value; + } + } + + /// Field number for the "errorMessage" field. + public const int ErrorMessageFieldNumber = 3; + private static readonly pb::FieldCodec _repeated_errorMessage_codec + = pb::FieldCodec.ForString(26); + private readonly pbc::RepeatedField errorMessage_ = new pbc::RepeatedField(); + /// + /// will be null or empty if isSuccessful is true + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField ErrorMessage { + get { return errorMessage_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as ValidationContent); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(ValidationContent other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (SsoSpConfigurationId != other.SsoSpConfigurationId) return false; + if (IsSuccessful != other.IsSuccessful) return false; + if(!errorMessage_.Equals(other.errorMessage_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); + if (IsSuccessful != false) hash ^= IsSuccessful.GetHashCode(); + hash ^= errorMessage_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoSpConfigurationId); + } + if (IsSuccessful != false) { + output.WriteRawTag(16); + output.WriteBool(IsSuccessful); + } + errorMessage_.WriteTo(output, _repeated_errorMessage_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoSpConfigurationId); + } + if (IsSuccessful != false) { + output.WriteRawTag(16); + output.WriteBool(IsSuccessful); + } + errorMessage_.WriteTo(ref output, _repeated_errorMessage_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SsoSpConfigurationId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoSpConfigurationId); + } + if (IsSuccessful != false) { + size += 1 + 1; + } + size += errorMessage_.CalculateSize(_repeated_errorMessage_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(ValidationContent other) { if (other == null) { return; } @@ -3040,10 +4993,18 @@ public void MergeFrom(ValidationContent other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3061,7 +5022,39 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 16: { + IsSuccessful = input.ReadBool(); + break; + } + case 26: { + errorMessage_.AddEntriesFrom(ref input, _repeated_errorMessage_codec); + break; + } + } + } } + #endif } @@ -3069,23 +5062,32 @@ public void MergeFrom(pb::CodedInputStream input) { ///* /// This response is sent for a configuration validation request and for a Metadata upload request. /// - public sealed partial class SsoCloudConfigurationValidationResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudConfigurationValidationResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudConfigurationValidationResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[13]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[15]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudConfigurationValidationResponse() { OnConstruction(); } @@ -3093,12 +5095,14 @@ public SsoCloudConfigurationValidationResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudConfigurationValidationResponse(SsoCloudConfigurationValidationResponse other) : this() { validationContent_ = other.validationContent_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudConfigurationValidationResponse Clone() { return new SsoCloudConfigurationValidationResponse(this); } @@ -3109,16 +5113,19 @@ public SsoCloudConfigurationValidationResponse Clone() { = pb::FieldCodec.ForMessage(10, global::SsoCloud.ValidationContent.Parser); private readonly pbc::RepeatedField validationContent_ = new pbc::RepeatedField(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField ValidationContent { get { return validationContent_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudConfigurationValidationResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudConfigurationValidationResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -3131,6 +5138,7 @@ public bool Equals(SsoCloudConfigurationValidationResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= validationContent_.GetHashCode(); @@ -3141,19 +5149,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else validationContent_.WriteTo(output, _repeated_validationContent_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + validationContent_.WriteTo(ref output, _repeated_validationContent_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += validationContent_.CalculateSize(_repeated_validationContent_codec); @@ -3164,6 +5190,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudConfigurationValidationResponse other) { if (other == null) { return; @@ -3173,10 +5200,18 @@ public void MergeFrom(SsoCloudConfigurationValidationResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3186,31 +5221,64 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + validationContent_.AddEntriesFrom(ref input, _repeated_validationContent_codec); + break; + } + } + } } + #endif } /// ///* - /// This request is sent to retrieve the list of configurations availble to a service provider. + /// This request is sent to retrieve the list of configurations defined in an enterprise. /// - public sealed partial class SsoCloudServiceProviderConfigurationListRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudServiceProviderConfigurationListRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudServiceProviderConfigurationListRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[14]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[16]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderConfigurationListRequest() { OnConstruction(); } @@ -3218,12 +5286,14 @@ public SsoCloudServiceProviderConfigurationListRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderConfigurationListRequest(SsoCloudServiceProviderConfigurationListRequest other) : this() { ssoServiceProviderId_ = other.ssoServiceProviderId_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderConfigurationListRequest Clone() { return new SsoCloudServiceProviderConfigurationListRequest(this); } @@ -3231,7 +5301,11 @@ public SsoCloudServiceProviderConfigurationListRequest Clone() { /// Field number for the "ssoServiceProviderId" field. public const int SsoServiceProviderIdFieldNumber = 1; private ulong ssoServiceProviderId_; + /// + /// Not required, may be zero. + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoServiceProviderId { get { return ssoServiceProviderId_; } set { @@ -3240,11 +5314,13 @@ public ulong SsoServiceProviderId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudServiceProviderConfigurationListRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudServiceProviderConfigurationListRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -3257,6 +5333,7 @@ public bool Equals(SsoCloudServiceProviderConfigurationListRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); @@ -3267,12 +5344,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoServiceProviderId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoServiceProviderId); @@ -3280,21 +5362,38 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (SsoServiceProviderId != 0UL) { - size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); } if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (SsoServiceProviderId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoServiceProviderId); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); } return size; } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudServiceProviderConfigurationListRequest other) { if (other == null) { return; @@ -3306,10 +5405,18 @@ public void MergeFrom(SsoCloudServiceProviderConfigurationListRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3319,32 +5426,65 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + } + } } + #endif } /// ///* /// This represents one configuration in the list. - /// If isSelected is true this configuration is the one currently being used. + /// If isSelected is true this configuration is currently being used by the sso service provider(s) listed. /// - public sealed partial class ConfigurationListItem : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class ConfigurationListItem : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ConfigurationListItem()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[15]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[17]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ConfigurationListItem() { OnConstruction(); } @@ -3352,14 +5492,17 @@ public ConfigurationListItem() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ConfigurationListItem(ConfigurationListItem other) : this() { ssoSpConfigurationId_ = other.ssoSpConfigurationId_; name_ = other.name_; isSelected_ = other.isSelected_; + ssoServiceProviderId_ = other.ssoServiceProviderId_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ConfigurationListItem Clone() { return new ConfigurationListItem(this); } @@ -3367,7 +5510,11 @@ public ConfigurationListItem Clone() { /// Field number for the "ssoSpConfigurationId" field. public const int SsoSpConfigurationIdFieldNumber = 1; private ulong ssoSpConfigurationId_; + /// + /// The ID of the configuration + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoSpConfigurationId { get { return ssoSpConfigurationId_; } set { @@ -3378,7 +5525,11 @@ public ulong SsoSpConfigurationId { /// Field number for the "name" field. public const int NameFieldNumber = 2; private string name_ = ""; + /// + /// The name of the configuration + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Name { get { return name_; } set { @@ -3389,7 +5540,11 @@ public string Name { /// Field number for the "isSelected" field. public const int IsSelectedFieldNumber = 3; private bool isSelected_; + /// + /// If true, this configuration is in use + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool IsSelected { get { return isSelected_; } set { @@ -3397,12 +5552,28 @@ public bool IsSelected { } } + /// Field number for the "ssoServiceProviderId" field. + public const int SsoServiceProviderIdFieldNumber = 4; + private static readonly pb::FieldCodec _repeated_ssoServiceProviderId_codec + = pb::FieldCodec.ForUInt64(34); + private readonly pbc::RepeatedField ssoServiceProviderId_ = new pbc::RepeatedField(); + /// + /// If the configuration is in use, this is a list of service providers that use it. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField SsoServiceProviderId { + get { return ssoServiceProviderId_; } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as ConfigurationListItem); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(ConfigurationListItem other) { if (ReferenceEquals(other, null)) { return false; @@ -3413,15 +5584,18 @@ public bool Equals(ConfigurationListItem other) { if (SsoSpConfigurationId != other.SsoSpConfigurationId) return false; if (Name != other.Name) return false; if (IsSelected != other.IsSelected) return false; + if(!ssoServiceProviderId_.Equals(other.ssoServiceProviderId_)) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoSpConfigurationId != 0UL) hash ^= SsoSpConfigurationId.GetHashCode(); if (Name.Length != 0) hash ^= Name.GetHashCode(); if (IsSelected != false) hash ^= IsSelected.GetHashCode(); + hash ^= ssoServiceProviderId_.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3429,12 +5603,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoSpConfigurationId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoSpConfigurationId); @@ -3447,12 +5626,38 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(24); output.WriteBool(IsSelected); } + ssoServiceProviderId_.WriteTo(output, _repeated_ssoServiceProviderId_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoSpConfigurationId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoSpConfigurationId); + } + if (Name.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Name); + } + if (IsSelected != false) { + output.WriteRawTag(24); + output.WriteBool(IsSelected); + } + ssoServiceProviderId_.WriteTo(ref output, _repeated_ssoServiceProviderId_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoSpConfigurationId != 0UL) { @@ -3464,6 +5669,7 @@ public int CalculateSize() { if (IsSelected != false) { size += 1 + 1; } + size += ssoServiceProviderId_.CalculateSize(_repeated_ssoServiceProviderId_codec); if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3471,6 +5677,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(ConfigurationListItem other) { if (other == null) { return; @@ -3484,14 +5691,23 @@ public void MergeFrom(ConfigurationListItem other) { if (other.IsSelected != false) { IsSelected = other.IsSelected; } + ssoServiceProviderId_.Add(other.ssoServiceProviderId_); _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3507,9 +5723,51 @@ public void MergeFrom(pb::CodedInputStream input) { IsSelected = input.ReadBool(); break; } + case 34: + case 32: { + ssoServiceProviderId_.AddEntriesFrom(input, _repeated_ssoServiceProviderId_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoSpConfigurationId = input.ReadUInt64(); + break; + } + case 18: { + Name = input.ReadString(); + break; + } + case 24: { + IsSelected = input.ReadBool(); + break; + } + case 34: + case 32: { + ssoServiceProviderId_.AddEntriesFrom(ref input, _repeated_ssoServiceProviderId_codec); + break; + } } } } + #endif } @@ -3517,23 +5775,32 @@ public void MergeFrom(pb::CodedInputStream input) { ///* /// This represents a list of Configuration entries. /// - public sealed partial class SsoCloudServiceProviderConfigurationListResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudServiceProviderConfigurationListResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudServiceProviderConfigurationListResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[16]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[18]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderConfigurationListResponse() { OnConstruction(); } @@ -3541,12 +5808,14 @@ public SsoCloudServiceProviderConfigurationListResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderConfigurationListResponse(SsoCloudServiceProviderConfigurationListResponse other) : this() { configurationItem_ = other.configurationItem_.Clone(); _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudServiceProviderConfigurationListResponse Clone() { return new SsoCloudServiceProviderConfigurationListResponse(this); } @@ -3556,17 +5825,23 @@ public SsoCloudServiceProviderConfigurationListResponse Clone() { private static readonly pb::FieldCodec _repeated_configurationItem_codec = pb::FieldCodec.ForMessage(10, global::SsoCloud.ConfigurationListItem.Parser); private readonly pbc::RepeatedField configurationItem_ = new pbc::RepeatedField(); + /// + /// A list of all of the SSO Cloud configurations in an enterprise + /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pbc::RepeatedField ConfigurationItem { get { return configurationItem_; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudServiceProviderConfigurationListResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudServiceProviderConfigurationListResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -3579,6 +5854,7 @@ public bool Equals(SsoCloudServiceProviderConfigurationListResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; hash ^= configurationItem_.GetHashCode(); @@ -3589,19 +5865,37 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else configurationItem_.WriteTo(output, _repeated_configurationItem_codec); if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + configurationItem_.WriteTo(ref output, _repeated_configurationItem_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; size += configurationItem_.CalculateSize(_repeated_configurationItem_codec); @@ -3612,6 +5906,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudServiceProviderConfigurationListResponse other) { if (other == null) { return; @@ -3621,10 +5916,18 @@ public void MergeFrom(SsoCloudServiceProviderConfigurationListResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3634,7 +5937,31 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + configurationItem_.AddEntriesFrom(ref input, _repeated_configurationItem_codec); + break; + } + } + } } + #endif } @@ -3643,23 +5970,32 @@ public void MergeFrom(pb::CodedInputStream input) { /// For security, this structure is used to make a Cloud SSO login or logout request rather than sending the parameters in the URL or in a form. /// A typical call is: https://www.keepersecurity.com/api/rest/sso/saml/login/123456789?payload=encodedEncryptedAPIRequestContainingAnSsoCloudRequest /// - public sealed partial class SsoCloudRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[17]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[19]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudRequest() { OnConstruction(); } @@ -3667,6 +6003,7 @@ public SsoCloudRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudRequest(SsoCloudRequest other) : this() { messageSessionUid_ = other.messageSessionUid_; clientVersion_ = other.clientVersion_; @@ -3676,10 +6013,12 @@ public SsoCloudRequest(SsoCloudRequest other) : this() { idpSessionId_ = other.idpSessionId_; forceLogin_ = other.forceLogin_; username_ = other.username_; + detached_ = other.detached_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudRequest Clone() { return new SsoCloudRequest(this); } @@ -3691,6 +6030,7 @@ public SsoCloudRequest Clone() { /// Required, 16 bytes /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString MessageSessionUid { get { return messageSessionUid_; } set { @@ -3705,6 +6045,7 @@ public SsoCloudRequest Clone() { /// version id string /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ClientVersion { get { return clientVersion_; } set { @@ -3719,6 +6060,7 @@ public string ClientVersion { /// If true, the login/logout result is embedded in a web page /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Embedded { get { return embedded_; } set { @@ -3733,6 +6075,7 @@ public bool Embedded { /// If true, the login/logout result is returned as a JSON object /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Json { get { return json_; } set { @@ -3747,6 +6090,7 @@ public bool Json { /// redirect to: "vault", "console", or "app.fooo", where the user is redirected to fooo:// (used for mobile) /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Dest { get { return dest_; } set { @@ -3761,6 +6105,7 @@ public string Dest { /// If this value was provided in an SSO login response, send it when performing a logut request. Otherwise unused. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string IdpSessionId { get { return idpSessionId_; } set { @@ -3775,6 +6120,7 @@ public string IdpSessionId { /// On login, whether the user should be forced to re-enter their password even if they have an active session. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool ForceLogin { get { return forceLogin_; } set { @@ -3789,6 +6135,7 @@ public bool ForceLogin { /// Only used on Logout at this time. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Username { get { return username_; } set { @@ -3796,12 +6143,29 @@ public string Username { } } + /// Field number for the "detached" field. + public const int DetachedFieldNumber = 9; + private bool detached_; + /// + /// If true, the login success HTML page contains a button to copy the login token to the clipboard. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Detached { + get { return detached_; } + set { + detached_ = value; + } + } + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -3817,10 +6181,12 @@ public bool Equals(SsoCloudRequest other) { if (IdpSessionId != other.IdpSessionId) return false; if (ForceLogin != other.ForceLogin) return false; if (Username != other.Username) return false; + if (Detached != other.Detached) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); @@ -3831,6 +6197,7 @@ public override int GetHashCode() { if (IdpSessionId.Length != 0) hash ^= IdpSessionId.GetHashCode(); if (ForceLogin != false) hash ^= ForceLogin.GetHashCode(); if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Detached != false) hash ^= Detached.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -3838,12 +6205,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (MessageSessionUid.Length != 0) { output.WriteRawTag(10); output.WriteBytes(MessageSessionUid); @@ -3876,12 +6248,64 @@ public void WriteTo(pb::CodedOutputStream output) { output.WriteRawTag(66); output.WriteString(Username); } + if (Detached != false) { + output.WriteRawTag(72); + output.WriteBool(Detached); + } if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (ClientVersion.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ClientVersion); + } + if (Embedded != false) { + output.WriteRawTag(24); + output.WriteBool(Embedded); + } + if (Json != false) { + output.WriteRawTag(32); + output.WriteBool(Json); + } + if (Dest.Length != 0) { + output.WriteRawTag(42); + output.WriteString(Dest); + } + if (IdpSessionId.Length != 0) { + output.WriteRawTag(50); + output.WriteString(IdpSessionId); + } + if (ForceLogin != false) { + output.WriteRawTag(56); + output.WriteBool(ForceLogin); + } + if (Username.Length != 0) { + output.WriteRawTag(66); + output.WriteString(Username); + } + if (Detached != false) { + output.WriteRawTag(72); + output.WriteBool(Detached); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (MessageSessionUid.Length != 0) { @@ -3908,6 +6332,9 @@ public int CalculateSize() { if (Username.Length != 0) { size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); } + if (Detached != false) { + size += 1 + 1; + } if (_unknownFields != null) { size += _unknownFields.CalculateSize(); } @@ -3915,6 +6342,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudRequest other) { if (other == null) { return; @@ -3943,14 +6371,25 @@ public void MergeFrom(SsoCloudRequest other) { if (other.Username.Length != 0) { Username = other.Username; } + if (other.Detached != false) { + Detached = other.Detached; + } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -3986,9 +6425,69 @@ public void MergeFrom(pb::CodedInputStream input) { Username = input.ReadString(); break; } + case 72: { + Detached = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 18: { + ClientVersion = input.ReadString(); + break; + } + case 24: { + Embedded = input.ReadBool(); + break; + } + case 32: { + Json = input.ReadBool(); + break; + } + case 42: { + Dest = input.ReadString(); + break; + } + case 50: { + IdpSessionId = input.ReadString(); + break; + } + case 56: { + ForceLogin = input.ReadBool(); + break; + } + case 66: { + Username = input.ReadString(); + break; + } + case 72: { + Detached = input.ReadBool(); + break; + } } } } + #endif } @@ -3997,23 +6496,32 @@ public void MergeFrom(pb::CodedInputStream input) { /// For security, this structure is used to return values from a Cloud SSO login or logout. /// It is encrypted with the key sent along with the SsoCloudRequest. /// - public sealed partial class SsoCloudResponse : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudResponse()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[18]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[20]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudResponse() { OnConstruction(); } @@ -4021,6 +6529,7 @@ public SsoCloudResponse() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudResponse(SsoCloudResponse other) : this() { command_ = other.command_; messageSessionUid_ = other.messageSessionUid_; @@ -4034,6 +6543,7 @@ public SsoCloudResponse(SsoCloudResponse other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudResponse Clone() { return new SsoCloudResponse(this); } @@ -4045,6 +6555,7 @@ public SsoCloudResponse Clone() { /// The value will be "sso_login" or "sso_logout" /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Command { get { return command_; } set { @@ -4059,6 +6570,7 @@ public string Command { /// If available, 16 bytes. Can not be zeros. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString MessageSessionUid { get { return messageSessionUid_; } set { @@ -4073,6 +6585,7 @@ public string Command { /// The user's email address /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string Email { get { return email_; } set { @@ -4087,6 +6600,7 @@ public string Email { /// Login only. Returned from a successful login. Send this to start_login. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedLoginToken { get { return encryptedLoginToken_; } set { @@ -4101,6 +6615,7 @@ public string Email { /// The "domain name" associated with this user. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ProviderName { get { return providerName_; } set { @@ -4115,6 +6630,7 @@ public string ProviderName { /// Some IdPs associate a sessionId with the session. If present, remember this and send it in the SsoCloudRequest when you logout. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string IdpSessionId { get { return idpSessionId_; } set { @@ -4129,6 +6645,7 @@ public string IdpSessionId { /// If available. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public pb::ByteString EncryptedSessionToken { get { return encryptedSessionToken_; } set { @@ -4143,6 +6660,7 @@ public string IdpSessionId { /// If there is an error this is a stringified JSON object. The "userInstructions" and "errorMessage" fields can be shown to the user. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ErrorToken { get { return errorToken_; } set { @@ -4151,11 +6669,13 @@ public string ErrorToken { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudResponse); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudResponse other) { if (ReferenceEquals(other, null)) { return false; @@ -4175,6 +6695,7 @@ public bool Equals(SsoCloudResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (Command.Length != 0) hash ^= Command.GetHashCode(); @@ -4192,12 +6713,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (Command.Length != 0) { output.WriteRawTag(10); output.WriteString(Command); @@ -4233,48 +6759,93 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif } + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int CalculateSize() { - int size = 0; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { if (Command.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Command); + output.WriteRawTag(10); + output.WriteString(Command); } if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + output.WriteRawTag(18); + output.WriteBytes(MessageSessionUid); } if (Email.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + output.WriteRawTag(26); + output.WriteString(Email); } if (EncryptedLoginToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + output.WriteRawTag(34); + output.WriteBytes(EncryptedLoginToken); } if (ProviderName.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ProviderName); + output.WriteRawTag(42); + output.WriteString(ProviderName); } if (IdpSessionId.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(IdpSessionId); + output.WriteRawTag(50); + output.WriteString(IdpSessionId); } if (EncryptedSessionToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + output.WriteRawTag(58); + output.WriteBytes(EncryptedSessionToken); } if (ErrorToken.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorToken); + output.WriteRawTag(66); + output.WriteString(ErrorToken); } if (_unknownFields != null) { - size += _unknownFields.CalculateSize(); + _unknownFields.WriteTo(ref output); } - return size; } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SsoCloudResponse other) { - if (other == null) { - return; - } - if (other.Command.Length != 0) { - Command = other.Command; + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Command.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Command); + } + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); + } + if (EncryptedLoginToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedLoginToken); + } + if (ProviderName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ProviderName); + } + if (IdpSessionId.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(IdpSessionId); + } + if (EncryptedSessionToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(EncryptedSessionToken); + } + if (ErrorToken.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(ErrorToken); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudResponse other) { + if (other == null) { + return; + } + if (other.Command.Length != 0) { + Command = other.Command; } if (other.MessageSessionUid.Length != 0) { MessageSessionUid = other.MessageSessionUid; @@ -4301,10 +6872,18 @@ public void MergeFrom(SsoCloudResponse other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4342,7 +6921,59 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + Command = input.ReadString(); + break; + } + case 18: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 26: { + Email = input.ReadString(); + break; + } + case 34: { + EncryptedLoginToken = input.ReadBytes(); + break; + } + case 42: { + ProviderName = input.ReadString(); + break; + } + case 50: { + IdpSessionId = input.ReadString(); + break; + } + case 58: { + EncryptedSessionToken = input.ReadBytes(); + break; + } + case 66: { + ErrorToken = input.ReadString(); + break; + } + } + } } + #endif } @@ -4350,23 +6981,32 @@ public void MergeFrom(pb::CodedInputStream input) { ///* /// This allows the user to retrieve or clear SSO logs related to a service provider. /// - public sealed partial class SsoCloudLogRequest : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudLogRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudLogRequest()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[19]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[21]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudLogRequest() { OnConstruction(); } @@ -4374,6 +7014,7 @@ public SsoCloudLogRequest() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudLogRequest(SsoCloudLogRequest other) : this() { ssoServiceProviderId_ = other.ssoServiceProviderId_; serviceName_ = other.serviceName_; @@ -4382,6 +7023,7 @@ public SsoCloudLogRequest(SsoCloudLogRequest other) : this() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SsoCloudLogRequest Clone() { return new SsoCloudLogRequest(this); } @@ -4393,6 +7035,7 @@ public SsoCloudLogRequest Clone() { /// The ID of the service provider /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public ulong SsoServiceProviderId { get { return ssoServiceProviderId_; } set { @@ -4407,6 +7050,7 @@ public ulong SsoServiceProviderId { /// Either the service name, such as "Cloud SSO Connect" /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public string ServiceName { get { return serviceName_; } set { @@ -4421,6 +7065,7 @@ public string ServiceName { /// Or the ID of the service, such as 1. /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public uint ServiceId { get { return serviceId_; } set { @@ -4429,11 +7074,13 @@ public uint ServiceId { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { return Equals(other as SsoCloudLogRequest); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public bool Equals(SsoCloudLogRequest other) { if (ReferenceEquals(other, null)) { return false; @@ -4448,6 +7095,7 @@ public bool Equals(SsoCloudLogRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; if (SsoServiceProviderId != 0UL) hash ^= SsoServiceProviderId.GetHashCode(); @@ -4460,12 +7108,17 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else if (SsoServiceProviderId != 0UL) { output.WriteRawTag(8); output.WriteUInt64(SsoServiceProviderId); @@ -4481,9 +7134,33 @@ public void WriteTo(pb::CodedOutputStream output) { if (_unknownFields != null) { _unknownFields.WriteTo(output); } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (SsoServiceProviderId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(SsoServiceProviderId); + } + if (ServiceName.Length != 0) { + output.WriteRawTag(18); + output.WriteString(ServiceName); + } + if (ServiceId != 0) { + output.WriteRawTag(24); + output.WriteUInt32(ServiceId); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; if (SsoServiceProviderId != 0UL) { @@ -4502,6 +7179,7 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(SsoCloudLogRequest other) { if (other == null) { return; @@ -4519,10 +7197,18 @@ public void MergeFrom(SsoCloudLogRequest other) { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; @@ -4540,7 +7226,39 @@ public void MergeFrom(pb::CodedInputStream input) { } } } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + SsoServiceProviderId = input.ReadUInt64(); + break; + } + case 18: { + ServiceName = input.ReadString(); + break; + } + case 24: { + ServiceId = input.ReadUInt32(); + break; + } + } + } } + #endif } @@ -4548,23 +7266,32 @@ public void MergeFrom(pb::CodedInputStream input) { ///* /// This is used internally by Cloud SSO. Clients do not use it. /// - public sealed partial class SamlRelayState : pb::IMessage { + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SamlRelayState : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SamlRelayState()); private pb::UnknownFieldSet _unknownFields; [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pb::MessageParser Parser { get { return _parser; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public static pbr::MessageDescriptor Descriptor { - get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[20]; } + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[22]; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] pbr::MessageDescriptor pb::IMessage.Descriptor { get { return Descriptor; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SamlRelayState() { OnConstruction(); } @@ -4572,6 +7299,7 @@ public SamlRelayState() { partial void OnConstruction(); [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public SamlRelayState(SamlRelayState other) : this() { messageSessionUid_ = other.messageSessionUid_; username_ = other.username_; @@ -4582,177 +7310,1632 @@ public SamlRelayState(SamlRelayState other) : this() { supportedLanguage_ = other.supportedLanguage_; checksum_ = other.checksum_; isGeneratedUid_ = other.isGeneratedUid_; + deviceId_ = other.deviceId_; + detached_ = other.detached_; _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public SamlRelayState Clone() { - return new SamlRelayState(this); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SamlRelayState Clone() { + return new SamlRelayState(this); + } + + /// Field number for the "messageSessionUid" field. + public const int MessageSessionUidFieldNumber = 1; + private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; + /// + /// Required, 16 bytes + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pb::ByteString MessageSessionUid { + get { return messageSessionUid_; } + set { + messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "username" field. + public const int UsernameFieldNumber = 2; + private string username_ = ""; + /// + /// Required for logout + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Username { + get { return username_; } + set { + username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "embedded" field. + public const int EmbeddedFieldNumber = 3; + private bool embedded_; + /// + /// If true, the login/logout result is embedded in a web page + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Embedded { + get { return embedded_; } + set { + embedded_ = value; + } + } + + /// Field number for the "json" field. + public const int JsonFieldNumber = 4; + private bool json_; + /// + /// If true, the login/logout result is returned as a JSON object + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Json { + get { return json_; } + set { + json_ = value; + } + } + + /// Field number for the "destId" field. + public const int DestIdFieldNumber = 5; + private uint destId_; + /// + /// ID of the dest: lookup from the DB on return. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint DestId { + get { return destId_; } + set { + destId_ = value; + } + } + + /// Field number for the "keyId" field. + public const int KeyIdFieldNumber = 6; + private int keyId_; + /// + /// Which transmission key is used + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int KeyId { + get { return keyId_; } + set { + keyId_ = value; + } + } + + /// Field number for the "supportedLanguage" field. + public const int SupportedLanguageFieldNumber = 7; + private global::Authentication.SupportedLanguage supportedLanguage_ = global::Authentication.SupportedLanguage.English; + /// + /// Passed in by the caller, or defaults to English + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public global::Authentication.SupportedLanguage SupportedLanguage { + get { return supportedLanguage_; } + set { + supportedLanguage_ = value; + } + } + + /// Field number for the "checksum" field. + public const int ChecksumFieldNumber = 8; + private ulong checksum_; + /// + /// Used to verify contents after transmission + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong Checksum { + get { return checksum_; } + set { + checksum_ = value; + } + } + + /// Field number for the "isGeneratedUid" field. + public const int IsGeneratedUidFieldNumber = 9; + private bool isGeneratedUid_; + /// + /// Used if the messageSessionUid was generated by Keeper rather than the client + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsGeneratedUid { + get { return isGeneratedUid_; } + set { + isGeneratedUid_ = value; + } + } + + /// Field number for the "deviceId" field. + public const int DeviceIdFieldNumber = 10; + private long deviceId_; + /// + /// Used to differentiate different login attempts by the same user + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public long DeviceId { + get { return deviceId_; } + set { + deviceId_ = value; + } + } + + /// Field number for the "detached" field. + public const int DetachedFieldNumber = 11; + private bool detached_; + /// + /// Whether the HTML page is "detached" from the login process, as in Commander or other CLI clients + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Detached { + get { return detached_; } + set { + detached_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SamlRelayState); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SamlRelayState other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (MessageSessionUid != other.MessageSessionUid) return false; + if (Username != other.Username) return false; + if (Embedded != other.Embedded) return false; + if (Json != other.Json) return false; + if (DestId != other.DestId) return false; + if (KeyId != other.KeyId) return false; + if (SupportedLanguage != other.SupportedLanguage) return false; + if (Checksum != other.Checksum) return false; + if (IsGeneratedUid != other.IsGeneratedUid) return false; + if (DeviceId != other.DeviceId) return false; + if (Detached != other.Detached) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); + if (Username.Length != 0) hash ^= Username.GetHashCode(); + if (Embedded != false) hash ^= Embedded.GetHashCode(); + if (Json != false) hash ^= Json.GetHashCode(); + if (DestId != 0) hash ^= DestId.GetHashCode(); + if (KeyId != 0) hash ^= KeyId.GetHashCode(); + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) hash ^= SupportedLanguage.GetHashCode(); + if (Checksum != 0UL) hash ^= Checksum.GetHashCode(); + if (IsGeneratedUid != false) hash ^= IsGeneratedUid.GetHashCode(); + if (DeviceId != 0L) hash ^= DeviceId.GetHashCode(); + if (Detached != false) hash ^= Detached.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (Embedded != false) { + output.WriteRawTag(24); + output.WriteBool(Embedded); + } + if (Json != false) { + output.WriteRawTag(32); + output.WriteBool(Json); + } + if (DestId != 0) { + output.WriteRawTag(40); + output.WriteUInt32(DestId); + } + if (KeyId != 0) { + output.WriteRawTag(48); + output.WriteInt32(KeyId); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + output.WriteRawTag(56); + output.WriteEnum((int) SupportedLanguage); + } + if (Checksum != 0UL) { + output.WriteRawTag(64); + output.WriteUInt64(Checksum); + } + if (IsGeneratedUid != false) { + output.WriteRawTag(72); + output.WriteBool(IsGeneratedUid); + } + if (DeviceId != 0L) { + output.WriteRawTag(80); + output.WriteInt64(DeviceId); + } + if (Detached != false) { + output.WriteRawTag(88); + output.WriteBool(Detached); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (MessageSessionUid.Length != 0) { + output.WriteRawTag(10); + output.WriteBytes(MessageSessionUid); + } + if (Username.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Username); + } + if (Embedded != false) { + output.WriteRawTag(24); + output.WriteBool(Embedded); + } + if (Json != false) { + output.WriteRawTag(32); + output.WriteBool(Json); + } + if (DestId != 0) { + output.WriteRawTag(40); + output.WriteUInt32(DestId); + } + if (KeyId != 0) { + output.WriteRawTag(48); + output.WriteInt32(KeyId); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + output.WriteRawTag(56); + output.WriteEnum((int) SupportedLanguage); + } + if (Checksum != 0UL) { + output.WriteRawTag(64); + output.WriteUInt64(Checksum); + } + if (IsGeneratedUid != false) { + output.WriteRawTag(72); + output.WriteBool(IsGeneratedUid); + } + if (DeviceId != 0L) { + output.WriteRawTag(80); + output.WriteInt64(DeviceId); + } + if (Detached != false) { + output.WriteRawTag(88); + output.WriteBool(Detached); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (MessageSessionUid.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); + } + if (Username.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); + } + if (Embedded != false) { + size += 1 + 1; + } + if (Json != false) { + size += 1 + 1; + } + if (DestId != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DestId); + } + if (KeyId != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(KeyId); + } + if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { + size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SupportedLanguage); + } + if (Checksum != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Checksum); + } + if (IsGeneratedUid != false) { + size += 1 + 1; + } + if (DeviceId != 0L) { + size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeviceId); + } + if (Detached != false) { + size += 1 + 1; + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SamlRelayState other) { + if (other == null) { + return; + } + if (other.MessageSessionUid.Length != 0) { + MessageSessionUid = other.MessageSessionUid; + } + if (other.Username.Length != 0) { + Username = other.Username; + } + if (other.Embedded != false) { + Embedded = other.Embedded; + } + if (other.Json != false) { + Json = other.Json; + } + if (other.DestId != 0) { + DestId = other.DestId; + } + if (other.KeyId != 0) { + KeyId = other.KeyId; + } + if (other.SupportedLanguage != global::Authentication.SupportedLanguage.English) { + SupportedLanguage = other.SupportedLanguage; + } + if (other.Checksum != 0UL) { + Checksum = other.Checksum; + } + if (other.IsGeneratedUid != false) { + IsGeneratedUid = other.IsGeneratedUid; + } + if (other.DeviceId != 0L) { + DeviceId = other.DeviceId; + } + if (other.Detached != false) { + Detached = other.Detached; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 24: { + Embedded = input.ReadBool(); + break; + } + case 32: { + Json = input.ReadBool(); + break; + } + case 40: { + DestId = input.ReadUInt32(); + break; + } + case 48: { + KeyId = input.ReadInt32(); + break; + } + case 56: { + SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + break; + } + case 64: { + Checksum = input.ReadUInt64(); + break; + } + case 72: { + IsGeneratedUid = input.ReadBool(); + break; + } + case 80: { + DeviceId = input.ReadInt64(); + break; + } + case 88: { + Detached = input.ReadBool(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 10: { + MessageSessionUid = input.ReadBytes(); + break; + } + case 18: { + Username = input.ReadString(); + break; + } + case 24: { + Embedded = input.ReadBool(); + break; + } + case 32: { + Json = input.ReadBool(); + break; + } + case 40: { + DestId = input.ReadUInt32(); + break; + } + case 48: { + KeyId = input.ReadInt32(); + break; + } + case 56: { + SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + break; + } + case 64: { + Checksum = input.ReadUInt64(); + break; + } + case 72: { + IsGeneratedUid = input.ReadBool(); + break; + } + case 80: { + DeviceId = input.ReadInt64(); + break; + } + case 88: { + Detached = input.ReadBool(); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// This is used when migrating from SSO Connect to SSO Connect Cloud. + /// This retrieves the current status of the migration. + /// + /// If fullStatus == false but limit == 0, a default limit (probably 25) will be used. + /// + /// Example 1: (nodeId=123, fullStatus=true, includeMigratedUsers=true, limit=any). ALL users, migrated and unmigrated, will be returned. + /// Example 2: (nodeId=123, fullStatus=true, includeMigratedUsers=false, limit=any). ALL unmigrated users will be returned. + /// Example 3: (nodeId=123, fullStatus=false, includeMigratedUsers=true, limit=-1). No users will be returned + /// Example 4: (nodeId=123, fullStatus=false, includeMigratedUsers=true, limit=0). The first 25 users of each type, migrated and unmigrated, will be returned. + /// Example 5: (nodeId=123, fullStatus=false, includeMigratedUsers=false, limit=0). The first 25 unmigrated users will be returned. + /// Example 6: (nodeId=123, fullStatus=false, includeMigratedUsers=false, limit=15). The first 15 unmigrated users will be returned. + /// Example 7: (nodeId=123, fullStatus=false, includeMigratedUsers=false, limit=-1). Just stats will be returned, no users will be returned. + /// + /// @see SsoCloudMigrationStatusResponse + /// @since MH: 2022-01-11 + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudMigrationStatusRequest : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudMigrationStatusRequest()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[23]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationStatusRequest() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationStatusRequest(SsoCloudMigrationStatusRequest other) : this() { + nodeId_ = other.nodeId_; + fullStatus_ = other.fullStatus_; + includeMigratedUsers_ = other.includeMigratedUsers_; + limit_ = other.limit_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationStatusRequest Clone() { + return new SsoCloudMigrationStatusRequest(this); + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 1; + private ulong nodeId_; + /// + /// Required. The node being queried. It should have an SSO migration in process. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "fullStatus" field. + public const int FullStatusFieldNumber = 2; + private bool fullStatus_; + /// + /// If true, the full status will be returned, including a list of all unmigrated users - beware this could be large! + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool FullStatus { + get { return fullStatus_; } + set { + fullStatus_ = value; + } + } + + /// Field number for the "includeMigratedUsers" field. + public const int IncludeMigratedUsersFieldNumber = 3; + private bool includeMigratedUsers_; + /// + /// If true, the list of migrated users will also be returned. This applies to both regular status and full status. Default is false. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IncludeMigratedUsers { + get { return includeMigratedUsers_; } + set { + includeMigratedUsers_ = value; + } + } + + /// Field number for the "limit" field. + public const int LimitFieldNumber = 4; + private int limit_; + /// + /// Return, say, the first 50 migrated and/or unmigrated users. 0 means use the default (25). -1 means don't return any. Ignored if fullStatus is true. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int Limit { + get { return limit_; } + set { + limit_ = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoCloudMigrationStatusRequest); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudMigrationStatusRequest other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (NodeId != other.NodeId) return false; + if (FullStatus != other.FullStatus) return false; + if (IncludeMigratedUsers != other.IncludeMigratedUsers) return false; + if (Limit != other.Limit) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (NodeId != 0UL) hash ^= NodeId.GetHashCode(); + if (FullStatus != false) hash ^= FullStatus.GetHashCode(); + if (IncludeMigratedUsers != false) hash ^= IncludeMigratedUsers.GetHashCode(); + if (Limit != 0) hash ^= Limit.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (NodeId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(NodeId); + } + if (FullStatus != false) { + output.WriteRawTag(16); + output.WriteBool(FullStatus); + } + if (IncludeMigratedUsers != false) { + output.WriteRawTag(24); + output.WriteBool(IncludeMigratedUsers); + } + if (Limit != 0) { + output.WriteRawTag(32); + output.WriteInt32(Limit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (NodeId != 0UL) { + output.WriteRawTag(8); + output.WriteUInt64(NodeId); + } + if (FullStatus != false) { + output.WriteRawTag(16); + output.WriteBool(FullStatus); + } + if (IncludeMigratedUsers != false) { + output.WriteRawTag(24); + output.WriteBool(IncludeMigratedUsers); + } + if (Limit != 0) { + output.WriteRawTag(32); + output.WriteInt32(Limit); + } + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (NodeId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(NodeId); + } + if (FullStatus != false) { + size += 1 + 1; + } + if (IncludeMigratedUsers != false) { + size += 1 + 1; + } + if (Limit != 0) { + size += 1 + pb::CodedOutputStream.ComputeInt32Size(Limit); + } + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudMigrationStatusRequest other) { + if (other == null) { + return; + } + if (other.NodeId != 0UL) { + NodeId = other.NodeId; + } + if (other.FullStatus != false) { + FullStatus = other.FullStatus; + } + if (other.IncludeMigratedUsers != false) { + IncludeMigratedUsers = other.IncludeMigratedUsers; + } + if (other.Limit != 0) { + Limit = other.Limit; + } + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + NodeId = input.ReadUInt64(); + break; + } + case 16: { + FullStatus = input.ReadBool(); + break; + } + case 24: { + IncludeMigratedUsers = input.ReadBool(); + break; + } + case 32: { + Limit = input.ReadInt32(); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + NodeId = input.ReadUInt64(); + break; + } + case 16: { + FullStatus = input.ReadBool(); + break; + } + case 24: { + IncludeMigratedUsers = input.ReadBool(); + break; + } + case 32: { + Limit = input.ReadInt32(); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// Returns the status of an SSO Connect migration in progress. + /// If there is an error, success will be false and message will contain an error message. + /// User records will be sorted by last name. + /// + /// @see SsoCloudMigrationStatusRequest + /// @since MH: 2022-01-11 + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudMigrationStatusResponse : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudMigrationStatusResponse()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[24]; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationStatusResponse() { + OnConstruction(); + } + + partial void OnConstruction(); + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationStatusResponse(SsoCloudMigrationStatusResponse other) : this() { + success_ = other.success_; + message_ = other.message_; + nodeId_ = other.nodeId_; + ssoConnectId_ = other.ssoConnectId_; + ssoConnectName_ = other.ssoConnectName_; + ssoConnectCloudId_ = other.ssoConnectCloudId_; + ssoConnectCloudName_ = other.ssoConnectCloudName_; + totalUsersCount_ = other.totalUsersCount_; + usersMigratedCount_ = other.usersMigratedCount_; + migratedUsers_ = other.migratedUsers_.Clone(); + unmigratedUsers_ = other.unmigratedUsers_.Clone(); + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationStatusResponse Clone() { + return new SsoCloudMigrationStatusResponse(this); + } + + /// Field number for the "success" field. + public const int SuccessFieldNumber = 1; + private bool success_; + /// + /// If true, the call was successful. Otherwise check the message field. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Success { + get { return success_; } + set { + success_ = value; + } + } + + /// Field number for the "message" field. + public const int MessageFieldNumber = 2; + private string message_ = ""; + /// + /// Contains an error message if there was an error. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Message { + get { return message_; } + set { + message_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "nodeId" field. + public const int NodeIdFieldNumber = 3; + private ulong nodeId_; + /// + /// ID of the node being queried. + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong NodeId { + get { return nodeId_; } + set { + nodeId_ = value; + } + } + + /// Field number for the "ssoConnectId" field. + public const int SsoConnectIdFieldNumber = 4; + private ulong ssoConnectId_; + /// + /// ID of the SSO Connect on-premise service provider + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoConnectId { + get { return ssoConnectId_; } + set { + ssoConnectId_ = value; + } + } + + /// Field number for the "ssoConnectName" field. + public const int SsoConnectNameFieldNumber = 5; + private string ssoConnectName_ = ""; + /// + /// Name of the SSO Connect on-premise service provider + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SsoConnectName { + get { return ssoConnectName_; } + set { + ssoConnectName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "ssoConnectCloudId" field. + public const int SsoConnectCloudIdFieldNumber = 6; + private ulong ssoConnectCloudId_; + /// + /// ID of the SSO Connect Cloud service provider + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public ulong SsoConnectCloudId { + get { return ssoConnectCloudId_; } + set { + ssoConnectCloudId_ = value; + } + } + + /// Field number for the "ssoConnectCloudName" field. + public const int SsoConnectCloudNameFieldNumber = 7; + private string ssoConnectCloudName_ = ""; + /// + /// Name of the SSO Connect Cloud service provider + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string SsoConnectCloudName { + get { return ssoConnectCloudName_; } + set { + ssoConnectCloudName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); + } + } + + /// Field number for the "totalUsersCount" field. + public const int TotalUsersCountFieldNumber = 8; + private uint totalUsersCount_; + /// + /// The number of users serviced by this node + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint TotalUsersCount { + get { return totalUsersCount_; } + set { + totalUsersCount_ = value; + } + } + + /// Field number for the "usersMigratedCount" field. + public const int UsersMigratedCountFieldNumber = 9; + private uint usersMigratedCount_; + /// + /// The number of users who have migrated + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint UsersMigratedCount { + get { return usersMigratedCount_; } + set { + usersMigratedCount_ = value; + } + } + + /// Field number for the "migratedUsers" field. + public const int MigratedUsersFieldNumber = 10; + private static readonly pb::FieldCodec _repeated_migratedUsers_codec + = pb::FieldCodec.ForMessage(82, global::SsoCloud.SsoCloudMigrationUserInfo.Parser); + private readonly pbc::RepeatedField migratedUsers_ = new pbc::RepeatedField(); + /// + /// The list of migrated users, can be constrained via the limit parameter in the request + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField MigratedUsers { + get { return migratedUsers_; } + } + + /// Field number for the "unmigratedUsers" field. + public const int UnmigratedUsersFieldNumber = 11; + private static readonly pb::FieldCodec _repeated_unmigratedUsers_codec + = pb::FieldCodec.ForMessage(90, global::SsoCloud.SsoCloudMigrationUserInfo.Parser); + private readonly pbc::RepeatedField unmigratedUsers_ = new pbc::RepeatedField(); + /// + /// The list of unmigrated users, can be constrained via the limit parameter in the request + /// + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public pbc::RepeatedField UnmigratedUsers { + get { return unmigratedUsers_; } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override bool Equals(object other) { + return Equals(other as SsoCloudMigrationStatusResponse); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudMigrationStatusResponse other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Success != other.Success) return false; + if (Message != other.Message) return false; + if (NodeId != other.NodeId) return false; + if (SsoConnectId != other.SsoConnectId) return false; + if (SsoConnectName != other.SsoConnectName) return false; + if (SsoConnectCloudId != other.SsoConnectCloudId) return false; + if (SsoConnectCloudName != other.SsoConnectCloudName) return false; + if (TotalUsersCount != other.TotalUsersCount) return false; + if (UsersMigratedCount != other.UsersMigratedCount) return false; + if(!migratedUsers_.Equals(other.migratedUsers_)) return false; + if(!unmigratedUsers_.Equals(other.unmigratedUsers_)) return false; + return Equals(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override int GetHashCode() { + int hash = 1; + if (Success != false) hash ^= Success.GetHashCode(); + if (Message.Length != 0) hash ^= Message.GetHashCode(); + if (NodeId != 0UL) hash ^= NodeId.GetHashCode(); + if (SsoConnectId != 0UL) hash ^= SsoConnectId.GetHashCode(); + if (SsoConnectName.Length != 0) hash ^= SsoConnectName.GetHashCode(); + if (SsoConnectCloudId != 0UL) hash ^= SsoConnectCloudId.GetHashCode(); + if (SsoConnectCloudName.Length != 0) hash ^= SsoConnectCloudName.GetHashCode(); + if (TotalUsersCount != 0) hash ^= TotalUsersCount.GetHashCode(); + if (UsersMigratedCount != 0) hash ^= UsersMigratedCount.GetHashCode(); + hash ^= migratedUsers_.GetHashCode(); + hash ^= unmigratedUsers_.GetHashCode(); + if (_unknownFields != null) { + hash ^= _unknownFields.GetHashCode(); + } + return hash; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void WriteTo(pb::CodedOutputStream output) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (NodeId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(NodeId); + } + if (SsoConnectId != 0UL) { + output.WriteRawTag(32); + output.WriteUInt64(SsoConnectId); + } + if (SsoConnectName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(SsoConnectName); + } + if (SsoConnectCloudId != 0UL) { + output.WriteRawTag(48); + output.WriteUInt64(SsoConnectCloudId); + } + if (SsoConnectCloudName.Length != 0) { + output.WriteRawTag(58); + output.WriteString(SsoConnectCloudName); + } + if (TotalUsersCount != 0) { + output.WriteRawTag(64); + output.WriteUInt32(TotalUsersCount); + } + if (UsersMigratedCount != 0) { + output.WriteRawTag(72); + output.WriteUInt32(UsersMigratedCount); + } + migratedUsers_.WriteTo(output, _repeated_migratedUsers_codec); + unmigratedUsers_.WriteTo(output, _repeated_unmigratedUsers_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (Success != false) { + output.WriteRawTag(8); + output.WriteBool(Success); + } + if (Message.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Message); + } + if (NodeId != 0UL) { + output.WriteRawTag(24); + output.WriteUInt64(NodeId); + } + if (SsoConnectId != 0UL) { + output.WriteRawTag(32); + output.WriteUInt64(SsoConnectId); + } + if (SsoConnectName.Length != 0) { + output.WriteRawTag(42); + output.WriteString(SsoConnectName); + } + if (SsoConnectCloudId != 0UL) { + output.WriteRawTag(48); + output.WriteUInt64(SsoConnectCloudId); + } + if (SsoConnectCloudName.Length != 0) { + output.WriteRawTag(58); + output.WriteString(SsoConnectCloudName); + } + if (TotalUsersCount != 0) { + output.WriteRawTag(64); + output.WriteUInt32(TotalUsersCount); + } + if (UsersMigratedCount != 0) { + output.WriteRawTag(72); + output.WriteUInt32(UsersMigratedCount); + } + migratedUsers_.WriteTo(ref output, _repeated_migratedUsers_codec); + unmigratedUsers_.WriteTo(ref output, _repeated_unmigratedUsers_codec); + if (_unknownFields != null) { + _unknownFields.WriteTo(ref output); + } + } + #endif + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public int CalculateSize() { + int size = 0; + if (Success != false) { + size += 1 + 1; + } + if (Message.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Message); + } + if (NodeId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(NodeId); + } + if (SsoConnectId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoConnectId); + } + if (SsoConnectName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SsoConnectName); + } + if (SsoConnectCloudId != 0UL) { + size += 1 + pb::CodedOutputStream.ComputeUInt64Size(SsoConnectCloudId); + } + if (SsoConnectCloudName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(SsoConnectCloudName); + } + if (TotalUsersCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(TotalUsersCount); + } + if (UsersMigratedCount != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UsersMigratedCount); + } + size += migratedUsers_.CalculateSize(_repeated_migratedUsers_codec); + size += unmigratedUsers_.CalculateSize(_repeated_unmigratedUsers_codec); + if (_unknownFields != null) { + size += _unknownFields.CalculateSize(); + } + return size; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudMigrationStatusResponse other) { + if (other == null) { + return; + } + if (other.Success != false) { + Success = other.Success; + } + if (other.Message.Length != 0) { + Message = other.Message; + } + if (other.NodeId != 0UL) { + NodeId = other.NodeId; + } + if (other.SsoConnectId != 0UL) { + SsoConnectId = other.SsoConnectId; + } + if (other.SsoConnectName.Length != 0) { + SsoConnectName = other.SsoConnectName; + } + if (other.SsoConnectCloudId != 0UL) { + SsoConnectCloudId = other.SsoConnectCloudId; + } + if (other.SsoConnectCloudName.Length != 0) { + SsoConnectCloudName = other.SsoConnectCloudName; + } + if (other.TotalUsersCount != 0) { + TotalUsersCount = other.TotalUsersCount; + } + if (other.UsersMigratedCount != 0) { + UsersMigratedCount = other.UsersMigratedCount; + } + migratedUsers_.Add(other.migratedUsers_); + unmigratedUsers_.Add(other.unmigratedUsers_); + _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadUInt64(); + break; + } + case 32: { + SsoConnectId = input.ReadUInt64(); + break; + } + case 42: { + SsoConnectName = input.ReadString(); + break; + } + case 48: { + SsoConnectCloudId = input.ReadUInt64(); + break; + } + case 58: { + SsoConnectCloudName = input.ReadString(); + break; + } + case 64: { + TotalUsersCount = input.ReadUInt32(); + break; + } + case 72: { + UsersMigratedCount = input.ReadUInt32(); + break; + } + case 82: { + migratedUsers_.AddEntriesFrom(input, _repeated_migratedUsers_codec); + break; + } + case 90: { + unmigratedUsers_.AddEntriesFrom(input, _repeated_unmigratedUsers_codec); + break; + } + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); + break; + case 8: { + Success = input.ReadBool(); + break; + } + case 18: { + Message = input.ReadString(); + break; + } + case 24: { + NodeId = input.ReadUInt64(); + break; + } + case 32: { + SsoConnectId = input.ReadUInt64(); + break; + } + case 42: { + SsoConnectName = input.ReadString(); + break; + } + case 48: { + SsoConnectCloudId = input.ReadUInt64(); + break; + } + case 58: { + SsoConnectCloudName = input.ReadString(); + break; + } + case 64: { + TotalUsersCount = input.ReadUInt32(); + break; + } + case 72: { + UsersMigratedCount = input.ReadUInt32(); + break; + } + case 82: { + migratedUsers_.AddEntriesFrom(ref input, _repeated_migratedUsers_codec); + break; + } + case 90: { + unmigratedUsers_.AddEntriesFrom(ref input, _repeated_unmigratedUsers_codec); + break; + } + } + } + } + #endif + + } + + /// + ///* + /// @since MH: 2022-01-11 + /// + [global::System.Diagnostics.DebuggerDisplayAttribute("{ToString(),nq}")] + public sealed partial class SsoCloudMigrationUserInfo : pb::IMessage + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + , pb::IBufferMessage + #endif + { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new SsoCloudMigrationUserInfo()); + private pb::UnknownFieldSet _unknownFields; + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pb::MessageParser Parser { get { return _parser; } } - /// Field number for the "messageSessionUid" field. - public const int MessageSessionUidFieldNumber = 1; - private pb::ByteString messageSessionUid_ = pb::ByteString.Empty; - /// - /// Required, 16 bytes - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public pb::ByteString MessageSessionUid { - get { return messageSessionUid_; } - set { - messageSessionUid_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public static pbr::MessageDescriptor Descriptor { + get { return global::SsoCloud.SsocloudReflection.Descriptor.MessageTypes[25]; } } - /// Field number for the "username" field. - public const int UsernameFieldNumber = 2; - private string username_ = ""; - /// - /// Required for logout - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public string Username { - get { return username_; } - set { - username_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } } - /// Field number for the "embedded" field. - public const int EmbeddedFieldNumber = 3; - private bool embedded_; - /// - /// If true, the login/logout result is embedded in a web page - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Embedded { - get { return embedded_; } - set { - embedded_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationUserInfo() { + OnConstruction(); } - /// Field number for the "json" field. - public const int JsonFieldNumber = 4; - private bool json_; - /// - /// If true, the login/logout result is returned as a JSON object - /// + partial void OnConstruction(); + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Json { - get { return json_; } - set { - json_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationUserInfo(SsoCloudMigrationUserInfo other) : this() { + userId_ = other.userId_; + email_ = other.email_; + fullName_ = other.fullName_; + isMigrated_ = other.isMigrated_; + _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields); } - /// Field number for the "destId" field. - public const int DestIdFieldNumber = 5; - private uint destId_; - /// - /// ID of the dest: lookup from the DB on return. - /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public uint DestId { - get { return destId_; } - set { - destId_ = value; - } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public SsoCloudMigrationUserInfo Clone() { + return new SsoCloudMigrationUserInfo(this); } - /// Field number for the "keyId" field. - public const int KeyIdFieldNumber = 6; - private int keyId_; + /// Field number for the "userId" field. + public const int UserIdFieldNumber = 1; + private uint userId_; /// - /// Which transmission key is used + /// The user ID of the user /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public int KeyId { - get { return keyId_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public uint UserId { + get { return userId_; } set { - keyId_ = value; + userId_ = value; } } - /// Field number for the "supportedLanguage" field. - public const int SupportedLanguageFieldNumber = 7; - private global::Authentication.SupportedLanguage supportedLanguage_ = global::Authentication.SupportedLanguage.English; + /// Field number for the "email" field. + public const int EmailFieldNumber = 2; + private string email_ = ""; /// - /// Passed in by the caller, or defaults to English + /// The primary email address of the user /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public global::Authentication.SupportedLanguage SupportedLanguage { - get { return supportedLanguage_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string Email { + get { return email_; } set { - supportedLanguage_ = value; + email_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "checksum" field. - public const int ChecksumFieldNumber = 8; - private ulong checksum_; + /// Field number for the "fullName" field. + public const int FullNameFieldNumber = 3; + private string fullName_ = ""; /// - /// Used to verify contents after transmission + /// The full name of the user /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public ulong Checksum { - get { return checksum_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public string FullName { + get { return fullName_; } set { - checksum_ = value; + fullName_ = pb::ProtoPreconditions.CheckNotNull(value, "value"); } } - /// Field number for the "isGeneratedUid" field. - public const int IsGeneratedUidFieldNumber = 9; - private bool isGeneratedUid_; + /// Field number for the "isMigrated" field. + public const int IsMigratedFieldNumber = 4; + private bool isMigrated_; /// - /// Used if the messageSessionUid was generated by Keeper rather than the client + /// Whether the user has migrated to SSO Cloud /// [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool IsGeneratedUid { - get { return isGeneratedUid_; } + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool IsMigrated { + get { return isMigrated_; } set { - isGeneratedUid_ = value; + isMigrated_ = value; } } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override bool Equals(object other) { - return Equals(other as SamlRelayState); + return Equals(other as SsoCloudMigrationUserInfo); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public bool Equals(SamlRelayState other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public bool Equals(SsoCloudMigrationUserInfo other) { if (ReferenceEquals(other, null)) { return false; } if (ReferenceEquals(other, this)) { return true; } - if (MessageSessionUid != other.MessageSessionUid) return false; - if (Username != other.Username) return false; - if (Embedded != other.Embedded) return false; - if (Json != other.Json) return false; - if (DestId != other.DestId) return false; - if (KeyId != other.KeyId) return false; - if (SupportedLanguage != other.SupportedLanguage) return false; - if (Checksum != other.Checksum) return false; - if (IsGeneratedUid != other.IsGeneratedUid) return false; + if (UserId != other.UserId) return false; + if (Email != other.Email) return false; + if (FullName != other.FullName) return false; + if (IsMigrated != other.IsMigrated) return false; return Equals(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override int GetHashCode() { int hash = 1; - if (MessageSessionUid.Length != 0) hash ^= MessageSessionUid.GetHashCode(); - if (Username.Length != 0) hash ^= Username.GetHashCode(); - if (Embedded != false) hash ^= Embedded.GetHashCode(); - if (Json != false) hash ^= Json.GetHashCode(); - if (DestId != 0) hash ^= DestId.GetHashCode(); - if (KeyId != 0) hash ^= KeyId.GetHashCode(); - if (SupportedLanguage != global::Authentication.SupportedLanguage.English) hash ^= SupportedLanguage.GetHashCode(); - if (Checksum != 0UL) hash ^= Checksum.GetHashCode(); - if (IsGeneratedUid != false) hash ^= IsGeneratedUid.GetHashCode(); + if (UserId != 0) hash ^= UserId.GetHashCode(); + if (Email.Length != 0) hash ^= Email.GetHashCode(); + if (FullName.Length != 0) hash ^= FullName.GetHashCode(); + if (IsMigrated != false) hash ^= IsMigrated.GetHashCode(); if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } @@ -4760,81 +8943,79 @@ public override int GetHashCode() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public override string ToString() { return pb::JsonFormatter.ToDiagnosticString(this); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void WriteTo(pb::CodedOutputStream output) { - if (MessageSessionUid.Length != 0) { - output.WriteRawTag(10); - output.WriteBytes(MessageSessionUid); + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + output.WriteRawMessage(this); + #else + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(UserId); } - if (Username.Length != 0) { + if (Email.Length != 0) { output.WriteRawTag(18); - output.WriteString(Username); + output.WriteString(Email); } - if (Embedded != false) { - output.WriteRawTag(24); - output.WriteBool(Embedded); + if (FullName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(FullName); } - if (Json != false) { + if (IsMigrated != false) { output.WriteRawTag(32); - output.WriteBool(Json); + output.WriteBool(IsMigrated); } - if (DestId != 0) { - output.WriteRawTag(40); - output.WriteUInt32(DestId); + if (_unknownFields != null) { + _unknownFields.WriteTo(output); } - if (KeyId != 0) { - output.WriteRawTag(48); - output.WriteInt32(KeyId); + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) { + if (UserId != 0) { + output.WriteRawTag(8); + output.WriteUInt32(UserId); } - if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { - output.WriteRawTag(56); - output.WriteEnum((int) SupportedLanguage); + if (Email.Length != 0) { + output.WriteRawTag(18); + output.WriteString(Email); } - if (Checksum != 0UL) { - output.WriteRawTag(64); - output.WriteUInt64(Checksum); + if (FullName.Length != 0) { + output.WriteRawTag(26); + output.WriteString(FullName); } - if (IsGeneratedUid != false) { - output.WriteRawTag(72); - output.WriteBool(IsGeneratedUid); + if (IsMigrated != false) { + output.WriteRawTag(32); + output.WriteBool(IsMigrated); } if (_unknownFields != null) { - _unknownFields.WriteTo(output); + _unknownFields.WriteTo(ref output); } } + #endif [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public int CalculateSize() { int size = 0; - if (MessageSessionUid.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeBytesSize(MessageSessionUid); - } - if (Username.Length != 0) { - size += 1 + pb::CodedOutputStream.ComputeStringSize(Username); - } - if (Embedded != false) { - size += 1 + 1; - } - if (Json != false) { - size += 1 + 1; - } - if (DestId != 0) { - size += 1 + pb::CodedOutputStream.ComputeUInt32Size(DestId); - } - if (KeyId != 0) { - size += 1 + pb::CodedOutputStream.ComputeInt32Size(KeyId); + if (UserId != 0) { + size += 1 + pb::CodedOutputStream.ComputeUInt32Size(UserId); } - if (SupportedLanguage != global::Authentication.SupportedLanguage.English) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) SupportedLanguage); + if (Email.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(Email); } - if (Checksum != 0UL) { - size += 1 + pb::CodedOutputStream.ComputeUInt64Size(Checksum); + if (FullName.Length != 0) { + size += 1 + pb::CodedOutputStream.ComputeStringSize(FullName); } - if (IsGeneratedUid != false) { + if (IsMigrated != false) { size += 1 + 1; } if (_unknownFields != null) { @@ -4844,87 +9025,97 @@ public int CalculateSize() { } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] - public void MergeFrom(SamlRelayState other) { + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + public void MergeFrom(SsoCloudMigrationUserInfo other) { if (other == null) { return; } - if (other.MessageSessionUid.Length != 0) { - MessageSessionUid = other.MessageSessionUid; - } - if (other.Username.Length != 0) { - Username = other.Username; - } - if (other.Embedded != false) { - Embedded = other.Embedded; - } - if (other.Json != false) { - Json = other.Json; - } - if (other.DestId != 0) { - DestId = other.DestId; - } - if (other.KeyId != 0) { - KeyId = other.KeyId; + if (other.UserId != 0) { + UserId = other.UserId; } - if (other.SupportedLanguage != global::Authentication.SupportedLanguage.English) { - SupportedLanguage = other.SupportedLanguage; + if (other.Email.Length != 0) { + Email = other.Email; } - if (other.Checksum != 0UL) { - Checksum = other.Checksum; + if (other.FullName.Length != 0) { + FullName = other.FullName; } - if (other.IsGeneratedUid != false) { - IsGeneratedUid = other.IsGeneratedUid; + if (other.IsMigrated != false) { + IsMigrated = other.IsMigrated; } _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields); } [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] public void MergeFrom(pb::CodedInputStream input) { + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + input.ReadRawMessage(this); + #else uint tag; while ((tag = input.ReadTag()) != 0) { - switch(tag) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { default: _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input); break; - case 10: { - MessageSessionUid = input.ReadBytes(); + case 8: { + UserId = input.ReadUInt32(); break; } case 18: { - Username = input.ReadString(); + Email = input.ReadString(); break; } - case 24: { - Embedded = input.ReadBool(); + case 26: { + FullName = input.ReadString(); break; } case 32: { - Json = input.ReadBool(); + IsMigrated = input.ReadBool(); break; } - case 40: { - DestId = input.ReadUInt32(); + } + } + #endif + } + + #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE + [global::System.Diagnostics.DebuggerNonUserCodeAttribute] + [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)] + void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + if ((tag & 7) == 4) { + // Abort on any end group tag. + return; + } + switch(tag) { + default: + _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input); break; - } - case 48: { - KeyId = input.ReadInt32(); + case 8: { + UserId = input.ReadUInt32(); break; } - case 56: { - SupportedLanguage = (global::Authentication.SupportedLanguage) input.ReadEnum(); + case 18: { + Email = input.ReadString(); break; } - case 64: { - Checksum = input.ReadUInt64(); + case 26: { + FullName = input.ReadString(); break; } - case 72: { - IsGeneratedUid = input.ReadBool(); + case 32: { + IsMigrated = input.ReadBool(); break; } } } } + #endif } diff --git a/KeeperSdk/utils/CredentialManager.cs b/KeeperSdk/utils/CredentialManager.cs index 329223d..9db0c8e 100644 --- a/KeeperSdk/utils/CredentialManager.cs +++ b/KeeperSdk/utils/CredentialManager.cs @@ -1,4 +1,4 @@ -#if NET45 +#if NET452_OR_GREATER using System; using System.Diagnostics; using System.Runtime.InteropServices; @@ -14,7 +14,7 @@ public static class CredentialManager { public static bool DeleteCredentials(string target) { -#if NET45 +#if NET452_OR_GREATER try { var permissions = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode); @@ -33,7 +33,7 @@ public static bool DeleteCredentials(string target) public static bool GetCredentials(string target, out string username, out string password) { -#if NET45 +#if NET452_OR_GREATER try { var permissions = new SecurityPermission(SecurityPermissionFlag.UnmanagedCode); @@ -67,7 +67,7 @@ public static bool GetCredentials(string target, out string username, out string public static bool PutCredentials(string target, string username, string password) { -#if NET45 +#if NET452_OR_GREATER if (password.Length > 512) { Debug.WriteLine("Credentials password is too long."); @@ -101,7 +101,7 @@ public static bool PutCredentials(string target, string username, string passwor #endif return false; } -#if NET45 +#if NET452_OR_GREATER [DllImport("Advapi32.dll", EntryPoint = "CredReadW", CharSet = CharSet.Unicode, SetLastError = true)] static extern bool CredRead(string target, int credentialType, int reservedFlag, out IntPtr credentialPtr); diff --git a/KeeperSdk/utils/CryptoUtils.cs b/KeeperSdk/utils/CryptoUtils.cs index a4e695e..6c78114 100644 --- a/KeeperSdk/utils/CryptoUtils.cs +++ b/KeeperSdk/utils/CryptoUtils.cs @@ -69,7 +69,12 @@ public static byte[] GenerateEncryptionKey() /// UID. 16 random bytes Base64 URL encoded. public static string GenerateUid() { - return GetRandomBytes(16).Base64UrlEncode(); + var uid = GetRandomBytes(16); + if ((uid[0] & 0xf8) == 0xf8) + { + uid[0] = (byte)(uid[0] & 0x7f); + } + return uid.Base64UrlEncode(); } /// @@ -297,7 +302,7 @@ public static byte[] CreateAuthVerifier(string password, byte[] salt, int iterat if (BitConverter.IsLittleEndian) Array.Reverse(iterationsBytes); var key = DeriveKeyV1(password, salt, iterations); - return new[] {versionBytes.Take(1), iterationsBytes.Skip(1), salt, key}.SelectMany(x => x).ToArray(); + return new[] { versionBytes.Take(1), iterationsBytes.Skip(1), salt, key }.SelectMany(x => x).ToArray(); } /// @@ -321,7 +326,7 @@ public static byte[] CreateEncryptionParams(string password, byte[] salt, int it len += cipher.ProcessBlock(dataKey, offset, outBuffer, len); } - return new[] {versionBytes.Take(1), iterationsBytes.Skip(1), salt, iv, outBuffer}.SelectMany(x => x) + return new[] { versionBytes.Take(1), iterationsBytes.Skip(1), salt, iv, outBuffer }.SelectMany(x => x) .ToArray(); } @@ -458,7 +463,7 @@ public static ECPrivateKeyParameters LoadPrivateEcKey(byte[] key) } /// - /// Load EC public key. + /// LoadV2 EC public key. /// /// public key bytes. /// EC public key @@ -514,7 +519,7 @@ internal static byte[] Base32ToBytes(string base32) const string alphabet = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"; var output = new List(); var bytes = base32.ToCharArray(); - for (var bitIndex = 0; bitIndex < base32.Length * 5; bitIndex += 8) + for (var bitIndex = 0; bitIndex / 5 + 1 < bytes.Length; bitIndex += 8) { var dualByte = alphabet.IndexOf(bytes[bitIndex / 5]) << 10; if (bitIndex / 5 + 1 < bytes.Length) @@ -586,6 +591,9 @@ public static Tuple GetTotpCode(string url) case "SHA256": hmac = new HMACSHA256(secretBytes); break; + case "SHA512": + hmac = new HMACSHA512(secretBytes); + break; case "MD5": hmac = new HMACMD5(secretBytes); break; @@ -607,6 +615,206 @@ public static Tuple GetTotpCode(string url) return Tuple.Create(codeStr, (int) (tmBase % period), period); } + + internal static void Shuffle(T[] array) + { + if (array?.Length >= 2) + { + var bigArray = array.Length > byte.MaxValue; + var randoms = GetRandomBytes(array.Length * (bigArray ? 4 : 1)); + for (var i = array.Length - 1; i >= 0; i--) + { + var random = bigArray ? (int) (BitConverter.ToUInt32(randoms, i * 4) & 0x7fffffff) : randoms[i]; + var j = random % array.Length; + if (i != j) + { + var ch = array[i]; + array[i] = array[j]; + array[j] = ch; + } + } + } + } + + /// + /// Special characters for password generator + /// + public static readonly string SPECIAL_CHARACTERS = "!@#$%()+;<>=?[]{}^.,"; + + /// + /// Generates random password. + /// + /// Password generation rules. Optional + /// Generated password + public static string GeneratePassword(PasswordGenerationOptions options = null) + { + const int LETTER_COUNT = 'z' - 'a' + 1; + + int length = options?.Length ?? 20; + int upper = options?.Upper ?? 4; + int lower = options?.Lower ?? 4; + int digit = options?.Digit ?? 2; + int special = options?.Special ?? -1; + + if (length <= 0) + { + length = 20; + } + if (upper < 0 && lower < 0 && digit < 0 && special < 0) + { + lower = length; + } + + var required = Math.Max(upper, 0) + Math.Max(lower, 0) + Math.Max(digit, 0) + Math.Max(special, 0); + var extra = required - length; + if (extra > 0) + { + var left = extra; + if (left > 0 && lower > 0) + { + var to_substract = (int) Math.Ceiling((float) lower / required * extra); + if (to_substract > 0) + { + to_substract = Math.Min(left, to_substract); + lower -= to_substract; + left -= to_substract; + } + } + if (left > 0 && upper > 0) + { + var to_substract = (int) Math.Ceiling((float) upper / required * extra); + if (to_substract > 0) + { + to_substract = Math.Min(left, to_substract); + upper -= to_substract; + left -= to_substract; + } + } + if (left > 0 && digit > 0) + { + var to_substract = (int) Math.Ceiling((float) digit / required * extra); + if (to_substract > 0) + { + to_substract = Math.Min(left, to_substract); + digit -= to_substract; + left -= to_substract; + } + } + if (left > 0 && special > 0) + { + var to_substract = (int) Math.Ceiling((float) special / required * extra); + if (to_substract > 0) + { + to_substract = Math.Min(left, to_substract); + special -= to_substract; + left -= to_substract; + } + } + Debug.Assert(left <= 0); + } + + required = Math.Max(upper, 0) + Math.Max(lower, 0) + Math.Max(digit, 0) + Math.Max(special, 0); + extra = length - required; + while (extra > 0) + { + if (extra > 0 && lower >= 0) + { + lower++; + extra--; + } + if (extra > 0 && upper >= 0) + { + upper++; + extra--; + } + if (extra > 0 && digit >= 0) + { + digit++; + extra--; + } + if (extra > 0 && special >= 0) + { + special++; + extra--; + } + } + + + var buffer = new char[length]; + var indexes = new int[length]; + for (var i = 0; i < indexes.Length; i++) + { + indexes[i] = i; + } + Shuffle(indexes); + var randoms = GetRandomBytes(length); + var sprecialCharacters = string.IsNullOrEmpty(options?.SpecialCharacters) ? SPECIAL_CHARACTERS : options.SpecialCharacters; + foreach (var pos in indexes) { + if (upper > 0) + { + buffer[pos] = (char) ('A' + (randoms[pos] % LETTER_COUNT)); + upper--; + } + else if (lower > 0) + { + buffer[pos] = (char) ('a' + (randoms[pos] % LETTER_COUNT)); + lower--; + } + else if (digit > 0) + { + buffer[pos] = (char) ('0' + (randoms[pos] % 10)); + digit--; + } + else if (special > 0) + { + buffer[pos] = sprecialCharacters[randoms[pos] % sprecialCharacters.Length]; + special--; + } + else + { + buffer[pos] = (char) ('a' + (randoms[pos] % LETTER_COUNT)); + } + } + + Shuffle(buffer); + return new string(buffer); + } + } + + /// + /// Defines password generation rules. + /// + public class PasswordGenerationOptions + { + /// + /// Password Length + /// + /// Default: 20 + public int Length { get; set; } + /// + /// Minimal number of lowercase characters. + /// + /// -1 to exclude lowercase characters + public int Lower { get; set; } + /// + /// Minimal number of uppercase characters. + /// + /// -1 to exclude uppercase characters + public int Upper { get; set; } + /// + /// Minimal number of digits + /// + /// -1 to exclude digits + public int Digit { get; set; } + /// + /// Minimal number of special characters + /// + /// -1 to exclude special characters + public int Special { get; set; } + /// + /// Special character vocabulary. + /// + public string SpecialCharacters { get; set; } } /// @@ -615,10 +823,11 @@ public class EncryptTransform : ICryptoTransform private readonly IBufferedCipher _cypher; private byte[] _tail; - public EncryptTransform(IBufferedCipher cypher, byte[] key) + public EncryptTransform(IBufferedCipher cypher, byte[] key, int ivSize = 0) { _cypher = cypher; - var iv = CryptoUtils.GetRandomBytes(cypher.GetBlockSize()); + + var iv = CryptoUtils.GetRandomBytes(ivSize > 0 ? ivSize : _cypher.GetBlockSize()); _cypher.Init(true, new ParametersWithIV(new KeyParameter(key), iv)); _tail = iv; EncryptedBytes = 0; @@ -647,7 +856,7 @@ public int TransformBlock(byte[] inputBuffer, var encrypted = _cypher.ProcessBytes(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset); if (_tail.Length > 0) { - if (_tail.Length <= outputBuffer.Length + outputOffset + encrypted) + if (_tail.Length <= outputBuffer.Length - (outputOffset + encrypted)) { Array.Copy(outputBuffer, outputOffset, outputBuffer, outputOffset + _tail.Length, encrypted); Array.Copy(_tail, 0, outputBuffer, outputOffset, _tail.Length); @@ -660,7 +869,7 @@ public int TransformBlock(byte[] inputBuffer, { var newTail = new byte[_tail.Length]; Array.Copy(outputBuffer, outputOffset + encrypted - _tail.Length, newTail, 0, _tail.Length); - Array.Copy(outputBuffer, outputOffset, outputBuffer, outputOffset + _tail.Length, encrypted); + Array.Copy(outputBuffer, outputOffset, outputBuffer, outputOffset + _tail.Length, encrypted - newTail.Length); Array.Copy(_tail, 0, outputBuffer, outputOffset, _tail.Length); _tail = newTail; } @@ -696,10 +905,11 @@ public class DecryptTransform : ICryptoTransform public readonly byte[] Key; private bool _initialized; - public DecryptTransform(IBufferedCipher cypher, byte[] key) + public DecryptTransform(IBufferedCipher cypher, byte[] key, int ivSize) { _cypher = cypher; Key = key; + _ivSize = ivSize > 0 ? ivSize : _cypher.GetBlockSize(); _initialized = false; DecryptedBytes = 0; } @@ -713,25 +923,32 @@ public DecryptTransform(IBufferedCipher cypher, byte[] key) public bool CanReuseTransform => false; + protected readonly int _ivSize; + public void Dispose() { } - public int TransformBlock(byte[] inputBuffer, - int inputOffset, - int inputCount, - byte[] outputBuffer, - int outputOffset) + private void EnsureInitialized(byte[] inputBuffer, ref int inputOffset, ref int inputCount) { if (!_initialized) { - var iv = new byte[_cypher.GetBlockSize()]; + var iv = new byte[_ivSize]; Array.Copy(inputBuffer, inputOffset, iv, 0, iv.Length); inputOffset += iv.Length; inputCount -= iv.Length; _cypher.Init(false, new ParametersWithIV(new KeyParameter(Key), iv)); _initialized = true; } + } + + public int TransformBlock(byte[] inputBuffer, + int inputOffset, + int inputCount, + byte[] outputBuffer, + int outputOffset) + { + EnsureInitialized(inputBuffer, ref inputOffset, ref inputCount); var res = _cypher.ProcessBytes(inputBuffer, inputOffset, inputCount, outputBuffer, outputOffset); DecryptedBytes += res; @@ -740,15 +957,7 @@ public int TransformBlock(byte[] inputBuffer, public byte[] TransformFinalBlock(byte[] inputBuffer, int inputOffset, int inputCount) { - if (!_initialized) - { - var iv = new byte[_cypher.GetBlockSize()]; - Array.Copy(inputBuffer, inputOffset, iv, 0, iv.Length); - inputOffset += iv.Length; - inputCount -= iv.Length; - _cypher.Init(false, new ParametersWithIV(new KeyParameter(Key), iv)); - _initialized = true; - } + EnsureInitialized(inputBuffer, ref inputOffset, ref inputCount); var res = _cypher.DoFinal(inputBuffer, inputOffset, inputCount); DecryptedBytes += res.LongLength; @@ -761,7 +970,7 @@ public class EncryptAesV1Transform : EncryptTransform { public EncryptAesV1Transform(byte[] key) : base( new PaddedBufferedBlockCipher(new CbcBlockCipher(new AesEngine()), new Pkcs7Padding()), - key) + key, 0) { } } @@ -771,7 +980,26 @@ public class DecryptAesV1Transform : DecryptTransform { public DecryptAesV1Transform(byte[] key) : base( new PaddedBufferedBlockCipher(new CbcBlockCipher(new AesEngine()), new Pkcs7Padding()), - key) + key, 0) + { + } + } + + + /// + public class EncryptAesV2Transform : EncryptTransform + { + public EncryptAesV2Transform(byte[] key) : base( + new BufferedAeadBlockCipher(new GcmBlockCipher(new AesEngine())), key, 12) + { + } + } + + /// + public class DecryptAesV2Transform : DecryptTransform + { + public DecryptAesV2Transform(byte[] key) : base( + new BufferedAeadBlockCipher(new GcmBlockCipher(new AesEngine())), key, 12) { } } diff --git a/KeeperSdk/utils/ExternalSchema.cs b/KeeperSdk/utils/ExternalSchema.cs index 83c03c5..8e75958 100644 --- a/KeeperSdk/utils/ExternalSchema.cs +++ b/KeeperSdk/utils/ExternalSchema.cs @@ -67,9 +67,9 @@ public SqlColumnAttribute() } /// - [SqlTable(Name = "Records", PrimaryKey = new [] { "RecordUid" })] + [SqlTable(Name = "Records", PrimaryKey = new[] { "RecordUid" })] [DataContract] - public class ExternalRecord : IEntity, IPasswordRecord, IEntityCopy + public class ExternalRecord : IEntity, IStorageRecord, IEntityCopy { [SqlColumn(Length = 32)] [DataMember(Name = "record_uid", EmitDefaultValue = false)] @@ -79,6 +79,10 @@ public class ExternalRecord : IEntity, IPasswordRecord, IEntityCopy RecordUid = value; } - public void CopyFields(IPasswordRecord source) + public void CopyFields(IStorageRecord source) { RecordUid = source.RecordUid; Revision = source.Revision; @@ -123,7 +127,7 @@ public void CopyFields(IPasswordRecord source) } /// - [SqlTable(Name = "RecordKeys", PrimaryKey = new[] { "RecordUid", "SharedFolderUid" }, Index1 = new [] { "SharedFolderUid" })] + [SqlTable(Name = "RecordKeys", PrimaryKey = new[] { "RecordUid", "SharedFolderUid" }, Index1 = new[] { "SharedFolderUid" })] [DataContract] public class ExternalRecordMetadata : IEntityLink, IRecordMetadata, IEntityCopy { @@ -251,7 +255,7 @@ public void CopyFields(ISharedFolder source) } /// - [SqlTable(Name = "SharedFolderKeys", PrimaryKey = new[] {"SharedFolderUid", "TeamUid"}, Index1 = new[] {"TeamUid"})] + [SqlTable(Name = "SharedFolderKeys", PrimaryKey = new[] { "SharedFolderUid", "TeamUid" }, Index1 = new[] { "TeamUid" })] [DataContract] public class ExternalSharedFolderKey : IEntityLink, ISharedFolderKey, IEntityCopy { @@ -447,7 +451,7 @@ public void CopyFields(IFolder source) } /// - [SqlTable(Name = "FolderRecords", PrimaryKey = new[] {"FolderUid", "RecordUid"}, Index1 = new[] {"RecordUid"})] + [SqlTable(Name = "FolderRecords", PrimaryKey = new[] { "FolderUid", "RecordUid" }, Index1 = new[] { "RecordUid" })] [DataContract] public class ExternalFolderRecordLink : IEntityLink, IFolderRecordLink, IEntityCopy { @@ -477,4 +481,56 @@ public void CopyFields(IFolderRecordLink source) RecordUid = source.RecordUid; } } + + /// + [SqlTable(Name = "RecordType", PrimaryKey = new[] { "RecordTypeUid" })] + [DataContract] + public class ExternalRecordType : IEntity, IRecordType, IEntityCopy + { + [SqlColumn(Length = 32)] + [DataMember(Name = "record_type_uid", EmitDefaultValue = false)] + public string RecordTypeUid { get; set; } + + [SqlColumn] + [DataMember(Name = "id")] + public int Id { get; set; } + + [SqlColumn] + [DataMember(Name = "type_scope", EmitDefaultValue = false)] + public int TypeScope { get; set; } + + [SqlColumn] + [DataMember(Name = "content", EmitDefaultValue = false)] + public string Content { get; set; } + + public string Uid + { + get => RecordTypeUid; + set => RecordTypeUid = value; + } + + RecordTypeScope IRecordType.Scope + { + get + { + switch (TypeScope) + { + case (int) RecordTypeScope.Standard: + return RecordTypeScope.Standard; + case (int) RecordTypeScope.Enterprise: + return RecordTypeScope.Enterprise; + default: + return RecordTypeScope.User; + } + } + } + + public void CopyFields(IRecordType source) + { + RecordTypeUid = source.Uid; + Id = source.Id; + TypeScope = (int) source.Scope; + Content = source.Content; + } + } } \ No newline at end of file diff --git a/KeeperSdk/utils/JsonUtils.cs b/KeeperSdk/utils/JsonUtils.cs index 93bed4b..b45f165 100644 --- a/KeeperSdk/utils/JsonUtils.cs +++ b/KeeperSdk/utils/JsonUtils.cs @@ -1,4 +1,6 @@ -using System.IO; +using System; +using System.Diagnostics; +using System.IO; using System.Runtime.Serialization; using System.Runtime.Serialization.Json; using System.Text; @@ -13,7 +15,7 @@ public static class JsonUtils internal static readonly DataContractJsonSerializerSettings JsonSettings = new DataContractJsonSerializerSettings { UseSimpleDictionaryFormat = true, - EmitTypeInformation = EmitTypeInformation.Never + EmitTypeInformation = EmitTypeInformation.Never, }; /// @@ -36,13 +38,14 @@ public static T ParseJson(byte[] json) /// /// Type of JSON object. /// JSON object. + /// Pretty print /// JSON data. - public static byte[] DumpJson(T obj) + public static byte[] DumpJson(T obj, bool indent = true) { var serializer = new DataContractJsonSerializer(typeof(T), JsonSettings); using (var ms = new MemoryStream()) { - using (var writer = JsonReaderWriterFactory.CreateJsonWriter(ms, Encoding.UTF8, false, true)) + using (var writer = JsonReaderWriterFactory.CreateJsonWriter(ms, Encoding.UTF8, false, indent)) { serializer.WriteObject(writer, obj); } @@ -51,4 +54,43 @@ public static byte[] DumpJson(T obj) } } } + + /// + public static class StringUtils + { + public static string ToSnakeCase(this string text) + { + var sb = new StringBuilder(); + for (var i = 0; i < text.Length; i++) + { + var ch = text[i]; + if (char.IsUpper(ch) && i > 0) + { + sb.Append('_'); + sb.Append(char.ToLower(ch)); + } + else + { + sb.Append(ch); + } + } + + return sb.ToString(); + } + + public static string StripUrl(this string url) + { + try + { + var builder = new UriBuilder(url); + return builder.Host + builder.Path; + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + return url; + } + } + } + } diff --git a/KeeperSdk/utils/Pollyfill.cs b/KeeperSdk/utils/Pollyfill.cs index 17cd478..36ae772 100644 --- a/KeeperSdk/utils/Pollyfill.cs +++ b/KeeperSdk/utils/Pollyfill.cs @@ -5,7 +5,7 @@ namespace KeeperSecurity.Utils /// public static class DateTimeOffsetExtensions { -#if NET45 +#if NET452_OR_GREATER internal static long Epoch = new DateTimeOffset(1970, 1, 1, 0, 0, 0, TimeSpan.Zero).UtcTicks; public static long ToUnixTimeMilliseconds(this DateTimeOffset date) diff --git a/KeeperSdk/utils/RecordTypesUtils.cs b/KeeperSdk/utils/RecordTypesUtils.cs new file mode 100644 index 0000000..65e15bc --- /dev/null +++ b/KeeperSdk/utils/RecordTypesUtils.cs @@ -0,0 +1,450 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using KeeperSecurity.Vault; + +namespace KeeperSecurity.Utils +{ + /// + /// Provides extension methods for Vault Record Types + /// + public static class RecordTypesUtils + { + /// + public static string ToText(this RecordTypeScope scope) + { + switch (scope) + { + case RecordTypeScope.Standard: + return "standard"; + case RecordTypeScope.Enterprise: + return "enterprise"; + case RecordTypeScope.User: + return "user"; + default: + return ""; + } + } + + /// + /// Returns record type information. + /// + /// Keeper Record + /// + public static string KeeperRecordType(this KeeperRecord record) + { + if (record is PasswordRecord) + { + return ""; + } + + if (record is TypedRecord tr) + { + return tr.TypeName ?? ""; + } + + if (record is FileRecord) + { + return "file"; + } + + return ""; + } + + /// + /// Returns common record information. + /// Does not include sensitive data + /// + /// Keeper Record + /// General record information + public static string KeeperRecordPublicInformation(this KeeperRecord record) + { + switch (record) + { + case PasswordRecord pr: + return string.Join(" (at) ", new[] { pr.Login, pr.Link }.Where(x => !string.IsNullOrEmpty(x))); + case TypedRecord tr: + { + var loginField = tr.Fields.FirstOrDefault(x => x.FieldName == "login"); + if (loginField != null) + { + var login = loginField.GetTypedFieldInformation().FirstOrDefault(); + string host = null; + var urlField = tr.Fields.FirstOrDefault(x => x.FieldName == "url"); + if (urlField != null) + { + host = urlField.GetTypedFieldInformation().FirstOrDefault(); + } + else + { + var hostField = tr.Fields.FirstOrDefault(x => x.FieldName == "host"); + if (hostField != null) + { + host = hostField.GetTypedFieldInformation().FirstOrDefault(); + } + } + + return string.Join(" (at) ", new[] { login, host }.Where(x => !string.IsNullOrEmpty(x))); + } + + var nameField = tr.Fields.FirstOrDefault(x => x.FieldName == "name"); + if (nameField != null) + { + return nameField.GetTypedFieldInformation().FirstOrDefault() ?? ""; + } + + var cardField = tr.Fields.FirstOrDefault(x => x.FieldName == "paymentCard"); + if (cardField != null) + { + return cardField.GetTypedFieldInformation().FirstOrDefault() ?? ""; + } + + var keyPairField = tr.Fields.FirstOrDefault(x => x.FieldName == "keyPair"); + if (keyPairField != null) + { + return keyPairField.GetTypedFieldInformation().FirstOrDefault() ?? ""; + } + + return ""; + } + case FileRecord fr when fr.FileSize == 0: + return ""; + case FileRecord fr when fr.FileSize < 2000: + return $"{fr.FileSize} bytes"; + case FileRecord fr: + { + var sz = fr.FileSize / 1024.0; + if (sz < 1000) + { + return $"{sz:F1} KB"; + } + + sz /= 1024.0; + if (sz < 1000) + { + return $"{sz:F1} MB"; + } + + sz /= 1024.0; + return $"{sz:F1} gB"; + } + default: + return ""; + } + } + + /// + /// Encodes record field name + /// + /// Field definition + /// Record field full name. + public static string GetTypedFieldName(this IRecordTypeField field) + { + string name = field.FieldName ?? ""; + if (string.Equals(name, "text")) + { + name = ""; + } + if (string.IsNullOrEmpty(field.FieldLabel)) + { + return "$" + (string.IsNullOrEmpty(name) ? "text" : name); + } + if (!string.IsNullOrEmpty(name)) + { + name = "$" + name + ":"; + } + return name + field.FieldLabel; + } + + /// + /// Returns typed field values converted to string + /// + /// Record Field + /// Field values. + public static IEnumerable GetTypedFieldValues(this ITypedField field) + { + for (var i = 0; i < field.Count; i++) + { + var value = field.GetValueAt(i); + if (value == null) continue; + + if (value is string str) + { + if (!string.IsNullOrEmpty(str)) + { + yield return str; + } + } + else if (value is long l) + { + if (l != 0) + { + var dt = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(l); + yield return dt.ToString("d"); + } + } + else if (value is bool b) + { + if (b) + { + yield return "true"; + } + } + else if (value is IFieldTypeSerialize fts) + { + yield return fts.GetValueAsString(); + } + else + { + yield return ""; + } + } + } + + /// + /// Returns general typed field values masking sensitive information. + /// + /// Record Field + /// Field common values + public static IEnumerable GetTypedFieldInformation(this ITypedField field) + { + if (field.FieldName == "password" || field.FieldName == "secret" || + field.FieldName == "pinCode") + { + if (field.Count > 0) + { + yield return "***"; + } + } + else + { + if (!RecordTypesConstants.TryGetRecordField(field.FieldName, out var recordField)) + { + yield return ""; + } + + else if (recordField.Type.Name == "secret" || recordField.Type.Name == "password") + { + if (field.Count > 0) + { + yield return "***"; + } + } + else + { + for (var i = 0; i < field.Count; i++) + { + var value = field.GetValueAt(i); + if (value == null) continue; + if (value is long dv) + { + if (dv == 0) continue; + if (recordField.Type.Name == "date") + { + if (dv != 0) + { + var dt = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(dv); + yield return dt.ToString("d"); + } + } + else + { + yield return dv.ToString(); + } + } + else if (value is string sv) + { + yield return sv; + } + else + { + switch (value) + { + case FieldTypeHost fth: + if (!string.IsNullOrEmpty(fth.HostName)) + { + yield return string.IsNullOrEmpty(fth.Port) + ? fth.HostName + : $"{fth.HostName}:{fth.Port}"; + } + + break; + case FieldTypePhone ftph: + if (!string.IsNullOrEmpty(ftph.Number)) + { + var text = ftph.Number; + if (!string.IsNullOrEmpty(ftph.Region)) + { + text = $"({ftph.Region})" + text; + } + + if (!string.IsNullOrEmpty(ftph.Type)) + { + text = $"[{ftph.Type}] " + ftph.Number; + } + + if (!string.IsNullOrEmpty(ftph.Ext)) + { + text += $" - {ftph.Ext}"; + } + + yield return text; + } + + break; + case FieldTypeName ftn: + yield return string.Join(" ", + new[] { ftn.First, ftn.Middle, ftn.Last }.Where(x => !string.IsNullOrEmpty(x))); + break; + case FieldTypeAddress fts: + var address = $"{fts.Street1 ?? ""} {fts.Street2 ?? ""}".Trim(); + if (!string.IsNullOrEmpty(fts.City)) + { + if (!string.IsNullOrEmpty(address)) + { + address += ", "; + } + + address += fts.City; + } + + address += $" {fts.State ?? ""} {fts.Zip ?? ""} {fts.Country ?? ""}".Trim(); + if (!string.IsNullOrEmpty(address)) + { + yield return address; + } + + break; + case FieldTypeSecurityQuestion ftsq: + if (!string.IsNullOrEmpty(ftsq.Question)) + { + yield return ftsq.Question; + } + + break; + + case FieldTypeBankAccount ftba: + var account = ftba.AccountNumber ?? ""; + if (!string.IsNullOrEmpty(ftba.RoutingNumber)) + { + account = $"{ftba.RoutingNumber} / " + account; + } + + if (!string.IsNullOrEmpty(account)) + { + if (!string.IsNullOrEmpty(ftba.AccountType)) + { + account += $"[ {ftba.AccountType}]"; + } + + yield return account; + } + + break; + + case FieldTypePaymentCard ftpc: + if (!string.IsNullOrEmpty(ftpc.CardNumber)) + { + if (ftpc.CardNumber.Length > 4) + { + yield return + $"x{ftpc.CardNumber.Substring(ftpc.CardNumber.Length - 4)}"; + } + else + { + yield return "***"; + } + } + + break; + case FieldTypeKeyPair ftpk: + if (!string.IsNullOrEmpty(ftpk.PrivateKey) && !string.IsNullOrEmpty(ftpk.PublicKey)) + { + yield return " "; + } + else if (string.IsNullOrEmpty(ftpk.PrivateKey)) + { + yield return ""; + } + else if (string.IsNullOrEmpty(ftpk.PublicKey)) + { + yield return ""; + } + + break; + } + } + } + } + } + } + + /// + /// Verifies Typed record. + /// + /// Vault + /// Typed Record + public static void AdjustTypedRecord(this VaultData vault, TypedRecord typed) + { + if (!vault.TryGetRecordTypeByName(typed.TypeName, out var recordType)) return; + + var allFields = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + foreach (var rf in typed.Fields.Concat(typed.Custom)) + { + for (var i = rf.Count - 1; i >= 0; i--) + { + var value = rf.GetValueAt(i); + if (value == null) + { + rf.DeleteValueAt(i); + } + } + var fieldKey = rf.GetTypedFieldName(); + if (!allFields.ContainsKey(fieldKey)) + { + allFields.Add(fieldKey, rf); + } + } + + typed.Fields.Clear(); + foreach (var field in recordType.Fields) + { + var fieldKey = field.GetTypedFieldName(); + if (allFields.TryGetValue(fieldKey, out var rf)) + { + allFields.Remove(fieldKey); + } + else + { + rf = field.CreateTypedField(); + } + rf.Required = field.Required; + typed.Fields.Add(rf); + } + + var customFields = new List(typed.Custom); + typed.Custom.Clear(); + foreach (var rf in customFields) + { + if (rf.Count > 0) + { + var fieldKey = rf.GetTypedFieldName(); + if (allFields.ContainsKey(fieldKey)) + { + typed.Custom.Add(rf); + allFields.Remove(fieldKey); + } + } + } + if (allFields.Count > 0) + { + typed.Custom.AddRange(allFields.Values.Where(x => x.Count > 0)); + } + typed.Custom.RemoveAll((rf) => rf.Count == 0); + foreach (var rf in typed.Custom) + { + rf.Required = false; + } + } + } +} diff --git a/KeeperSdk/utils/Tabulate.cs b/KeeperSdk/utils/Tabulate.cs deleted file mode 100644 index 1b37c89..0000000 --- a/KeeperSdk/utils/Tabulate.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -namespace KeeperSecurity.Utils -{ - /// - public class Tabulate - { - private readonly int _columns; - private readonly bool[] _rightAlignColumn; - private readonly int[] _maxChars; - private readonly List _data = new List(); - - public Tabulate(int columns) - { - _columns = columns; - _rightAlignColumn = Enumerable.Repeat(false, columns).ToArray(); - _maxChars = Enumerable.Repeat(0, columns).ToArray(); - } - - private string[] _header; - - public void AddHeader(params string[] header) - { - _header = header.Take(_columns).ToArray(); - } - - private static bool IsNumber(object value) - { - return value is sbyte - || value is byte - || value is short - || value is ushort - || value is int - || value is uint - || value is long - || value is ulong - || value is float - || value is double - || value is decimal; - } - - private static bool IsDecimal(object value) - { - return value is float - || value is double - || value is decimal; - } - - public void AddRow(params object[] fields) - { - var row = Enumerable.Repeat("", _columns).ToArray(); - var colNo = 0; - foreach (var o in fields) - { - var text = ""; - if (o != null) - { - if (o is bool b) - { - text = b ? "X" : "-"; - } - else - { - text = o.ToString(); - var isNum = IsNumber(o); - if (isNum) - { - if (IsDecimal(o)) - { - text = $"{o:0.00}"; - } - } - } - } - - row[colNo] = text; - colNo++; - if (colNo >= _columns) - { - break; - } - } - - _data.Add(row); - } - - public void SetColumnRightAlign(int colNo, bool value) - { - if (colNo >= 0 && colNo < _columns) - { - _rightAlignColumn[colNo] = value; - } - } - - public void Sort(int colNo) - { - if (_data.Count <= 1) return; - - var isNum = _rightAlignColumn[colNo]; - if (colNo >= 0 && colNo < _columns) - { - _data.Sort((x, y) => - { - if (!isNum) return string.Compare(x[colNo], y[colNo], StringComparison.Ordinal); - - var res = x[colNo].Length.CompareTo(y[colNo].Length); - return res != 0 ? res : string.Compare(x[colNo], y[colNo], StringComparison.Ordinal); - }); - } - } - - private const string RowSeparator = " "; - public bool DumpRowNo { get; set; } - public int LeftPadding { get; set; } - public int MaxColumnWidth { get; set; } = 60; - - public void Dump() - { - for (var i = 0; i < _maxChars.Length; i++) - { - var len = 0; - if (_header != null) - { - if (_maxChars[i] < _header.Length) - { - len = _header[i].Length; - } - } - - foreach (var row in _data.Where(row => i < row.Length)) - { - len = Math.Max(len, row[i].Length); - if (len > MaxColumnWidth) - { - len = MaxColumnWidth; - } - } - - _maxChars[i] = len; - } - - var rowNoLen = DumpRowNo ? _data.Count.ToString().Length + 1 : 0; - if (rowNoLen > 0 && rowNoLen < 3) - { - rowNoLen = 3; - } - - if (_header != null) - { - var r = (DumpRowNo ? new[] {"#".PadLeft(rowNoLen)} : Enumerable.Empty()) - .Concat(_header.Zip(_maxChars.Zip(_rightAlignColumn, (m, b) => b ? -m : m), - (h, m) => m < 0 ? h.PadLeft(-m) : h.PadRight(m))); - if (LeftPadding > 0) - { - Console.Write("".PadLeft(LeftPadding)); - } - - Console.WriteLine(string.Join(RowSeparator, r)); - - r = (DumpRowNo ? (new[] {"".PadLeft(rowNoLen, '-')}) : Enumerable.Empty()) - .Concat(_maxChars.Select(m => "".PadRight(m, '-'))); - if (LeftPadding > 0) - { - Console.Write("".PadLeft(LeftPadding)); - } - - Console.WriteLine(string.Join(RowSeparator, r)); - } - - var rowNo = 1; - foreach (var row in _data) - { - var r = (DumpRowNo ? (new[] {rowNo.ToString().PadLeft(rowNoLen)}) : Enumerable.Empty()) - .Concat(row.Zip(_maxChars.Zip(_rightAlignColumn, (m, b) => b ? -m : m), (cell, m) => - { - cell = cell.Replace("\n", " "); - if (cell.Length > MaxColumnWidth) - { - return cell.Substring(0, MaxColumnWidth - 3) + "..."; - } - - return m < 0 ? cell.PadLeft(-m) : cell.PadRight(m); - })); - - if (LeftPadding > 0) - { - Console.Write("".PadLeft(LeftPadding)); - } - - Console.WriteLine(string.Join(RowSeparator, r)); - - rowNo++; - } - - Console.WriteLine(); - } - } -} \ No newline at end of file diff --git a/KeeperSdk/vault/BatchVaultOperations.cs b/KeeperSdk/vault/BatchVaultOperations.cs new file mode 100644 index 0000000..694d254 --- /dev/null +++ b/KeeperSdk/vault/BatchVaultOperations.cs @@ -0,0 +1,1788 @@ +using KeeperSecurity.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Google.Protobuf; +using KeeperSecurity.Authentication; +using Folder; +using KeeperSecurity.Commands; +using Records; +using Org.BouncyCastle.Crypto.Digests; + +namespace KeeperSecurity.Vault +{ + /// + /// Specifies log message severity + /// + public enum Severity + { + /// + /// Fatal error + /// + Error, + + /// + /// Warning + /// + Warning, + + /// + /// Information + /// + Information, + } + + /// + /// Represents record existing match strategy + /// + public enum RecordMatch + { + /// + /// Do not match existing records when added. + /// + None, + + /// + /// Match only main fields. Skip notes and custom fields + /// + MainFields, + + /// + /// Match all record fields. + /// + AllFields, + } + + /// + /// Represents Batch Vault Updater Summary + /// + public class BatchResult + { + /// + /// Gets number of added shared folders + /// + public int SharedFolderCount { get; internal set; } + + /// + /// Gets number of added folders + /// + public int FolderCount { get; internal set; } + + /// + /// Gets number of added legacy records + /// + public int LegacyRecordCount { get; internal set; } + + /// + /// Get number of added typed records + /// + public int TypedRecordCount { get; internal set; } + + /// + /// Get number of updated records + /// + public int UpdatedRecordCount { get; internal set; } + + /// + /// Get number of updated folders + /// + public int UpdatedFolderCount { get; internal set; } + + public IDictionary FolderFailure { get; } = new Dictionary(); + public IDictionary RecordFailure { get; } = new Dictionary(); + } + + /// + /// Declares Batch Vault Updater methods + /// + public interface IBatchVaultOperations + { + /// + /// Gets the root folder + /// + FolderNode RootFolder { get; } + + /// + /// Gets folder node by folder UID + /// + /// folder UID + /// folder node + /// + /// true if folder is found + bool TryGetFolderByUid(string folderUid, out FolderNode folder); + + /// + /// Gets record by record UID. Returns both pending and active records. + /// + /// record UID + /// Keeper record + /// + bool TryGetRecordByUid(string recordUid, out KeeperRecord record); + + /// + /// Finds folder node by folder path + /// + /// Folder Path + /// + /// folder node + FolderNode GetFolderByPath(string folderPath); + + /// + /// Appends folder to folder structure + /// + /// folder name + /// parent folder + /// shared folder options + /// folder node to be added + FolderNode AddFolder(string folderName, string parentUid = null, + SharedFolderOptions sharedFolderOptions = null); + + /// + /// Checks if the folder has to be created + /// + /// + /// true if folder is scheduled to be added + bool IsFolderPending(string folderUid); + + /// + /// Checks if the record has to be created + /// + /// + /// true if record is scheduled to be added + bool IsRecordPending(string recordUid); + + /// + /// Updates folder name + /// + /// folder UID + /// new folder name + /// true if folder is scheduled to be added + bool UpdateFolderName(string folderUid, string folderName); + + /// + /// Update a record + /// + /// Keeper record + /// true is record is scheduled to be updated + bool UpdateRecord(KeeperRecord record); + + /// + /// Appends record + /// + /// record + /// folder + /// true is record is scheduled to be added + bool AddRecord(KeeperRecord record, FolderNode folder); + + /// + /// Adds (if needed) user or team to the shared folder and set user access permissions. + /// + /// Shared Folder UID. + /// User email or Team UID. + /// Type of userId parameter. + /// Shared Folder User Permissions. + /// true if parameters are accepted + /// + /// If optionsc> parameter is null then user gets default user permissions when added./> + /// + /// + /// + /// + bool PutUserToSharedFolder(string sharedFolderUid, string userId, UserType userType, ISharedFolderUserOptions options = null); + /// + /// Removes user or team from shared folder. + /// + /// Shared Folder UID. + /// User email or Team UID. + /// Type of userId parameter. + /// true if parameters are accepted + /// + bool RemoveUserFromSharedFolder(string sharedFolderUid, string userId, UserType userType); + + /// + /// Applies pending changes + /// + /// Change status + Task ApplyChanges(); + + /// + /// Resets pending changes + /// + void Reset(); + + /// + /// Gets record matching strategy + /// + RecordMatch RecordMatch { get; } + } + + internal class SharedFolderMember + { + public string UserId { get; set; } + public UserType UserType { get; set; } + public ISharedFolderUserOptions Options { get; set; } + public bool IsRemove { get; set; } + } + + /// + /// Represents Batch Vault Updater + /// + /// + public class BatchVaultOperations : IBatchVaultOperations + { + private readonly VaultOnline _vault; + + private readonly FolderNode _rootFolder = new FolderNode + { + FolderType = FolderType.UserFolder, + }; + + private readonly List> _foldersToAdd = + new List>(); + + private readonly List> _legacyRecordsToAdd = + new List>(); + + private readonly List> _typedRecordsToAdd = + new List>(); + + private readonly List _recordsToUpdate = new List(); + + private readonly Dictionary _folderInfoLookup = new Dictionary(); + private readonly Dictionary _folderPathLookup = new Dictionary(); + private readonly HashSet _recordSet = new HashSet(); + private readonly Dictionary _recordFullHashes = new Dictionary(); + private readonly Dictionary _recordMainHashes = new Dictionary(); + private readonly Dictionary> _sharedFolderMembership = new Dictionary>(); + + private readonly Dictionary _folderNameUpdates = new Dictionary(); + + /// + /// Instantiate . + /// + /// Vault instance + /// Record matching strategy + public BatchVaultOperations(VaultOnline vault, RecordMatch recordMatch = RecordMatch.AllFields) + { + _vault = vault; + RecordMatch = recordMatch; + Reset(); + } + + /// + public void Reset() + { + _rootFolder.Subfolders.Clear(); + _rootFolder.Records.Clear(); + + _foldersToAdd.Clear(); + _legacyRecordsToAdd.Clear(); + _typedRecordsToAdd.Clear(); + _recordsToUpdate.Clear(); + _folderInfoLookup.Clear(); + _folderPathLookup.Clear(); + _recordSet.Clear(); + _folderNameUpdates.Clear(); + _recordFullHashes.Clear(); + _recordMainHashes.Clear(); + _sharedFolderMembership.Clear(); + + // Load folders + var folders = _vault.Folders.ToArray(); + foreach (var folder in folders) + { + var f = new FolderNode + { + FolderUid = folder.FolderUid, + Name = folder.Name, + ParentUid = folder.ParentUid, + FolderType = folder.FolderType, + SharedFolderUid = folder.SharedFolderUid, + FolderKey = folder.FolderKey, + }; + _folderInfoLookup[folder.FolderUid] = f; + } + + foreach (var folder in folders) + { + var path = GetFolderPath(folder.FolderUid).ToLower(); + if (!_folderPathLookup.ContainsKey(path)) + { + _folderPathLookup.Add(path, folder.FolderUid); + } + + FolderNode parentFolder; + if (string.IsNullOrEmpty(folder.ParentUid)) + { + parentFolder = _rootFolder; + } + else + { + _folderInfoLookup.TryGetValue(folder.ParentUid, out parentFolder); + } + + parentFolder?.Subfolders.Add(folder.FolderUid); + } + + // Load records + if (RecordMatch != RecordMatch.None) + { + var hash = new Sha256Digest(); + foreach (var record in _vault.KeeperRecords) + { + if (record is PasswordRecord || record is TypedRecord) + { + hash.Reset(); + foreach (var token in TokenizeKeeperRecord(record, RecordMatch.AllFields)) + { + var buffer = Encoding.UTF8.GetBytes(token); + hash.BlockUpdate(buffer, 0, buffer.Length); + } + + var hashValue = new byte[hash.GetDigestSize()]; + hash.DoFinal(hashValue, 0); + _recordFullHashes[hashValue.Base64UrlEncode()] = record.Uid; + + if (RecordMatch == RecordMatch.MainFields) + { + hash.Reset(); + foreach (var token in TokenizeKeeperRecord(record, RecordMatch)) + { + var buffer = Encoding.UTF8.GetBytes(token); + hash.BlockUpdate(buffer, 0, buffer.Length); + } + + var hashMatchValue = new byte[hash.GetDigestSize()]; + hash.DoFinal(hashMatchValue, 0); + _recordMainHashes[hashMatchValue.Base64UrlEncode()] = record.Uid; + } + } + } + + var loadedRecords = new HashSet(_recordFullHashes.Values); + foreach (var folder in _vault.Folders) + { + if (_folderInfoLookup.TryGetValue(folder.FolderUid, out var f)) + { + if (folder.Records != null) + { + foreach (var recordUid in folder.Records) + { + if (loadedRecords.Contains(recordUid)) + { + f.Records.Add(recordUid); + } + } + } + } + } + } + } + + private static IEnumerable TokenizeKeeperRecord(KeeperRecord record, RecordMatch match) + { + var fields = new List + { + $"$title:{record.Title}" + }; + if (record is PasswordRecord password) + { + if (!string.IsNullOrEmpty(password.Login)) + { + fields.Add($"$login:{password.Login}"); + } + + if (!string.IsNullOrEmpty(password.Password)) + { + fields.Add($"$password:{password.Password}"); + } + + if (!string.IsNullOrEmpty(password.Link)) + { + fields.Add($"$url:{password.Link}"); + } + + if (match == RecordMatch.AllFields) + { + if (!string.IsNullOrEmpty(password.Notes)) + { + fields.Add($"$notes:{password.Notes}"); + } + + var cfs = new List(password.Custom); + cfs.Sort((x, y) => + { + if (x == null || y == null) + { + if (x == null && y == null) + { + return 0; + } + + return x == null ? 1 : -1; + } + + return string.CompareOrdinal(x.Name, y.Name); + }); + fields.AddRange(cfs.Select(x => $"{x.Name ?? string.Empty}:{x.Value ?? string.Empty}")); + } + } + else if (record is TypedRecord typed) + { + fields.Add($"$type:{typed.TypeName}"); + + foreach (var field in typed.Fields) + { + var token = GetRecordFieldToken(field); + if (!string.IsNullOrEmpty(token)) + { + fields.Add(token); + } + } + + if (match == RecordMatch.AllFields) + { + if (!string.IsNullOrEmpty(typed.Notes)) + { + fields.Add($"$notes:{typed.Notes}"); + } + + foreach (var field in typed.Custom) + { + var token = GetRecordFieldToken(field); + if (!string.IsNullOrEmpty(token)) + { + fields.Add(token); + } + } + } + } + + fields.Sort(StringComparer.InvariantCulture); + foreach (var token in fields) + { + yield return token; + } + } + internal static string GetRecordFieldToken(ITypedField field) + { + var value = field.GetExternalValue(); + if (string.IsNullOrEmpty(value)) + { + return null; + } + + string key = "$" + field.FieldName; + if (!string.IsNullOrEmpty(field.FieldLabel)) + { + key += "." + field.FieldLabel; + } + + return key + ":" + value; + } + + /// + public const char PathDelimiter = '\\'; + + private const string EscapedPathDelimiter = "\\\\"; + + private string GetFolderPath(string folderUid) + { + if (!_folderInfoLookup.TryGetValue(folderUid, out var folder)) + { + return null; + } + + var path = new List(); + + while (folder != null) + { + path.Add(folder.Name); + if (string.IsNullOrEmpty(folder.ParentUid)) + { + break; + } + else if (!_folderInfoLookup.TryGetValue(folder.ParentUid, out folder)) + { + break; + } + } + + path.Reverse(); + return CreateFolderPath(path); + } + + /// + public FolderNode RootFolder => _rootFolder; + + /// + public FolderNode GetFolderByPath(string folderPath) + { + if (_folderPathLookup.TryGetValue(folderPath.ToLower(), out var folderUid)) + { + if (_folderInfoLookup.TryGetValue(folderUid, out var f)) + { + return f; + } + } + + return null; + } + + /// + public bool TryGetFolderByUid(string folderUid, out FolderNode folder) + { + return _folderInfoLookup.TryGetValue(folderUid, out folder); + } + + + /// + /// Composes folder path + /// + /// folder name list + /// folder path + public static string CreateFolderPath(IEnumerable folderNames) + { + var folderPath = ""; + foreach (var folderName in folderNames) + { + if (folderPath.Length > 0) + { + folderPath += PathDelimiter; + } + + folderPath += folderName.Replace(PathDelimiter.ToString(), EscapedPathDelimiter); + } + + return folderPath; + } + + /// + /// Parses folder path to names + /// + /// folder path + /// folder name list + public static IEnumerable ParseFolderPath(string folderPath) + { + var startPos = 0; + var searchPos = 0; + while (startPos < folderPath.Length) + { + var found = folderPath.IndexOf(PathDelimiter, searchPos); + if (found >= 0) + { + if (found < folderPath.Length - 1 && folderPath[found + 1] == PathDelimiter) + { + searchPos = found + 2; + } + else + { + if (found > startPos) + { + var folderName = folderPath.Substring(startPos, found - startPos); + folderName = folderName.Replace(EscapedPathDelimiter, PathDelimiter.ToString()); + yield return folderName; + } + + searchPos = found + 1; + startPos = searchPos; + } + } + else + { + break; + } + } + + if (startPos < folderPath.Length) + { + var folderName = folderPath.Substring(startPos); + folderName = folderName.Replace(EscapedPathDelimiter, PathDelimiter.ToString()); + yield return folderName; + } + } + + /// + public FolderNode AddFolder(string folderName, string parentUid = null, + SharedFolderOptions sharedFolderOptions = null) + { + var f = new FolderNode + { + FolderUid = CryptoUtils.GenerateUid(), + Name = folderName, + ParentUid = parentUid, + FolderKey = CryptoUtils.GenerateEncryptionKey() + }; + FolderNode parentFolder; + if (!string.IsNullOrEmpty(parentUid)) + { + if (_folderInfoLookup.TryGetValue(parentUid, out parentFolder)) + { + if (sharedFolderOptions != null && parentFolder.FolderType != FolderType.UserFolder) + { + BatchLogger?.Invoke(Severity.Warning, + $"Add Folder {folderName}: Folder cannot be added as a shared folder."); + sharedFolderOptions = null; + } + } + else + { + BatchLogger?.Invoke(Severity.Error, + $"Add Folder {folderName}: Parent folder UID \"{parentUid}\" not found"); + return null; + } + } + else + { + parentFolder = _rootFolder; + } + + if (!string.IsNullOrEmpty(parentFolder.FolderUid)) + { + f.ParentUid = parentFolder.FolderUid; + } + + if (sharedFolderOptions != null && parentFolder.FolderType == FolderType.UserFolder) + { + f.FolderType = FolderType.SharedFolder; + f.SharedFolderUid = f.FolderUid; + } + else if (parentFolder.FolderType == FolderType.UserFolder) + { + f.FolderType = FolderType.UserFolder; + } + else + { + f.FolderType = FolderType.SharedFolderFolder; + f.SharedFolderUid = parentFolder.SharedFolderUid; + } + + parentFolder.Subfolders.Add(f.FolderUid); + _foldersToAdd.Add(Tuple.Create(f, sharedFolderOptions)); + _folderInfoLookup[f.FolderUid] = f; + var path = GetFolderPath(f.FolderUid).ToLower(); + if (!string.IsNullOrEmpty(path) && !_folderPathLookup.ContainsKey(path)) + { + _folderPathLookup.Add(path, f.FolderUid); + } + + return f; + } + + /// + public bool UpdateFolderName(string folderUid, string folderName) + { + if (TryGetFolderByUid(folderUid, out var folder)) + { + if (string.Equals(folder.Name, folderName)) + { + return true; + } + + var added = _foldersToAdd.FirstOrDefault(x => x.Item1.FolderUid == folderUid); + if (added != null) + { + added.Item1.Name = folderName; + } + else + { + _folderNameUpdates[folderUid] = folderName; + } + + return true; + } + + return false; + } + + /// + public bool TryGetRecordByUid(string recordUid, out KeeperRecord record) + { + record = null; + if (_recordSet.Contains(recordUid)) + { + record = (KeeperRecord) _typedRecordsToAdd.Select(x => x.Item1).FirstOrDefault(x => x.Uid == recordUid) + ?? _legacyRecordsToAdd.Select(x => x.Item1).FirstOrDefault(x => x.Uid == recordUid); + } + else + { + record = _recordsToUpdate.FirstOrDefault(x => x.Uid == recordUid); + if (record == null) + { + _vault.TryGetKeeperRecord(recordUid, out record); + } + } + return record != null; + } + + /// + public bool UpdateRecord(KeeperRecord record) + { + if (_vault.TryGetKeeperRecord(record.Uid, out var r)) + { + if (ReferenceEquals(record, r)) + { + BatchLogger?.Invoke(Severity.Information, + $"Update Record \"{record.Title}\": Same instance. Skipped."); + return false; + } + + if (!ReferenceEquals(record.GetType(), r.GetType())) + { + BatchLogger?.Invoke(Severity.Warning, + $"Update Record \"{record.Title}\": Record types do not match. Skipped."); + return false; + } + + _recordsToUpdate.Add(record); + } + else + { + BatchLogger?.Invoke(Severity.Warning, + $"Update Record \"{record.Title}\": Cannot find existing record. Skipped."); + return false; + } + + // TODO check added records UID + return true; + } + + /// + public bool AddRecord(KeeperRecord record, FolderNode folder) + { + var recordHasher = new Sha256Digest(); + foreach (var token in TokenizeKeeperRecord(record, RecordMatch.AllFields)) + { + var buffer = Encoding.UTF8.GetBytes(token); + recordHasher.BlockUpdate(buffer, 0, buffer.Length); + } + + var hashValue = new byte[recordHasher.GetDigestSize()]; + recordHasher.DoFinal(hashValue, 0); + var recordHashStr = hashValue.Base64UrlEncode(); + + if (_recordFullHashes.TryGetValue(recordHashStr, out var recordUid)) + { + record.Uid = recordUid; + BatchLogger?.Invoke(Severity.Warning, + $"Add Record \"{record.Title}\": A full record match already exists. Skipped."); + return false; + } + + if (!string.IsNullOrEmpty(record.Uid)) + { + if (_vault.TryGetKeeperRecord(record.Uid, out var r)) + { + BatchLogger?.Invoke(Severity.Information, + $"Add Record \"{record.Title}\": Record UID \"{record.Uid}\" exists: Updated."); + record.RecordKey = r.RecordKey; + return UpdateRecord(record); + } + + if (_recordSet.Contains(record.Uid)) + { + BatchLogger?.Invoke(Severity.Warning, + $"Add Record \"{record.Title}\": Record UID \"{record.Uid}\" already added. Skipped."); + return false; + } + } + + string mainHashStr = null; + if (RecordMatch != RecordMatch.MainFields) + { + recordHasher.Reset(); + foreach (var token in TokenizeKeeperRecord(record, RecordMatch)) + { + var buffer = Encoding.UTF8.GetBytes(token); + recordHasher.BlockUpdate(buffer, 0, buffer.Length); + } + + hashValue = new byte[recordHasher.GetDigestSize()]; + recordHasher.DoFinal(hashValue, 0); + mainHashStr = hashValue.Base64UrlEncode(); + if (_recordMainHashes.TryGetValue(mainHashStr, out recordUid)) + { + if (_vault.TryGetKeeperRecord(recordUid, out var r)) + { + record.Uid = r.Uid; + record.RecordKey = r.RecordKey; + BatchLogger?.Invoke(Severity.Information, + $"Add Record \"{record.Title}\": Matching record found: Updated."); + return UpdateRecord(record); + } + } + } + + if (folder != null) + { + if (_folderInfoLookup.TryGetValue(folder.FolderUid, out var f)) + { + folder = f; + } + else + { + BatchLogger?.Invoke(Severity.Warning, + $"Add Record \"{record.Title}\": Folder \"{folder.Name}\" has not been created. Skipped."); + return false; + } + } + + if (string.IsNullOrEmpty(record.Uid)) + { + record.Uid = CryptoUtils.GenerateUid(); + } + + record.RecordKey = CryptoUtils.GenerateEncryptionKey(); + if (record is PasswordRecord password) + { + _legacyRecordsToAdd.Add(Tuple.Create(password, folder)); + } + else if (record is TypedRecord typed) + { + _typedRecordsToAdd.Add(Tuple.Create(typed, folder)); + } + else + { + BatchLogger?.Invoke(Severity.Warning, + $"Add Record \"{record.Title}\": Record type is not supported. Skipped."); + return false; + } + + _recordSet.Add(record.Uid); + _recordFullHashes[recordHashStr] = record.Uid; + if (!string.IsNullOrEmpty(mainHashStr)) + { + _recordMainHashes[mainHashStr] = record.Uid; + } + + if (folder != null) + { + folder.Records.Add(record.Uid); + } + + return true; + } + + /// + public bool IsFolderPending(string folderUid) + { + return _foldersToAdd.Any(x => x.Item1.FolderUid == folderUid); + } + + /// + public bool IsRecordPending(string recordUid) + { + return _recordSet.Contains(recordUid); + } + + /// + public async Task ApplyChanges() + { + var result = new BatchResult(); + var round = 0; + while (_foldersToAdd.Count > 0 || _legacyRecordsToAdd.Count > 0) + { + if (round > 0) + { + await Task.Delay(TimeSpan.FromSeconds(10)); + } + + round++; + + var left = 999; + var rq = new ImportFolderRecordRequest(); + if (_foldersToAdd.Count > 0) + { + Tuple[] chunk; + if (_foldersToAdd.Count > left) + { + chunk = _foldersToAdd.Take(left).ToArray(); + _foldersToAdd.RemoveRange(0, chunk.Length); + } + else + { + chunk = _foldersToAdd.ToArray(); + _foldersToAdd.Clear(); + } + + left -= chunk.Length; + + foreach (var f in chunk) + { + var folder = f.Item1; + var sharedFolderOptions = f.Item2; + var frq = new FolderRequest + { + FolderUid = ByteString.CopyFrom(folder.FolderUid.Base64UrlDecode()), + }; + if (!string.IsNullOrEmpty(folder.ParentUid)) + { + var parentFolder = folder.ParentUid; + if (folder.FolderType == FolderType.SharedFolderFolder && + string.Equals(parentFolder, folder.SharedFolderUid)) + { + parentFolder = null; + } + + if (!string.IsNullOrEmpty(parentFolder)) + { + frq.ParentFolderUid = ByteString.CopyFrom(parentFolder.Base64UrlDecode()); + } + } + + var fd = new FolderData + { + name = folder.Name, + }; + var data = JsonUtils.DumpJson(fd); + frq.FolderData = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(data, folder.FolderKey)); + + switch (folder.FolderType) + { + case FolderType.UserFolder: + { + frq.FolderType = Folder.FolderType.UserFolder; + frq.EncryptedFolderKey = ByteString.CopyFrom( + CryptoUtils.EncryptAesV1(folder.FolderKey, _vault.Auth.AuthContext.DataKey)); + } + break; + case FolderType.SharedFolder: + { + frq.FolderType = Folder.FolderType.SharedFolder; + frq.EncryptedFolderKey = ByteString.CopyFrom( + CryptoUtils.EncryptAesV1(folder.FolderKey, _vault.Auth.AuthContext.DataKey)); + var encName = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(folder.Name), + folder.FolderKey); + frq.SharedFolderFields = new SharedFolderFields + { + EncryptedFolderName = ByteString.CopyFrom(encName), + ManageUsers = (sharedFolderOptions?.ManageUsers ?? false), + ManageRecords = (sharedFolderOptions?.ManageRecords ?? false), + CanEdit = (sharedFolderOptions?.CanEdit ?? false), + CanShare = (sharedFolderOptions?.CanShare ?? false), + }; + + } + break; + case FolderType.SharedFolderFolder: + { + if (!_folderInfoLookup.TryGetValue(folder.SharedFolderUid, out var sharedFolder)) + { + var message = + $"Prepare Shared Folder Folder {folder.FolderUid}: Parent Shared Folder UID {folder.SharedFolderUid} not found"; + BatchLogger?.Invoke(Severity.Warning, message); + result.FolderFailure[folder.FolderUid] = message; + continue; + } + + frq.FolderType = Folder.FolderType.SharedFolderFolder; + frq.EncryptedFolderKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(folder.FolderKey, sharedFolder.FolderKey)); + frq.SharedFolderFolderFields = new SharedFolderFolderFields + { + SharedFolderUid = ByteString.CopyFrom(folder.SharedFolderUid.Base64UrlDecode()), + }; + } + break; + } + + rq.FolderRequest.Add(frq); + } + } + + if (_legacyRecordsToAdd.Count > 0 && left > 10) + { + Tuple[] chunk; + if (_legacyRecordsToAdd.Count > left) + { + chunk = _legacyRecordsToAdd.Take(left).ToArray(); + _legacyRecordsToAdd.RemoveRange(0, chunk.Length); + } + else + { + chunk = _legacyRecordsToAdd.ToArray(); + _legacyRecordsToAdd.Clear(); + } + + foreach (var r in chunk) + { + var record = r.Item1; + var folder = r.Item2; + var rrq = new RecordRequest + { + RecordUid = ByteString.CopyFrom(record.Uid.Base64UrlDecode()), + EncryptedRecordKey = + ByteString.CopyFrom(CryptoUtils.EncryptAesV1(record.RecordKey, _vault.Auth.AuthContext.DataKey)), + }; + if (folder != null) + { + FolderNode sharedFolder = null; + switch (folder.FolderType) + { + case FolderType.UserFolder: + rrq.FolderType = Folder.FolderType.UserFolder; + break; + case FolderType.SharedFolder: + { + rrq.FolderType = Folder.FolderType.SharedFolder; + sharedFolder = folder; + } + break; + case FolderType.SharedFolderFolder: + { + rrq.FolderType = Folder.FolderType.SharedFolderFolder; + if (!_folderInfoLookup.TryGetValue(folder.SharedFolderUid, out sharedFolder)) + { + var message = $"Prepare Shared Folder Folder {folder.FolderUid}: Parent Shared Folder UID {folder.SharedFolderUid} not found"; + BatchLogger?.Invoke(Severity.Warning, message); + result.FolderFailure[folder.FolderUid] = message; + continue; + } + } + break; + } + + rrq.FolderUid = ByteString.CopyFrom(folder.FolderUid.Base64UrlDecode()); + + if (sharedFolder != null) + { + rrq.EncryptedRecordFolderKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(record.RecordKey, sharedFolder.FolderKey)); + } + } + else + { + rrq.FolderType = Folder.FolderType.UserFolder; + } + + var rd = record.ExtractRecordData(); + var data = JsonUtils.DumpJson(rd); + data = CryptoUtils.EncryptAesV1(data, record.RecordKey); + rrq.RecordData = ByteString.CopyFrom(data); + + rq.RecordRequest.Add(rrq); + } + } + + BatchLogger?.Invoke(Severity.Information, "Create Folders and Legacy Records"); + var rs = await _vault.Auth.ExecuteAuthRest("folder/import_folders_and_records", rq); + foreach (var frs in rs.FolderResponse) + { + if (frs.Status.ToLower() == "success") + { + var folderUid = frs.FolderUid.ToArray().Base64UrlEncode(); + if (_folderInfoLookup.TryGetValue(folderUid, out var f)) + { + if (f.FolderType == FolderType.SharedFolder) + { + result.SharedFolderCount++; + } + else + { + result.FolderCount++; + } + } + else + { + result.FolderCount++; + } + } + else + { + var folderUid = frs.FolderUid.ToByteArray().Base64UrlEncode(); + var message = $"Add folder \"{folderUid}\" error: {frs.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + result.FolderFailure[folderUid] = message; + } + } + + foreach (var rrs in rs.RecordResponse) + { + if (rrs.Status.ToLower() == "success") + { + result.LegacyRecordCount++; + } + else + { + var recordUid = rrs.RecordUid.ToByteArray().Base64UrlEncode(); + var message = $"Add legacy record \"{recordUid}\" error: {rrs.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + result.RecordFailure[recordUid] = message; + } + } + } + + + BatchLogger?.Invoke(Severity.Information, "Create Typed Records"); + while (_typedRecordsToAdd.Count > 0) + { + var left = 999; + + Tuple[] chunk; + if (_typedRecordsToAdd.Count > left) + { + chunk = _typedRecordsToAdd.Take(left).ToArray(); + _typedRecordsToAdd.RemoveRange(0, chunk.Length); + } + else + { + chunk = _typedRecordsToAdd.ToArray(); + _typedRecordsToAdd.Clear(); + } + + var rq = new RecordsAddRequest + { + ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + }; + foreach (var pair in chunk) + { + var typed = pair.Item1; + var folder = pair.Item2; + + var ra = new RecordAdd + { + RecordUid = ByteString.CopyFrom(typed.Uid.Base64UrlDecode()), + ClientModifiedTime = rq.ClientTime, + RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(typed.RecordKey, + _vault.Auth.AuthContext.DataKey)), + }; + + if (folder != null) + { + FolderNode sharedFolder = null; + switch (folder.FolderType) + { + case FolderType.UserFolder: + ra.FolderType = RecordFolderType.UserFolder; + break; + case FolderType.SharedFolder: + { + ra.FolderType = RecordFolderType.SharedFolder; + sharedFolder = folder; + } + break; + case FolderType.SharedFolderFolder: + { + ra.FolderType = RecordFolderType.SharedFolderFolder; + if (!_folderInfoLookup.TryGetValue(folder.SharedFolderUid, out sharedFolder)) + { + var message = + $"Prepare Shared Folder Folder {folder.FolderUid}: Parent Shared Folder UID {folder.SharedFolderUid} not found"; + BatchLogger?.Invoke(Severity.Warning, message); + result.RecordFailure[typed.Uid] = message; + continue; + } + } + break; + } + + ra.FolderUid = ByteString.CopyFrom(folder.FolderUid.Base64UrlDecode()); + + if (sharedFolder != null) + { + ra.FolderKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(typed.RecordKey, sharedFolder.FolderKey)); + } + } + else + { + ra.FolderType = RecordFolderType.UserFolder; + } + + _vault.AdjustTypedRecord(typed); + var recordData = typed.ExtractRecordV3Data(); + var data = JsonUtils.DumpJson(recordData); + data = VaultExtensions.PadRecordData(data); + data = CryptoUtils.EncryptAesV2(data, typed.RecordKey); + ra.Data = ByteString.CopyFrom(data); + if (_vault.Auth.AuthContext.EnterprisePublicEcKey != null) + { + var auditData = typed.ExtractRecordAuditData(); + data = JsonUtils.DumpJson(auditData); + ra.Audit = new RecordAudit + { + Version = 0, + Data = ByteString.CopyFrom(CryptoUtils.EncryptEc(data, _vault.Auth.AuthContext.EnterprisePublicEcKey)) + }; + } + + rq.Records.Add(ra); + } + + var rs = await _vault.Auth.ExecuteAuthRest("vault/records_add", rq); + foreach (var ar in rs.Records) + { + if (ar.Status == RecordModifyResult.RsSuccess) + { + result.TypedRecordCount++; + } + else + { + var recordUid = ar.RecordUid.ToByteArray().Base64UrlEncode(); + var message = $"Add typed record \"{recordUid}\" error: {ar.Message}"; + BatchLogger?.Invoke(Severity.Warning, message); + result.RecordFailure[recordUid] = message; + } + } + + if (_typedRecordsToAdd.Count > 100) + { + await Task.Delay(TimeSpan.FromSeconds(10)); + } + } + + if (_recordsToUpdate.Count > 0) + { + // discard duplicates keeping the last update + var toUpdate = new Dictionary(); + foreach (var r in _recordsToUpdate) + { + toUpdate[r.Uid] = r; + } + + var statuses = await _vault.UpdateRecordBatch(toUpdate.Values); + foreach (var status in statuses) + { + if (status.Status != "success") + { + var recordUid = status.RecordUid; + if (toUpdate.TryGetValue(recordUid, out var r)) + { + BatchLogger?.Invoke(Severity.Warning, + $"Update record \"{r.Title}\" error: {status.Message}"); + } + else + { + BatchLogger?.Invoke(Severity.Warning, + $"Update record UID \"{recordUid}\" error: {status.Message}"); + } + + result.RecordFailure[recordUid] = $"Update record UID \"{recordUid}\" error: {status.Message}"; + } + else + { + result.UpdatedRecordCount++; + } + } + } + + if (_folderNameUpdates.Count > 0) + { + var folderUpdateRequests = new List(); + foreach (var folderUid in _folderNameUpdates.Keys) + { + if (TryGetFolderByUid(folderUid, out var folder)) + { + var request = new FolderUpdateCommand + { + FolderUid = folder.FolderUid, + FolderType = folder.FolderType.GetFolderTypeText(), + ParentUid = string.IsNullOrEmpty(folder.ParentUid) ? null : folder.ParentUid, + SharedFolderUid = string.IsNullOrEmpty(folder.SharedFolderUid) ? null : folder.SharedFolderUid, + }; + + var newName = _folderNameUpdates[folderUid]; + FolderData data = null; + try + { + var existingFolder = _vault.Storage.Folders.GetEntity(folderUid); + if (folder.FolderKey != null && !string.IsNullOrEmpty(existingFolder?.Data)) + { + data = JsonUtils.ParseJson(CryptoUtils.DecryptAesV1(existingFolder.Data.Base64UrlDecode(), folder.FolderKey)); + } + } + catch {/* ignored */} + + if (data == null) + { + data = new FolderData(); + } + + data.name = newName; + var dataBytes = JsonUtils.DumpJson(data); + request.Data = CryptoUtils.EncryptAesV1(dataBytes, folder.FolderKey).Base64UrlEncode(); + if (folder.FolderType != FolderType.UserFolder) + { + var sharedFolderUid = folder.FolderType == FolderType.UserFolder + ? folder.FolderUid + : folder.SharedFolderUid; + var perm = _vault.ResolveSharedFolderAccessPath(_vault.Auth.Username, sharedFolderUid, false, true); + if (perm != null) + { + if (perm.UserType == UserType.Team) + { + request.TeamUid = perm.UserId; + } + } + } + + if (folder.FolderType == FolderType.SharedFolder) + { + request.Name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(newName), folder.FolderKey).Base64UrlEncode(); + } + + folderUpdateRequests.Add(request); + } + } + + if (folderUpdateRequests.Count > 0) + { + var updateResults = await _vault.Auth.ExecuteBatch(folderUpdateRequests); + if (updateResults?.Count > 0) + { + for (int i = 0; i < updateResults.Count; i++) + { + var rs = updateResults[i]; + var rq = folderUpdateRequests[i]; + if (rs.IsSuccess) + { + result.UpdatedFolderCount++; + } + else + { + if (rq is FolderUpdateCommand fuc) + { + var message = $"Rename folder \"{fuc.FolderUid}\" error: {rs.message}"; + BatchLogger?.Invoke(Severity.Warning, message); + result.FolderFailure[fuc.FolderUid] = message; + } + else + { + BatchLogger?.Invoke(Severity.Warning, rs.message); + } + } + } + } + } + } + + if (_sharedFolderMembership.Count > 0) + { + await _vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + + var userEmails = new HashSet(); + var teamUids = new HashSet(); + + foreach (var sharedFolderUid in _sharedFolderMembership.Keys) + { + if (_vault.TryGetSharedFolder(sharedFolderUid, out var sharedFolder)) + { + foreach (var membership in _sharedFolderMembership[sharedFolderUid].Values) + { + if (!membership.IsRemove) + { + var existingUser = sharedFolder.UsersPermissions.FirstOrDefault(x => x.UserType == membership.UserType && x.UserId == membership.UserId); + if (existingUser == null) + { + (membership.UserType == UserType.User ? userEmails : teamUids).Add(membership.UserId); + } + } + } + } + } + + if (userEmails.Count > 0) + { + await _vault.Auth.LoadUsersKeys(userEmails); + } + if (teamUids.Count > 0) + { + await _vault.Auth.LoadTeamKeys(teamUids); + } + + var sharedFolderMembershipRequests = new List(); + foreach (var sharedFolderUid in _sharedFolderMembership.Keys) + { + if (!_vault.TryGetSharedFolder(sharedFolderUid, out var sharedFolder)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\" not found"; + BatchLogger?.Invoke(Severity.Warning, message); + continue; + } + var rq = new SharedFolderUpdateV3Request + { + SharedFolderUid = ByteString.CopyFrom(sharedFolderUid.Base64UrlDecode()), + ForceUpdate = true + }; + foreach (var membership in _sharedFolderMembership[sharedFolderUid].Values) + { + var existingUser = sharedFolder.UsersPermissions.FirstOrDefault(x => x.UserType == membership.UserType && x.UserId == membership.UserId); + if (membership.IsRemove) + { + if (existingUser == null) continue; + if (membership.UserType == UserType.User) + { + rq.SharedFolderRemoveUser.Add(membership.UserId); + } + else + { + rq.SharedFolderRemoveTeam.Add(ByteString.CopyFrom(membership.UserId.Base64UrlDecode())); + } + } + else + { + if (membership.UserType == UserType.User) + { + var sfuu = new SharedFolderUpdateUser(); + sfuu.Username = membership.UserId; + if (membership.Options != null) + { + if (membership.Options.ManageUsers.HasValue) + { + sfuu.ManageUsers = membership.Options.ManageUsers.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse; + } + if (membership.Options.ManageRecords.HasValue) + { + sfuu.ManageRecords = membership.Options.ManageRecords.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse; + } + } + if (existingUser == null) + { + if (_vault.Auth.TryGetUserKeys(membership.UserId, out var keys)) + { + try + { + if (keys.RsaPublicKey == null) + { + throw new Exception($"RSA public key not found"); + } + var rsaPublicKey = CryptoUtils.LoadPublicKey(keys.RsaPublicKey); + sfuu.TypedSharedFolderKey = new EncryptedDataKey + { + EncryptedKey = ByteString.CopyFrom(CryptoUtils.EncryptRsa(sharedFolder.SharedFolderKey, rsaPublicKey)), + EncryptedKeyType = EncryptedKeyType.EncryptedByPublicKey, + }; + } + catch (Exception e) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": user {membership.UserId}: {e.Message}"; + BatchLogger?.Invoke(Severity.Warning, message); + continue; + } + } + else + { + var message = $"Shared folder UID \"{sharedFolderUid}\": user {membership.UserId}: public key is not available"; + BatchLogger?.Invoke(Severity.Warning, message); + continue; + } + rq.SharedFolderAddUser.Add(sfuu); + } + else + { + bool mr = (sfuu.ManageRecords == SetBooleanValue.BooleanNoChange) ? existingUser.ManageRecords : (sfuu.ManageRecords == SetBooleanValue.BooleanTrue); + var mu = (sfuu.ManageUsers == SetBooleanValue.BooleanNoChange) ? existingUser.ManageUsers : (sfuu.ManageUsers == SetBooleanValue.BooleanTrue); + if (mr != existingUser.ManageRecords || mu != existingUser.ManageUsers) + { + rq.SharedFolderUpdateUser.Add(sfuu); + } + } + } + else + { + var sfut = new SharedFolderUpdateTeam + { + TeamUid = ByteString.CopyFrom(membership.UserId.Base64UrlDecode()), + ManageUsers = (membership.Options?.ManageUsers).HasValue ? membership.Options.ManageUsers.Value : sharedFolder.DefaultManageUsers, + ManageRecords = (membership.Options?.ManageRecords).HasValue ? membership.Options.ManageRecords.Value : sharedFolder.DefaultManageRecords + }; + if (existingUser == null) + { + if (_vault.Auth.TryGetTeamKeys(membership.UserId, out var keys)) + { + try + { + if (keys.AesKey != null) + { + sfut.TypedSharedFolderKey = new EncryptedDataKey + { + EncryptedKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(sharedFolder.SharedFolderKey, keys.AesKey)), + EncryptedKeyType = EncryptedKeyType.EncryptedByDataKey, + }; + } + else if (keys.RsaPublicKey != null) + { + var rsaPublicKey = CryptoUtils.LoadPublicKey(keys.RsaPublicKey); + sfut.TypedSharedFolderKey = new EncryptedDataKey + { + EncryptedKey = ByteString.CopyFrom(CryptoUtils.EncryptRsa(sharedFolder.SharedFolderKey, rsaPublicKey)), + EncryptedKeyType = EncryptedKeyType.EncryptedByPublicKey, + }; + } + else + { + throw new Exception($"RSA public key not found"); + } + } + catch (Exception e) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": team {membership.UserId}: {e.Message}"; + BatchLogger?.Invoke(Severity.Warning, message); + continue; + } + } + else + { + var message = $"Shared folder UID \"{sharedFolderUid}\": user {membership.UserId}: public key is not available"; + BatchLogger?.Invoke(Severity.Warning, message); + continue; + } + rq.SharedFolderAddTeam.Add(sfut); + } + else + { + if (sfut.ManageRecords != existingUser.ManageRecords || sfut.ManageUsers != existingUser.ManageUsers) + { + + rq.SharedFolderUpdateTeam.Add(sfut); + } + } + } + } + } + if (rq.SharedFolderAddUser.Count > 0 || rq.SharedFolderAddTeam.Count > 0 || rq.SharedFolderUpdateUser.Count > 0 || + rq.SharedFolderUpdateTeam.Count > 0 || rq.SharedFolderRemoveUser.Count > 0 || rq.SharedFolderRemoveTeam.Count > 0) + { + sharedFolderMembershipRequests.Add(rq); + } + } + + while (sharedFolderMembershipRequests.Count > 0) + { + var rq = new SharedFolderUpdateV3RequestV2(); + var rqNo = 0; + while (sharedFolderMembershipRequests.Count > 0) + { + var sfRq = sharedFolderMembershipRequests[0]; + rqNo += sfRq.SharedFolderAddUser.Count + sfRq.SharedFolderAddTeam.Count + sfRq.SharedFolderUpdateUser.Count + + sfRq.SharedFolderUpdateTeam.Count + sfRq.SharedFolderRemoveUser.Count + sfRq.SharedFolderRemoveTeam.Count; + sharedFolderMembershipRequests.RemoveAt(0); + rq.SharedFoldersUpdateV3.Add(sfRq); + if (rqNo >= 900) + { + break; + } + } + try + { + var rs = await _vault.Auth.ExecuteAuthRest( + "vault/shared_folder_update_v3", rq, apiVersion: 1); + foreach (var rss in rs.SharedFoldersUpdateV3Response) + { + var sharedFolderUid = rss.SharedFolderUid.ToArray().Base64UrlEncode(); + foreach (var uas in rss.SharedFolderAddUserStatus) + { + if (!string.Equals(uas.Status, "success", StringComparison.InvariantCultureIgnoreCase)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": failed to add user {uas.Username}: {uas.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + } + } + foreach (var uus in rss.SharedFolderUpdateUserStatus) + { + if (!string.Equals(uus.Status, "success", StringComparison.InvariantCultureIgnoreCase)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": failed to update user {uus.Username}: {uus.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + } + } + foreach (var uus in rss.SharedFolderRemoveUserStatus) + { + if (!string.Equals(uus.Status, "success", StringComparison.InvariantCultureIgnoreCase)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": failed to remove user {uus.Username}: {uus.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + } + } + foreach (var tas in rss.SharedFolderAddTeamStatus) + { + if (!string.Equals(tas.Status, "success", StringComparison.InvariantCultureIgnoreCase)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": failed to add team {tas.TeamUid.ToArray().Base64UrlEncode()}: {tas.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + } + } + foreach (var tus in rss.SharedFolderUpdateTeamStatus) + { + if (!string.Equals(tus.Status, "success", StringComparison.InvariantCultureIgnoreCase)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": failed to update user {tus.TeamUid.ToArray().Base64UrlEncode()}: {tus.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + } + } + foreach (var tas in rss.SharedFolderRemoveTeamStatus) + { + if (!string.Equals(tas.Status, "success", StringComparison.InvariantCultureIgnoreCase)) + { + var message = $"Shared folder UID \"{sharedFolderUid}\": failed to remove team {tas.TeamUid.ToArray().Base64UrlEncode()}: {tas.Status}"; + BatchLogger?.Invoke(Severity.Warning, message); + } + } + } + } + catch (Exception e) + { + BatchLogger?.Invoke(Severity.Warning, $"Shared folders update error: {e.Message}"); + } + } + } + + await _vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + Reset(); + return result; + } + + + /// + public bool PutUserToSharedFolder(string sharedFolderUid, string userId, UserType userType, ISharedFolderUserOptions options = null) + { + if (!TryGetFolderByUid(sharedFolderUid, out var f)) + { + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" not found"); + return false; + } + + switch (f.FolderType) + { + case FolderType.UserFolder: + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" is not a shared folder"); + return false; + case FolderType.SharedFolderFolder: + BatchLogger?.Invoke(Severity.Information, $"Folder UID \"{sharedFolderUid}\" is a shared subfolder folder. Selecting a parent shared folder."); + sharedFolderUid = f.SharedFolderUid; + if (!TryGetFolderByUid(sharedFolderUid, out f)) + { + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" not found"); + } + if (f.FolderType != FolderType.SharedFolder) + { + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" is not a shared folder"); + } + break; + } + + SharedFolderMember pendingMembership = null; + + if (_sharedFolderMembership.TryGetValue(sharedFolderUid, out var currentSharedFolder)) + { + currentSharedFolder.TryGetValue(userId, out pendingMembership); + } + + if (pendingMembership != null) + { + pendingMembership.IsRemove = false; + pendingMembership.Options = options; + return true; + } + + pendingMembership = new SharedFolderMember + { + UserId = userId, + UserType = userType, + IsRemove = false, + Options = options, + }; + if (currentSharedFolder == null) + { + currentSharedFolder = new Dictionary(); + _sharedFolderMembership.Add(sharedFolderUid, currentSharedFolder); + } + currentSharedFolder.Add(userId, pendingMembership); + return true; + } + + public bool RemoveUserFromSharedFolder(string sharedFolderUid, string userId, UserType userType) + { + if (!TryGetFolderByUid(sharedFolderUid, out var f)) + { + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" not found"); + return false; + } + + switch (f.FolderType) + { + case FolderType.UserFolder: + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" is not a shared folder"); + return false; + case FolderType.SharedFolderFolder: + BatchLogger?.Invoke(Severity.Information, $"Folder UID \"{sharedFolderUid}\" is a shared subfolder folder. Selecting a parent shared folder."); + sharedFolderUid = f.SharedFolderUid; + if (!TryGetFolderByUid(sharedFolderUid, out f)) + { + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" not found"); + } + if (f.FolderType != FolderType.SharedFolder) + { + BatchLogger?.Invoke(Severity.Warning, $"Folder UID \"{sharedFolderUid}\" is not a shared folder"); + } + break; + } + + SharedFolderMember pendingMembership = null; + if (_sharedFolderMembership.TryGetValue(sharedFolderUid, out var currentSharedFolder)) + { + currentSharedFolder.TryGetValue(userId, out pendingMembership); + } + if (pendingMembership != null) + { + if (!pendingMembership.IsRemove) + { + currentSharedFolder.Remove(userId); + } + return true; + } + + if (_vault.TryGetSharedFolder(sharedFolderUid, out var sharedFolder)) + { + var existingMembership = sharedFolder.UsersPermissions.FirstOrDefault( + x => x.UserType == userType && string.Equals(x.UserId, userId, + x.UserType == UserType.User ? StringComparison.InvariantCultureIgnoreCase : StringComparison.InvariantCulture)); + if (existingMembership != null) + { + if (currentSharedFolder == null) + { + currentSharedFolder = new Dictionary(); + _sharedFolderMembership.Add(sharedFolderUid, currentSharedFolder); + } + currentSharedFolder.Add(userId, new SharedFolderMember { UserType = userType, UserId = userId, IsRemove = true }); + } + } + + return true; + } + + + /// + public RecordMatch RecordMatch { get; } + + /// + /// Gets or sets logger + /// + public Action BatchLogger { get; set; } + + /// + /// Gets number of folders to be added + /// + public int FoldersToAdd => _foldersToAdd.Count; + + /// + /// Gets number of legacy records to be added + /// + public int LegacyRecordsToAdd => _legacyRecordsToAdd.Count; + + /// + /// Gets number of typed records to be added + /// + public int TypedRecordsToAdd => _typedRecordsToAdd.Count; + + /// + /// Gets number of typed records to be updated + /// + public int RecordsToUpdate => _recordsToUpdate.Count; + + /// + /// Gets the number of folder to be renamed + /// + /// + public int FoldersToRename => _folderNameUpdates.Count; + } +} diff --git a/KeeperSdk/vault/FileAttachment.cs b/KeeperSdk/vault/FileAttachment.cs index 6b0a6f0..aa6b011 100644 --- a/KeeperSdk/vault/FileAttachment.cs +++ b/KeeperSdk/vault/FileAttachment.cs @@ -1,442 +1,441 @@ using KeeperSecurity.Authentication; using KeeperSecurity.Commands; using KeeperSecurity.Utils; -using KeeperSecurity.Vault; using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Net; -using System.Runtime.Serialization; using System.Security.Cryptography; using System.Text; using System.Threading.Tasks; - -namespace KeeperSecurity -{ - namespace Vault - { +using Google.Protobuf; +using Org.BouncyCastle.Utilities.Zlib; +using System.Net.Http; +using System.Runtime.CompilerServices; +using System.Net.Http.Headers; + +namespace KeeperSecurity.Vault { + + /// + /// Creates an attachment upload task. + /// + public class AttachmentUploadTask : IAttachmentUploadTask { /// - /// Creates an attachment upload task. + /// Initializes a new instance of class. /// - public class AttachmentUploadTask : IAttachmentUploadTask + /// + /// + public AttachmentUploadTask(Stream attachmentStream, IThumbnailUploadTask thumbnail = null) { - /// - /// Initializes a new instance of class. - /// - /// - /// - public AttachmentUploadTask(Stream attachmentStream, IThumbnailUploadTask thumbnail = null) - { - Thumbnail = thumbnail; - Stream = attachmentStream; - } + Thumbnail = thumbnail; + Stream = attachmentStream; + } - /// - /// Attachment name. - /// - public string Name { get; set; } + /// + public string Name { get; set; } - /// - /// Attachment title. - /// - public string Title { get; set; } + /// + public string Title { get; set; } - /// - /// Attachment MIME type. - /// - public string MimeType { get; set; } + /// + public string MimeType { get; set; } - /// - /// Attachment input stream. - /// - public Stream Stream { get; protected set; } + /// + public Stream Stream { get; protected set; } - public IThumbnailUploadTask Thumbnail { get; protected set; } - } + /// + public IThumbnailUploadTask Thumbnail { get; protected set; } + } + /// + /// Creates a file attachment upload task. + /// + public class FileAttachmentUploadTask : AttachmentUploadTask, IDisposable { /// - /// Creates a file attachment upload task. + /// Initializes a new instance of class. /// - public class FileAttachmentUploadTask : AttachmentUploadTask, IDisposable + /// File name. + /// Thumbnail upload task. Optional. + public FileAttachmentUploadTask(string fileName, IThumbnailUploadTask thumbnail = null) + : base(null, thumbnail) { - /// - /// Initializes a new instance of class. - /// - /// File name. - /// Thumbnail upload task. Optional. - public FileAttachmentUploadTask(string fileName, IThumbnailUploadTask thumbnail = null) - : base(null, thumbnail) - { - if (File.Exists(fileName)) - { - Name = Path.GetFileName(fileName); - Title = Name; - try - { - MimeType = MimeTypes.MimeTypeMap.GetMimeType(Path.GetExtension(fileName)); - } - catch - { - // ignored - } - - Stream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read); - } - else - { - Trace.TraceError("FileAttachmentUploadTask: fileName: \"{0}\" not found.", fileName); - } + if (!File.Exists(fileName)) { + throw new Exception($"Cannot open file \"{fileName}\""); } + Name = Path.GetFileName(fileName); + Title = Name; + try { + MimeType = MimeTypes.MimeTypeMap.GetMimeType(Path.GetExtension(fileName)); + } catch {/*ignored*/} - public void Dispose() - { - Stream?.Dispose(); - } + Stream = File.Open(fileName, FileMode.Open, FileAccess.Read, FileShare.Read); } - public partial class VaultOnline : IVaultFileAttachment + public void Dispose() { - /// - /// Creates a file attachment download HTTP request. - /// - /// Record UID. - /// Attachment ID. - /// A signed WebRequest instance (awaitable) - public async Task CreateAttachmentDownloadRequest(string recordUid, string attachmentId) - { - var command = new RequestDownloadCommand - { - RecordUid = recordUid, - FileIDs = new[] {attachmentId} - }; - this.ResolveRecordAccessPath(command); - - var rs = await Auth.ExecuteAuthCommand(command); - - var download = rs.Downloads[0]; - return WebRequest.Create(new Uri(download.Url)); - } + Stream?.Dispose(); + } + } - /// - /// Downloads and decrypts file attachment. - /// - /// Keeper record. - /// Attachment name, title, or ID. - /// Writable stream. - /// Awaitable task. - /// - public async Task DownloadAttachment(PasswordRecord record, string attachment, Stream destination) - { - if (record.Attachments == null) - { - throw new KeeperInvalidParameter("Vault::DownloadAttachment", "record", record.Uid, "has no attachments"); + public partial class VaultOnline : IVaultFileAttachment { + /// + public IEnumerable RecordAttachments(KeeperRecord record) + { + switch (record) { + case PasswordRecord password: + if (password.Attachments != null) { + foreach (var atta in password.Attachments) { + yield return atta; + } } - AttachmentFile attachmentFile; - if (string.IsNullOrEmpty(attachment)) - { - if (record.Attachments.Count == 1) - { - attachmentFile = record.Attachments[0]; - } - else - { - throw new KeeperInvalidParameter("Vault::DownloadAttachment", "attachment", "", "is empty"); + break; + + case TypedRecord typed: + var fileRef = typed.Fields + .Where(x => x.FieldName == "fileRef") + .OfType>().FirstOrDefault(); + if (fileRef != null) { + foreach (var fileUid in fileRef.Values) { + if (TryGetKeeperRecord(fileUid, out var kr)) { + if (kr is FileRecord fr) { + yield return fr; + } + } } } - else - { - attachmentFile = record.Attachments - .FirstOrDefault(x => - { - if (attachment == x.Id || attachment == x.Name || attachment == x.Title) - { - return true; - } - if (x.Thumbnails != null) - { - var thumbId = x.Thumbnails.Select(y => y.Id).FirstOrDefault(y => y == attachment); - if (!string.IsNullOrEmpty(thumbId)) - { - return true; - } - } + break; - return false; - }); - } + case FileRecord file: + yield return file; + break; + } + } - if (attachmentFile == null) - { - throw new KeeperInvalidParameter("Vault::DownloadAttachment", "attachment", attachment, "not found"); - } - var attachmentId = attachmentFile.Id; - if (attachmentFile.Thumbnails != null) - { - foreach (var th in attachmentFile.Thumbnails) - { - if (th.Id == attachment) - { - attachmentId = th.Id; - break; - } + /// + public async Task DownloadAttachment(KeeperRecord record, string attachment, Stream destination) + { + var atta = RecordAttachments(record) + .Where(x => { + if (string.IsNullOrEmpty(attachment)) { + return true; } - } - var request = await CreateAttachmentDownloadRequest(record.Uid, attachmentId); - using (var response = (HttpWebResponse) await request.GetResponseAsync()) - { - using (var stream = response.GetResponseStream()) - { - var transform = new DecryptAesV1Transform(attachmentFile.Key.Base64UrlDecode()); - using (var decodeStream = new CryptoStream(stream, transform, CryptoStreamMode.Read)) - { - if (destination != null) - { - await decodeStream.CopyToAsync(destination); - } - } + if (attachment == x.Id || attachment == x.Name || attachment == x.Title) { + return true; } - } + + return false; + + }) + .FirstOrDefault(); + + if (atta == null) { + throw new KeeperInvalidParameter("Vault::DownloadAttachment", "attachment", attachment, "not found"); } - internal static async Task UploadSingleFile(UploadParameters upload, Stream source) - { - var boundary = "----------" + DateTime.Now.Ticks.ToString("x"); - var boundaryBytes = System.Text.Encoding.ASCII.GetBytes("\r\n--" + boundary); - - var request = (HttpWebRequest) WebRequest.Create(new Uri(upload.Url)); - request.Method = "POST"; - request.ContentType = "multipart/form-data; boundary=" + boundary; - - using (var requestStream = await Task.Factory.FromAsync(request.BeginGetRequestStream, request.EndGetRequestStream, null)) - { - const string parameterTemplate = "\r\nContent-Disposition: form-data; name=\"{0}\"\r\n\r\n{1}"; - if (upload.Parameters != null) - { - foreach (var pair in upload.Parameters) - { - await requestStream.WriteAsync(boundaryBytes, 0, boundaryBytes.Length); - var formItem = string.Format(parameterTemplate, pair.Key, pair.Value); - var formItemBytes = Encoding.UTF8.GetBytes(formItem); - await requestStream.WriteAsync(formItemBytes, 0, formItemBytes.Length); - } - } + switch (atta) { + case AttachmentFile attachmentFile: + await DownloadAttachmentFile(record.Uid, attachmentFile, destination); + break; - await requestStream.WriteAsync(boundaryBytes, 0, boundaryBytes.Length); - const string fileTemplate = "\r\nContent-Disposition: form-data; name=\"{0}\"\r\nContent-Type: application/octet-stream\r\n\r\n"; - var fileItem = string.Format(fileTemplate, upload.FileParameter); - var fileBytes = Encoding.UTF8.GetBytes(fileItem); - await requestStream.WriteAsync(fileBytes, 0, fileBytes.Length); + case FileRecord fileRecord: + await DownloadFile(fileRecord, destination); + break; - await source.CopyToAsync(requestStream); + default: + throw new KeeperInvalidParameter("Vault::DownloadAttachment", "attachment", atta.GetType().Name, "attachment type is not supported"); - await requestStream.WriteAsync(boundaryBytes, 0, boundaryBytes.Length); - var trailer = Encoding.ASCII.GetBytes("--\r\n"); - await requestStream.WriteAsync(trailer, 0, trailer.Length); - } + } + } + + + /// + public async Task UploadAttachment(KeeperRecord record, IAttachmentUploadTask uploadTask) + { + switch (record) { + case PasswordRecord password: + await UploadPasswordAttachment(password, uploadTask); + break; + + case TypedRecord typed: + await UploadTypedAttachment(typed, uploadTask); + break; + default: + throw new KeeperInvalidParameter("Vault::UploadAttachment", "record", record.GetType().Name, "unsupported record type"); + } + } - HttpWebResponse response; - try - { - response = (HttpWebResponse) await Task.Factory.FromAsync(request.BeginGetResponse, request.EndGetResponse, null); - if ((int) response.StatusCode != upload.SuccessStatusCode) - { - throw new KeeperInvalidParameter("Vault::UploadSingleFile", "StatusCode", response.StatusCode.ToString(), "not success"); + /// + public async Task DeleteAttachment(KeeperRecord record, string attachmentId) + { + var deleted = false; + switch (record) { + case PasswordRecord password: + if (password.Attachments != null) { + var atta = password.Attachments.FirstOrDefault(x => x.Id == attachmentId); + if (atta != null) { + deleted = password.Attachments.Remove(atta); } } - catch (WebException e) - { - response = (HttpWebResponse) e.Response; - if (response == null || response.ContentType != "application/xml") throw; - using (var stream = new MemoryStream()) - { - var srcStream = response.GetResponseStream(); - if (srcStream == null) throw; - await srcStream.CopyToAsync(stream); - var responseText = Encoding.UTF8.GetString(stream.ToArray()); - Trace.TraceError(responseText); - } - - throw; + break; + case TypedRecord typed: + var fileRef = typed.Fields + .Where(x => x.FieldName == "fileRef") + .OfType>().FirstOrDefault(); + if (fileRef != null) { + deleted = fileRef.Values.Remove(attachmentId); } + break; } - /// - /// Encrypts and uploads file attachment. - /// - /// Keeper record. - /// Upload task - /// Awaitable task. - /// - public async Task UploadAttachment(PasswordRecord record, IAttachmentUploadTask uploadTask) - { - var fileStream = uploadTask.Stream; - if (fileStream == null) - { - throw new KeeperInvalidParameter("Vault::UploadAttachment", "uploadTask", "GetStream()", "null"); - } + if (deleted) { + await UpdateRecord(record, false); + } - var thumbStream = uploadTask.Thumbnail?.Stream; - var command = new RequestUploadCommand - { - FileCount = 1, - ThumbnailCount = thumbStream != null ? 1 : 0 - }; + return deleted; + } - var rs = await Auth.ExecuteAuthCommand(command); - if (rs.FileUploads == null || rs.FileUploads.Length < 1) - { - throw new KeeperInvalidParameter("Vault::UploadAttachment", "request_upload", "file_uploads", "empty"); - } - var fileUpload = rs.FileUploads[0]; - UploadParameters thumbUpload = null; - if (rs.ThumbnailUploads != null && rs.ThumbnailUploads.Length > 0) - { - thumbUpload = rs.ThumbnailUploads[0]; - } - var key = CryptoUtils.GenerateEncryptionKey(); - var atta = new AttachmentFile - { - Id = fileUpload.FileId, - Name = uploadTask.Name, - Title = uploadTask.Title, - Key = key.Base64UrlEncode(), - Type = uploadTask.MimeType, - LastModified = DateTimeOffset.Now, - }; - var transform = new EncryptAesV1Transform(key); - using (var cryptoStream = new CryptoStream(fileStream, transform, CryptoStreamMode.Read)) - { - await UploadSingleFile(fileUpload, cryptoStream); - atta.Size = transform.EncryptedBytes; + /// + public async Task DownloadFile(FileRecord fileRecord, Stream destination) + { + var rq = new Records.FilesGetRequest { + ForThumbnails = false + }; + rq.RecordUids.Add(ByteString.CopyFrom(fileRecord.Uid.Base64UrlDecode())); + var rs = await Auth.ExecuteAuthRest( + "vault/files_download", rq); + var fileResult = rs.Files[0]; + if (fileResult.Status != Records.FileGetResult.FgSuccess) { + var status = fileResult.Status.ToString().ToSnakeCase(); + if (status.StartsWith("fg_")) { + status = status.Substring(3); } - if (thumbUpload != null && thumbStream != null) - { - try - { - transform = new EncryptAesV1Transform(key); - using (var cryptoStream = new CryptoStream(thumbStream, transform, CryptoStreamMode.Read)) - { - await UploadSingleFile(thumbUpload, cryptoStream); - } + throw new KeeperApiException(status, fileRecord.Name ?? fileRecord.Title); + } - var thumbnail = new AttachmentFileThumb - { - Id = thumbUpload.FileId, - Type = uploadTask.Thumbnail.MimeType, - Size = uploadTask.Thumbnail.Size - }; - var ts = new[] {thumbnail}; - atta.Thumbnails = atta.Thumbnails == null ? ts : atta.Thumbnails.Concat(ts).ToArray(); - } - catch (Exception e) - { - Trace.TraceError("Upload Thumbnail: {0}: \"{1}\"", e.GetType().Name, e.Message); + var request = WebRequest.Create(new Uri(fileResult.Url)); + + using (var response = (HttpWebResponse) await request.GetResponseAsync()) { + using (var stream = response.GetResponseStream()) { + var transform = new DecryptAesV2Transform(fileRecord.RecordKey); + using (var decodeStream = new CryptoStream(stream, transform, CryptoStreamMode.Read)) { + if (destination != null) { + await decodeStream.CopyToAsync(destination); + } } } - - record.Attachments.Add(atta); } } - } - namespace Commands - { - [DataContract] - internal class RequestDownloadCommand : AuthenticatedCommand, IRecordAccessPath + /// + public async Task DownloadAttachmentFile(string recordUid, AttachmentFile attachment, Stream destination) { - public RequestDownloadCommand() : base("request_download") - { + var command = new RequestDownloadCommand { + RecordUid = recordUid, + FileIDs = new[] { attachment.Id } + }; + this.ResolveRecordAccessPath(command); + var rs = await this.Auth.ExecuteAuthCommand(command); + + var download = rs.Downloads[0]; + var request = WebRequest.Create(new Uri(download.Url)); + using (var response = (HttpWebResponse) await request.GetResponseAsync()) + using (var stream = response.GetResponseStream()) { + var transform = new DecryptAesV1Transform(attachment.Key.Base64UrlDecode()); + using (var decodeStream = new CryptoStream(stream, transform, CryptoStreamMode.Read)) { + if (destination != null) { + await decodeStream.CopyToAsync(destination); + } + } } + } - [DataMember(Name = "file_ids")] - public string[] FileIDs; - - [DataMember(Name = "record_uid")] - public string RecordUid { get; set; } - - [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] - public string SharedFolderUid { get; set; } - - [DataMember(Name = "team_uid", EmitDefaultValue = false)] - public string TeamUid { get; set; } + internal static async Task UploadSingleFile(UploadParameters upload, Stream inputStream, IWebProxy proxy = null) + { + var content = new MultipartFormDataContent(); + foreach (var pair in upload.Parameters) content.Add(new StringContent(pair.Value), pair.Key); + var fileContent = new StreamContent(inputStream); + fileContent.Headers.ContentType = new MediaTypeHeaderValue("application/octet-stream"); + content.Add(fileContent, upload.FileParameter); + var httpMessageHandler = new HttpClientHandler(); + if (proxy != null) { + httpMessageHandler.Proxy = proxy; + } + using (var httpClient = new HttpClient(httpMessageHandler, true)) { + var rs = await httpClient.PostAsync(upload.Url, content); + if ((int) rs.StatusCode != upload.SuccessStatusCode) + throw new Exception($"File upload HTTP error: {rs.StatusCode}"); + } } - [DataContract] - internal class RequestUploadCommand : AuthenticatedCommand + private async Task UploadPasswordAttachment(PasswordRecord record, IAttachmentUploadTask uploadTask) { - public RequestUploadCommand() : base("request_upload") - { + var fileStream = uploadTask.Stream; + if (fileStream == null) { + throw new KeeperInvalidParameter("Vault::UploadAttachment", "uploadTask", "GetStream()", "null"); } - [DataMember(Name = "file_count")] - public int FileCount = 0; + var thumbStream = uploadTask.Thumbnail?.Stream; + var command = new RequestUploadCommand { + FileCount = 1, + ThumbnailCount = thumbStream != null ? 1 : 0 + }; - [DataMember(Name = "thumbnail_count")] - public int ThumbnailCount = 0; - } + var rs = await Auth.ExecuteAuthCommand(command); + if (rs.FileUploads == null || rs.FileUploads.Length < 1) { + throw new KeeperInvalidParameter("Vault::UploadAttachment", "request_upload", "file_uploads", "empty"); + } -#pragma warning disable 0649 - [DataContract] - internal class RequestDownload - { - [DataMember(Name = "success_status_code")] - public int SuccessStatusCode; + var fileUpload = rs.FileUploads[0]; + UploadParameters thumbUpload = null; + if (rs.ThumbnailUploads != null && rs.ThumbnailUploads.Length > 0) { + thumbUpload = rs.ThumbnailUploads[0]; + } - [DataMember(Name = "url")] - public string Url; - } + var key = CryptoUtils.GenerateEncryptionKey(); + var atta = new AttachmentFile { + Id = fileUpload.FileId, + Name = uploadTask.Name, + Title = uploadTask.Title, + Key = key.Base64UrlEncode(), + MimeType = uploadTask.MimeType, + LastModified = DateTimeOffset.Now, + }; + var transform = new EncryptAesV1Transform(key); + using (var cryptoStream = new CryptoStream(fileStream, transform, CryptoStreamMode.Read)) { + await UploadSingleFile(fileUpload, cryptoStream); + atta.Size = transform.EncryptedBytes; + } - [DataContract] - [KnownType(typeof(RequestDownload))] - internal class RequestDownloadResponse : KeeperApiResponse - { + if (thumbUpload != null && thumbStream != null) { + try { + transform = new EncryptAesV1Transform(key); + using (var cryptoStream = new CryptoStream(thumbStream, transform, CryptoStreamMode.Read)) { + await UploadSingleFile(thumbUpload, cryptoStream); + } + + var thumbnail = new AttachmentFileThumb { + Id = thumbUpload.FileId, + Type = uploadTask.Thumbnail.MimeType, + Size = uploadTask.Thumbnail.Size + }; + var ts = new[] { thumbnail }; + atta.Thumbnails = atta.Thumbnails == null ? ts : atta.Thumbnails.Concat(ts).ToArray(); + } catch (Exception e) { + Trace.TraceError("Upload Thumbnail: {0}: \"{1}\"", e.GetType().Name, e.Message); + } + } - [DataMember(Name = "downloads")] - public RequestDownload[] Downloads; + record.Attachments.Add(atta); + + await UpdateRecord(record); } - [DataContract] - internal class UploadParameters + private async Task UploadTypedAttachment(TypedRecord record, IAttachmentUploadTask uploadTask) { - [DataMember(Name = "url")] - public string Url; - - [DataMember(Name = "max_size")] - public long MaxSize; + var fileStream = uploadTask.Stream; + if (fileStream == null) { + throw new KeeperInvalidParameter("Vault::UploadAttachment", "uploadTask", "GetStream()", "null"); + } - [DataMember(Name = "success_status_code")] - public int SuccessStatusCode; + var fileData = new RecordFileData { + Type = uploadTask.MimeType, + Name = uploadTask.Name, + Title = uploadTask.Title, + Size = null, + ThumbnailSize = null, + LastModified = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + + }; + var fileKey = CryptoUtils.GenerateEncryptionKey(); + byte[] encryptedThumb = null; + if (uploadTask.Thumbnail != null) { + using (var ts = new MemoryStream()) { + await uploadTask.Stream.CopyToAsync(ts); + await ts.FlushAsync(); + var thumbBytes = ts.ToArray(); + fileData.ThumbnailSize = thumbBytes.Length; + encryptedThumb = CryptoUtils.EncryptAesV2(thumbBytes, fileKey); + } + } - [DataMember(Name = "file_id")] - public string FileId; + var tempFile = Path.GetTempFileName(); + var transform = new EncryptAesV2Transform(fileKey); + using (var encryptedFile = File.OpenWrite(tempFile)) + using (var cryptoStream = new CryptoStream(uploadTask.Stream, transform, CryptoStreamMode.Read)) { + await cryptoStream.CopyToAsync(encryptedFile); + fileData.Size = transform.EncryptedBytes; + } - [DataMember(Name = "file_parameter")] - public string FileParameter; + var fileInfo = new FileInfo(tempFile); + var fileUid = CryptoUtils.GenerateUid(); + var fileRq = new Records.File { + RecordUid = ByteString.CopyFrom(fileUid.Base64UrlDecode()), + RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(fileKey, Auth.AuthContext.DataKey)), + Data = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(JsonUtils.DumpJson(fileData), fileKey)), + FileSize = fileInfo.Length, + ThumbSize = encryptedThumb?.Length ?? 0, + }; + var rq = new Records.FilesAddRequest { + ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }; + rq.Files.Add(fileRq); + var fileRs = await Auth.ExecuteAuthRest("vault/files_add", rq); + var uploadRs = fileRs.Files[0]; + var fileUpload = new UploadParameters { + Url = uploadRs.Url, + FileParameter = "file", + SuccessStatusCode = uploadRs.SuccessStatusCode, + Parameters = JsonUtils.ParseJson>(Encoding.UTF8.GetBytes(uploadRs.Parameters)) + }; + if (record.LinkedKeys == null) { + record.LinkedKeys = new Dictionary(); + } + record.LinkedKeys[fileUid] = fileKey; - [DataMember(Name = "parameters")] - public IDictionary Parameters; + try { + using (var cryptoStream = File.OpenRead(tempFile)) { + await UploadSingleFile(fileUpload, cryptoStream); + } + } catch (Exception e) { + Trace.TraceError("Upload Thumbnail: {0}: \"{1}\"", e.GetType().Name, e.Message); + } - } + if (encryptedThumb != null && !string.IsNullOrEmpty(uploadRs.ThumbnailParameters)) { + var thumbUpload = new UploadParameters { + Url = uploadRs.Url, + FileParameter = "thumb", + SuccessStatusCode = uploadRs.SuccessStatusCode, + Parameters = JsonUtils.ParseJson>(Encoding.UTF8.GetBytes(uploadRs.ThumbnailParameters)) + }; + try { + using (var cryptoStream = new MemoryStream(encryptedThumb)) { + await UploadSingleFile(thumbUpload, cryptoStream); + } + } catch (Exception e) { + Trace.TraceError("Upload Thumbnail: {0}: \"{1}\"", e.GetType().Name, e.Message); + } + } - [DataContract] - internal class RequestUploadResponse : KeeperApiResponse - { - [DataMember(Name = "file_uploads")] - public UploadParameters[] FileUploads; + var facade = new TypedRecordFacade(record); + if (facade.Fields.FileRef != null) { + var uids = facade.Fields.FileRef.Values; + if (uids.Count > 0 && string.IsNullOrEmpty(uids[0])) { + uids[0] = fileUid; + } else { + uids.Add(fileUid); + } + } - [DataMember(Name = "thumbnail_uploads")] - public UploadParameters[] ThumbnailUploads; + await UpdateRecord(record); } - -#pragma warning restore 0649 } } diff --git a/KeeperSdk/vault/Import.cs b/KeeperSdk/vault/Import.cs new file mode 100644 index 0000000..27a154b --- /dev/null +++ b/KeeperSdk/vault/Import.cs @@ -0,0 +1,702 @@ +using KeeperSecurity.Commands; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Runtime.Serialization; +using System.Threading.Tasks; + +namespace KeeperSecurity +{ + namespace Commands + { + [DataContract] + public class ImportRecordFolder + { + [DataMember(Name = "folder", EmitDefaultValue = false)] + public string FolderName { get; set; } + [DataMember(Name = "shared_folder", EmitDefaultValue = false)] + public string SharedFolderName { get; set; } + [DataMember(Name = "can_edit", EmitDefaultValue = false)] + public bool? CanEdit { get; set; } + [DataMember(Name = "can_share", EmitDefaultValue = false)] + public bool? CanShare { get; set; } + } + + + [DataContract] + public class ImportRecord + { + [DataMember(Name = "uid", EmitDefaultValue = false)] + public string Uid { get; set; } + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + [DataMember(Name = "$type", EmitDefaultValue = false)] + public string RecordType { get; set; } + [DataMember(Name = "login", EmitDefaultValue = false)] + public string Login { get; set; } + [DataMember(Name = "password", EmitDefaultValue = false)] + public string Password { get; set; } + [DataMember(Name = "login_url", EmitDefaultValue = false)] + public string LoginUrl { get; set; } + [DataMember(Name = "notes", EmitDefaultValue = false)] + public string Notes { get; set; } + [DataMember(Name = "custom_fields", EmitDefaultValue = false)] + public IDictionary CustomFields { get; set; } + [DataMember(Name = "folders", EmitDefaultValue = false)] + public ImportRecordFolder[] Folders { get; set; } + } + + [DataContract] + public class ImportSharedFolderPermissions + { + [DataMember(Name = "uid", EmitDefaultValue = false)] + public string Uid { get; set; } + [DataMember(Name = "name")] + public string Name { get; set; } + [DataMember(Name = "manage_users", EmitDefaultValue = false)] + public bool? ManageUsers { get; set; } + [DataMember(Name = "manage_records", EmitDefaultValue = false)] + public bool? ManageRecords { get; set; } + } + + [DataContract] + public class ImportSharedFolder + { + [DataMember(Name = "path", EmitDefaultValue = false)] + public string Path { get; set; } + [DataMember(Name = "can_edit")] + public bool CanEdit { get; set; } + [DataMember(Name = "can_share")] + public bool CanShare { get; set; } + [DataMember(Name = "manage_users")] + public bool ManageUsers { get; set; } + [DataMember(Name = "manage_records")] + public bool ManageRecords { get; set; } + + [DataMember(Name = "permissions")] + public ImportSharedFolderPermissions[] Permissions { get; set; } + } + + [DataContract] + public class ImportFile + { + [DataMember(Name = "records")] + public ImportRecord[] Records { get; set; } + [DataMember(Name = "shared_folders")] + public ImportSharedFolder[] SharedFolders { get; set; } + } + } + + namespace Vault + { + /// + /// Keeper Import methods + /// + public static class KeeperImport + { + private const string TWO_FACTOR_CODE = "TFC:Keeper"; + + static void PopulatePasswordRecord(this ImportRecord import, PasswordRecord password) + { + password.Uid = import.Uid; + password.Title = import.Title; + password.Login = import.Login; + password.Password = import.Password; + password.Link = import.LoginUrl; + password.Notes = import.Notes; + if (import.CustomFields != null) + { + foreach (var pair in import.CustomFields) + { + var name = pair.Key; + var value = pair.Value; + if (value == null) + { + continue; + } + if (value is string strValue && !string.IsNullOrEmpty(strValue)) + { + if (name == TWO_FACTOR_CODE) + { + if (strValue.StartsWith("otpauth://")) + { + password.Totp = strValue; + } + else + { + password.Totp = $"otpauth://totp/?secret={strValue}"; + } + } + else + { + password.SetCustomField(name, strValue); + } + } + } + } + } + + static Tuple SplitFieldKey(string fieldKey) + { + string fieldType; + var fieldLabel = ""; + const char separator = ':'; + if (fieldKey.StartsWith("$")) + { + var pos = fieldKey.IndexOf(separator); + if (pos > 0) + { + fieldType = fieldKey.Substring(1, pos - 1); + fieldLabel = fieldKey.Substring(pos + 1); + } + else + { + fieldType = fieldKey.Substring(1); + } + } + else + { + fieldType = "text"; + fieldLabel = fieldKey; + } + + if (!string.IsNullOrEmpty(fieldLabel)) + { + var indexPos = fieldLabel.LastIndexOf(separator); + if (indexPos == fieldLabel.Length - 2) + { + char lastCh = fieldLabel[fieldLabel.Length - 1]; + if (char.IsDigit(lastCh)) + { + fieldLabel = fieldLabel.Substring(0, indexPos); + } + } + } + if (!string.IsNullOrEmpty(fieldType)) + { + if (!RecordTypesConstants.TryGetRecordField(fieldType, out _)) + { + if (string.IsNullOrEmpty(fieldLabel)) + { + fieldLabel = fieldType; + } + fieldType = "text"; + } + } + return Tuple.Create(fieldType, fieldLabel); + } + + static void AssignValueToField(this ITypedField field, object value, Action logger) + { + if (value is string str && field is ISerializeTypedField sf) + { + sf.ImportTypedField(str); + } + else + { + IEnumerable Values() + { + if (value != null) + { + if (value is Array arr) + { + for (var i = 0; i < arr.Length; i++) + { + var v = arr.GetValue(i); + if (v != null) + { + yield return v; + } + } + } + else + { + yield return value; + } + } + } + foreach (var v in Values()) + { + if (v is string sv && field is TypedField ls) + { + if (!string.IsNullOrEmpty(sv)) + { + ls.Values.Add(sv); + } + } + else if (v is bool bv && field is TypedField lb) + { + lb.Values.Add(bv); + } + else if (v is IConvertible conv && field is TypedField lf) + { + var lv = conv.ToInt64(CultureInfo.InvariantCulture); + if (lv > 0) + { + lf.Values.Add(lv); + } + } + else if (v is IDictionary dict) + { + var obj = field.AppendValue(); + if (obj is IFieldTypeSerialize fts) + { + foreach (var key in dict.Keys) + { + var val = dict[key]; + if (key is string element && val is string elementValue) + { + if (!fts.SetElementValue(element, elementValue)) + { + if (!string.IsNullOrEmpty(elementValue)) + { + logger?.Invoke(Severity.Warning, $"Field \"${field.FieldName}.{field.FieldLabel}\": Unsupported element \"{element}\""); + } + } + } + } + } + else + { + logger?.Invoke(Severity.Warning, $"Field \"${field.FieldName}.{field.FieldLabel}\": IFieldTypeSerialize interface is not supported"); + } + } + else + { + logger?.Invoke(Severity.Warning, $"Field \"${field.FieldName}.{field.FieldLabel}\": Provided value is not supported"); + } + } + } + } + + static void PopulateTypedRecord(this ImportRecord import, TypedRecord typed, RecordTypeField[] schemaFields, Action logger) + { + typed.Uid = import.Uid; + typed.Title = import.Title; + typed.Notes = import.Notes; + + Dictionary customFields = null; + if (import.CustomFields != null) + { + customFields = import.CustomFields.ToDictionary(entry => entry.Key, entry => entry.Value); + if (customFields.TryGetValue(TWO_FACTOR_CODE, out var tfa)) + { + customFields["$oneTimeCode"] = tfa; + customFields.Remove(TWO_FACTOR_CODE); + } + } + + foreach (var schemaField in schemaFields) + { + var field = schemaField.CreateTypedField(); + typed.Fields.Add(field); + + if (schemaField.FieldName == "login" && !string.IsNullOrEmpty(import.Login)) + { + field.ObjectValue = import.Login; + import.Login = null; + } + else if (schemaField.FieldName == "password" && !string.IsNullOrEmpty(import.Password)) + { + field.ObjectValue = import.Password; + import.Password = null; + } + else if (schemaField.FieldName == "url" && !string.IsNullOrEmpty(import.LoginUrl)) + { + field.ObjectValue = import.LoginUrl; + import.LoginUrl = null; + } + else if (schemaField.FieldName.EndsWith("Ref")) + { + // TODO + } + else if (customFields != null) + { + string key = ""; + var ignoreLabel = schemaField.RecordField != null && schemaField.RecordField.Multiple != RecordFieldMultiple.Optional; + foreach (var fk in customFields.Keys) + { + var t = SplitFieldKey(fk); + if (t.Item1 == schemaField.FieldName || (string.IsNullOrEmpty(t.Item1) && schemaField.FieldName == "text")) + { + if (ignoreLabel || string.Equals(t.Item2, schemaField.FieldLabel, StringComparison.CurrentCultureIgnoreCase)) + { + key = fk; + break; + } + } + } + if (!string.IsNullOrEmpty(key)) + { + if (customFields.TryGetValue(key, out var value)) + { + if (value != null) + { + field.AssignValueToField(value, logger); + } + customFields.Remove(key); + } + + } + } + } + + // custom fields + if (!string.IsNullOrEmpty(import.Login)) + { + var tf = new RecordTypeField("login").CreateTypedField(); + tf.ObjectValue = import.Login; + typed.Custom.Add(tf); + } + if (!string.IsNullOrEmpty(import.Password)) + { + var tf = new RecordTypeField("password").CreateTypedField(); + tf.ObjectValue = import.Password; + typed.Custom.Add(tf); + } + if (!string.IsNullOrEmpty(import.LoginUrl)) + { + var tf = new RecordTypeField("url").CreateTypedField(); + tf.ObjectValue = import.LoginUrl; + typed.Custom.Add(tf); + } + + if (customFields != null) + { + foreach (var pair in customFields) + { + var fk = pair.Key; + var value = pair.Value; + if (value == null) + { + continue; + } + + var t = SplitFieldKey(fk); + var fieldType = t.Item1; + var fieldLabel = t.Item2; + + try + { + var field = new RecordTypeField(t.Item1, t.Item2).CreateTypedField(); + field.AssignValueToField(value, logger); + typed.Custom.Add(field); + } + catch (Exception e) + { + logger?.Invoke(Severity.Warning, $"Create field \"{fk}\" error: {e.Message}"); + } + } + } + } + + static FolderNode CreateFolderPath(this BatchVaultOperations bvo, string folderPath, SharedFolderOptions options = null) + { + FolderNode lastFolder = null; + var path = BatchVaultOperations.ParseFolderPath(folderPath).ToArray(); + for (var i = 0; i < path.Length; i++) + { + var currentPath = BatchVaultOperations.CreateFolderPath(path.Take(i + 1)); + var folder = bvo.GetFolderByPath(currentPath); + if (folder == null) + { + folder = bvo.AddFolder(path[i], lastFolder?.FolderUid, i == path.Length - 1 ? options : null); + } + lastFolder = folder; + } + return lastFolder; + } + + /// + /// Parses JSON object to import type + /// + /// parsed JSON import file + /// parsed import object + public static ImportFile LoadJsonDictionary(IDictionary importFile) + { + var import = new ImportFile(); + if (importFile.TryGetValue("records", out var r)) + { + var recordList = new List(); + if (r is Array records) + { + foreach (var ro in records) + { + if (ro is IDictionary record) + { + var rec = new ImportRecord(); + foreach (var pair in record) + { + switch (pair.Key) + { + case "title": rec.Title = pair.Value as string; break; + case "uid": rec.Uid = pair.Value as string; break; + case "$type": rec.RecordType = pair.Value as string; break; + case "login": rec.Login = pair.Value as string; break; + case "password": rec.Password = pair.Value as string; break; + case "login_url": rec.LoginUrl = pair.Value as string; break; + case "notes": rec.Notes = pair.Value as string; break; + case "folders": + { + if (pair.Value is Array folderArray) + { + var fl = new List(); + foreach (var fo in folderArray) + { + if (fo is IDictionary folder) + { + var irf = new ImportRecordFolder(); + foreach (var fp in folder) + { + switch (fp.Key) + { + case "folder": irf.FolderName = fp.Value as string; break; + case "shared_folder": irf.SharedFolderName = fp.Value as string; break; + case "can_edit": irf.CanEdit = fp.Value as bool?; break; + case "can_share": irf.CanShare = fp.Value as bool?; break; + } + } + fl.Add(irf); + } + } + rec.Folders = fl.ToArray(); + } + } + break; + case "custom_fields": rec.CustomFields = pair.Value as IDictionary; break; + } + } + recordList.Add(rec); + } + } + } + import.Records = recordList.ToArray(); + } + if (importFile.TryGetValue("shared_folders", out var sfs)) + { + var sharedFolderList = new List(); + if (sfs is Array sfArray) + { + foreach (var sfo in sfArray) + { + if (sfo is IDictionary sharedFolder) + { + var sf = new ImportSharedFolder(); + foreach (var pair in sharedFolder) + { + + switch (pair.Key) + { + case "path": { sf.Path = pair.Value as string; } break; + case "can_edit": { sf.CanEdit = (pair.Value is bool b ? b : false); } break; + case "can_share": { sf.CanShare = (pair.Value is bool b ? b : false); } break; + case "manage_records": { sf.ManageRecords = (pair.Value is bool b ? b : false); } break; + case "manage_users": { sf.ManageUsers = (pair.Value is bool b ? b : false); } break; + case "permissions": + { + var permissions = new List(); + if (pair.Value is Array ar) + { + foreach (var sfp in ar) + { + if (sfp is IDictionary permission) + { + var perm = new ImportSharedFolderPermissions(); + foreach (var ppair in permission) + { + switch (ppair.Key) + { + case "uid": { perm.Uid = (ppair.Value ?? "").ToString(); } break; + case "name": { perm.Name = (ppair.Value ?? "").ToString(); } break; + case "manage_records": { perm.ManageRecords = (ppair.Value is bool b ? b : false); } break; + case "manage_users": { perm.ManageUsers = (ppair.Value is bool b ? b : false); } break; + } + } + permissions.Add(perm); + } + } + sf.Permissions = permissions.ToArray(); + } + } + break; + } + } + sharedFolderList.Add(sf); + } + } + import.SharedFolders = sharedFolderList.ToArray(); + } + } + return import; + } + + /// + /// Import Keeper JSON file + /// + /// Vault instance + /// Import object + /// Logger + /// + public static async Task ImportJson(this VaultOnline vault, ImportFile import, Action logger) + { + var bo = new BatchVaultOperations(vault) + { + BatchLogger = logger + }; + + if (import.SharedFolders?.Length > 0) + { + var teamLookup = new Dictionary(); + foreach (var team in await vault.GetTeamsForShare()) + { + teamLookup[team.TeamUid] = team.TeamUid; + teamLookup[team.Name.ToLower()] = team.TeamUid; + } + + foreach (var sharedFolder in import.SharedFolders) + { + if (!string.IsNullOrEmpty(sharedFolder.Path)) + { + var folderNode = bo.GetFolderByPath(sharedFolder.Path); + if (folderNode == null) + { + SharedFolderOptions options = new SharedFolderOptions + { + ManageRecords = sharedFolder.ManageRecords, + ManageUsers = sharedFolder.ManageUsers, + CanEdit = sharedFolder.CanEdit, + CanShare = sharedFolder.CanShare, + }; + folderNode = bo.CreateFolderPath(sharedFolder.Path, options); + } + + if (folderNode != null && sharedFolder.Permissions != null) + { + foreach (var permission in sharedFolder.Permissions) + { + string userId = null; + UserType userType = UserType.Team; + + if (!string.IsNullOrEmpty(permission.Uid) && teamLookup.ContainsKey(permission.Uid)) + { + userId = teamLookup[permission.Uid]; + } + else if (!string.IsNullOrEmpty(permission.Name)) + { + var name = permission.Name.ToLower(); + if (teamLookup.ContainsKey(name)) + { + userId = teamLookup[name]; + } + else + { + try + { + var addr = new System.Net.Mail.MailAddress(name); + userId = name; + userType = UserType.User; + } + catch { /*ignored*/} + } + } + if (!string.IsNullOrEmpty(userId)) + { + bo.PutUserToSharedFolder(folderNode.FolderUid, userId, userType, new SharedFolderUserOptions + { + ManageRecords = permission.ManageRecords, + ManageUsers = permission.ManageUsers, + }); + } + } + } + } + } + } + + if (import.Records?.Length > 0) + { + foreach (var record in import.Records) + { + if (record.Folders?.Length > 0) + { + foreach (var f in record.Folders) + { + if (!string.IsNullOrEmpty(f.SharedFolderName)) + { + var folderNode = bo.GetFolderByPath(f.SharedFolderName); + if (folderNode == null) + { + SharedFolderOptions options = new SharedFolderOptions + { + ManageRecords = false, + ManageUsers = false, + CanEdit = false, + CanShare = false, + }; + bo.CreateFolderPath(f.SharedFolderName, options); + } + } + } + } + } + } + + if (import.Records?.Length > 0) + { + foreach (var record in import.Records) + { + KeeperRecord keeperRecord; + if (string.IsNullOrEmpty(record.RecordType)) + { + var password = new PasswordRecord(); + record.PopulatePasswordRecord(password); + keeperRecord = password; + } + else + { + if (!vault.TryGetRecordTypeByName(record.RecordType, out var recordType)) + { + record.RecordType = "login"; + vault.TryGetRecordTypeByName(record.RecordType, out recordType); + } + var typedRecord = new TypedRecord(record.RecordType); + record.PopulateTypedRecord(typedRecord, recordType.Fields, logger); + keeperRecord = typedRecord; + } + + FolderNode folder = null; + if (record.Folders?.Length > 0) + { + var f = record.Folders[0]; + if (!string.IsNullOrEmpty(f.FolderName) || !string.IsNullOrEmpty(f.SharedFolderName)) + { + var path = string.IsNullOrEmpty(f.FolderName) ? "" : f.FolderName; + if (!string.IsNullOrEmpty(f.SharedFolderName)) + { + if (!string.IsNullOrEmpty(path)) + { + if (f.SharedFolderName.EndsWith(BatchVaultOperations.PathDelimiter.ToString())) + { + f.SharedFolderName = f.SharedFolderName.Substring(0, f.SharedFolderName.Length - 1); + } + path = f.SharedFolderName + BatchVaultOperations.PathDelimiter + path; + } + } + folder = bo.GetFolderByPath(path); + if (folder == null) + { + folder = bo.CreateFolderPath(path); + } + } + } + bo.AddRecord(keeperRecord, folder); + } + } + + return await bo.ApplyChanges(); + } + } + } +} diff --git a/KeeperSdk/vault/OneTimeShareExtensions.cs b/KeeperSdk/vault/OneTimeShareExtensions.cs new file mode 100644 index 0000000..106f792 --- /dev/null +++ b/KeeperSdk/vault/OneTimeShareExtensions.cs @@ -0,0 +1,154 @@ +using KeeperSecurity.Utils; +using System.Security.Cryptography; +using System.Text; +using Authentication; +using Google.Protobuf; +using System; +using System.Threading.Tasks; +using KeeperSecurity.Authentication; +using System.Linq; +using System.Collections.Generic; + +namespace KeeperSecurity.Vault +{ + /// + /// Represents External / One-Time Share + /// + public class ExternalRecordShare { + /// + /// Record UID + /// + public string RecordUid { get; internal set; } + /// + public string ClientId { get; internal set; } + /// + /// Share Name + /// + public string Name { get; internal set; } + /// + /// Share Created + /// + public DateTimeOffset CreatedOn { get; internal set; } + /// + public DateTimeOffset FirstAccessExpiresOn { get; internal set; } + /// + /// Share Expiration + /// + public DateTimeOffset AccessExpiresOn { get; internal set; } + /// + /// URL Opened + /// + public DateTimeOffset? FirstAccessed { get; internal set; } + /// + /// Last Accessed + /// + public DateTimeOffset? LastAccessed { get; internal set; } + } + + /// + /// Miscellaneous External Share Methods + /// + public static class ExternalRecordShareExtensions + { + /// + /// Retrieve external shares for a record + /// + /// Vault + /// Record UID + /// List of external shares + public static async Task GetExernalRecordShares(this VaultOnline vault, string recordUid) + { + var rq = new GetAppInfoRequest + { + AppRecordUid = { ByteString.CopyFrom(recordUid.Base64UrlDecode()) }, + }; + + var rs = await vault.Auth.ExecuteAuthRest("vault/get_app_info", rq); + + return rs.AppInfo.Where(x => x.IsExternalShare).SelectMany(share => share.Clients, (share, client) => new { share, client }) + .Select(x => new ExternalRecordShare + { + RecordUid = x.share.AppRecordUid.ToArray().Base64UrlEncode(), + ClientId = x.client.ClientId.ToArray().Base64UrlEncode(), + Name = x.client.Id, + CreatedOn = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.client.CreatedOn), + FirstAccessExpiresOn = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.client.FirstAccessExpireOn), + AccessExpiresOn = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.client.AccessExpireOn), + FirstAccessed = x.client.FirstAccess > 0 ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.client.FirstAccess) : (DateTimeOffset?) null, + LastAccessed = x.client.LastAccess > 0 ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.client.LastAccess) : (DateTimeOffset?) null, + }).ToArray(); + } + + /// + /// Deletes external shares for a record + /// + /// Vault + /// Record UID + /// List of external share names + /// Awaitable task + public static async Task DeleteExernalRecordShares(this VaultOnline vault, string recordUid, IEnumerable clientIds) + { + var rq = new RemoveAppClientsRequest + { + AppRecordUid = ByteString.CopyFrom(recordUid.Base64UrlDecode()), + }; + var allShares = await vault.GetExernalRecordShares(recordUid); + foreach (var clientId in clientIds) + { + var share = allShares.FirstOrDefault(x => x.ClientId == clientId); + if (share != null) + { + rq.Clients.Add(ByteString.CopyFrom(clientId.Base64UrlDecode())); + } + } + if (rq.Clients.Count > 0) + { + await vault.Auth.ExecuteAuthRest("vault/external_share_remove", rq); + } + } + + /// + /// Creates an external share for a record + /// + /// Vault + /// Record UID + /// Share Expiration + /// Share Name + /// External Share URL + /// + public static async Task CreateExternalRecordShare(this VaultOnline vault, string recordUid, TimeSpan expireIn, string shareName = null) { + var record = vault.GetRecord(recordUid); + if (record == null) + { + throw new VaultException($"Record Uid \"{recordUid}\" not found"); + } + if (!(record is TypedRecord tr)) { + throw new VaultException($"Record Uid \"{record.Uid}\" / Title \"{record.Title}\" should be typed record."); + } + + + var clientKey = CryptoUtils.GenerateEncryptionKey(); + var hmac = new HMACSHA512(clientKey); + var clientId = hmac.ComputeHash(Encoding.UTF8.GetBytes("KEEPER_SECRETS_MANAGER_CLIENT_ID")); + var rq = new AddExternalShareRequest { + RecordUid = ByteString.CopyFrom(tr.Uid.Base64UrlDecode()), + ClientId = ByteString.CopyFrom(clientId), + EncryptedRecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(tr.RecordKey, clientKey)), + AccessExpireOn = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + (long)expireIn.TotalMilliseconds, + }; + if (!string.IsNullOrEmpty(shareName)) + { + rq.Id = shareName; + } + await vault.Auth.ExecuteAuthRest("vault/external_share_add", rq); + var builder = new UriBuilder(vault.Auth.Endpoint.Server) + { + Path = "/vault/share", + Scheme = "https", + Port = 443, + Fragment = clientKey.Base64UrlEncode(), + }; + return builder.ToString(); + } + } +} diff --git a/KeeperSdk/vault/RecordHistory.cs b/KeeperSdk/vault/RecordHistory.cs new file mode 100644 index 0000000..552dc86 --- /dev/null +++ b/KeeperSdk/vault/RecordHistory.cs @@ -0,0 +1,409 @@ +using KeeperSecurity.Authentication; +using KeeperSecurity.Commands; +using KeeperSecurity.Utils; +using KeeperSecurity.Vault.Commands; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Runtime.Serialization; +using System.Text; +using System.Threading.Tasks; + +namespace KeeperSecurity +{ + namespace Vault + { + public partial class VaultOnline + { + public async Task GetRecordHistory(string recordUid) + { + if (!TryGetKeeperRecord(recordUid, out var r)) + { + throw new Exception($"Record UID {recordUid} not found"); + } + var rq = new GetRecordHistoryCommand + { + RecordUid = recordUid, + }; + var rs = await Auth.ExecuteAuthCommand(rq); + var history = new List(); + foreach (var rh in rs.History) + { + try + { + history.Add(new RecordHistory + { + KeeperRecord = rh.Load(r.RecordKey), + Username = rh.Username, + }); + } + catch (Exception e) + { + Debug.WriteLine($"Parse record revision error: {e}"); + } + } + for (var i = 1; i < history.Count; i++) + { + var r1 = history[i].KeeperRecord; + var r2 = history[i - 1].KeeperRecord; + history[i].RecordChange = RecordHistoryUtils.GetRecordChanges(r1, r2); + } + + history.Reverse(); + return history.ToArray(); + } + + } + internal static class RecordHistoryUtils + { + internal static RecordChange GetRecordChanges(KeeperRecord r1, KeeperRecord r2) + { + RecordChange change = 0; + if (!string.Equals(r1.ExtractType(), r2.ExtractType())) { + change |= RecordChange.RecordType; + } + if (!string.Equals(r1.ExtractTitle(), r2.ExtractTitle())) + { + change |= RecordChange.Title; + } + if (!string.Equals(r1.ExtractLogin(), r2.ExtractLogin())) + { + change |= RecordChange.Login; + } + if (!string.Equals(r1.ExtractPassword(), r2.ExtractPassword())) + { + change |= RecordChange.Password; + } + if (!string.Equals(r1.ExtractUrl(), r2.ExtractUrl())) + { + change |= RecordChange.Url; + } + if (!string.Equals(r1.ExtractNotes(), r2.ExtractNotes())) + { + change |= RecordChange.Notes; + } + if (!string.Equals(r1.ExtractTotp(), r2.ExtractTotp())) + { + change |= RecordChange.Totp; + } + if (!string.Equals(r1.ExtractHost(), r2.ExtractHost())) + { + change |= RecordChange.Hostname; + } + if (!string.Equals(r1.ExtractAddress(), r2.ExtractAddress())) + { + change |= RecordChange.Address; + } + if (!string.Equals(r1.ExtractCard(), r2.ExtractCard())) + { + change |= RecordChange.PaymentCard; + } + if (!string.Equals(r1.ExtractCustomFields(), r2.ExtractCustomFields())) + { + change |= RecordChange.CustomField; + } + if (!string.Equals(r1.ExtractAttachments(), r2.ExtractAttachments())) + { + change |= RecordChange.File; + } + + return change; + } + + private static string ExtractType(this KeeperRecord record) + { + if (record == null) return null; + if (record is PasswordRecord) + { + return "legacy"; + } + else if (record is TypedRecord tr) + { + return tr.TypeName; + } + else if (record is ApplicationRecord) + { + return "app"; + } + return ""; + } + private static string ExtractTitle(this KeeperRecord record) + { + return record?.Title; + } + private static string ExtractLogin(this KeeperRecord record) + { + if (record == null) return null; + if (record is PasswordRecord pr) + { + return pr.Login; + } + else if (record is TypedRecord tr) + { + if (tr.FindTypedField("login", null, out var rf)) + { + return rf.GetExternalValue(); + } + } + return ""; + } + private static string ExtractPassword(this KeeperRecord record) + { + if (record == null) return null; + if (record is PasswordRecord pr) + { + return pr.Password; + } + else if (record is TypedRecord tr) + { + if (tr.FindTypedField("password", null, out var rf)) + { + return rf.GetExternalValue(); + } + } + return ""; + } + private static string ExtractUrl(this KeeperRecord record) + { + if (record == null) return null; + if (record is PasswordRecord pr) + { + return pr.Link; + } + else if (record is TypedRecord tr) + { + if (tr.FindTypedField("url", null, out var rf)) + { + return rf.GetExternalValue(); + } + } + return ""; + } + + private static string ExtractNotes(this KeeperRecord record) + { + if (record == null) return null; + if (record is PasswordRecord pr) + { + return pr.Notes; + } + else if (record is TypedRecord tr) + { + var notes = tr.Notes ?? ""; + if (tr.FindTypedField("note", null, out var rf)) + { + notes += rf.GetExternalValue(); + } + return notes; + } + return ""; + } + + private static string ExtractTotp(this KeeperRecord record) + { + if (record == null) return null; + if (record is PasswordRecord pr) + { + return pr.Totp; + } + else if (record is TypedRecord tr) + { + if (tr.FindTypedField("oneTimeCode", null, out var rf)) + { + var totp = rf.GetExternalValue(); + if (!string.IsNullOrEmpty(totp)) { + Debug.WriteLine(totp); + } + return totp; + } + } + return ""; + } + + private static string ExtractHost(this KeeperRecord record) + { + if (record == null) return null; + if (record is TypedRecord tr) + { + if (tr.FindTypedField("host", null, out var rf)) + { + var totp = rf.GetExternalValue(); + if (!string.IsNullOrEmpty(totp)) + { + Debug.WriteLine(totp); + } + return totp; + } + } + return ""; + } + + private static string ExtractAddress(this KeeperRecord record) + { + if (record == null) return null; + if (record is TypedRecord tr) + { + if (tr.FindTypedField("address", null, out var rf)) + { + var totp = rf.GetExternalValue(); + if (!string.IsNullOrEmpty(totp)) + { + Debug.WriteLine(totp); + } + return totp; + } + } + return ""; + } + + private static string ExtractCard(this KeeperRecord record) + { + if (record == null) return null; + if (record is TypedRecord tr) + { + if (tr.FindTypedField("paymentCard", null, out var rf)) + { + var totp = rf.GetExternalValue(); + if (!string.IsNullOrEmpty(totp)) + { + Debug.WriteLine(totp); + } + return totp; + } + } + return ""; + } + + private static string ExtractCustomFields(this KeeperRecord record) + { + if (record == null) return null; + List values = null; + + if (record is PasswordRecord pr) + { + if ((pr.Custom?.Count ?? 0) > 0) + { + values = new List(); + foreach (var cf in pr.Custom) + { + values.Add($"$text.{cf.Name}:{cf.Value}"); + } + } + } + else if (record is TypedRecord tr) + { + if ((tr.Custom?.Count ?? 0) > 0) { + values = new List(); + foreach (var cf in tr.Custom) + { + values.Add($"${cf.FieldName}.{cf.FieldLabel ?? string.Empty}:{cf.GetExternalValue()}"); + } + } + } + if (values != null && values.Count > 0) + { + values.Sort(); + return string.Join("\n", values); + } + return ""; + } + + private static string ExtractAttachments(this KeeperRecord record) + { + if (record == null) return null; + List values = null; + + if (record is PasswordRecord pr) + { + if ((pr.Attachments?.Count ?? 0) > 0) + { + values = new List(); + foreach (var atta in pr.Attachments) + { + values.Add(atta.Id); + } + } + } + else if (record is TypedRecord tr) + { + if (tr.FindTypedField("fileRef", null, out var rf)) + { + values = new List(); + for (int i = 0; i < rf.Count; i++) + { + var v = rf.GetValueAt(i); + if (v is string s) { + values.Add(s); + } + } + } + + } + if (values != null && values.Count > 0) + { + values.Sort(); + return string.Join("\n", values); + } + return ""; + } + } + + namespace Commands + { + [DataContract] + internal class GetRecordHistoryCommand : AuthenticatedCommand + { + public GetRecordHistoryCommand() : base("get_record_history") + { + } + + [DataMember(Name = "record_uid")] + public string RecordUid; + + [DataMember(Name = "client_time")] + public long ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + } + + [DataContract] + internal class RecordHistoryStorage : IStorageRecord + { + [DataMember(Name = "record_uid")] + public string RecordUid { get; internal set; } + [DataMember(Name = "user_name")] + public string Username { get; internal set; } + [DataMember(Name = "client_version")] + public string ClientVersion; + [DataMember(Name = "version")] + public int Version { get; internal set; } + [DataMember(Name = "revision")] + public long Revision { get; internal set; } + [DataMember(Name = "shared")] + public bool Shared { get; internal set; } + [DataMember(Name = "client_modified_time")] + internal double _client_modified_time; + public long ClientModifiedTime => (long) _client_modified_time; + + [DataMember(Name = "data")] + public string Data { get; internal set; } + [DataMember(Name = "extra")] + public string Extra { get; internal set; } + + + [DataMember(Name = "udata")] + internal SyncDownRecordUData udata; + public string Udata => udata != null ? Encoding.UTF8.GetString(JsonUtils.DumpJson(udata)) : null; + + public bool Owner { get; set; } + string IUid.Uid => RecordUid; + } + + [DataContract] + internal class GetRecordHistoryResponse : KeeperApiResponse + { + [DataMember(Name = "history")] + public RecordHistoryStorage[] History; + } + + } + } +} diff --git a/KeeperSdk/vault/RecordTypes.cs b/KeeperSdk/vault/RecordTypes.cs new file mode 100644 index 0000000..88327aa --- /dev/null +++ b/KeeperSdk/vault/RecordTypes.cs @@ -0,0 +1,1617 @@ +using KeeperSecurity.Utils; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.Serialization; +using System.Runtime.Serialization.Json; +using System.Text; + +namespace KeeperSecurity.Vault +{ + /// + /// Record Types Schema: Field Type definition. + /// + public class FieldType + { + /// + public FieldType(string name, Type type, string defaultValue, string description) + { + Name = name; + Type = type; + Description = description; + DefaultValue = defaultValue; + } + + /// + /// Type name + /// + public string Name { get; } + /// + /// Type description + /// + public string Description { get; } + /// + /// .Net Type object + /// + public Type Type { get; } + + public string DefaultValue { get; } + } + + /// + /// Specifies if Record Field allows multiple values. + /// + public enum RecordFieldMultiple + { + /// + /// Single Value only + /// + Never, + /// + /// Maybe multi-valued + /// + Optional, + /// + /// Multi-Value field + /// + Always, + } + + /// + /// Record Types Schema: Field definition. + /// + public class RecordField + { + /// + public RecordField(string name, FieldType fieldType, RecordFieldMultiple multiple = RecordFieldMultiple.Optional) + { + Name = name; + Type = fieldType; + Multiple = multiple; + } + + /// + /// Record Field Name + /// + public string Name { get; } + /// + /// Field Type + /// + public FieldType Type { get; } + /// + /// Multi-Value attribute + /// + public RecordFieldMultiple Multiple { get; } + } + + /// + /// Defines common properties for Record Field + /// + public interface IRecordTypeField + { + /// + /// Record Field Name + /// + string FieldName { get; } + /// + /// Record Field Label + /// + string FieldLabel { get; } + } + + /// + /// Record Types Schema: Record Field definition. + /// + public class RecordTypeField : IRecordTypeField + { + /// + /// Initializes a new instance of the RecordTypeField class + /// + /// Field Name + /// Field Label + public RecordTypeField(string fieldName, string label = null) + { + if (string.IsNullOrEmpty(fieldName)) + { + fieldName = "text"; + } + if (RecordTypesConstants.TryGetRecordField(fieldName, out var rf)) + { + RecordField = rf; + } + FieldName = fieldName; + FieldLabel = label; + } + /// + /// Initializes a new instance of the RecordTypeField class + /// + /// Field + /// Field Label + public RecordTypeField(RecordField recordField, string label = null) + { + RecordField = recordField; + FieldName = RecordField.Name; + FieldLabel = label; + } + + /// + /// Gets Record Field + /// + public RecordField RecordField { get; } + + /// + /// Gets field name + /// + public string FieldName { get; } + /// + /// Gets field label + /// + public string FieldLabel { get; } + + public bool Required { get; internal set; } + } + + /// + public class RecordTypePasswordField : RecordTypeField + { + public RecordTypePasswordField(RecordField recordField, string label) : base(recordField, label) + { + } + public PasswordGenerationOptions PasswordOptions { get; set; } + } + + /// + /// Record Types Schema: Record Type definition. + /// + public class RecordType + { + /// + public RecordType() { } + + /// + public RecordType(int id, string name, string description, IEnumerable fields) : this() + { + Id = id; + Scope = RecordTypeScope.User; + Name = name; + Description = description; + Fields = fields.ToArray(); + } + + /// + /// Gets record type ID + /// + public int Id { get; internal set; } + /// + /// Gets record type scope + /// + public RecordTypeScope Scope { get; internal set; } + /// + /// Gets record type name + /// + public string Name { get; internal set; } + /// + /// Gets record type description + /// + public string Description { get; internal set; } + /// + /// Gets record type fields + /// + public RecordTypeField[] Fields { get; internal set; } + } + + + /// + /// Defines access methods for compound record types + /// + public interface IFieldTypeSerialize + { + /// + /// Enumerates property names + /// + IEnumerable Elements { get; } + /// + /// Enumerates property values + /// + IEnumerable ElementValues { get; } + /// + /// Sets property value + /// + /// Property or element name + /// Property value + /// true is the property was set + bool SetElementValue(string element, string value); + + /// + /// Sets field value from human friendly text + /// + /// String representation + void SetValueAsString(string value); + /// + /// Gets human friendly text + /// + /// + string GetValueAsString(); + } + + + /// + [DataContract] + public class FieldTypeBase : IExtensibleDataObject + { + public ExtensionDataObject ExtensionData { get; set; } + } + + /// + [DataContract] + public class FieldScript : FieldTypeBase + { + [DataMember(Name = "fileRef", EmitDefaultValue = true)] + public string FileRef { get; set; } + [DataMember(Name = "command", EmitDefaultValue = true)] + public string Command { get; set; } + [DataMember(Name = "recordRef", EmitDefaultValue = true)] + public string[] RecordRef { get; set; } + } + + /// + [DataContract] + public class FieldPamResources : FieldTypeBase + { + [DataMember(Name = "controllerUid", EmitDefaultValue = true)] + public string ControllerUid { get; set; } + [DataMember(Name = "folderUid", EmitDefaultValue = true)] + public string FolderUid { get; set; } + [DataMember(Name = "resourceRef", EmitDefaultValue = true)] + public string[] ResourceRef { get; set; } + } + + /// + /// "host" field type + /// + [DataContract] + public class FieldTypeHost : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypeHost() + { + HostName = ""; + Port = ""; + } + /// + /// Gets or sets hostname + /// + [DataMember(Name = "hostName", EmitDefaultValue = true)] + public string HostName { get; set; } + /// + /// Gets or sets port + /// + [DataMember(Name = "port", EmitDefaultValue = true)] + public string Port { get; set; } + + + private static readonly string[] HostElements = new[] { "hostName", "port" }; + /// + public IEnumerable Elements => HostElements; + /// + public IEnumerable ElementValues + { + get + { + yield return HostName; + yield return Port; + } + } + + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "hostName": HostName = value; return true; + case "port": Port = value; return true; + default: return false; + } + } + + /// + public void SetValueAsString(string value) + { + if (!string.IsNullOrEmpty(value)) + { + var idx = value.LastIndexOf(':'); + if (idx >= 0) + { + HostName = value.Substring(0, idx).Trim(); + Port = value.Substring(idx + 1).Trim(); + } + else + { + HostName = value; + Port = ""; + } + } + else + { + HostName = ""; + Port = ""; + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + var result = !string.IsNullOrEmpty(HostName) ? HostName : ""; + if (!string.IsNullOrEmpty(Port)) + { + result += $":{Port}"; + } + return result; + } + } + + /// + /// "phone" field type + /// + [DataContract] + public class FieldTypePhone : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypePhone() + { + Region = ""; + Number = ""; + Ext = ""; + Type = ""; + } + + /// + /// Gets or sets phone region + /// + [DataMember(Name = "region", EmitDefaultValue = true)] + public string Region { get; set; } + /// + /// Gets or sets phone number + /// + [DataMember(Name = "number", EmitDefaultValue = true)] + public string Number { get; set; } + /// + /// Gets or sets phone extension + /// + [DataMember(Name = "ext", EmitDefaultValue = true)] + public string Ext { get; set; } + /// + /// Gets or sets phone type + /// + [DataMember(Name = "type", EmitDefaultValue = true)] + public string Type { get; set; } + + + private static readonly string[] PhoneElements = new[] { "region", "number", "ext", "type" }; + /// + public IEnumerable Elements => PhoneElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return Region; + yield return Number; + yield return Ext; + yield return Type; + } + } + + /// + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "region": Region = value; return true; + case "number": Number = value; return true; + case "ext": Ext = value; return true; + case "type": Type = value; return true; + default: return true; + } + } + /// + public void SetValueAsString(string value) + { + Type = ""; + Region = ""; + Number = ""; + Ext = ""; + if (string.IsNullOrEmpty(value)) + { + return; + } + + var idx = value.LastIndexOf(':'); + if (idx >= 0) + { + Type = value.Substring(0, idx).Trim(); + value = value.Substring(idx + 1).Trim(); + } + var comps = value.Split(' ').Select(x => x.Trim()).Where(x => !string.IsNullOrEmpty(x)).ToArray(); + if (comps.Length == 0) + { + return; + } + if (comps.Length == 1) + { + Number = comps[0]; + return; + } + + if (comps[0].StartsWith("+") || comps[0].Length == 2) + { + Region = comps[0]; + comps[0] = null; + comps = comps.Where(x => !string.IsNullOrEmpty(x)).ToArray(); + } + if (comps.Length == 1) + { + Number = comps[0]; + return; + } + Ext = comps[comps.Length - 1]; + Number = string.Join(" ", comps.Take(comps.Length - 1)); + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + var result = !string.IsNullOrEmpty(Type) ? $"{Type}: " : ""; + result += string.Join(" ", (new[] { Region, Number, Ext }).Where(x => !string.IsNullOrEmpty(x))); + return result; + } + } + + /// + /// "name" field type + /// + [DataContract(Name = "Name")] + public class FieldTypeName : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypeName() + { + First = ""; + Middle = ""; + Last = ""; + } + + /// + /// Gets or sets first name + /// + [DataMember(Name = "first", EmitDefaultValue = true)] + public string First { get; set; } + + /// + /// Gets or sets last name + /// + [DataMember(Name = "last", EmitDefaultValue = true)] + public string Last { get; set; } + + /// + /// Gets or sets middle name + /// + [DataMember(Name = "middle", EmitDefaultValue = true)] + public string Middle { get; set; } + + private static readonly string[] NameElements = new string[] { "first", "middle", "last" }; + /// + public IEnumerable Elements => NameElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return First; + yield return Middle; + yield return Last; + } + } + + /// + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "first": First = value; return true; + case "last": Last = value; return true; + case "middle": Middle = value; return true; + default: return false; + } + } + + /// + public void SetValueAsString(string value) + { + First = ""; + Last = ""; + Middle = ""; + if (string.IsNullOrEmpty(value)) + { + return; + } + + var idx = value.LastIndexOf(','); + if (idx >= 0) + { + Last = value.Substring(0, idx).Trim(); + value = value.Substring(idx + 1).Trim(); + } + else + { + idx = value.LastIndexOf(' '); + if (idx >= 0) + { + Last = value.Substring(idx + 1).Trim(); + value = value.Substring(0, idx).Trim(); + } + } + idx = value.LastIndexOf(' '); + if (idx >= 0) + { + First = value.Substring(0, idx).Trim(); + Middle = value.Substring(idx + 1).Trim(); + } + else + { + First = value; + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + var result = string.IsNullOrEmpty(Last) ? "" : $"{Last}, "; + result += string.Join(" ", (new[] { First, Middle }).Where(x => !string.IsNullOrEmpty(x))); + return result.Trim(); + } + } + + /// + /// "address" field type + /// + [DataContract] + public class FieldTypeAddress : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypeAddress() + { + Street1 = ""; + Street2 = ""; + City = ""; + State = ""; + Zip = ""; + Country = ""; + } + + /// + /// Gets or sets Street 1 + /// + [DataMember(Name = "street1", EmitDefaultValue = true)] + public string Street1 { get; set; } + + /// + /// Gets or sets Street 1 + /// + [DataMember(Name = "street2", EmitDefaultValue = true)] + public string Street2 { get; set; } + + /// + /// Gets or sets City + /// + [DataMember(Name = "city", EmitDefaultValue = true)] + public string City { get; set; } + + /// + /// Gets or sets State + /// + [DataMember(Name = "state", EmitDefaultValue = true)] + public string State { get; set; } + + /// + /// Gets or sets Zip/Postal Code + /// + [DataMember(Name = "zip", EmitDefaultValue = true)] + public string Zip { get; set; } + + /// + /// Gets or sets Country + /// + [DataMember(Name = "country", EmitDefaultValue = true)] + public string Country { get; set; } + + private static readonly string[] AddressElements = new string[] { "street1", "street2", "city", "state", "zip", "country" }; + /// + public IEnumerable Elements => AddressElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return Street1; + yield return Street2; + yield return City; + yield return State; + yield return Zip; + yield return Country; + } + } + + /// + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "street1": Street1 = value; return true; + case "street2": Street2 = value; return true; + case "city": City = value; return true; + case "state": State = value; return true; + case "zip": Zip = value; return true; + case "country": Country = value; return true; + default: return false; + } + } + + /// + public void SetValueAsString(string value) + { + Street1 = ""; + Street2 = ""; + City = ""; + State = ""; + Zip = ""; + Country = ""; + if (string.IsNullOrEmpty(value)) + { + return; + } + var comps = value.Split(',').Select(x => x.Trim()).ToArray(); + if (comps.Length == 0) + { + return; + } + if (comps.Length >= 4) + { + Country = comps[comps.Length - 1]; + comps = comps.Take(comps.Length - 1).ToArray(); + } + if (comps.Length >= 3) + { + var zip = comps[comps.Length - 1]; + var pos = zip.LastIndexOf(' '); + if (pos > 0) + { + State = zip.Substring(0, pos).Trim(); + Zip = zip.Substring(pos + 1).Trim(); + } + else + { + if (zip.Any(char.IsNumber)) + { + Zip = zip; + } + else + { + State = zip; + } + } + comps = comps.Take(comps.Length - 1).ToArray(); + } + if (comps.Length >= 2) + { + City = comps[comps.Length - 1]; + comps = comps.Take(comps.Length - 1).ToArray(); + } + + if (comps.Length >= 2) + { + Street2 = comps[comps.Length - 1]; + Street1 = string.Join(" ", comps.Take(comps.Length - 1)); + } + else if (comps.Length >= 1) + { + Street1 = string.Join(" ", comps); + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + + var result = Street1 ?? ""; + if (!string.IsNullOrEmpty(Street2)) + { + result += $" {Street2}"; + } + result += $", {City ?? ""}, {State} {Zip}"; + if (!string.IsNullOrEmpty(Country)) + { + result += $", {Country}"; + } + return result; + } + } + + /// + /// "securityQuestion" field type + /// + [DataContract] + public class FieldTypeSecurityQuestion : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypeSecurityQuestion() + { + Question = ""; + Answer = ""; + } + + /// + /// Gets or sets Security Question + /// + [DataMember(Name = "question", EmitDefaultValue = true)] + public string Question { get; set; } + /// + /// Gets or sets Security Answer + /// + [DataMember(Name = "answer", EmitDefaultValue = true)] + public string Answer { get; set; } + + private static readonly string[] QaElements = new[] { "question", "answer" }; + /// + public IEnumerable Elements => QaElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return Question; + yield return Answer; + } + } + + /// + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "question": Question = value; return true; + case "answer": Answer = value; return true; + default: return false; + } + } + + /// + public void SetValueAsString(string value) + { + Question = ""; + Answer = ""; + if (string.IsNullOrEmpty(value)) + { + return; + } + var pos = value.IndexOf('?'); + if (pos >= 0) + { + Question = value.Substring(0, pos).Trim(); + Answer = value.Substring(pos + 1).Trim(); + } + else + { + Question = value; + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + + var result = (Question ?? "").Replace("?", "") + "?"; + if (!string.IsNullOrEmpty(Answer)) + { + result += $" {Answer}"; + } + return result; + } + } + + + /// + /// "bankAccount" field type + /// + [DataContract] + public class FieldTypeBankAccount : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypeBankAccount() + { + AccountType = ""; + RoutingNumber = ""; + AccountNumber = ""; + } + + /// + /// Gets or sets Account Type + /// + [DataMember(Name = "accountType", EmitDefaultValue = true)] + public string AccountType { get; set; } + + /// + /// Gets or sets Routing Number + /// + [DataMember(Name = "routingNumber", EmitDefaultValue = true)] + public string RoutingNumber { get; set; } + + /// + /// Gets or setsAccount Number + /// + [DataMember(Name = "accountNumber", EmitDefaultValue = true)] + public string AccountNumber { get; set; } + + private static readonly string[] AccountElements = new[] { "accountType", "routingNumber", "accountNumber" }; + /// + public IEnumerable Elements => AccountElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return AccountType; + yield return RoutingNumber; + yield return AccountNumber; + } + } + + /// + bool IFieldTypeSerialize.SetElementValue(string element, string value) + { + switch (element) + { + case "accountType": AccountType = value; return true; + case "routingNumber": RoutingNumber = value; return true; + case "accountNumber": AccountNumber = value; return true; + default: return false; + } + } + + /// + public void SetValueAsString(string value) + { + AccountType = ""; + RoutingNumber = ""; + AccountNumber = ""; + + if (string.IsNullOrEmpty(value)) + { + return; + } + + var pos = value.IndexOf(':'); + if (pos >= 0) + { + AccountType = value.Substring(0, pos).Trim(); + value = value.Substring(pos + 1).Trim(); + } + pos = value.IndexOf(' '); + if (pos >= 0) + { + RoutingNumber = value.Substring(0, pos).Trim(); + AccountNumber = value.Substring(pos + 1).Trim(); + } + else + { + RoutingNumber = value; + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + + var result = string.IsNullOrEmpty(AccountType) ? "" : $"{AccountType}: "; + result += string.Join(" ", (new[] { RoutingNumber, AccountNumber }).Where(x => !string.IsNullOrEmpty(x))); + return result; + } + } + + /// + /// "paymentCard" field type + /// + [DataContract] + + public class FieldTypePaymentCard : FieldTypeBase, IFieldTypeSerialize + { + /// + public FieldTypePaymentCard() + { + CardNumber = ""; + CardExpirationDate = ""; + CardSecurityCode = ""; + } + /// + /// Gets or sets Card Number + /// + [DataMember(Name = "cardNumber", EmitDefaultValue = true)] + public string CardNumber { get; set; } + + /// + /// Gets or sets Card Expiration Date + /// + [DataMember(Name = "cardExpirationDate", EmitDefaultValue = true)] + public string CardExpirationDate { get; set; } + + /// + /// Gets or sets Card Security Code + /// + [DataMember(Name = "cardSecurityCode", EmitDefaultValue = true)] + public string CardSecurityCode { get; set; } + + private static readonly string[] CardElements = new[] { "cardNumber", "cardExpirationDate", "cardSecurityCode" }; + + /// + public IEnumerable Elements => CardElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return CardNumber; + yield return CardExpirationDate; + yield return CardSecurityCode; + } + } + + /// + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "cardNumber": CardNumber = value; return true; + case "cardExpirationDate": CardExpirationDate = value; return true; + case "cardSecurityCode": CardSecurityCode = value; return true; + default: return false; + } + } + + /// + public void SetValueAsString(string value) + { + CardNumber = ""; + CardExpirationDate = ""; + CardSecurityCode = ""; + + if (string.IsNullOrEmpty(value)) + { + return; + } + + foreach (var comp in value.Split(' ').Select(x => x.Trim()).Where(x => !string.IsNullOrEmpty(x))) + { + if (comp.Length > 10) + { + CardNumber = comp; + } + else if (comp.IndexOf('/') >= 0) + { + CardExpirationDate = comp; + } + else if (comp.Length < 6) + { + CardSecurityCode = comp; + } + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + + return string.Join(" ", (new[] { CardNumber, CardExpirationDate, CardSecurityCode }).Where(x => !string.IsNullOrEmpty(x))); + } + } + + /// + /// "keyPair" field type + /// + [DataContract] + public class FieldTypeKeyPair : FieldTypeBase, IFieldTypeSerialize + { + /// + /// Gets or sets Public Key + /// + [DataMember(Name = "publicKey", EmitDefaultValue = true)] + public string PublicKey { get; set; } = ""; + + /// + /// Gets or sets Private Key + /// + [DataMember(Name = "privateKey", EmitDefaultValue = true)] + public string PrivateKey { get; set; } = ""; + + private static readonly string[] KeyPairElements = new[] { "publicKey", "privateKey" }; + + /// + public IEnumerable Elements => KeyPairElements; + + /// + public IEnumerable ElementValues + { + get + { + yield return PublicKey; + yield return PrivateKey; + } + } + + /// + public bool SetElementValue(string element, string value) + { + switch (element) + { + case "publicKey": PublicKey = value; return true; + case "privateKey": PrivateKey = value; return true; + default: return false; + } + } + + private const string PUBLIC_KEY = "Public Key:"; + /// + public void SetValueAsString(string value) + { + PrivateKey = ""; + PublicKey = ""; + + if (string.IsNullOrEmpty(value)) + { + return; + } + if (value.StartsWith(PUBLIC_KEY)) + { + PublicKey = value.Substring(PUBLIC_KEY.Length).Trim(); + } + else + { + PrivateKey = value; + } + } + + /// + public string GetValueAsString() + { + if (ElementValues.All(string.IsNullOrEmpty)) + { + return ""; + } + if (string.IsNullOrEmpty(PrivateKey)) + { + return PrivateKey; + } + + return $"{PUBLIC_KEY} {PublicKey}"; + } + } + + /// + [DataContract] + public class FieldTypeAppFiller : FieldTypeBase, IFieldTypeSerialize + { + [DataMember(Name = "applicationTitle", EmitDefaultValue = true)] + public string ApplicationTitle { get; set; } + + [DataMember(Name = "contentFilter", EmitDefaultValue = true)] + public string ContentFilter { get; set; } + [DataMember(Name = "macroSequence", EmitDefaultValue = true)] + public string MacroSequence { get; set; } + + + private static readonly string[] KeyPairElements = new[] { "applicationTitle", "contentFilter", "macroSequence" }; + IEnumerable IFieldTypeSerialize.Elements => KeyPairElements; + + IEnumerable IFieldTypeSerialize.ElementValues + { + get + { + yield return ApplicationTitle; + yield return ContentFilter; + yield return MacroSequence; + } + } + bool IFieldTypeSerialize.SetElementValue(string element, string value) + { + switch (element) + { + case "applicationTitle": { ApplicationTitle = value; return true; } + case "macroSequence": { MacroSequence = value; return true; } + case "contentFilter": { ContentFilter = value; return true; } + } + return false; + } + + void IFieldTypeSerialize.SetValueAsString(string value) + { + var appFiller = JsonUtils.ParseJson(Encoding.UTF8.GetBytes(value)); + if (appFiller != null) + { + ApplicationTitle = appFiller.ApplicationTitle; + MacroSequence = appFiller.MacroSequence; + ContentFilter = appFiller.ContentFilter; + } + } + string IFieldTypeSerialize.GetValueAsString() + { + var e = (this as IFieldTypeSerialize).ElementValues.ToArray(); + return string.Join("\n", e); + } + } + + /// + [DataContract] + public class JsonWebKey + { + [DataMember(Name = "kty", EmitDefaultValue = true)] + public string Kty { get; set; } + + [DataMember(Name = "crv", EmitDefaultValue = true)] + public string Crv { get; set; } + + [DataMember(Name = "x", EmitDefaultValue = true)] + public string X { get; set; } + + [DataMember(Name = "y", EmitDefaultValue = true)] + public string Y { get; set; } + + [DataMember(Name = "kid", EmitDefaultValue = true)] + public string Kid { get; set; } + } + + /// + /// "passkey" field type + /// + [DataContract] + public class FieldTypePasskey : FieldTypeBase + { + [DataMember(Name = "privateKey", EmitDefaultValue = true)] + public JsonWebKey PrivateKey { get; set; } + + /// + /// Gets or sets Relying Party + /// + [DataMember(Name = "relyingParty", EmitDefaultValue = true)] + public string RelyingParty { get; set; } = ""; + + /// + /// Gets or sets Credential Id + /// + [DataMember(Name = "credentialId", EmitDefaultValue = true)] + public string CredentialId { get; set; } = ""; + + /// + /// Gets or sets User Id + /// + [DataMember(Name = "userId", EmitDefaultValue = true)] + public string UserId { get; set; } = ""; + + /// + /// Gets or sets Username + /// + [DataMember(Name = "username", EmitDefaultValue = true)] + public string Username { get; set; } = ""; + + /// + /// Gets or sets Sign Count + /// + [DataMember(Name = "signCount", EmitDefaultValue = true)] + public long SignCount { get; set; } + + /// + /// Gets or sets Created Date + /// + [DataMember(Name = "createdDate", EmitDefaultValue = true)] + public long CreatedDate { get; set; } + } + + /// + public class AnyComplexField : Dictionary, IExtensibleDataObject, IFieldTypeSerialize + { + public ExtensionDataObject ExtensionData { get; set; } + IEnumerable IFieldTypeSerialize.Elements + { + get + { + return this.OrderBy(x => x.Key).Select(x => x.Key); + } + } + public IEnumerable ElementValues + { + get + { + return this.OrderBy(x => x.Key).Select(x => x.Value); + } + } + bool IFieldTypeSerialize.SetElementValue(string element, string value) + { + this[element] = value; + return true; + } + + void IFieldTypeSerialize.SetValueAsString(string value) + { + } + string IFieldTypeSerialize.GetValueAsString() + { + return string.Join("\n", ElementValues); + } + } + + internal class RecordTypeInfo + { + public Type RecordFieldType { get; set; } // RecordTypeDataField + public Type TypedFieldType { get; set; } // TypedField + public DataContractJsonSerializer Serializer { get; set; } + } + + /// + /// Record Types Schema: Fields + /// + public static class RecordTypesConstants + { + private static readonly Dictionary _fieldTypes = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + private static readonly Dictionary _recordFields = new Dictionary(StringComparer.InvariantCultureIgnoreCase); + + static RecordTypesConstants() + { + var types = new[] + { + new FieldType("text", typeof(string), "''", "plain text"), + new FieldType("url", typeof(string), "''", "url string, can be clicked"), + new FieldType("multiline", typeof(string), "''", "multiline text"), + new FieldType("fileRef", typeof(string), "''", "reference to the file field on another record"), + new FieldType("email", typeof(string), "''", "valid email address plus tag"), + new FieldType("host", typeof(FieldTypeHost), "{'hostName': '', 'port': ''}", "multiple fields to capture host information"), + new FieldType("phone", typeof(FieldTypePhone), "{'region': '', 'number': '', 'ext': '', 'type': ''}", "numbers and symbols only plus tag"), + new FieldType("name", typeof(FieldTypeName), "{'first': '', 'middle': '', 'last': ''}", "multiple fields to capture name"), + new FieldType("address", typeof(FieldTypeAddress), "{'street1': '', 'street2': '', 'city': '', 'state': '', 'zip': '', 'country': ''}", "multiple fields to capture address"), + new FieldType("addressRef", typeof(string), "''", "reference to the address field on another record"), + new FieldType("cardRef", typeof(string), "''", "reference to the card record type"), + new FieldType("secret", typeof(string), "''", "the field value is masked"), + new FieldType("login", typeof(string), "''", "Login field, detected as the website login for browser extension or KFFA."), + new FieldType("password", typeof(string), "''", "Field value is masked and allows for generation. Also complexity enforcements."), + new FieldType("securityQuestion", typeof(FieldTypeSecurityQuestion), "{'question': '', 'answer': ''}", "Security Question and Answer"), + new FieldType("otp", typeof(string), "''", "captures the seed, displays QR code"), + new FieldType("paymentCard", typeof(FieldTypePaymentCard), "{'cardNumber': '', 'cardExpirationDate': '', 'cardSecurityCode': ''}", "Field consisting of validated card number, expiration date and security code."), + new FieldType("date", typeof(long), "0", "calendar date with validation, stored as unix milliseconds"), + new FieldType("bankAccount", typeof(FieldTypeBankAccount), "{'accountType': '', 'routingNumber': '', 'accountNumber': '', 'otherType': ''}", "bank account information"), + new FieldType("privateKey", typeof(FieldTypeKeyPair), "{'publicKey': '', 'privateKey': ''}", "private and/or public keys in ASN.1 format"), + new FieldType("passkey", typeof(JsonWebKey), "{'privateKey': {}, 'credentialId': '', 'signCount': 0, 'userId': '', 'relyingParty': '', 'username': '', 'createdDate': 0}", "passwordless login passkey"), + new FieldType("checkbox", typeof(bool), "false", "on/off checkbox"), + new FieldType("dropdown", typeof(string), "''", "list of text choices"), + new FieldType("appFiller", typeof(FieldTypeAppFiller), "{'macroSequence': '', 'applicationTitle': '', 'contentFilter': ''}", "native application filler"), + new FieldType("script", typeof(FieldScript), "{'fileRef': '', 'command': '', 'recordRef': []}", "Post rotation script"), + new FieldType("pamResources", typeof(FieldPamResources), "{'controllerUid': '', 'folderUid': '', 'resourceRef': []}", "PAM resources"), + }; + + foreach (var t in types) + { + _fieldTypes.Add(t.Name, t); + } + + var fields = new[] + { + new RecordField("login", _fieldTypes["login"], RecordFieldMultiple.Never), + new RecordField("password", _fieldTypes["password"], RecordFieldMultiple.Never), + new RecordField("company", _fieldTypes["text"], RecordFieldMultiple.Never), + new RecordField("licenseNumber", _fieldTypes["multiline"], RecordFieldMultiple.Never), + new RecordField("accountNumber", _fieldTypes["text"], RecordFieldMultiple.Never), + new RecordField("bankAccount", _fieldTypes["bankAccount"], RecordFieldMultiple.Never), + new RecordField("note", _fieldTypes["multiline"], RecordFieldMultiple.Never), + new RecordField("oneTimeCode", _fieldTypes["otp"], RecordFieldMultiple.Never), + new RecordField("keyPair", _fieldTypes["privateKey"], RecordFieldMultiple.Never), + new RecordField("pinCode", _fieldTypes["secret"], RecordFieldMultiple.Never), + new RecordField("expirationDate", _fieldTypes["date"], RecordFieldMultiple.Never), + new RecordField("birthDate", _fieldTypes["date"], RecordFieldMultiple.Never), + new RecordField("securityQuestion", _fieldTypes["securityQuestion"], RecordFieldMultiple.Always), + new RecordField("fileRef", _fieldTypes["fileRef"], RecordFieldMultiple.Always), + + new RecordField("pamResources", _fieldTypes["pamResources"], RecordFieldMultiple.Never), + new RecordField("pamHostname", _fieldTypes["host"], RecordFieldMultiple.Never), + new RecordField("databaseType", _fieldTypes["dropdown"], RecordFieldMultiple.Never), + new RecordField("directoryType", _fieldTypes["dropdown"], RecordFieldMultiple.Never), + }; + foreach (var rf in fields) + { + _recordFields.Add(rf.Name, rf); + } + foreach (var ft in _fieldTypes.Values) + { + if (!_recordFields.ContainsKey(ft.Name)) + { + _recordFields.Add(ft.Name, new RecordField(ft.Name, ft)); + } + } + } + + /// + /// Gets supported Field Types + /// + public static IEnumerable FieldTypes => _fieldTypes.Values; + + /// + /// Gets supported Fields + /// + public static IEnumerable RecordFields => _recordFields.Values; + public static bool TryGetRecordField(string name, out RecordField value) + { + return _recordFields.TryGetValue(name ?? "text", out value); + } + + private static readonly Dictionary _recordTypeInfo = new Dictionary(); + + private static bool GetRecordType(Type dataType, out RecordTypeInfo recordTypeInfo) + { + lock (_recordTypeInfo) + { + if (_recordTypeInfo.TryGetValue(dataType, out recordTypeInfo)) + { + return true; + } + var genericRecordType = typeof(RecordTypeDataField<>); + var genericTypedFieldType = typeof(TypedField<>); + recordTypeInfo = new RecordTypeInfo + { + RecordFieldType = genericRecordType.MakeGenericType(dataType), + TypedFieldType = genericTypedFieldType.MakeGenericType(dataType), + }; + recordTypeInfo.Serializer = new DataContractJsonSerializer(recordTypeInfo.RecordFieldType, JsonUtils.JsonSettings); + _recordTypeInfo.Add(dataType, recordTypeInfo); + return true; + } + } + + /// + public static bool GetTypedFieldType(Type dataType, out Type typedFieldType) + { + if (GetRecordType(dataType, out var rt)) + { + typedFieldType = rt.TypedFieldType; + return true; + } + + typedFieldType = null; + return false; + } + + /// + public static bool GetRecordFieldDataType(Type dataType, out Type recordFieldType) + { + if (GetRecordType(dataType, out var rt)) + { + recordFieldType = rt.RecordFieldType; + return true; + } + + recordFieldType = null; + return false; + } + /// + public static bool GetJsonParser(Type dataType, out DataContractJsonSerializer jsonType) + { + if (GetRecordType(dataType, out var rt)) + { + jsonType = rt.Serializer; + return true; + } + + jsonType = null; + return false; + } + } + + internal class ApiRecordType : IRecordType + { + private readonly string _uid; + public ApiRecordType(Records.RecordType recordType) + { + string scopeName; + Id = recordType.RecordTypeId; + switch (recordType.Scope) + { + case Records.RecordTypeScope.RtStandard: + Scope = RecordTypeScope.Standard; + scopeName = "standard"; + break; + case Records.RecordTypeScope.RtEnterprise: + Scope = RecordTypeScope.Enterprise; + scopeName = "enterprise"; + break; + default: + Scope = RecordTypeScope.User; + scopeName = "user"; + break; + } + _uid = $"{scopeName}:{Id}"; + Content = recordType.Content; + } + + public int Id { get; } + public RecordTypeScope Scope { get; } + public string Content { get; } + string IUid.Uid => _uid; + } + + [DataContract] + internal class PasswordFieldComplexity + { + [DataMember(Name = "length")] + public int Length { get; set; } + [DataMember(Name = "caps")] + public int Upper { get; set; } + [DataMember(Name = "lowercase")] + public int Lower { get; set; } + [DataMember(Name = "digits")] + public int Digit { get; set; } + [DataMember(Name = "special")] + public int Special { get; set; } + } + + [DataContract] + internal class RecordTypeContentField + { + [DataMember(Name = "$ref")] + public string Ref { get; set; } + + [DataMember(Name = "label")] + public string Label { get; set; } + + [DataMember(Name = "required")] + public bool? Required { get; set; } + + [DataMember(Name = "complexity")] + public PasswordFieldComplexity Complexity { get; set; } + } + + [DataContract] + internal class RecordTypeContent + { + [DataMember(Name = "$id")] + public string Name { get; set; } + + [DataMember(Name = "categories")] + public string[] Categories { get; set; } + + [DataMember(Name = "description")] + public string Description { get; set; } + + [DataMember(Name = "fields")] + public RecordTypeContentField[] Fields { get; set; } + } + + [DataContract] + internal class RecordTypeDataField : RecordTypeDataFieldBase + { + [DataMember(Name = "value", Order = 3, EmitDefaultValue = false)] + public T[] Value { get; set; } + + public override ITypedField CreateTypedField() + { + return new TypedField(this) + { + Required = Required + }; + } + + public RecordTypeDataField(TypedField typedField) + { + Type = typedField.FieldName; + Label = typedField.FieldLabel; + Required = typedField.Required; + Value = typedField.Values.Where(x => x != null).ToArray(); + } + } + + + [DataContract] + internal class RecordTypeDataFieldBase : IExtensibleDataObject + { + [DataMember(Name = "type", Order = 1)] + public string Type { get; set; } + [DataMember(Name = "label", Order = 2, EmitDefaultValue = false)] + public string Label { get; set; } + [DataMember(Name = "required", Order = 3, EmitDefaultValue = false)] + public bool Required { get; set; } + + public ExtensionDataObject ExtensionData { get; set; } + + public virtual ITypedField CreateTypedField() + { + return null; + } + } + + [DataContract] + internal class RecordTypeData + { + [DataMember(Name = "type", Order = 1)] + public string Type { get; set; } + + [DataMember(Name = "title", Order = 2)] + public string Title { get; set; } + + [DataMember(Name = "notes", Order = 3)] + public string Notes { get; set; } + + [DataMember(Name = "fields", Order = 4)] + public RecordTypeDataFieldBase[] Fields { get; set; } + + [DataMember(Name = "custom", Order = 5)] + public RecordTypeDataFieldBase[] Custom { get; set; } + } + + [DataContract] + internal class RecordFileData + { + [DataMember(Name = "name", EmitDefaultValue = false)] + public string Name { get; set; } + + [DataMember(Name = "size", EmitDefaultValue = false)] + public long? Size { get; set; } + + [DataMember(Name = "thumbnail_size", EmitDefaultValue = false)] + public long? ThumbnailSize { get; set; } + + [DataMember(Name = "type", EmitDefaultValue = false)] + public string Type { get; set; } + + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + [DataMember(Name = "lastModified", EmitDefaultValue = false)] + public double? LastModified { get; set; } + } + + [DataContract] + internal class RecordApplicationData + { + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + [DataMember(Name = "type", EmitDefaultValue = false)] + public string Type { get; set; } + } +} diff --git a/KeeperSdk/vault/RecordTypesExtra.cs b/KeeperSdk/vault/RecordTypesExtra.cs new file mode 100644 index 0000000..e0be653 --- /dev/null +++ b/KeeperSdk/vault/RecordTypesExtra.cs @@ -0,0 +1,444 @@ +using System; +using System.Collections.Generic; +using KeeperSecurity.Utils; + +namespace KeeperSecurity.Vault +{ + /// + public class TypedRecordFields + { + private List _overflow; + + protected internal virtual void LoadTypedField(ITypedField field) + { + if (_overflow == null) + { + _overflow = new List(); + } + + _overflow.Add(field); + } + + protected internal virtual IEnumerable CreateMissingFields() + { + yield break; + } + + protected internal virtual string RecordType => null; + } + + /// + public class TypedRecordFacade where T : TypedRecordFields, new() + { + private readonly TypedRecord _typedRecord; + + public TypedRecordFacade(TypedRecord record = null) + { + Fields = new T(); + _typedRecord = record ?? new TypedRecord(Fields.RecordType); + + foreach (var field in _typedRecord.Fields) + { + Fields.LoadTypedField(field); + } + + _typedRecord.Fields.AddRange(Fields.CreateMissingFields()); + } + + public TypedRecord TypedRecord => _typedRecord; + public T Fields { get; } + public IList Custom => _typedRecord.Custom; + } + + /// + public class TypedRecordFileRef : TypedRecordFields + { + public TypedField FileRef { get; private set; } + + protected internal override void LoadTypedField(ITypedField field) + { + if (field.FieldName == "fileRef" && FileRef == null) + { + FileRef = field as TypedField; + } + else + { + base.LoadTypedField(field); + } + } + + protected internal override IEnumerable CreateMissingFields() + { + if (FileRef == null) + { + FileRef = new TypedField("fileRef"); + yield return FileRef; + } + + foreach (var f in base.CreateMissingFields()) + { + yield return f; + } + } + } + + /// + public class AddressRecordType : TypedRecordFileRef + { + private TypedField _address; + + public FieldTypeAddress Address => _address.TypedValue; + + protected internal override void LoadTypedField(ITypedField field) + { + if (field.FieldName == "address" && _address == null) + { + _address = field as TypedField; + } + else + { + base.LoadTypedField(field); + } + } + + protected internal override IEnumerable CreateMissingFields() + { + if (_address == null) + { + _address = new TypedField("address"); + yield return _address; + } + + foreach (var f in base.CreateMissingFields()) + { + yield return f; + } + } + + protected internal override string RecordType => "address"; + } + + /// + public class PersonBirthDateRecordType : TypedRecordFileRef + { + private TypedField _name; + private TypedField _birthDate; + + public FieldTypeName Name => _name.TypedValue; + + public DateTimeOffset BirthDate + { + get => DateTimeOffsetExtensions.FromUnixTimeMilliseconds(_birthDate.TypedValue); + set => _birthDate.TypedValue = value.ToUnixTimeMilliseconds(); + } + + protected internal override void LoadTypedField(ITypedField field) + { + if (field.FieldName == "name" && _name == null) + { + _name = field as TypedField; + } + else if (field.FieldName == "birthDate" && _birthDate == null) + { + _birthDate = field as TypedField; + } + else + { + base.LoadTypedField(field); + } + } + + protected internal override IEnumerable CreateMissingFields() + { + if (_name == null) + { + _name = new TypedField("name"); + yield return _name; + } + + if (_birthDate == null) + { + _birthDate = new TypedField("birthDate"); + yield return _birthDate; + } + + foreach (var f in base.CreateMissingFields()) + { + yield return f; + } + } + } + + + /// + public class PassportRecordType : PersonBirthDateRecordType + { + private TypedField _passportNumber; + private TypedField _expirationDate; + private TypedField _dateIssued; + private TypedField _password; + private TypedField _addressRef; + + public string PassportNumber + { + get => _passportNumber.TypedValue; + set => _passportNumber.TypedValue = value; + } + + public DateTimeOffset ExpirationDate + { + get => DateTimeOffsetExtensions.FromUnixTimeMilliseconds(_expirationDate.TypedValue); + set => _expirationDate.TypedValue = value.ToUnixTimeMilliseconds(); + } + + public DateTimeOffset DateIssued + { + get => DateTimeOffsetExtensions.FromUnixTimeMilliseconds(_dateIssued.TypedValue); + set => _dateIssued.TypedValue = value.ToUnixTimeMilliseconds(); + } + + public string Password + { + get => _password.TypedValue; + set => _password.TypedValue = value; + } + + public string AddressRef + { + get => _addressRef.TypedValue; + set => _addressRef.TypedValue = value; + } + + protected internal override void LoadTypedField(ITypedField field) + { + if (field.FieldName == "accountNumber" && field.FieldLabel == "passportNumber" && _passportNumber == null) + { + _passportNumber = field as TypedField; + } + else if (field.FieldName == "expirationDate" && _expirationDate == null) + { + _expirationDate = field as TypedField; + } + else if (field.FieldName == "date" && field.FieldLabel == "dateIssued" && _dateIssued == null) + { + _dateIssued = field as TypedField; + } + else if (field.FieldName == "password" && _password == null) + { + _password = field as TypedField; + } + else if (field.FieldName == "addressRef" && _addressRef == null) + { + _addressRef = field as TypedField; + } + else + { + base.LoadTypedField(field); + } + } + + protected internal override IEnumerable CreateMissingFields() + { + if (_passportNumber == null) + { + _passportNumber = new TypedField("accountNumber", "passportNumber"); + yield return _passportNumber; + } + + if (_expirationDate == null) + { + _expirationDate = new TypedField("expirationDate"); + yield return _expirationDate; + } + + if (_dateIssued == null) + { + _dateIssued = new TypedField("date", "dateIssued"); + yield return _dateIssued; + } + + if (_password == null) + { + _password = new TypedField("password"); + yield return _password; + } + + if (_addressRef == null) + { + _addressRef = new TypedField("addressRef"); + yield return _addressRef; + } + + foreach (var f in base.CreateMissingFields()) + { + yield return f; + } + } + protected internal override string RecordType => "passport"; + } + + /// + public class DriverLicenseRecordType : PersonBirthDateRecordType + { + private TypedField _dlNumber; + private TypedField _expirationDate; + private TypedField _addressRef; + + public string DlNumber + { + get => _dlNumber.TypedValue; + set => _dlNumber.TypedValue = value; + } + + public DateTimeOffset ExpirationDate + { + get => DateTimeOffsetExtensions.FromUnixTimeMilliseconds(_expirationDate.TypedValue); + set => _expirationDate.TypedValue = value.ToUnixTimeMilliseconds(); + } + + public string AddressRef + { + get => _addressRef.TypedValue; + set => _addressRef.TypedValue = value; + } + + + protected internal override void LoadTypedField(ITypedField field) + { + if (field.FieldName == "accountNumber" && field.FieldLabel == "dlNumber" && _dlNumber == null) + { + _dlNumber = field as TypedField; + } + else if (field.FieldName == "expirationDate" && _expirationDate == null) + { + _expirationDate = field as TypedField; + } + else if (field.FieldName == "addressRef" && _addressRef == null) + { + _addressRef = field as TypedField; + } + else + { + base.LoadTypedField(field); + } + } + + protected internal override IEnumerable CreateMissingFields() + { + if (_dlNumber == null) + { + _dlNumber = new TypedField("accountNumber", "dlNumber"); + yield return _dlNumber; + } + + if (_expirationDate == null) + { + _expirationDate = new TypedField("expirationDate"); + yield return _expirationDate; + } + + if (_addressRef == null) + { + _addressRef = new TypedField("addressRef"); + yield return _addressRef; + } + + foreach (var f in base.CreateMissingFields()) + { + yield return f; + } + } + protected internal override string RecordType => "driverLicense"; + } + + /// + public class LoginRecordType : TypedRecordFileRef + { + private TypedField _login; + private TypedField _password; + private TypedField _url; + private TypedField _oneTimeCode; + + public string Login + { + get => _login.TypedValue; + set => _login.TypedValue = value; + } + + public string Password + { + get => _password.TypedValue; + set => _password.TypedValue = value; + } + + public string Url + { + get => _url.TypedValue; + set => _url.TypedValue = value; + } + + public string OneTimeCode + { + get => _oneTimeCode.TypedValue; + set => _oneTimeCode.TypedValue = value; + } + + protected internal override void LoadTypedField(ITypedField field) + { + if (field.FieldName == "login" && _login == null) + { + _login = field as TypedField; + } + else if (field.FieldName == "password" && _password == null) + { + _password = field as TypedField; + } + else if (field.FieldName == "url" && _url == null) + { + _url = field as TypedField; + } + else if (field.FieldName == "oneTimeCode" && _oneTimeCode == null) + { + _oneTimeCode = field as TypedField; + } + else + { + base.LoadTypedField(field); + } + } + + protected internal override IEnumerable CreateMissingFields() + { + if (_login == null) + { + _login = new TypedField("login"); + yield return _login; + } + + if (_password == null) + { + _password = new TypedField("password"); + yield return _password; + } + + if (_url == null) + { + _url = new TypedField("url"); + yield return _url; + } + + if (_oneTimeCode == null) + { + _oneTimeCode = new TypedField("oneTimeCode"); + yield return _oneTimeCode; + } + + foreach (var f in base.CreateMissingFields()) + { + yield return f; + } + } + + protected internal override string RecordType => "login"; + } +} diff --git a/KeeperSdk/vault/SecretManagerExtensions.cs b/KeeperSdk/vault/SecretManagerExtensions.cs new file mode 100644 index 0000000..8136227 --- /dev/null +++ b/KeeperSdk/vault/SecretManagerExtensions.cs @@ -0,0 +1,625 @@ +using Google.Protobuf; +using KeeperSecurity.Authentication; +using KeeperSecurity.Utils; +using Org.BouncyCastle.Asn1; +using Org.BouncyCastle.Asn1.Pkcs; +using Org.BouncyCastle.Asn1.Sec; +using Org.BouncyCastle.Asn1.X509; +using Org.BouncyCastle.Asn1.X9; +using Org.BouncyCastle.Crypto.Parameters; +using Org.BouncyCastle.Security; +using Records; +using System; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Net; +using System.Runtime.Serialization; +using System.Security.Cryptography; +using System.Text; +using System.Threading.Tasks; +using AuthProto = Authentication; +using EnterpriseProto = Enterprise; + +namespace KeeperSecurity.Vault +{ + public partial class VaultOnline : ISecretManager + { + /// + public async Task GetSecretManagerApplication(string recordUid, bool force = false) + { + if (!TryGetKeeperApplication(recordUid, out var ar)) + { + return null; + } + + if (!force && ar is SecretsManagerApplication ksma) + { + return ksma; + } + + var applicationUid = ar.Uid.Base64UrlDecode(); + var rq = new AuthProto.GetAppInfoRequest(); + rq.AppRecordUid.Add(ByteString.CopyFrom(applicationUid)); + + var rs = await Auth.ExecuteAuthRest("vault/get_app_info", rq); + var appInfo = rs.AppInfo.FirstOrDefault(x => x.AppRecordUid.SequenceEqual(applicationUid)); + var application = new SecretsManagerApplication + { + Uid = ar.Uid, + Revision = ar.Revision, + ClientModified = ar.ClientModified, + Title = ar.Title, + Type = ar.Type, + Version = ar.Version, + Owner = ar.Owner, + Shared = ar.Shared, + RecordKey = ar.RecordKey, + IsExternalShare = appInfo.IsExternalShare, + Devices = appInfo.Clients.Select(x => new SecretsManagerDevice + { + Name = x.Id, + DeviceId = x.ClientId.ToByteArray().Base64UrlEncode(), + CreatedOn = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.CreatedOn), + FirstAccess = x.FirstAccess > 0 ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.FirstAccess) : (DateTimeOffset?) null, + LastAccess = x.LastAccess > 0 ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.LastAccess) : (DateTimeOffset?) null, + LockIp = x.LockIp, + IpAddress = x.IpAddress, + PublicKey = x.PublicKey.ToByteArray(), + FirstAccessExpireOn = x.FirstAccessExpireOn > 0 ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.FirstAccessExpireOn) : (DateTimeOffset?) null, + AccessExpireOn = x.AccessExpireOn > 0 ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.AccessExpireOn) : (DateTimeOffset?) null, + }).ToArray(), + Shares = appInfo.Shares + .Where(x => + { + var uid = x.SecretUid.ToByteArray().Base64UrlEncode(); + if (x.ShareType == AuthProto.ApplicationShareType.ShareTypeRecord) + { + return TryGetKeeperRecord(uid, out _); + } + else + { + return TryGetSharedFolder(uid, out _); + } + }) + .Select(x => new SecretManagerShare + { + SecretUid = x.SecretUid.ToByteArray().Base64UrlEncode(), + SecretType = (SecretManagerSecretType) x.ShareType, + Editable = x.Editable, + CreatedOn = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x.CreatedOn) + }).ToArray() + }; + + keeperApplications.TryAdd(application.Uid, application); + + return application; + } + + /// + public async Task CreateSecretManagerApplication(string title) + { + if (string.IsNullOrEmpty(title)) + { + throw new KeeperInvalidParameter("CreateSecretManagerApplication", "title", "", "Application Title cannot be empty"); + } + var data = new RecordApplicationData + { + Title = title, + Type = "app" + }; + var appUid = CryptoUtils.GenerateUid(); + var appKey = CryptoUtils.GenerateEncryptionKey(); + var dataBytes = JsonUtils.DumpJson(data); + var rq = new ApplicationAddRequest + { + AppUid = ByteString.CopyFrom(appUid.Base64UrlDecode()), + RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(appKey, Auth.AuthContext.DataKey)), + Data = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(dataBytes, appKey)), + ClientModifiedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + }; + await Auth.ExecuteAuthRest("vault/application_add", rq); + await ScheduleSyncDown(TimeSpan.FromSeconds(0)); + if (TryGetKeeperApplication(appUid, out var ar)) + { + return ar; + } + return null; + } + + /// + public async Task DeleteSecretManagerApplication(string applicationId) + { + await this.DeleteVaultObjects(new[] { new RecordPath { RecordUid = applicationId } }, true); + } + + + /// + public async Task ShareToSecretManagerApplication(string applicationId, string sharedFolderOrRecordUid, bool editable) + { + if (!TryGetKeeperApplication(applicationId, out var application)) + { + throw new KeeperInvalidParameter("ShareToSecretManagerApplication", "applicationId", applicationId, "Application not found"); + } + + var isRecord = false; + byte[] secretKey = null; + if (TryGetSharedFolder(sharedFolderOrRecordUid, out var sf)) + { + secretKey = sf.SharedFolderKey; + } + else if (TryGetKeeperRecord(sharedFolderOrRecordUid, out var r)) + { + if (r is PasswordRecord || r is TypedRecord) + { + isRecord = true; + secretKey = r.RecordKey; + } + else + { + throw new KeeperInvalidParameter("ShareToSecretManagerApplication", "sharedFolderOrRecordUid", sharedFolderOrRecordUid, "Invalid record type"); + } + } + else + { + throw new KeeperInvalidParameter("ShareToSecretManagerApplication", "sharedFolderOrRecordUid", sharedFolderOrRecordUid, "Shared folder or Record do not exist"); + } + var addRq = new AuthProto.AppShareAdd + { + SecretUid = ByteString.CopyFrom(sharedFolderOrRecordUid.Base64UrlDecode()), + ShareType = isRecord ? AuthProto.ApplicationShareType.ShareTypeRecord : AuthProto.ApplicationShareType.ShareTypeFolder, + EncryptedSecretKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(secretKey, application.RecordKey)), + Editable = editable, + }; + var rq = new AuthProto.AddAppSharesRequest + { + AppRecordUid = ByteString.CopyFrom(application.Uid.Base64UrlDecode()) + }; + rq.Shares.Add(addRq); + await Auth.ExecuteAuthRest("vault/app_share_add", rq); + return await GetSecretManagerApplication(application.Uid, true); + } + + /// + public async Task UnshareFromSecretManagerApplication(string applicationId, string sharedFolderOrRecordUid) + { + if (!TryGetKeeperApplication(applicationId, out var application)) + { + throw new KeeperInvalidParameter("UnshareFromSecretManagerApplication", "applicationId", applicationId, "Application not found"); + } + + var rq = new AuthProto.RemoveAppSharesRequest + { + AppRecordUid = ByteString.CopyFrom(application.Uid.Base64UrlDecode()) + }; + var uidBytes = sharedFolderOrRecordUid.Base64UrlDecode(); + if (uidBytes.Length > 0) + { + rq.Shares.Add(ByteString.CopyFrom(uidBytes)); + } + + await Auth.ExecuteAuthRest("vault/app_share_remove", rq); + + return await GetSecretManagerApplication(application.Uid, true); + } + + + /// + public async Task> AddSecretManagerClient( + string applicationId, bool? unlockIp = null, int? firstAccessExpireInMinutes = null, + int? accessExpiresInMinutes = null, string name = null) + { + if (!TryGetKeeperApplication(applicationId, out var application)) + { + throw new KeeperInvalidParameter("AddSecretManagerClient", "applicationId", applicationId, "Application not found"); + } + + var clientKey = CryptoUtils.GenerateEncryptionKey(); + var hash = new HMACSHA512(clientKey); + var clientId = hash.ComputeHash(Encoding.UTF8.GetBytes("KEEPER_SECRETS_MANAGER_CLIENT_ID")); + + var encryptedAppKey = CryptoUtils.EncryptAesV2(application.RecordKey, clientKey); + + var rq = new AuthProto.AddAppClientRequest + { + AppRecordUid = ByteString.CopyFrom(application.Uid.Base64UrlDecode()), + EncryptedAppKey = ByteString.CopyFrom(encryptedAppKey), + ClientId = ByteString.CopyFrom(clientId), + LockIp = unlockIp != null ? !unlockIp.Value : true, + FirstAccessExpireOn = DateTimeOffset.UtcNow.AddMinutes( + firstAccessExpireInMinutes != null ? firstAccessExpireInMinutes.Value : 60).ToUnixTimeMilliseconds(), + AppClientType = EnterpriseProto.AppClientType.General, + }; + if (accessExpiresInMinutes.HasValue) + { + rq.AccessExpireOn = DateTimeOffset.UtcNow.AddMinutes(accessExpiresInMinutes.Value).ToUnixTimeMilliseconds(); + } + if (!string.IsNullOrEmpty(name)) + { + rq.Id = name; + } + + await Auth.ExecuteAuthRest("vault/app_client_add", rq); + var appDetails = await GetSecretManagerApplication(application.Uid, true); + var client = clientId.Base64UrlEncode(); + var device = appDetails.Devices.FirstOrDefault(x => x.DeviceId == client); + if (device == null) + { + throw new Exception($"Client Error"); + } + + var host = Auth.Endpoint.Server; + switch (host) + { + case "keepersecurity.com": + host = "US"; + break; + case "keeperseurity.eu": + host = "EU"; + break; + case "keepersecurity.com.au": + host = "AU"; + break; + case "keepersecurity.jp": + host = "JP"; + break; + case "keepersecurity.ca": + host = "CA"; + break; + case "govcloud.keepersecurity.us": + host = "GOV"; + break; + } + return Tuple.Create(device, $"{host}:{clientKey.Base64UrlEncode()}"); + } + + private const string ClientIdHashTag = "KEEPER_SECRETS_MANAGER_CLIENT_ID"; // Tag for hashing the client key to client id + private const string KsmClientVersion = "mn16.6.4"; + + [DataContract] + internal class KsmPayload + { + [DataMember(Name = "clientVersion", EmitDefaultValue = false)] + public string ClientVersion { get; set; } + [DataMember(Name = "clientId", EmitDefaultValue = false)] + public string ClientId { get; set; } + [DataMember(Name = "publicKey", EmitDefaultValue = false)] + public string PublicKey { get; set; } + [DataMember(Name = "appKey", EmitDefaultValue = false)] + public string AppKey { get; set; } + [DataMember(Name = "requestedRecords", EmitDefaultValue = false)] + public string[] RequestedRecords { get; set; } + } + + [DataContract] + internal class KsmResponseFile + { + [DataMember(Name = "fileUid", EmitDefaultValue = false)] + public string FileUid { get; set; } + [DataMember(Name = "fileKey", EmitDefaultValue = false)] + public string FileKey { get; set; } + [DataMember(Name = "data", EmitDefaultValue = false)] + public string Data { get; set; } + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } + [DataMember(Name = "thumbnailUrl", EmitDefaultValue = false)] + public string ThumbnailUrl { get; set; } + } + + [DataContract] + internal class KsmResponseRecord + { + [DataMember(Name = "recordUid", EmitDefaultValue = false)] + public string RecordUid { get; set; } + [DataMember(Name = "recordKey", EmitDefaultValue = false)] + public string RecordKey { get; set; } + [DataMember(Name = "data", EmitDefaultValue = false)] + public string Data { get; set; } + [DataMember(Name = "revision", EmitDefaultValue = false)] + public long Revision { get; set; } + [DataMember(Name = "isEditable", EmitDefaultValue = false)] + public bool IsEditable { get; set; } + [DataMember(Name = "files", EmitDefaultValue = false)] + public KsmResponseFile[] files { get; set; } + [DataMember(Name = "innerFolderUid", EmitDefaultValue = false)] + public string InnerFolderUid { get; set; } + } + + [DataContract] + internal class KsmResponseFolder + { + [DataMember(Name = "folderUid", EmitDefaultValue = false)] + public string FolderUid { get; set; } + [DataMember(Name = "folderKey", EmitDefaultValue = false)] + public string FolderKey { get; set; } + [DataMember(Name = "data", EmitDefaultValue = false)] + public string Data { get; set; } + [DataMember(Name = "parent", EmitDefaultValue = false)] + public string Parent { get; set; } + [DataMember(Name = "records", EmitDefaultValue = false)] + public KsmResponseRecord[] Records { get; set; } + } + + [DataContract] + internal class KsmResponse + { + [DataMember(Name = "appData", EmitDefaultValue = false)] + public string AppData { get; set; } + [DataMember(Name = "encryptedAppKey", EmitDefaultValue = false)] + public string EncryptedAppKey { get; set; } + [DataMember(Name = "appOwnerPublicKey", EmitDefaultValue = false)] + public string AppOwnerPublicKey { get; set; } + [DataMember(Name = "folders", EmitDefaultValue = false)] + public KsmResponseFolder[] Folders { get; set; } + [DataMember(Name = "records", EmitDefaultValue = false)] + public KsmResponseRecord[] Records { get; set; } + [DataMember(Name = "expiresOn", EmitDefaultValue = false)] + public long ExpiresOn { get; set; } + [DataMember(Name = "warnings", EmitDefaultValue = false)] + public string[] Warnings { get; set; } + } + + [DataContract] + internal class KsmError + { + [DataMember(Name = "key_id", EmitDefaultValue = false)] + public int KeyId { get; set; } + [DataMember(Name = "error", EmitDefaultValue = false)] + public string Error { get; set; } + } + + [DataContract] + public class SecretManagerConfiguration : ISecretManagerConfiguration { + [DataMember(Name = "hostname", EmitDefaultValue = false)] + public string Hostname { get; set; } + [DataMember(Name = "clientId", EmitDefaultValue = false)] + public string ClientId { get; set; } + [DataMember(Name = "appKey", EmitDefaultValue = false)] + public string AppKey { get; set; } + [DataMember(Name = "privateKey", EmitDefaultValue = false)] + public string PrivateKey { get; set; } + [DataMember(Name = "serverPublicKeyId", EmitDefaultValue = false)] + public string ServerPublicKeyId { get; set; } + [DataMember(Name = "appOwnerPublicKey", EmitDefaultValue = false)] + public string AppOwnerPublicKey { get; set; } + } + + private ECPrivateKeyParameters LoadKsmPrivateKey(byte[] data) + { + var privateKeyInfo = PrivateKeyInfo.GetInstance(data); + var privateKeyStructure = ECPrivateKeyStructure.GetInstance(privateKeyInfo.ParsePrivateKey()); + var privateKeyValue = privateKeyStructure.GetKey(); + return new ECPrivateKeyParameters(privateKeyValue, CryptoUtils.EcParameters); + } + + private byte[] UnloadKsmPrivateKey(ECPrivateKeyParameters privateKey) + { + var publicKey = CryptoUtils.GetPublicEcKey(privateKey); + var publicKeyDer = new DerBitString(publicKey.Q.GetEncoded(false)); + var dp = privateKey.Parameters; + var orderBitLength = dp.N.BitLength; + var x962 = new X962Parameters(X9ObjectIdentifiers.Prime256v1); + var ec = new ECPrivateKeyStructure(orderBitLength, privateKey.D, publicKeyDer, x962); + var algId = new AlgorithmIdentifier(X9ObjectIdentifiers.IdECPublicKey, x962); + var privateKeyInfo = new PrivateKeyInfo(algId, ec); + return privateKeyInfo.GetDerEncoded(); + } + + private async Task ExecuteKsm(SecretManagerConfiguration configuration, string endpoint, RQ payload) + { + + var payloadBytes = JsonUtils.DumpJson(payload); +#if DEBUG + var rq = Encoding.UTF8.GetString(payloadBytes); + Debug.WriteLine($"[KSM RQ]: {endpoint}: {rq}"); +#endif + var privateKeyDer = Convert.FromBase64String(configuration.PrivateKey); + var privateKey = LoadKsmPrivateKey(privateKeyDer); + + var transmissionKey = CryptoUtils.GenerateEncryptionKey(); + var encryptedPayload = CryptoUtils.EncryptAesV2(payloadBytes, transmissionKey); + + var attempt = 0; + var keyId = Auth.Endpoint.ServerKeyId; + if (!string.IsNullOrEmpty(configuration.ServerPublicKeyId)) + { + if (int.TryParse(configuration.ServerPublicKeyId, out keyId)) { + } + } + if (!KeeperSettings.KeeperEcPublicKeys.ContainsKey(keyId)) + { + keyId = 7; + } + var url = $"https://{configuration.Hostname}/api/rest/sm/v1/{endpoint}"; + + while (attempt < 2) + { + attempt++; + var encTransmissionKey = Auth.Endpoint.EncryptWithKeeperKey(transmissionKey, keyId); + var signatureBase = encTransmissionKey.Concat(encryptedPayload).ToArray(); + var signer = SignerUtilities.GetSigner("SHA256withECDSA"); + + signer.Init(true, privateKey); + signer.BlockUpdate(signatureBase, 0, signatureBase.Length); + var signature = signer.GenerateSignature(); + + var request = (HttpWebRequest) WebRequest.Create(url); + request.Timeout = (int) TimeSpan.FromMinutes(5).TotalMilliseconds; + if (Auth.Endpoint.WebProxy != null) + { + request.Proxy = Auth.Endpoint.WebProxy; + } + + request.UserAgent = "KSM.Net/" + KsmClientVersion; + request.ContentType = "application/octet-stream"; + request.Headers["PublicKeyId"] = keyId.ToString(); + request.Headers["TransmissionKey"] = Convert.ToBase64String(encTransmissionKey); + request.Headers["Authorization"] = $"Signature {Convert.ToBase64String(signature)}"; + request.Method = "POST"; + + HttpWebResponse response; + try + { + using (var requestStream = request.GetRequestStream()) + { + await requestStream.WriteAsync(encryptedPayload, 0, encryptedPayload.Length); + } + response = (HttpWebResponse) request.GetResponse(); + } + catch (WebException e) + { + response = (HttpWebResponse) e.Response; + if (response == null) throw; + } + if (response.StatusCode == HttpStatusCode.OK) + { + configuration.ServerPublicKeyId = keyId.ToString(); + using (var ms = new MemoryStream()) + using (var rss = response.GetResponseStream()) + { + await rss.CopyToAsync(ms); + await rss.FlushAsync(); + var data = ms.ToArray(); + if (data.Length > 0) + { + var decryptedRs = CryptoUtils.DecryptAesV2(data, transmissionKey); +#if DEBUG + var rs = Encoding.UTF8.GetString(decryptedRs); + Debug.WriteLine($"[KSM RS]: {endpoint}: {rs}"); +#endif + return JsonUtils.ParseJson(decryptedRs); + } + } + return default; + } + else + { + if (response.ContentType == "application/json") + { + using (var ms = new MemoryStream()) + using (var rss = response.GetResponseStream()) + { + await rss.CopyToAsync(ms); + await ms.FlushAsync(); + var data = ms.ToArray(); +#if DEBUG + var rs = Encoding.UTF8.GetString(data); + Debug.WriteLine($"[KSM Error RS]: {endpoint}: {rs}"); +#endif + var errorRs = JsonUtils.ParseJson(ms.ToArray()); + if (errorRs.Error == "key") + { + keyId = errorRs.KeyId; + continue; + } + throw new KeeperApiException("ksm_error", errorRs.Error); + } + } + throw new Exception("KSM API Http error: " + response.StatusCode); + } + } + throw new Exception("KSM API error"); + } + + /// + public async Task GetConfiguration(string oneTimeToken) + { + var tokenParts = oneTimeToken.Split(':'); + string host; + string clientKey; + if (tokenParts.Length == 1) + { + host = Auth.Endpoint.Server; + clientKey = oneTimeToken; + } + else + { + switch (tokenParts[0].ToUpper()) + { + case "US": + host = "keepersecurity.com"; + break; + case "EU": + host = "keepersecurity.eu"; + break; + case "AU": + host = "keepersecurity.com.au"; + break; + case "GOV": + host = "govcloud.keepersecurity.us"; + break; + case "JP": + host = "keepersecurity.jp"; + break; + case "CA": + host = "keepersecurity.ca"; + break; + default: + host = Auth.Endpoint.Server; + break; + } + clientKey = tokenParts[1]; + } + + var clientKeyBytes = clientKey.Base64UrlDecode(); + var hmac = new HMACSHA512(clientKeyBytes); + var clientKeyHash = hmac.ComputeHash(Encoding.UTF8.GetBytes(ClientIdHashTag)); + var clientId = Convert.ToBase64String(clientKeyHash); + + CryptoUtils.GenerateEcKey(out var privateKey, out var publicKey); + var privateKeyBytes = UnloadKsmPrivateKey(privateKey); + + var configuration = new SecretManagerConfiguration + { + Hostname = host, + ClientId = clientId, + PrivateKey = Convert.ToBase64String(privateKeyBytes), + ServerPublicKeyId = Auth.Endpoint.ServerKeyId.ToString(), + }; + + var ksmPayload = new KsmPayload + { + ClientVersion = KsmClientVersion, + ClientId = clientId, + PublicKey = CryptoUtils.UnloadEcPublicKey(publicKey).Base64UrlEncode(), + RequestedRecords = new[] { "NON-EXISTING-RECORD-UID" }, + }; + + var rs = await ExecuteKsm(configuration, "get_secret", ksmPayload); + if (!string.IsNullOrEmpty(rs.EncryptedAppKey)) + { + configuration.AppKey = Convert.ToBase64String(CryptoUtils.DecryptAesV2(rs.EncryptedAppKey.Base64UrlDecode(), clientKeyBytes)); + ksmPayload.PublicKey = null; + if (!string.IsNullOrEmpty(rs.AppOwnerPublicKey)) + { + configuration.AppOwnerPublicKey = rs.AppOwnerPublicKey; + } + _ = await ExecuteKsm(configuration, "get_secret", ksmPayload); + } + + return configuration; + } + + /// + public async Task DeleteSecretManagerClient(string applicationId, string deviceId) + { + if (!TryGetKeeperApplication(applicationId, out var application)) + { + throw new KeeperInvalidParameter("RemoveSecretManagerClient", "applicationId", applicationId, "Application not found"); + } + + var rq = new AuthProto.RemoveAppClientsRequest + { + AppRecordUid = ByteString.CopyFrom(application.Uid.Base64UrlDecode()), + }; + var clientBytes = deviceId.Base64UrlDecode(); + if (clientBytes.Length > 0) + { + rq.Clients.Add(ByteString.CopyFrom(clientBytes)); + } + + await Auth.ExecuteAuthRest("vault/app_client_remove", rq); + await GetSecretManagerApplication(application.Uid, true); + } + } +} diff --git a/KeeperSdk/vault/SharedFolderExtensions.cs b/KeeperSdk/vault/SharedFolderExtensions.cs index 2f31b61..2927b07 100644 --- a/KeeperSdk/vault/SharedFolderExtensions.cs +++ b/KeeperSdk/vault/SharedFolderExtensions.cs @@ -5,24 +5,14 @@ using KeeperSecurity.Commands; using KeeperSecurity.Authentication; using KeeperSecurity.Utils; +using Folder; +using Google.Protobuf; namespace KeeperSecurity.Vault { public partial class VaultOnline : IVaultSharedFolder { - /// - /// Adds (if needed) user or team to the shared folder and set user access permissions. - /// - /// Shared Folder UID. - /// User email or Team UID. - /// Type of parameter. - /// Shared Folder User Permissions. - /// Awaitable task. - /// - /// If options parameter is null then user gets default user permissions when added. - /// - /// - /// + /// > public async Task PutUserToSharedFolder(string sharedFolderUid, string userId, UserType userType, @@ -30,91 +20,91 @@ public async Task PutUserToSharedFolder(string sharedFolderUid, { var sharedFolder = this.GetSharedFolder(sharedFolderUid); var perm = this.ResolveSharedFolderAccessPath(Auth.Username, sharedFolderUid, true); - if (perm == null) - { - throw new VaultException("You don't have permission to manage users."); - } - var request = new SharedFolderUpdateCommand + var request = new SharedFolderUpdateV3Request { - pt = Auth.AuthContext.SessionToken.Base64UrlEncode(), - operation = "update", - shared_folder_uid = sharedFolder.Uid, - from_team_uid = perm.UserType == UserType.Team ? perm.UserId : null, - name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey).Base64UrlEncode(), - forceUpdate = true, + SharedFolderUid = ByteString.CopyFrom(sharedFolder.Uid.Base64UrlDecode()), + EncryptedSharedFolderName = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey)), + ForceUpdate = true, + }; + if (perm != null && perm.UserType == UserType.Team) + { + request.FromTeamUid = ByteString.CopyFrom(perm.UserId.Base64UrlDecode()); + } + if (userType == UserType.User) { if (sharedFolder.UsersPermissions.Any(x => x.UserType == UserType.User && x.UserId == userId)) { - request.updateUsers = new[] + request.SharedFolderUpdateUser.Add(new Folder.SharedFolderUpdateUser { - new SharedFolderUpdateUser - { - Username = userId, - ManageUsers = options?.ManageUsers, - ManageRecords = options?.ManageRecords, - } - }; + Username = userId, + ManageUsers = options.ManageUsers == null ? SetBooleanValue.BooleanNoChange + : options.ManageUsers.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse, + ManageRecords = options.ManageRecords == null ? SetBooleanValue.BooleanNoChange + : options.ManageRecords.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse, + }); } else { - var pkRq = new PublicKeysCommand - { - keyOwners = new[] {userId}, - }; - var pkRs = await Auth.ExecuteAuthCommand(pkRq); - if (pkRs.publicKeys == null || pkRs.publicKeys.Length == 0) + byte[] encryptedKey; + EncryptedKeyType encryptedKeyType; + if (string.Equals(userId, Auth.Username, StringComparison.InvariantCultureIgnoreCase)) { - throw new VaultException($"Cannot get public key of user: {userId}"); + encryptedKey = CryptoUtils.EncryptAesV1(sharedFolder.SharedFolderKey, Auth.AuthContext.DataKey); + encryptedKeyType = EncryptedKeyType.EncryptedByDataKey; } - - var pk = pkRs.publicKeys[0]; - if (!string.IsNullOrEmpty(pk.resultCode)) + else { - throw new KeeperApiException(pk.resultCode, pk.message); + var keyTuple = await GetUserPublicKeys(userId); + var publicKey = CryptoUtils.LoadPublicKey(keyTuple.Item1); + encryptedKey = CryptoUtils.EncryptRsa(sharedFolder.SharedFolderKey, publicKey); + encryptedKeyType = EncryptedKeyType.EncryptedByPublicKey; } - - var publicKey = CryptoUtils.LoadPublicKey(pk.publicKey.Base64UrlDecode()); - request.addUsers = new[] + request.SharedFolderAddUser.Add(new Folder.SharedFolderUpdateUser { - new SharedFolderUpdateUser + Username = userId, + ManageUsers = options.ManageUsers == null + ? (sharedFolder.DefaultManageUsers ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse) + : options.ManageUsers.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse, + ManageRecords = options.ManageRecords == null + ? (sharedFolder.DefaultManageRecords ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse) + : options.ManageRecords.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse, + TypedSharedFolderKey = new EncryptedDataKey { - Username = userId, - ManageUsers = options?.ManageUsers, - ManageRecords = options?.ManageRecords, - SharedFolderKey = CryptoUtils.EncryptRsa(sharedFolder.SharedFolderKey, publicKey).Base64UrlEncode(), - } - }; + EncryptedKey = ByteString.CopyFrom(encryptedKey), + EncryptedKeyType = encryptedKeyType, + }, + }); } } else { - if (sharedFolder.UsersPermissions.Any(x => x.UserType == UserType.Team && x.UserId == userId)) + var p = sharedFolder.UsersPermissions.FirstOrDefault(x => x.UserType == UserType.Team && x.UserId == userId); + if (p != null) { - request.updateTeams = new[] + request.SharedFolderUpdateTeam.Add(new Folder.SharedFolderUpdateTeam { - new SharedFolderUpdateTeam - { - TeamUid = userId, - ManageUsers = options?.ManageUsers, - ManageRecords = options?.ManageRecords, - } - }; + TeamUid = ByteString.CopyFrom(userId.Base64UrlDecode()), + ManageUsers = options.ManageUsers == null ? p.ManageUsers : options.ManageUsers.Value, + ManageRecords = options.ManageRecords == null ? p.ManageRecords : options.ManageRecords.Value, + }); } else { - string encryptedSharedFolderKey; + byte[] encryptedSharedFolderKey; + EncryptedKeyType keyType; if (TryGetTeam(userId, out var team)) { - encryptedSharedFolderKey = CryptoUtils.EncryptAesV1(sharedFolder.SharedFolderKey, team.TeamKey).Base64UrlEncode(); + encryptedSharedFolderKey = CryptoUtils.EncryptAesV1(sharedFolder.SharedFolderKey, team.TeamKey); + keyType = EncryptedKeyType.EncryptedByDataKey; } else { var tkRq = new TeamGetKeysCommand { - teams = new[] {userId}, + teams = new[] { userId }, }; var tkRs = await Auth.ExecuteAuthCommand(tkRq); if (tkRs.keys == null || tkRs.keys.Length == 0) @@ -129,25 +119,26 @@ public async Task PutUserToSharedFolder(string sharedFolderUid, } var tpk = CryptoUtils.LoadPublicKey(tk.key.Base64UrlDecode()); - encryptedSharedFolderKey = CryptoUtils.EncryptRsa(sharedFolder.SharedFolderKey, tpk).Base64UrlEncode(); + encryptedSharedFolderKey = CryptoUtils.EncryptRsa(sharedFolder.SharedFolderKey, tpk); + keyType = EncryptedKeyType.EncryptedByPublicKey; } - request.addTeams = new[] + request.SharedFolderAddTeam.Add(new Folder.SharedFolderUpdateTeam { - new SharedFolderUpdateTeam - { - TeamUid = userId, - ManageUsers = options?.ManageUsers, - ManageRecords = options?.ManageRecords, - SharedFolderKey = encryptedSharedFolderKey, + TeamUid = ByteString.CopyFrom(userId.Base64UrlDecode()), + ManageUsers = options.ManageUsers == null ? sharedFolder.DefaultManageUsers : options.ManageUsers.Value, + ManageRecords = options.ManageRecords == null ? sharedFolder.DefaultManageRecords : options.ManageRecords.Value, + TypedSharedFolderKey = new EncryptedDataKey + { + EncryptedKey = ByteString.CopyFrom(encryptedSharedFolderKey), + EncryptedKeyType = keyType, } - }; + }); } } - - var response = await Auth.ExecuteAuthCommand(request); - foreach (var arr in (new[] {response.addUsers, response.updateUsers})) + var response = await Auth.ExecuteAuthRest("vault/shared_folder_update_v3", request); + foreach (var arr in (new[] { response.SharedFolderAddUserStatus, response.SharedFolderUpdateUserStatus })) { var failed = arr?.FirstOrDefault(x => x.Status != "success"); if (failed != null) @@ -156,62 +147,55 @@ public async Task PutUserToSharedFolder(string sharedFolderUid, } } - foreach (var arr in (new[] {response.addTeams, response.updateTeams})) + foreach (var arr in (new[] { response.SharedFolderAddTeamStatus, response.SharedFolderUpdateTeamStatus })) { var failed = arr?.FirstOrDefault(x => x.Status != "success"); if (failed != null) { - throw new VaultException($"Put Team Uid \"{failed.TeamUid}\" to Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); + var uid = failed.TeamUid.ToArray().Base64UrlEncode(); + throw new VaultException($"Put Team Uid \"{uid}\" to Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); } } await ScheduleSyncDown(TimeSpan.FromSeconds(0)); } - /// - /// Removes user or team from shared folder. - /// - /// Shared Folder UID. - /// User email or Team UID. - /// Type of userId parameter. - /// Awaitable task. - /// - /// + /// > public async Task RemoveUserFromSharedFolder(string sharedFolderUid, string userId, UserType userType) { var sharedFolder = this.GetSharedFolder(sharedFolderUid); - var perm = this.ResolveSharedFolderAccessPath(Auth.Username, sharedFolderUid, true); - if (perm == null) - { - throw new VaultException("You don't have permission to manage teams."); - } - if (!sharedFolder.UsersPermissions.Any(x => x.UserType == userType && string.Compare(x.UserId, userId, StringComparison.InvariantCultureIgnoreCase) == 0)) { return; } - var request = new SharedFolderUpdateCommand + var request = new SharedFolderUpdateV3Request { - pt = Auth.AuthContext.SessionToken.Base64UrlEncode(), - operation = "update", - shared_folder_uid = sharedFolder.Uid, - from_team_uid = perm.UserType == UserType.Team ? perm.UserId : null, - name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey).Base64UrlEncode(), - forceUpdate = true, + SharedFolderUid = ByteString.CopyFrom(sharedFolder.Uid.Base64UrlDecode()), + EncryptedSharedFolderName = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey)), + ForceUpdate = true, + }; + { + var perm = this.ResolveSharedFolderAccessPath(Auth.Username, sharedFolderUid, true); + if (perm != null && perm.UserType == UserType.Team) + { + request.FromTeamUid = ByteString.CopyFrom(perm.UserId.Base64UrlDecode()); + } + } + if (userType == UserType.User) { - request.removeUsers = new[] {new SharedFolderUpdateUser {Username = userId}}; + request.SharedFolderRemoveUser.Add(userId); } else { - request.removeTeams = new[] {new SharedFolderUpdateTeam {TeamUid = userId}}; + request.SharedFolderRemoveTeam.Add(ByteString.CopyFrom(userId.Base64UrlDecode())); } - var response = await Auth.ExecuteAuthCommand(request); - foreach (var arr in (new[] {response.removeUsers})) + var response = await Auth.ExecuteAuthRest("vault/shared_folder_update_v3", request); + foreach (var arr in (new[] { response.SharedFolderRemoveUserStatus })) { var failed = arr?.FirstOrDefault(x => x.Status != "success"); if (failed != null) @@ -220,73 +204,59 @@ public async Task RemoveUserFromSharedFolder(string sharedFolderUid, string user } } - foreach (var arr in (new[] {response.removeTeams})) + foreach (var arr in (new[] { response.SharedFolderRemoveTeamStatus })) { var failed = arr?.FirstOrDefault(x => x.Status != "success"); if (failed != null) { - throw new VaultException($"Remove Team \"{failed.TeamUid}\" from Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); + var uid = failed.TeamUid.ToArray().Base64UrlEncode(); + throw new VaultException($"Remove Team \"{uid}\" from Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); } } await ScheduleSyncDown(TimeSpan.FromSeconds(0)); } - /// - /// Changes record permissions in shared folder. - /// - /// Shared Folder UID. - /// Record UID. - /// Record permissions. - /// Awaitable task - /// - /// This method does not add a record to shared folder. - /// Use or . - /// - /// + /// > public async Task ChangeRecordInSharedFolder(string sharedFolderUid, string recordUid, ISharedFolderRecordOptions options) { var sharedFolder = this.GetSharedFolder(sharedFolderUid); - var perm = this.ResolveSharedFolderAccessPath(Auth.Username, sharedFolderUid, false, true); - if (perm == null) - { - throw new VaultException("You don't have permission to manage records."); - } _ = this.GetRecord(recordUid); var recordPerm = sharedFolder.RecordPermissions.FirstOrDefault(x => x.RecordUid != recordUid); if (recordPerm != null && options != null) { - var sfur = new SharedFolderUpdateRecord + var request = new SharedFolderUpdateV3Request { - RecordUid = recordUid, - CanEdit = options.CanEdit ?? recordPerm.CanEdit, - CanShare = options.CanShare ?? recordPerm.CanShare, + SharedFolderUid = ByteString.CopyFrom(sharedFolder.Uid.Base64UrlDecode()), + EncryptedSharedFolderName = ByteString.CopyFrom(CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey)), + ForceUpdate = true, + }; - var recordPath = this.ResolveRecordAccessPath(sfur, options.CanEdit.HasValue, options.CanShare.HasValue); - if (recordPath == null) { - throw new VaultException($"You don't have permission to edit and/or share the record UID \"{recordUid}\""); + var perm = this.ResolveSharedFolderAccessPath(Auth.Username, sharedFolderUid, true); + if (perm != null && perm.UserType == UserType.Team) + { + request.FromTeamUid = ByteString.CopyFrom(perm.UserId.Base64UrlDecode()); + } } - - var request = new SharedFolderUpdateCommand + request.SharedFolderUpdateRecord.Add(new Folder.SharedFolderUpdateRecord { - pt = Auth.AuthContext.SessionToken.Base64UrlEncode(), - operation = "update", - shared_folder_uid = sharedFolder.Uid, - from_team_uid = perm.UserType == UserType.Team ? perm.UserId : null, - name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey).Base64UrlEncode(), - forceUpdate = true, - updateRecords = new[] {sfur} - }; + RecordUid = ByteString.CopyFrom(recordUid.Base64UrlDecode()), + CanEdit = options.CanEdit == null ? SetBooleanValue.BooleanNoChange + : (options.CanEdit.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse), + CanShare = options.CanShare == null ? SetBooleanValue.BooleanNoChange + : (options.CanShare.Value ? SetBooleanValue.BooleanTrue : SetBooleanValue.BooleanFalse), + }); - var response = await Auth.ExecuteAuthCommand(request); - foreach (var arr in (new[] {response.updateRecords})) + var response = await Auth.ExecuteAuthRest("vault/shared_folder_update_v3", request); + foreach (var arr in (new[] { response.SharedFolderUpdateRecordStatus })) { var failed = arr?.FirstOrDefault(x => x.Status != "success"); if (failed != null) { - throw new VaultException($"Put Record UID \"{failed.RecordUid}\" to Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); + var uid = failed.RecordUid.ToArray().Base64UrlEncode(); + throw new VaultException($"Put Record UID \"{uid}\" to Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); } } } @@ -297,43 +267,5 @@ public async Task ChangeRecordInSharedFolder(string sharedFolderUid, string reco await ScheduleSyncDown(TimeSpan.FromSeconds(0)); } - /* - public async Task RemoveRecordFromSharedFolder(string sharedFolderUid, string recordUid) - { - var sharedFolder = this.GetSharedFolder(sharedFolderUid); - var perm = this.ResolveSharedFolderAccessPath(Auth.Username, sharedFolderUid, false, true); - if (perm == null) - { - throw new VaultException("You don't have permission to manage records."); - } - - if (sharedFolder.RecordPermissions.All(x => x.RecordUid != recordUid)) - { - return; - } - - var request = new SharedFolderUpdateCommand - { - pt = Auth.AuthContext.SessionToken.Base64UrlEncode(), - operation = "update", - shared_folder_uid = sharedFolder.Uid, - from_team_uid = perm.UserType == UserType.Team ? perm.UserId : null, - name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(sharedFolder.Name), sharedFolder.SharedFolderKey).Base64UrlEncode(), - forceUpdate = true, - removeRecords = new[] {new SharedFolderUpdateRecord {RecordUid = recordUid}} - }; - var response = await Auth.ExecuteAuthCommand(request); - foreach (var arr in (new[] {response.removeRecords})) - { - var failed = arr?.FirstOrDefault(x => x.Status != "success"); - if (failed != null) - { - throw new VaultException($"Remove Record Uid \"{failed.RecordUid}\" to Shared Folder \"{sharedFolder.Name}\" error: {failed.Status}"); - } - } - - await ScheduleSyncDown(TimeSpan.FromSeconds(0)); - } - */ } } diff --git a/KeeperSdk/vault/Storage.cs b/KeeperSdk/vault/Storage.cs index c2e7262..92cff91 100644 --- a/KeeperSdk/vault/Storage.cs +++ b/KeeperSdk/vault/Storage.cs @@ -33,6 +33,10 @@ public enum KeyType /// Key is encrypted with team RSA key. /// TeamPrivateKey = 5, + /// + /// Key is encrypted with record key. + /// + RecordKey = 6, } /// @@ -83,7 +87,7 @@ public interface IRecordMetadata : IUidLink /// /// Defines Password Record properties. /// - public interface IPasswordRecord : IUid + public interface IStorageRecord : IUid { /// /// Record UID. @@ -94,13 +98,21 @@ public interface IPasswordRecord : IUid /// long Revision { get; } /// + /// Record Version. + /// 2 - Legacy + /// 3 - Typed + /// 4 - File + /// 5 - Application + /// + int Version { get; } + /// /// Last modification time. Unix epoch in seconds. /// long ClientModifiedTime { get; } /// /// Encrypted record data /// - string Data { get; set; } + string Data { get; } /// /// Encrypted record extra data. /// @@ -361,7 +373,7 @@ public interface IPredicateStorage where T : IUidLink /// /// Delete all links for object entity UID /// - /// List of Object UIDs to delete. + /// List of Object UIDs to delete. void DeleteLinksForObjects(IEnumerable objectUids); /// /// Gets all entity links for subject entity UID. @@ -400,7 +412,7 @@ public interface IKeeperStorage /// /// Gets record entity storage. /// - IEntityStorage Records { get; } + IEntityStorage Records { get; } /// /// Gets shared folder entity storage. @@ -448,7 +460,7 @@ public interface IKeeperStorage /// Subject UIDUser Email or Team UID /// /// - IPredicateStorage SharedFolderPermissions { get; } + IPredicateStorage SharedFolderPermissions { get; } /// /// Gets folder entity storage. @@ -466,12 +478,55 @@ public interface IKeeperStorage /// IPredicateStorage FolderRecords { get; } // FolderUid / RecordUid + /// + /// Gets record type's entity storage + /// + IEntityStorage RecordTypes { get; } + /// /// Clear offline Keeper vault storage. /// void Clear(); } + /// + /// Specifies Record Type Scope + /// + public enum RecordTypeScope + { + /// + /// Pre-Defined + /// + Standard = 0, + /// + /// User-Defined + /// + User = 1, + /// + /// Enterprise-Defined + /// + Enterprise = 2, + } + + /// + /// Defines properties for Record Types. + /// + public interface IRecordType : IUid + { + /// + /// Record Type ID + /// + int Id { get; } + /// + /// Record Type Scope + /// + RecordTypeScope Scope { get; } + /// + /// Record Type Content (JSON). + /// + string Content { get; } + } + internal class InMemoryItemStorage : IEntityStorage where T : IUid { private readonly Dictionary _items = new Dictionary(); @@ -503,7 +558,10 @@ public void PutEntities(IEnumerable data) { foreach (var entity in data) { - _items[entity.Uid] = entity; + if (entity != null) + { + _items[entity.Uid] = entity; + } } } } @@ -579,6 +637,10 @@ public void PutLinks(IEnumerable links) { foreach (var link in links) { + if (link == null) + { + continue; + } if (!_links.TryGetValue(link.SubjectUid, out IDictionary dict)) { dict = new Dictionary(); @@ -612,91 +674,46 @@ public InMemoryKeeperStorage() Clear(); } - /// - /// Gets pseudo UID for logged in user. - /// + /// public string PersonalScopeUid { get; } = "PersonalScopeUid"; - /// - /// Gets or sets revision. - /// + /// public long Revision { get; set; } - /// - /// Gets record entity storage. - /// - public IEntityStorage Records { get; private set; } + /// + public IEntityStorage Records { get; private set; } - /// - /// Gets shared folder entity storage. - /// + /// public IEntityStorage SharedFolders { get; private set; } - - /// - /// Gets team entity storage. - /// + + /// public IEntityStorage Teams { get; private set; } - /// - /// Gets non-shared record data entity storage. - /// + /// public IEntityStorage NonSharedData { get; private set; } - /// - /// Gets record key entity link storage. - /// - /// - /// - /// Object UIDRecord UID - /// Subject UIDPersonalScopeUid or Shared Folder UID - /// - /// + /// public IPredicateStorage RecordKeys { get; private set; } - /// - /// Gets shared folder key entity link storage - /// - /// - /// - /// Object UIDShared Folder UID - /// Subject UIDPersonalScopeUid or Team UID - /// - /// + /// public IPredicateStorage SharedFolderKeys { get; private set; } - /// - /// Gets shared folder user permission entity link storage. - /// - /// - /// - /// Object UIDShared Folder UID - /// Subject UIDUser Email or Team UID - /// - /// + /// public IPredicateStorage SharedFolderPermissions { get; private set; } - /// - /// Gets folder entity storage. - /// + /// public IEntityStorage Folders { get; private set; } - /// - /// Gets folder's record entity link storage. - /// - /// - /// - /// Object UIDFolder UID - /// Subject UIDRecord UID - /// - /// + /// public IPredicateStorage FolderRecords { get; private set; } - /// - /// Clear offline Keeper vault storage. - /// + public IEntityStorage RecordTypes { get; private set; } + + + /// public void Clear() { - Records = new InMemoryItemStorage(); + Records = new InMemoryItemStorage(); SharedFolders = new InMemoryItemStorage(); Teams = new InMemoryItemStorage(); NonSharedData = new InMemoryItemStorage(); @@ -705,6 +722,8 @@ public void Clear() SharedFolderPermissions = new InMemorySentenceStorage(); Folders = new InMemoryItemStorage(); FolderRecords = new InMemorySentenceStorage(); + RecordTypes = new InMemoryItemStorage(); + Revision = 0; } } diff --git a/KeeperSdk/vault/SyncDown.cs b/KeeperSdk/vault/SyncDown.cs index 072dab8..8035510 100644 --- a/KeeperSdk/vault/SyncDown.cs +++ b/KeeperSdk/vault/SyncDown.cs @@ -8,6 +8,7 @@ using KeeperSecurity.Commands; using KeeperSecurity.Authentication; using KeeperSecurity.Utils; +using Records; namespace KeeperSecurity.Vault { @@ -23,6 +24,7 @@ public static class SyncDownExtensions /// internal static async Task RunSyncDown(this VaultOnline vault) { + var auth = vault.Auth; var storage = vault.Storage; var context = vault.Auth.AuthContext; var clientKey = vault.ClientKey; @@ -30,14 +32,14 @@ internal static async Task RunSyncDown(this VaultOnline vault) var command = new SyncDownCommand { revision = storage.Revision, - include = new[] {"sfheaders", "sfrecords", "sfusers", "teams", "folders"}, + include = new[] { "sfheaders", "sfrecords", "sfusers", "teams", "folders", "typed_record", "app_record" }, deviceName = vault.Auth.Endpoint.DeviceName, deviceId = vault.Auth.Endpoint.DeviceName }; - var rs = await vault.Auth.ExecuteAuthCommand(command); + var rs = await auth.ExecuteAuthCommand(command); - Debug.WriteLine("Sync Down: Enter"); + Debug.WriteLine("Sync Down: Process Enter"); var isFullSync = rs.fullSync; if (isFullSync) { @@ -47,14 +49,21 @@ internal static async Task RunSyncDown(this VaultOnline vault) var result = new RebuildTask(isFullSync); if (rs.removedRecords != null) { + result.AddRecords(rs.removedRecords); storage.RecordKeys.DeleteLinks( rs.removedRecords .Select(recordUid => UidLink.Create(recordUid, storage.PersonalScopeUid))); + var recordLinks = rs.removedRecords + .SelectMany(x => storage.RecordKeys.GetLinksForObject(x), (s, md) => md) + .Cast() + .ToArray(); + result.AddRecords(recordLinks.Select(x => x.ObjectUid)); + storage.RecordKeys.DeleteLinks(recordLinks); + var folderRecords = new List(); foreach (var recordUid in rs.removedRecords) { - result.AddRecord(recordUid); var links = storage.FolderRecords.GetLinksForObject(recordUid).ToArray(); foreach (var link in links) { @@ -125,10 +134,11 @@ internal static async Task RunSyncDown(this VaultOnline vault) if (rs.userFolderSharedFoldersRemoved != null) { - storage.FolderRecords.DeleteLinksForSubjects(rs.userFolderSharedFoldersRemoved - .Select(x => x.SharedFolderUid)); - storage.Folders.DeleteUids(rs.userFolderSharedFoldersRemoved - .Select(x => x.SharedFolderUid)); + result.AddSharedFolders(rs.userFolderSharedFoldersRemoved.Select(x => x.FolderUid)); + //storage.FolderRecords.DeleteLinksForSubjects(rs.userFolderSharedFoldersRemoved + // .Select(x => x.SharedFolderUid)); + //storage.Folders.DeleteUids(rs.userFolderSharedFoldersRemoved + // .Select(x => x.SharedFolderUid)); } if (rs.userFoldersRemovedRecords != null) @@ -148,6 +158,12 @@ internal static async Task RunSyncDown(this VaultOnline vault) storage.FolderRecords.DeleteLinks(links); } + if (rs.removedLinks != null) + { + result.AddRecords(rs.removedLinks.Select(x => x.recordUid)); + storage.RecordKeys.DeleteLinks(rs.removedLinks); + } + if (rs.sharedFolders != null) { // full sync shared folders @@ -201,7 +217,7 @@ internal static async Task RunSyncDown(this VaultOnline vault) .ToArray(); - if (affectedTeams.Any() || affectedLinks.Any()) + if (affectedTeams.Any() || affectedUsers.Any()) { storage.SharedFolderPermissions.DeleteLinks(affectedTeams.Concat(affectedUsers)); } @@ -243,17 +259,46 @@ internal static async Task RunSyncDown(this VaultOnline vault) { result.AddRecords(rs.records.Select(x => x.RecordUid)); + foreach (var recordUid in rs.records + .Where(x => !recordOwnership.ContainsKey(x.RecordUid)) + .Select(x => storage.Records.GetEntity(x.RecordUid)) + .Where(x => x != null) + .Where(x => x.Owner) + .Select(x => x.RecordUid) + ) + { + recordOwnership[recordUid] = true; + } + storage.Records.PutEntities(rs.records .Select(x => { x.AdjustUdata(); - if (!recordOwnership.ContainsKey(x.RecordUid)) return x; - - x.Owner = recordOwnership[x.RecordUid]; - recordOwnership.Remove(x.RecordUid); + if (recordOwnership.ContainsKey(x.RecordUid)) + { + x.Owner = recordOwnership[x.RecordUid]; + recordOwnership.Remove(x.RecordUid); + } return x; })); + + var recordLinks = rs.records + .Where(x => !string.IsNullOrEmpty(x.OwnerRecordId) && !string.IsNullOrEmpty(x.LinkKey)) + .Select(x => new SyncDownRecordMetaData + { + RecordUid = x.RecordUid, + SharedFolderUid = x.OwnerRecordId, + RecordKey = x.LinkKey, + RecordKeyType = (int) KeyType.RecordKey, + CanEdit = false, + CanShare = false, + }) + .ToArray(); + if (recordLinks.Length > 0) + { + storage.RecordKeys.PutLinks(recordLinks); + } } if (rs.recordMetaData != null) @@ -294,7 +339,13 @@ internal static async Task RunSyncDown(this VaultOnline vault) key = CryptoUtils.DecryptAesV1(rmd.RecordKey.Base64UrlDecode(), context.DataKey); break; case 2: - key = CryptoUtils.DecryptRsa(rmd.RecordKey.Base64UrlDecode(), context.PrivateKey); + key = CryptoUtils.DecryptRsa(rmd.RecordKey.Base64UrlDecode(), context.PrivateRsaKey); + break; + case 3: + key = CryptoUtils.DecryptAesV2(rmd.RecordKey.Base64UrlDecode(), context.DataKey); + break; + case 4: + key = CryptoUtils.DecryptEc(rmd.RecordKey.Base64UrlDecode(), context.PrivateEcKey); break; default: throw new Exception( @@ -316,6 +367,7 @@ internal static async Task RunSyncDown(this VaultOnline vault) return null; }) + .Where(x => x != null) .ToArray(); storage.RecordKeys.PutLinks(rmds); @@ -343,11 +395,17 @@ internal static async Task RunSyncDown(this VaultOnline vault) byte[] teamKey; switch (x.KeyType) { - case (int) KeyType.DataKey: + case 1: teamKey = CryptoUtils.DecryptAesV1(x.TeamKey.Base64UrlDecode(), context.DataKey); break; - case (int) KeyType.PrivateKey: - teamKey = CryptoUtils.DecryptRsa(x.TeamKey.Base64UrlDecode(), context.PrivateKey); + case 2: + teamKey = CryptoUtils.DecryptRsa(x.TeamKey.Base64UrlDecode(), context.PrivateRsaKey); + break; + case 3: + teamKey = CryptoUtils.DecryptAesV2(x.TeamKey.Base64UrlDecode(), context.DataKey); + break; + case 4: + teamKey = CryptoUtils.DecryptEc(x.TeamKey.Base64UrlDecode(), context.PrivateEcKey); break; default: throw new Exception($"Team UID {x.TeamUid}: unsupported key type {x.KeyType}"); @@ -374,7 +432,7 @@ internal static async Task RunSyncDown(this VaultOnline vault) (team, sharedFolderKey) => { sharedFolderKey.TeamUid = team.TeamUid; - sharedFolderKey.KeyType = sharedFolderKey.KeyType == 2 ? (int) KeyType.TeamPrivateKey : (int)KeyType.TeamKey; + sharedFolderKey.KeyType = sharedFolderKey.KeyType == 2 ? (int) KeyType.TeamPrivateKey : (int) KeyType.TeamKey; return sharedFolderKey; }) .ToArray(); @@ -402,7 +460,13 @@ internal static async Task RunSyncDown(this VaultOnline vault) sharedFolderKey = CryptoUtils.DecryptAesV1(sharedFolderKey, context.DataKey); break; case 2: - sharedFolderKey = CryptoUtils.DecryptRsa(sharedFolderKey, context.PrivateKey); + sharedFolderKey = CryptoUtils.DecryptRsa(sharedFolderKey, context.PrivateRsaKey); + break; + case 3: + sharedFolderKey = CryptoUtils.DecryptAesV2(sharedFolderKey, context.DataKey); + break; + case 4: + sharedFolderKey = CryptoUtils.DecryptEc(sharedFolderKey, context.PrivateEcKey); break; default: throw new Exception( @@ -424,6 +488,7 @@ internal static async Task RunSyncDown(this VaultOnline vault) return null; } }) + .Where(x => x != null) .ToArray(); if (sharedFolderKeys.Any()) { @@ -493,11 +558,17 @@ internal static async Task RunSyncDown(this VaultOnline vault) var folderKey = uf.FolderKey.Base64UrlDecode(); switch (uf.keyType) { - case (int) KeyType.DataKey: + case 1: folderKey = CryptoUtils.DecryptAesV1(folderKey, context.DataKey); break; - case (int) KeyType.PrivateKey: - folderKey = CryptoUtils.DecryptRsa(folderKey, context.PrivateKey); + case 2: + folderKey = CryptoUtils.DecryptRsa(folderKey, context.PrivateRsaKey); + break; + case 3: + folderKey = CryptoUtils.DecryptAesV1(folderKey, context.DataKey); + break; + case 4: + folderKey = CryptoUtils.DecryptEc(folderKey, context.PrivateEcKey); break; default: throw new Exception($"User Folder UID {uf.FolderUid}: unsupported key type {uf.keyType}"); @@ -544,7 +615,27 @@ internal static async Task RunSyncDown(this VaultOnline vault) } storage.Revision = rs.revision; - Debug.WriteLine("Sync Down: Leave"); + Debug.WriteLine("Sync Down: Process Leave"); + + if (auth.AuthContext.Settings?.RecordTypesEnabled == true && !vault.RecordTypesLoaded) + { + var existingRecordTypes = new HashSet(storage.RecordTypes.GetAll().Select(x => x.Uid), StringComparer.InvariantCultureIgnoreCase); + var recordTypesRq = new RecordTypesRequest + { + Standard = true, + Enterprise = true, + User = true, + }; + var recordTypesRs = await auth.ExecuteAuthRest("vault/get_record_types", recordTypesRq); + var recordTypes = recordTypesRs.RecordTypes.Select(x => new ApiRecordType(x)).ToArray(); + existingRecordTypes.ExceptWith(recordTypes.Select(x => ((IRecordType) x).Uid)); + if (existingRecordTypes.Count > 0) + { + storage.RecordTypes.DeleteUids(existingRecordTypes); + } + storage.RecordTypes.PutEntities(recordTypes); + vault.RecordTypesLoaded = true; + } Debug.WriteLine("Rebuild Data: Enter"); vault.RebuildData(result); @@ -556,6 +647,17 @@ internal static async Task RunSyncDown(this VaultOnline vault) private static void AdjustUdata(this SyncDownRecord syncDownRecord) { + if (syncDownRecord.Version == 4) + { + if (syncDownRecord.udata == null) + { + syncDownRecord.udata = new SyncDownRecordUData(); + } + + syncDownRecord.udata.FileSize = syncDownRecord.fileSize; + syncDownRecord.udata.ThumbnailSize = syncDownRecord.thumbnailSize; + } + if (syncDownRecord.udata == null) return; using (var ms = new MemoryStream()) diff --git a/KeeperSdk/vault/SyncDownCommands.cs b/KeeperSdk/vault/SyncDownCommands.cs index 0202f64..e43cf5b 100644 --- a/KeeperSdk/vault/SyncDownCommands.cs +++ b/KeeperSdk/vault/SyncDownCommands.cs @@ -67,6 +67,9 @@ public class SyncDownResponse : KeeperApiResponse [DataMember(Name = "removed_teams")] public string[] removedTeams; + [DataMember(Name = "removed_links")] + public SyncDownRecordLink[] removedLinks; + [DataMember(Name = "user_folders")] public SyncDownUserFolder[] userFolders; @@ -99,7 +102,7 @@ public class SyncDownResponse : KeeperApiResponse } [DataContract] - public class SyncDownRecord : IPasswordRecord + public class SyncDownRecord : IStorageRecord { [DataMember(Name = "record_uid")] public string RecordUid { get; set; } @@ -108,13 +111,24 @@ public class SyncDownRecord : IPasswordRecord public long Revision { get; set; } [DataMember(Name = "version")] - public long Version { get; set; } + public int Version { get; set; } [DataMember(Name = "shared")] public bool Shared { get; set; } [DataMember(Name = "client_modified_time")] - public long ClientModifiedTime { get; set; } + internal double _client_modified_time; + public long ClientModifiedTime + { + get + { + return (long) _client_modified_time; + } + set + { + _client_modified_time = value; + } + } [DataMember(Name = "data")] public string Data { get; set; } @@ -125,6 +139,18 @@ public class SyncDownRecord : IPasswordRecord [DataMember(Name = "udata")] public SyncDownRecordUData udata; + [DataMember(Name = "owner_uid")] + public string OwnerRecordId; + + [DataMember(Name = "link_key")] + public string LinkKey; + + [DataMember(Name = "file_size")] + internal long? fileSize; + + [DataMember(Name = "thumbnail_size")] + internal long? thumbnailSize; + public string Udata { get; set; } public bool Owner { get; set; } @@ -477,6 +503,20 @@ public class SyncDownUserFolderSharedFolder : IFolder string IUid.Uid => FolderUid; } + [DataContract] + public class SyncDownRecordLink : IUidLink + { + [DataMember(Name = "record_uid")] + public string recordUid; + + [DataMember(Name = "owner_uid")] + public string ownerUid; + + string IUidLink.SubjectUid => ownerUid; + + string IUidLink.ObjectUid => recordUid; + } + [DataContract] public class SyncDownSharingChanges { @@ -611,12 +651,30 @@ public class RecordExtra : IExtensibleDataObject [DataContract] public class SyncDownRecordUData : IExtensibleDataObject { - [DataMember(Name = "file_ids")] + [DataMember(Name = "file_ids", EmitDefaultValue = false)] public string[] fileIds; + [DataMember(Name = "file_size", EmitDefaultValue = false)] + public long? FileSize { get; set; } + + [DataMember(Name = "thumbnail_size", EmitDefaultValue = false)] + public long? ThumbnailSize { get; set; } + public ExtensionDataObject ExtensionData { get; set; } } + [DataContract] + public class RecordAuditData + { + [DataMember(Name = "title", EmitDefaultValue = false)] + public string Title { get; set; } + + [DataMember(Name = "record_type", EmitDefaultValue = false)] + public string RecordType { get; set; } + + [DataMember(Name = "url", EmitDefaultValue = false)] + public string Url { get; set; } + } #pragma warning restore 0649 } \ No newline at end of file diff --git a/KeeperSdk/vault/VaultCommands.cs b/KeeperSdk/vault/VaultCommands.cs index 40685d2..f1d8d01 100644 --- a/KeeperSdk/vault/VaultCommands.cs +++ b/KeeperSdk/vault/VaultCommands.cs @@ -1,12 +1,30 @@ using System; +using System.Collections.Generic; using System.Runtime.Serialization; -using KeeperSecurity.Utils; using KeeperSecurity.Vault; +#if NET452_OR_GREATER +using KeeperSecurity.Utils; +#endif namespace KeeperSecurity.Commands { + /// + [DataContract] + public class RecordAccessPath : IRecordAccessPath + { + [DataMember(Name = "record_uid", EmitDefaultValue = false)] + public string RecordUid { get; set; } + + [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] + public string SharedFolderUid { get; set; } + + [DataMember(Name = "team_uid", EmitDefaultValue = false)] + public string TeamUid { get; set; } + } + + /// [DataContract] - internal class RecordAddCommand : AuthenticatedCommand + public class RecordAddCommand : AuthenticatedCommand { public RecordAddCommand() : base("record_add") { @@ -46,8 +64,9 @@ public RecordAddCommand() : base("record_add") public string[] FileIds; } + /// [DataContract] - internal class RecordUpdateUData : IExtensibleDataObject + public class RecordUpdateUData : IExtensibleDataObject { [DataMember(Name = "file_ids", EmitDefaultValue = false)] public string[] FileIds; @@ -55,6 +74,7 @@ internal class RecordUpdateUData : IExtensibleDataObject public ExtensionDataObject ExtensionData { get; set; } } + /// [DataContract] public class RecordNonSharedData : IExtensibleDataObject { @@ -62,8 +82,9 @@ public class RecordNonSharedData : IExtensibleDataObject } + /// [DataContract] - internal class RecordUpdateRecord : IRecordAccessPath + public class RecordUpdateRecord : IRecordAccessPath { [DataMember(Name = "record_uid")] public string RecordUid { get; set; } @@ -99,8 +120,9 @@ internal class RecordUpdateRecord : IRecordAccessPath public string TeamUid { get; set; } } + /// [DataContract] - internal class RecordUpdateCommand : AuthenticatedCommand + public class RecordUpdateCommand : AuthenticatedCommand { public RecordUpdateCommand() : base("record_update") { @@ -125,24 +147,29 @@ public RecordUpdateCommand() : base("record_update") public string[] DeleteRecords; } + /// [DataContract] - internal class RecordUpdateStatus + public class RecordUpdateStatus { [DataMember(Name = "record_uid")] public string RecordUid; - [DataMember(Name = "status_code")] - public string StatusCode; + [DataMember(Name = "status")] + public string Status; + + [DataMember(Name = "message")] + public string Message; } + /// [DataContract] - internal class RecordUpdateResponse : KeeperApiResponse + public class RecordUpdateResponse : KeeperApiResponse { [DataMember(Name = "add_records")] public RecordUpdateStatus[] AddRecords; [DataMember(Name = "update_records")] - public RecordUpdateRecord[] UpdateRecords; + public RecordUpdateStatus[] UpdateRecords; [DataMember(Name = "remove_records")] public RecordUpdateStatus[] RemoveRecords; @@ -154,202 +181,7 @@ internal class RecordUpdateResponse : KeeperApiResponse public long Revision; } - [DataContract] - public class SharedFolderUpdateCommand : AuthenticatedCommand, ISharedFolderAccessPath - { - public SharedFolderUpdateCommand() : base("shared_folder_update") - { - pt = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds().ToString(); - } - - [DataMember(Name = "pt", EmitDefaultValue = false)] - public string pt; - - [DataMember(Name = "operation")] - public string operation; - - [DataMember(Name = "shared_folder_uid")] - public string shared_folder_uid; - - [DataMember(Name = "from_team_uid", EmitDefaultValue = false)] - public string from_team_uid; - - [DataMember(Name = "name", EmitDefaultValue = false)] - public string name; - - [DataMember(Name = "revision", EmitDefaultValue = false)] - public long? revision; - - [DataMember(Name = "force_update", EmitDefaultValue = false)] - public bool? forceUpdate; - - [DataMember(Name = "default_manage_users", EmitDefaultValue = false)] - public bool? DefaultManageUsers { get; set; } - - [DataMember(Name = "default_manage_records", EmitDefaultValue = false)] - public bool? DefaultManageRecords { get; set; } - - [DataMember(Name = "default_can_edit", EmitDefaultValue = false)] - public bool? DefaultCanEdit { get; set; } - - [DataMember(Name = "default_can_share", EmitDefaultValue = false)] - public bool? DefaultCanShare { get; set; } - - [DataMember(Name = "add_users", EmitDefaultValue = false)] - public SharedFolderUpdateUser[] addUsers; - - [DataMember(Name = "update_users", EmitDefaultValue = false)] - public SharedFolderUpdateUser[] updateUsers; - - [DataMember(Name = "remove_users", EmitDefaultValue = false)] - public SharedFolderUpdateUser[] removeUsers; - - [DataMember(Name = "add_teams", EmitDefaultValue = false)] - public SharedFolderUpdateTeam[] addTeams; - - [DataMember(Name = "update_teams", EmitDefaultValue = false)] - public SharedFolderUpdateTeam[] updateTeams; - - [DataMember(Name = "remove_teams", EmitDefaultValue = false)] - public SharedFolderUpdateTeam[] removeTeams; - - [DataMember(Name = "add_records", EmitDefaultValue = false)] - public SharedFolderUpdateRecord[] addRecords; - - [DataMember(Name = "update_records", EmitDefaultValue = false)] - public SharedFolderUpdateRecord[] updateRecords; - - [DataMember(Name = "remove_records", EmitDefaultValue = false)] - public SharedFolderUpdateRecord[] removeRecords; - - public string SharedFolderUid - { - get => shared_folder_uid; - set => shared_folder_uid = value; - } - - public string TeamUid - { - get => from_team_uid; - set => from_team_uid = value; - } - } - - [DataContract] - public class SharedFolderUpdateUser - { - [DataMember(Name = "username", EmitDefaultValue = false)] - public string Username { get; set; } - - [DataMember(Name = "manage_users", EmitDefaultValue = false)] - public bool? ManageUsers { get; set; } - - [DataMember(Name = "manage_records", EmitDefaultValue = false)] - public bool? ManageRecords { get; set; } - - [DataMember(Name = "shared_folder_key", EmitDefaultValue = false)] - public string SharedFolderKey { get; set; } - } - - [DataContract] - public class SharedFolderUpdateTeam - { - [DataMember(Name = "team_uid", EmitDefaultValue = false)] - public string TeamUid { get; set; } - - [DataMember(Name = "manage_users", EmitDefaultValue = false)] - public bool? ManageUsers { get; set; } - - [DataMember(Name = "manage_records", EmitDefaultValue = false)] - public bool? ManageRecords { get; set; } - - [DataMember(Name = "shared_folder_key", EmitDefaultValue = false)] - public string SharedFolderKey { get; set; } - } - - [DataContract] - public class SharedFolderUpdateRecord : IRecordAccessPath - { - [DataMember(Name = "record_uid", EmitDefaultValue = false)] - public string RecordUid { get; set; } - - [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] - public string SharedFolderUid { get; set; } - - [DataMember(Name = "team_uid", EmitDefaultValue = false)] - public string TeamUid { get; set; } - - [DataMember(Name = "can_edit", EmitDefaultValue = false)] - public bool? CanEdit { get; set; } - - [DataMember(Name = "can_share", EmitDefaultValue = false)] - public bool? CanShare { get; set; } - - [DataMember(Name = "record_key", EmitDefaultValue = false)] - public string RecordKey { get; set; } - } - - [DataContract] - public class SharedFolderUpdateResponse : KeeperApiResponse - { - [DataMember(Name = "add_users")] - public SharedFolderUpdateUserStatus[] addUsers; - - [DataMember(Name = "update_users")] - public SharedFolderUpdateUserStatus[] updateUsers; - - [DataMember(Name = "remove_users")] - public SharedFolderUpdateUserStatus[] removeUsers; - - [DataMember(Name = "add_teams")] - public SharedFolderUpdateTeamStatus[] addTeams; - - [DataMember(Name = "update_teams")] - public SharedFolderUpdateTeamStatus[] updateTeams; - - [DataMember(Name = "remove_teams")] - public SharedFolderUpdateTeamStatus[] removeTeams; - - [DataMember(Name = "add_records")] - public SharedFolderUpdateRecordStatus[] addRecords; - - [DataMember(Name = "update_records")] - public SharedFolderUpdateRecordStatus[] updateRecords; - - [DataMember(Name = "remove_records")] - public SharedFolderUpdateRecordStatus[] removeRecords; - } - - [DataContract] - public class SharedFolderUpdateUserStatus - { - [DataMember(Name = "username")] - public string Username { get; set; } - - [DataMember(Name = "status")] - public string Status { get; set; } - } - - [DataContract] - public class SharedFolderUpdateTeamStatus - { - [DataMember(Name = "team_uid")] - public string TeamUid { get; set; } - - [DataMember(Name = "status")] - public string Status { get; set; } - } - - [DataContract] - public class SharedFolderUpdateRecordStatus - { - [DataMember(Name = "record_uid")] - public string RecordUid { get; set; } - - [DataMember(Name = "status")] - public string Status { get; set; } - } - + /// [DataContract] public class MoveObject { @@ -375,6 +207,7 @@ public class MoveObject public bool cascade { get; set; } } + /// [DataContract] public class TransitionKey { @@ -385,6 +218,7 @@ public class TransitionKey public string key; } + /// [DataContract] public class MoveCommand : AuthenticatedCommand { @@ -409,6 +243,7 @@ public MoveCommand() : base("move") } + /// [DataContract] public class FolderCommand : AuthenticatedCommand { @@ -447,8 +282,9 @@ public FolderCommand(string command) : base(command) public bool? CanShare { get; set; } } + /// [DataContract] - internal class FolderAddCommand : FolderCommand + public class FolderAddCommand : FolderCommand { public FolderAddCommand() : base("folder_add") { @@ -458,8 +294,9 @@ public FolderAddCommand() : base("folder_add") public string Key { get; set; } } + /// [DataContract] - internal class FolderUpdateCommand : FolderCommand + public class FolderUpdateCommand : FolderCommand { public FolderUpdateCommand() : base("folder_update") { @@ -469,15 +306,17 @@ public FolderUpdateCommand() : base("folder_update") public string TeamUid { get; set; } } + /// [DataContract] - internal class AddFolderResponse : KeeperApiResponse + public class AddFolderResponse : KeeperApiResponse { [DataMember(Name = "revision")] public long revision; } + /// [DataContract] - internal class PreDeleteObject + public class PreDeleteObject { [DataMember(Name = "object_uid", EmitDefaultValue = false)] public string objectUid; @@ -495,8 +334,9 @@ internal class PreDeleteObject public string deleteResolution; } + /// [DataContract] - internal class PreDeleteCommand : AuthenticatedCommand + public class PreDeleteCommand : AuthenticatedCommand { public PreDeleteCommand() : base("pre_delete") { @@ -506,15 +346,17 @@ public PreDeleteCommand() : base("pre_delete") public PreDeleteObject[] objects; } + /// [DataContract] - internal class WouldDeleteObject + public class WouldDeleteObject { [DataMember(Name = "deletion_summary", EmitDefaultValue = false)] public string[] deletionSummary; } + /// [DataContract] - internal class PreDeleteResponseObject + public class PreDeleteResponseObject { [DataMember(Name = "pre_delete_token", EmitDefaultValue = false)] public string preDeleteToken; @@ -523,15 +365,17 @@ internal class PreDeleteResponseObject public WouldDeleteObject wouldDelete; } + /// [DataContract] - internal class PreDeleteResponse : KeeperApiResponse + public class PreDeleteResponse : KeeperApiResponse { [DataMember(Name = "pre_delete_response", EmitDefaultValue = false)] public PreDeleteResponseObject preDeleteResponse; } + /// [DataContract] - internal class DeleteCommand : AuthenticatedCommand + public class DeleteCommand : AuthenticatedCommand { public DeleteCommand() : base("delete") { @@ -541,16 +385,18 @@ public DeleteCommand() : base("delete") public string preDeleteToken; } + /// [DataContract] - internal class GetAvailableTeamsCommand : AuthenticatedCommand + public class GetAvailableTeamsCommand : AuthenticatedCommand { public GetAvailableTeamsCommand() : base("get_available_teams") { } } + /// [DataContract] - internal class AvailableTeam + public class AvailableTeam { [DataMember(Name = "team_uid", EmitDefaultValue = false)] public string teamUid; @@ -558,15 +404,17 @@ internal class AvailableTeam public string teamName; } + /// [DataContract] - internal class GetAvailableTeamsResponse : KeeperApiResponse + public class GetAvailableTeamsResponse : KeeperApiResponse { [DataMember(Name = "teams", EmitDefaultValue = false)] public AvailableTeam[] teams; } + /// [DataContract] - internal class PublicKeysCommand : AuthenticatedCommand + public class PublicKeysCommand : AuthenticatedCommand { public PublicKeysCommand() : base("public_keys") { @@ -576,8 +424,9 @@ public PublicKeysCommand() : base("public_keys") public string[] keyOwners; } + /// [DataContract] - internal class UserPublicKeysObject + public class UserPublicKeysObject { [DataMember(Name = "key_owner", EmitDefaultValue = false)] public string keyOwner; @@ -589,15 +438,17 @@ internal class UserPublicKeysObject public string message; } + /// [DataContract] - internal class PublicKeysResponse : KeeperApiResponse + public class PublicKeysResponse : KeeperApiResponse { [DataMember(Name = "public_keys", EmitDefaultValue = false)] public UserPublicKeysObject[] publicKeys; } + /// [DataContract] - internal class TeamKeyObject + public class TeamKeyObject { [DataMember(Name = "team_uid")] public string teamUid; @@ -611,8 +462,9 @@ internal class TeamKeyObject public string message; } + /// [DataContract] - internal class TeamGetKeysCommand : AuthenticatedCommand + public class TeamGetKeysCommand : AuthenticatedCommand { public TeamGetKeysCommand() : base("team_get_keys") { @@ -622,10 +474,204 @@ public TeamGetKeysCommand() : base("team_get_keys") public string[] teams; } + /// [DataContract] - internal class TeamGetKeysResponse : KeeperApiResponse + public class TeamGetKeysResponse : KeeperApiResponse { [DataMember(Name = "keys", EmitDefaultValue = false)] public TeamKeyObject[] keys; } -} \ No newline at end of file + + [DataContract] + internal class RequestDownloadCommand : AuthenticatedCommand, IRecordAccessPath + { + public RequestDownloadCommand() : base("request_download") + { + } + + [DataMember(Name = "file_ids")] + public string[] FileIDs; + + [DataMember(Name = "record_uid")] + public string RecordUid { get; set; } + + [DataMember(Name = "shared_folder_uid", EmitDefaultValue = false)] + public string SharedFolderUid { get; set; } + + [DataMember(Name = "team_uid", EmitDefaultValue = false)] + public string TeamUid { get; set; } + } + + [DataContract] + internal class RequestUploadCommand : AuthenticatedCommand + { + public RequestUploadCommand() : base("request_upload") + { + } + + [DataMember(Name = "file_count")] + public int FileCount = 0; + + [DataMember(Name = "thumbnail_count")] + public int ThumbnailCount = 0; + } + + [DataContract] + internal class RequestDownload + { + [DataMember(Name = "success_status_code")] + public int SuccessStatusCode; + + [DataMember(Name = "url")] + public string Url; + } + + [DataContract] + [KnownType(typeof(RequestDownload))] + internal class RequestDownloadResponse : KeeperApiResponse + { + + [DataMember(Name = "downloads")] + public RequestDownload[] Downloads; + } + + [DataContract] + internal class UploadParameters + { + [DataMember(Name = "url")] + public string Url; + + [DataMember(Name = "max_size")] + public long MaxSize; + + [DataMember(Name = "success_status_code")] + public int SuccessStatusCode; + + [DataMember(Name = "file_id")] + public string FileId; + + [DataMember(Name = "file_parameter")] + public string FileParameter; + + [DataMember(Name = "parameters")] + public IDictionary Parameters; + + } + + [DataContract] + internal class RequestUploadResponse : KeeperApiResponse + { + [DataMember(Name = "file_uploads")] + public UploadParameters[] FileUploads; + + [DataMember(Name = "thumbnail_uploads")] + public UploadParameters[] ThumbnailUploads; + } + + + [DataContract] + internal class CancelShareCommand : AuthenticatedCommand + { + public CancelShareCommand() : base("cancel_share") + { + } + + [DataMember(Name = "from_email")] + public string FromEmail; + + [DataMember(Name = "to_email")] + public string ToEmail; + } + + [DataContract] + internal class GetRecordsCommand : AuthenticatedCommand + { + public GetRecordsCommand() : base("get_records") + { + } + + [DataMember(Name = "include", EmitDefaultValue = false)] + public string[] Include; + + [DataMember(Name = "client_time")] + public long ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(); + + [DataMember(Name = "records", EmitDefaultValue = false)] + public RecordAccessPath[] Records; + } + + + [DataContract] + internal class RecordUserPermission + { + [DataMember(Name = "username")] + public string Username; + + [DataMember(Name = "owner")] + public bool Owner { get; set; } + + [DataMember(Name = "sharable")] + public bool Sharable { get; set; } + + [DataMember(Name = "editable")] + public bool Editable { get; set; } + + [DataMember(Name = "awaiting_approval")] + public bool AwaitingApproval { get; set; } + } + + [DataContract] + internal class RecordSharedFolderPermission + { + [DataMember(Name = "shared_folder_uid")] + public string SharedFolderUid; + + [DataMember(Name = "revision")] + public long Revision; + + [DataMember(Name = "reshareable")] + public bool Reshareable { get; set; } + + [DataMember(Name = "editable")] + public bool Editable { get; set; } + } + + [DataContract] + internal class RecordDetail + { + [DataMember(Name = "record_uid")] + public string RecordUid; + + [DataMember(Name = "revision")] + public long Revision; + + [DataMember(Name = "version")] + public int Version; + + [DataMember(Name = "shared")] + public bool Shared; + + [DataMember(Name = "data")] + public string Data; + + [DataMember(Name = "extra")] + public string Extra; + + [DataMember(Name = "non_shared_data")] + public string NonSharedData; + + [DataMember(Name = "user_permissions")] + public RecordUserPermission[] UserPermissions; + + [DataMember(Name = "shared_folder_permissions")] + public RecordSharedFolderPermission[] SharedFolderPermissions; + } + + [DataContract] + internal class GetRecordsResponse : KeeperApiResponse + { + [DataMember(Name = "records", EmitDefaultValue = false)] + public RecordDetail[] Records; + } + +} diff --git a/KeeperSdk/vault/VaultData.cs b/KeeperSdk/vault/VaultData.cs index c3bac83..0d3387a 100644 --- a/KeeperSdk/vault/VaultData.cs +++ b/KeeperSdk/vault/VaultData.cs @@ -5,6 +5,7 @@ using System.IO; using System.Linq; using System.Runtime.Serialization.Json; +using System.Text; using KeeperSecurity.Commands; using KeeperSecurity.Utils; @@ -64,7 +65,7 @@ public void AddSharedFolders(IEnumerable sharedFolderUids) /// /// Represents Keeper vault loaded from the and decrypted. /// - public class VaultData: IVaultData, IDisposable + public class VaultData : IVaultData, IDisposable { /// /// Instantiates instance. @@ -84,59 +85,151 @@ public VaultData(byte[] clientKey, IKeeperStorage storage) }; } + /// public int RecordCount => keeperRecords.Count; - public IEnumerable Records => keeperRecords.Values; - public bool TryGetRecord(string recordUid, out PasswordRecord node) + /// + public IEnumerable KeeperRecords => keeperRecords.Values; + + /// + public bool TryGetKeeperRecord(string recordUid, out KeeperRecord record) + { + return keeperRecords.TryGetValue(recordUid, out record); + } + + /// + public bool TryLoadKeeperRecord(string recordUid, out KeeperRecord record) + { + record = null; + if (TryGetKeeperRecord(recordUid, out var r)) + { + var storageRecord = Storage.Records.GetEntity(recordUid); + if (storageRecord != null) + { + record = storageRecord.Load(r.RecordKey); + } + } + + return record != null; + } + + /// + public int ApplicationCount => keeperApplications.Count; + + /// + + public IEnumerable KeeperApplications => keeperApplications.Values; + /// + public bool TryGetKeeperApplication(string applicationUid, out ApplicationRecord record) + { + return keeperApplications.TryGetValue(applicationUid, out record); + } + + IEnumerable IVaultData.Records => keeperRecords.Values.OfType(); + + bool IVaultData.TryGetRecord(string recordUid, out PasswordRecord record) { - return keeperRecords.TryGetValue(recordUid, out node); + if (keeperRecords.TryGetValue(recordUid, out KeeperRecord r)) + { + record = r as PasswordRecord; + return record != null; + } + record = null; + return false; } + /// public int SharedFolderCount => keeperSharedFolders.Count; + /// public IEnumerable SharedFolders => keeperSharedFolders.Values; + /// public bool TryGetSharedFolder(string sharedFolderUid, out SharedFolder sharedFolder) { return keeperSharedFolders.TryGetValue(sharedFolderUid, out sharedFolder); } + /// public int TeamCount => keeperTeams.Count; + /// public IEnumerable Teams => keeperTeams.Values; + /// public bool TryGetTeam(string teamUid, out Team team) { return keeperTeams.TryGetValue(teamUid, out team); } + /// public IEnumerable Folders => keeperFolders.Values; + /// public bool TryGetFolder(string folderUid, out FolderNode node) { return keeperFolders.TryGetValue(folderUid, out node); } + /// public T LoadNonSharedData(string recordUid) where T : RecordNonSharedData, new() { - var nsd = Storage.NonSharedData.GetEntity(recordUid); - if (string.IsNullOrEmpty(nsd?.Data)) return new T(); - - try + if (TryGetKeeperRecord(recordUid, out var record)) { - var data = CryptoUtils.DecryptAesV1(nsd.Data.Base64UrlDecode(), ClientKey); - return JsonUtils.ParseJson(data); + var nsd = Storage.NonSharedData.GetEntity(recordUid); + if (string.IsNullOrEmpty(nsd?.Data)) return new T(); + + byte[] data = null; + try + { + if (record.Version <= 2) + { + data = CryptoUtils.DecryptAesV1(nsd.Data.Base64UrlDecode(), ClientKey); + } + else + { + data = CryptoUtils.DecryptAesV2(nsd.Data.Base64UrlDecode(), ClientKey); + } + } + catch + { + try { + if (record.Version > 2) + { + data = CryptoUtils.DecryptAesV1(nsd.Data.Base64UrlDecode(), ClientKey); + } + else + { + data = CryptoUtils.DecryptAesV2(nsd.Data.Base64UrlDecode(), ClientKey); + } + } + catch { } + } + if (data != null) + { + try + { + return JsonUtils.ParseJson(data); + } + catch (Exception e) + { + Trace.TraceError($"Record UID \"{recordUid}\": Non-shared data loading error: {e.Message}"); + } + } + + return new T(); } - catch (Exception e) + else { - Trace.TraceError($"Record UID \"{recordUid}\": Non-shared data loading error: {e.Message}"); - return new T(); + Debug.WriteLine($"Record UID \"{recordUid}\" is not found"); } + return default; } + /// public FolderNode RootFolder => rootFolder; - protected readonly ConcurrentDictionary keeperRecords = - new ConcurrentDictionary(); + protected readonly ConcurrentDictionary keeperRecords = + new ConcurrentDictionary(); protected readonly ConcurrentDictionary keeperSharedFolders = new ConcurrentDictionary(); @@ -149,9 +242,106 @@ public T LoadNonSharedData(string recordUid) protected readonly FolderNode rootFolder; + protected readonly ConcurrentDictionary keeperApplications = + new ConcurrentDictionary(); + + /// public IKeeperStorage Storage { get; } + /// public byte[] ClientKey { get; } + protected readonly ConcurrentDictionary _keeperRecordTypes = + new ConcurrentDictionary(StringComparer.InvariantCultureIgnoreCase); + + protected readonly ConcurrentBag _customRecordTypes = + new ConcurrentBag(); + + /// + public IEnumerable RecordTypes => _keeperRecordTypes.Values.Concat(_customRecordTypes); + + /// + public bool TryGetRecordTypeByName(string name, out RecordType recordType) + { + if (_keeperRecordTypes.TryGetValue(name, out recordType)) + { + return true; + } + foreach (var rt in _customRecordTypes) + { + if (string.Equals(name, rt.Name, StringComparison.InvariantCultureIgnoreCase)) + { + recordType = rt; + return true; + } + } + return false; + } + + private void LoadRecordTypes() + { + _keeperRecordTypes.Clear(); + while (!_customRecordTypes.IsEmpty) + { + _customRecordTypes.TryTake(out _); + } + + foreach (var field in Storage.RecordTypes.GetAll()) + { + var content = JsonUtils.ParseJson(Encoding.UTF8.GetBytes(field.Content)); + var recordType = new RecordType + { + Id = field.Id, + Scope = field.Scope, + Name = content.Name, + Description = content.Description, + Fields = content.Fields + .Select(x => + { + if (RecordTypesConstants.TryGetRecordField(x.Ref, out RecordField rf)) + { + RecordTypeField typeField; + if (x.Complexity != null) + { + typeField = new RecordTypePasswordField(rf, x.Label) + { + PasswordOptions = new PasswordGenerationOptions + { + Length = x.Complexity.Length, + Upper = x.Complexity.Upper, + Lower = x.Complexity.Lower, + Digit = x.Complexity.Digit, + Special = x.Complexity.Special, + } + }; + } + else + { + typeField = new RecordTypeField(rf, x.Label); + } + typeField.Required = x.Required ?? false; + return typeField; + } + else + { + Debug.WriteLine($"Load Record Types: Cannot resolve field: {x.Ref}."); + } + return null; + }) + .Where(x => x != null) + .ToArray(), + }; + if (recordType.Scope == RecordTypeScope.Standard) + { + _keeperRecordTypes.TryAdd(recordType.Name, recordType); + } + else if (recordType.Scope == RecordTypeScope.Enterprise) + { + _customRecordTypes.Add(recordType); + } + } + } + + private long _dataRevision = 0; private bool DecryptSharedFolderKey(ISharedFolderKey sfmd, out byte[] sharedFolderKey) @@ -226,7 +416,7 @@ private bool DecryptRecordKey(IRecordMetadata rmd, out byte[] recordKey) case (int) KeyType.SharedFolderKey: if (keeperSharedFolders.TryGetValue(rmd.SharedFolderUid, out var sf)) { - recordKey = CryptoUtils.DecryptAesV1(rKey, sf.SharedFolderKey); + recordKey = rKey.Length == 60 ? CryptoUtils.DecryptAesV2(rKey, sf.SharedFolderKey) : CryptoUtils.DecryptAesV1(rKey, sf.SharedFolderKey); return true; } else @@ -235,6 +425,9 @@ private bool DecryptRecordKey(IRecordMetadata rmd, out byte[] recordKey) break; } + case (int) KeyType.RecordKey: + break; + default: Trace.TraceError($"Record UID \"{rmd.RecordUid}\": Unsupported record key type."); break; @@ -262,7 +455,7 @@ internal void RebuildData(RebuildTask changes = null) { var teamKey = CryptoUtils.DecryptAesV1(team.TeamKey.Base64UrlDecode(), ClientKey); - var t = new Team(team, teamKey); + var t = team.Load(teamKey); keeperTeams.TryAdd(t.TeamUid, t); } catch (Exception e) @@ -358,7 +551,8 @@ internal void RebuildData(RebuildTask changes = null) { entityKeys.Clear(); var lostKeys = new List(); - var recordsToLoad = new Dictionary(); + var recordKeyLinks = new List(); + var recordsToLoad = new Dictionary(); if (!fullRebuild && (changes.Records?.Count ?? 0) * 5 > keeperRecords.Count) { fullRebuild = true; @@ -366,6 +560,7 @@ internal void RebuildData(RebuildTask changes = null) if (fullRebuild) { keeperRecords.Clear(); + keeperApplications.Clear(); foreach (var record in Storage.Records.GetAll()) { recordsToLoad[record.RecordUid] = record; @@ -377,10 +572,19 @@ internal void RebuildData(RebuildTask changes = null) if (!recordsToLoad.ContainsKey(rmd.RecordUid)) { lostKeys.Add(rmd); - continue; } - - if (DecryptRecordKey(rmd, out var rKey)) + else if (rmd.RecordKeyType == (int) KeyType.RecordKey) + { + if (recordsToLoad.ContainsKey(rmd.SubjectUid)) + { + recordKeyLinks.Add(rmd); + } + else + { + lostKeys.Add(rmd); + } + } + else if (DecryptRecordKey(rmd, out var rKey)) { entityKeys[rmd.RecordUid] = rKey; } @@ -400,34 +604,77 @@ internal void RebuildData(RebuildTask changes = null) if (r == null) continue; recordsToLoad[r.RecordUid] = r; - keeperRecords.TryRemove(recordUid, out _); + if (!keeperRecords.TryRemove(recordUid, out _)) + { + keeperApplications.TryRemove(recordUid, out _); + } foreach (var rmd in Storage.RecordKeys.GetLinksForSubject(r.RecordUid)) { - if (DecryptRecordKey(rmd, out var rKey)) + if (rmd.RecordKeyType == (int) KeyType.RecordKey) + { + recordKeyLinks.Add(rmd); + } + else if (DecryptRecordKey(rmd, out var rKey)) { entityKeys[rmd.RecordUid] = rKey; break; } - - lostKeys.Add(rmd); + else + { + lostKeys.Add(rmd); + } } } } } + foreach (var rkl in recordKeyLinks) + { + if (entityKeys.ContainsKey(rkl.RecordUid)) continue; + if (!entityKeys.TryGetValue(rkl.SharedFolderUid, out byte[] recordKey)) + { + if (keeperRecords.TryGetValue(rkl.SharedFolderUid, out var r)) + { + recordKey = r.RecordKey; + } + } + if (recordKey != null) + { + try + { + var rk = CryptoUtils.DecryptAesV2(rkl.RecordKey.Base64UrlDecode(), recordKey); + entityKeys[rkl.RecordUid] = rk; + } + catch (Exception e) + { + Trace.TraceError($"Record UID \"{rkl.RecordUid}\": Key decryption error: {e.Message}."); + } + } + } + uids.Clear(); foreach (var r in recordsToLoad.Values) { - if (entityKeys.ContainsKey(r.RecordUid)) + if (entityKeys.TryGetValue(r.RecordUid, out var rKey)) { - var rKey = entityKeys[r.RecordUid]; try { - var record = r.Load(rKey); - keeperRecords.TryAdd(r.RecordUid, record); + KeeperRecord record = r.Load(rKey); + if (record != null) + { + record.Revision = r.Revision; + if (record is ApplicationRecord ar) + { + keeperApplications.TryAdd(r.RecordUid, ar); + } + else + { + keeperRecords.TryAdd(r.RecordUid, record); + } + } } - catch (Exception e) + catch (Exception e) { Trace.TraceError($"Error decoding record \"{r.RecordUid}\": {e.Message}"); } @@ -450,8 +697,14 @@ internal void RebuildData(RebuildTask changes = null) } } - BuildFolders(); + _dataRevision = Storage.Revision; + + BuildFolders(); + if (fullRebuild) + { + LoadRecordTypes(); + } } internal void BuildFolders() @@ -497,12 +750,10 @@ internal void BuildFolders() }; try { - byte[] data = null; if (folder.FolderType == "user_folder") { node.FolderType = FolderType.UserFolder; - var key = CryptoUtils.DecryptAesV1(folder.FolderKey.Base64UrlDecode(), ClientKey); - data = CryptoUtils.DecryptAesV1(folder.Data.Base64UrlDecode(), key); + node.FolderKey = CryptoUtils.DecryptAesV1(folder.FolderKey.Base64UrlDecode(), ClientKey); } else { @@ -519,13 +770,13 @@ internal void BuildFolders() node.ParentUid = node.SharedFolderUid; } - var key = CryptoUtils.DecryptAesV1(folder.FolderKey.Base64UrlDecode(), + node.FolderKey = CryptoUtils.DecryptAesV1(folder.FolderKey.Base64UrlDecode(), sf.SharedFolderKey); - data = CryptoUtils.DecryptAesV1(folder.Data.Base64UrlDecode(), key); } else { node.Name = sf.Name; + node.FolderKey = sf.SharedFolderKey; } } else @@ -535,8 +786,9 @@ internal void BuildFolders() } } - if (data != null) + if (!string.IsNullOrEmpty(folder.Data) && node.FolderKey != null) { + var data = CryptoUtils.DecryptAesV1(folder.Data.Base64UrlDecode(), node.FolderKey); var serializer = new DataContractJsonSerializer(typeof(FolderData)); using (var stream = new MemoryStream(data)) { diff --git a/KeeperSdk/vault/VaultDataExtensions.cs b/KeeperSdk/vault/VaultDataExtensions.cs index fe11039..c226c4e 100644 --- a/KeeperSdk/vault/VaultDataExtensions.cs +++ b/KeeperSdk/vault/VaultDataExtensions.cs @@ -1,4 +1,8 @@ -namespace KeeperSecurity.Vault +using System; +using System.Collections.Generic; +using System.Linq; + +namespace KeeperSecurity.Vault { /// public static class VaultDataExtensions @@ -33,14 +37,14 @@ public static SharedFolder GetSharedFolder(this IVaultData vaultData, string sha throw new VaultException($"Shared Folder UID \"{sharedFolderUid}\" not found."); } - public static PasswordRecord GetRecord(this IVaultData vaultData, string recordUid) + public static KeeperRecord GetRecord(this IVaultData vaultData, string recordUid) { if (string.IsNullOrEmpty(recordUid)) { throw new VaultException("Record UID cannot be empty."); } - if (vaultData.TryGetRecord(recordUid, out var record)) + if (vaultData.TryGetKeeperRecord(recordUid, out var record)) { return record; } @@ -48,5 +52,91 @@ public static PasswordRecord GetRecord(this IVaultData vaultData, string recordU throw new VaultException($"Record UID \"{recordUid}\" not found."); } + public static ITypedField CreateTypedField(string fieldName, string fieldLabel = null) + { + if (!RecordTypesConstants.TryGetRecordField(fieldName, out var rf)) + { + throw new Exception($"Field \"{fieldName}\" not found."); + } + + if (!RecordTypesConstants.GetTypedFieldType(rf.Type.Type, out var tft)) + { + throw new Exception($"Field type \"{rf.Type.Type.Name}\" is not registered."); + } + + return (ITypedField) Activator.CreateInstance(tft, fieldName, fieldLabel); + } + + public static ITypedField CreateTypedField(this IRecordTypeField fieldInfo) + { + return CreateTypedField(fieldInfo.FieldName, fieldInfo.FieldLabel); + } + + public static bool FindTypedField(this IList fields, IRecordTypeField fieldInfo, out ITypedField field) + { + field = fields.FirstOrDefault(x => + { + if (!string.Equals(x.FieldName, fieldInfo.FieldName, StringComparison.InvariantCultureIgnoreCase)) + { + return false; + } + if (fieldInfo.FieldLabel == null) // NULL means ignore label + { + return true; + } + if (string.IsNullOrEmpty(x.FieldLabel) && string.IsNullOrEmpty(fieldInfo.FieldLabel)) + { + return true; + } + return string.Equals(x.FieldLabel, fieldInfo.FieldLabel, StringComparison.InvariantCultureIgnoreCase); + + }); + return field != null; + } + + public static bool FindTypedField(this TypedRecord record, IRecordTypeField fieldInfo, out ITypedField field) + { + if (record.Fields.FindTypedField(fieldInfo, out field)) + { + return true; + } + + return record.Custom.FindTypedField(fieldInfo, out field); + } + + public static bool FindTypedField(this TypedRecord record, string fieldType, string fieldLabel, out ITypedField field) + { + var fieldInfo = new RecordTypeField(fieldType, fieldLabel); + return record.FindTypedField(fieldInfo, out field); + } + + internal static string GetExternalValue(this ITypedField field) + { + var value = ""; + if (field is ISerializeTypedField fts) + { + value = fts.ExportTypedField(); + } + else + { + var vs = new List(); + for (var i = 0; i < field.Count; i++) + { + var v = field.GetValueAt(i); + if (v is IConvertible) + { + vs.Add(v.ToString()); + } + } + + if (vs.Count > 0) + { + vs.Sort(); + value = string.Join("|", vs); + } + } + return value; + } } + } diff --git a/KeeperSdk/vault/VaultDoc.cs b/KeeperSdk/vault/VaultDoc.cs index 73b1361..b8768f0 100644 --- a/KeeperSdk/vault/VaultDoc.cs +++ b/KeeperSdk/vault/VaultDoc.cs @@ -18,93 +18,108 @@ namespace KeeperSecurity.Vault /// /// /// + /// using System; /// using System.Linq; - /// using System.Threading; + /// using System.IO; /// using System.Threading.Tasks; /// using KeeperSecurity.Authentication; /// using KeeperSecurity.Vault; - /// + /// /// internal static class Program /// { - /// private static async Task Main() - /// { - /// IAuthentication auth = await ConnectToKeeperAs("username@company.com"); - /// var vault = new VaultOnline(auth); - /// Console.WriteLine("\nRetrieving records..."); - /// await vault.SyncDown(); - /// - /// Console.WriteLine($"Hello {auth.Username}!"); - /// Console.WriteLine($"Your vault has {vault.RecordCount} records."); - /// - /// // Find record with title "Google" - /// var search = vault.Records.FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); - /// // Create a record if it does not exist. - /// if (search == null) - /// { - /// search = new PasswordRecord - /// { - /// Title = "Google", - /// Login = "/Account Name/", - /// Password = "/Account Password/", - /// Link = "https://google.com", - /// Notes = "Stores google credentials" - /// }; - /// search = await vault.CreateRecord(search); - /// } - /// - /// // Update record. - /// search.SetCustomField("Security Token", "11111111"); - /// search = await vault.UpdateRecord(search); - /// - /// // find file attachment. - /// var attachment = search.Attachments - /// .FirstOrDefault(x => string.Compare(x.Title, "google", StringComparison.InvariantCultureIgnoreCase) == 0); - /// if (attachment == null) - /// { - /// // Upload local file "google.txt" - /// var uploadTask = new FileAttachmentUploadTask("google.txt") - /// { - /// Title = "Google", - /// }; - /// await vault.UploadAttachment(search, uploadTask); - /// } - /// else - /// { - /// // Download attachment into local file "google.txt" - /// await using var stream = File.OpenWrite("google.txt"); - /// await vault.DownloadAttachment(search, attachment.Id, stream); - /// - /// // Delete attachment. Remove it from the record - /// search.Attachments.Remove(attachment); - /// await vault.UpdateRecord(search); - /// } - /// - /// // Find shared folder with name "Google". - /// var sharedFolder = vault.SharedFolders - /// .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); - /// if (sharedFolder == null) - /// { - /// // Create shared folder. - /// var folder = await vault.CreateFolder("Google", null, new SharedFolderOptions - /// { - /// ManageRecords = true, - /// ManageUsers = false, - /// CanEdit = false, - /// CanShare = false, - /// }); - /// vault.TryGetSharedFolder(folder.FolderUid, out sharedFolder); - /// } - /// - /// // Add user to shared folder. - /// await vault.PutUserToSharedFolder(sharedFolder.Uid, "user@google.com", UserType.User, new SharedFolderUserOptions - /// { - /// ManageRecords = false, - /// ManageUsers = false, - /// }); - /// - /// // Add record to shared folder. - /// await vault.MoveRecords(new[] { new RecordPath { RecordUid = search.Uid } }, sharedFolder.Uid, true); - /// } + /// private static async Task Main() + /// { + /// IAuthentication auth = await ConnectToKeeperAs("username@company.com"); + /// var vault = new VaultOnline(auth); + /// Console.WriteLine("\nRetrieving records..."); + /// await vault.SyncDown(); + /// + /// Console.WriteLine($"Hello {auth.Username}!"); + /// Console.WriteLine($"Your vault has {vault.RecordCount} records."); + /// + /// // Find record with title "Google" + /// var search = vault.KeeperRecords.FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); + /// // Create a record if it does not exist. + /// if (search == null) + /// { + /// var typed = new TypedRecord("login") + /// { + /// Title = "Google", + /// Notes = "Stores google credentials" + /// }; + /// var loginRecord = new TypedRecordFacade<LoginRecordType>(typed); + /// loginRecord.Fields.Login = "/Account Name/"; + /// loginRecord.Fields.Password = "/Account Password/"; + /// loginRecord.Fields.Url = "https://google.com"; + /// + /// search = await vault.CreateRecord(typed); + /// } + /// + /// // Update record + /// if (search is TypedRecord tr) + /// { + /// var recordField = new RecordTypeField("secret", "Security Token"); + /// if (!tr.FindTypedField(recordField, out var rf)) + /// { + /// rf = recordField.CreateTypedField(); + /// tr.Custom.Add(rf); + /// } + /// var tokenValue = rf.ObjectValue == null ? "1" : rf.ObjectValue.ToString() + "1"; + /// } + /// else if (search is PasswordRecord pr) + /// { + /// pr.SetCustomField("Security Token", "11111111"); + /// } + /// search = await vault.UpdateRecord(search); + /// + /// // find file attachment + /// var attachment = vault.RecordAttachments(search) + /// .FirstOrDefault(x => string.Equals(x.Title, "google", StringComparison.InvariantCultureIgnoreCase)); + /// if (attachment == null) + /// { + /// // Upload local file "google.txt" + /// var uploadTask = new FileAttachmentUploadTask("google.txt") + /// { + /// Title = "Google", + /// }; + /// await vault.UploadAttachment(search, uploadTask); + /// } + /// else + /// { + /// // Download attachment into local file "google.txt" + /// await using var stream = File.OpenWrite("google.txt"); + /// await vault.DownloadAttachment(search, attachment.Id, stream); + /// + /// // Delete attachment. Remove it from the record + /// await vault.DeleteAttachment(search, attachment.Id); + /// } + /// + /// // Find shared folder with name "Google". + /// var sharedFolder = vault.SharedFolders + /// .FirstOrDefault(x => string.Compare(x.Name, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); + /// if (sharedFolder == null) + /// { + /// // Create shared folder. + /// var folder = await vault.CreateFolder("Google", null, new SharedFolderOptions + /// { + /// ManageRecords = true, + /// ManageUsers = false, + /// CanEdit = false, + /// CanShare = false, + /// }); + /// vault.TryGetSharedFolder(folder.FolderUid, out sharedFolder); + /// } + /// + /// // Add user to shared folder. + /// await vault.PutUserToSharedFolder(sharedFolder.Uid, "user@google.com", UserType.User, new SharedFolderUserOptions + /// { + /// ManageRecords = false, + /// ManageUsers = false, + /// }); + /// + /// // Add record to shared folder. + /// await vault.MoveRecords(new[] { new RecordPath { RecordUid = search.Uid } }, sharedFolder.Uid, true); + /// } /// } /// /// diff --git a/KeeperSdk/vault/VaultExtensions.cs b/KeeperSdk/vault/VaultExtensions.cs index b3275cb..8544436 100644 --- a/KeeperSdk/vault/VaultExtensions.cs +++ b/KeeperSdk/vault/VaultExtensions.cs @@ -1,9 +1,11 @@ using System; using System.Collections.Generic; +using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.Serialization.Json; using System.Text; +using Google.Protobuf; using KeeperSecurity.Commands; using KeeperSecurity.Utils; @@ -12,7 +14,35 @@ namespace KeeperSecurity.Vault /// public static class VaultExtensions { - public static IRecordMetadata ResolveRecordAccessPath(this IVault vault, IRecordAccessPath path, bool forEdit = false, + public static byte[] PadRecordData(byte[] data) + { + if (data == null) + { + return null; + } + + var padBytes = 0; + if (data.Length < 384) + { + padBytes = 384 - data.Length; + } + else + { + padBytes = data.Length % 16; + if (padBytes > 0) + { + padBytes = 16 - padBytes; + } + } + if (padBytes > 0) + { + return data.Concat(Enumerable.Repeat((byte) 0x20, padBytes)).ToArray(); + } + return data; + } + + public static IRecordMetadata ResolveRecordAccessPath(this IVault vault, IRecordAccessPath path, + bool forEdit = false, bool forShare = false, bool forView = false) { if (string.IsNullOrEmpty(path.RecordUid)) @@ -31,7 +61,7 @@ public static IRecordMetadata ResolveRecordAccessPath(this IVault vault, IRecord foreach (var sfmd in vault.Storage.SharedFolderKeys.GetLinksForSubject(rmd.SharedFolderUid)) { - if (string.IsNullOrEmpty(sfmd.TeamUid)) + if (string.IsNullOrEmpty(sfmd.TeamUid) || sfmd.TeamUid == vault.Storage.PersonalScopeUid) { path.SharedFolderUid = sfmd.SharedFolderUid; return rmd; @@ -57,15 +87,15 @@ public static IRecordMetadata ResolveRecordAccessPath(this IVault vault, IRecord return null; } - + public static SharedFolderPermission ResolveSharedFolderAccessPath(this IVault vault, string username, string sharedFolderUid, bool forManageUsers = false, bool forManageRecords = false) { if (string.IsNullOrEmpty(sharedFolderUid)) return null; if (!vault.TryGetSharedFolder(sharedFolderUid, out var sf)) return null; - + var permissions = sf.UsersPermissions - .Where(x => + .Where(x => x.UserType == UserType.User && x.UserId == username || x.UserType == UserType.Team && vault.TryGetTeam(x.UserId, out _)) .Where(x => (!forManageUsers || x.ManageUsers) && (!forManageRecords || x.ManageRecords)) @@ -75,22 +105,150 @@ public static SharedFolderPermission ResolveSharedFolderAccessPath(this IVault v return permissions.FirstOrDefault(x => x.UserType == UserType.User) ?? permissions[0]; } + internal static Records.RecordUpdate ExtractTypedRecordForUpdate(this VaultOnline vault, TypedRecord typed, IStorageRecord existingRecord) { + vault.AdjustTypedRecord(typed); + var recordUpdate = new Records.RecordUpdate + { + RecordUid = ByteString.CopyFrom(typed.Uid.Base64UrlDecode()), + ClientModifiedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + Revision = existingRecord.Revision, + }; + + var recordData = typed.ExtractRecordV3Data(); + var jsonData = JsonUtils.DumpJson(recordData); + jsonData = PadRecordData(jsonData); + recordUpdate.Data = + ByteString.CopyFrom(CryptoUtils.EncryptAesV2(jsonData, typed.RecordKey)); + + jsonData = CryptoUtils.DecryptAesV2(existingRecord.Data.Base64UrlDecode(), typed.RecordKey); + recordData = JsonUtils.ParseJson(jsonData); + + var existingRefs = new HashSet(); + existingRefs.UnionWith((recordData.Fields ?? Enumerable.Empty() + .Concat(recordData.Custom ?? Enumerable.Empty())) + .Where(x => !string.IsNullOrEmpty(x.Type)) + .Where(x => x.Type.EndsWith("Ref")) + .Select(ConvertToTypedField) + .OfType>() + .SelectMany(x => x.Values, (field, s) => s)); + + var currentRefs = new HashSet(typed.Fields.Concat(typed.Custom) + .Where(x => x.FieldName.EndsWith("Ref")) + .OfType>() + .SelectMany(x => x.Values, (field, s) => s)); + + foreach (var newRef in currentRefs.Except(existingRefs)) + { + byte[] refKey = null; + if (!typed.LinkedKeys.TryGetValue(newRef, out refKey)) + { + if (vault.TryGetKeeperRecord(newRef, out var xr)) + { + refKey = xr.RecordKey; + } + } + if (refKey != null) + { + var recordLink = new Records.RecordLink + { + RecordUid = ByteString.CopyFrom(newRef.Base64UrlDecode()), + RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(refKey, typed.RecordKey)) + }; + recordUpdate.RecordLinksAdd.Add(recordLink); + } + else + { + Trace.TraceError($"Lost record reference: record UID: \"{newRef}\""); + } + } + + recordUpdate.RecordLinksRemove.AddRange(existingRefs.Except(currentRefs) + .Select(x => ByteString.CopyFrom(x.Base64UrlDecode()))); + + if (vault.Auth.AuthContext.EnterprisePublicEcKey != null) + { + var rad = typed.ExtractRecordAuditData(); + recordUpdate.Audit = new Records.RecordAudit + { + Version = 0, + Data = ByteString.CopyFrom(CryptoUtils.EncryptEc(JsonUtils.DumpJson(rad), + vault.Auth.AuthContext.EnterprisePublicEcKey)) + }; + } + + return recordUpdate; + } + + internal static RecordUpdateRecord ExtractPasswordRecordForUpdate(this IVault vault, PasswordRecord password, IStorageRecord existingRecord) + { + var pru = new RecordUpdateRecord + { + RecordUid = password.Uid, + Revision = existingRecord.Revision, + }; + vault.ResolveRecordAccessPath(pru, forEdit: true); + var data = password.ExtractRecordData(); + var unencryptedData = JsonUtils.DumpJson(data); + pru.Data = CryptoUtils.EncryptAesV1(unencryptedData, password.RecordKey).Base64UrlEncode(); + + RecordExtra existingExtra = null; + if (!string.IsNullOrEmpty(existingRecord.Extra)) + { + try + { + var unencryptedExtra = + CryptoUtils.DecryptAesV1(existingRecord.Extra.Base64UrlDecode(), password.RecordKey); + existingExtra = JsonUtils.ParseJson(unencryptedExtra); + } + catch (Exception e) + { + Trace.TraceError("Decrypt Record: UID: {0}, {1}: \"{2}\"", + existingRecord.RecordUid, + e.GetType().Name, + e.Message); + } + } + var extra = password.ExtractRecordExtra(existingExtra); + var extraBytes = JsonUtils.DumpJson(extra); + pru.Extra = CryptoUtils.EncryptAesV1(extraBytes, password.RecordKey).Base64UrlEncode(); + + var udata = new RecordUpdateUData(); + var ids = new HashSet(); + if (password.Attachments != null) + { + foreach (var atta in password.Attachments) + { + ids.Add(atta.Id); + if (atta.Thumbnails != null) + { + foreach (var thumb in atta.Thumbnails) + { + ids.Add(thumb.Id); + } + } + } + } + + udata.FileIds = ids.ToArray(); + pru.Udata = udata; + + return pru; + } - internal static RecordData ExtractRecordData(this PasswordRecord record, RecordData existingData = null) + internal static RecordData ExtractRecordData(this PasswordRecord record) { return new RecordData { - title = record.Title, - folder = existingData?.folder, - secret1 = record.Login, - secret2 = record.Password, - link = record.Link, - notes = record.Notes, + title = record.Title ?? "", + secret1 = record.Login ?? "", + secret2 = record.Password ?? "", + link = record.Link ?? "", + notes = record.Notes ?? "", custom = record.Custom?.Select(x => new RecordDataCustom { - name = x.Name, + name = x.Name ?? "Custom Field", value = x.Value, - type = x.Type + type = x.Type ?? "text" }).ToArray() }; } @@ -107,6 +265,45 @@ internal static RecordExtra ExtractRecordExtra(this PasswordRecord record, Recor } } + List> extraFields = new List>(); + if (existingExtra?.fields != null && existingExtra.fields.Length > 0) + { + extraFields.AddRange(existingExtra.fields); + } + Dictionary totpField = extraFields.FirstOrDefault(x => + { + if (x.TryGetValue("field_type", out var value)) + { + if (value is string field_type) + { + return string.Equals(field_type, "totp", StringComparison.InvariantCultureIgnoreCase); + } + } + return false; + }); + + if (string.IsNullOrEmpty(record.Totp)) + { + if (totpField != null) + { + extraFields.Remove(totpField); + } + } + else + { + if (totpField == null) + { + totpField = new Dictionary + { + ["id"] = CryptoUtils.GetRandomBytes(8).Base64UrlEncode(), + ["field_type"] = "totp", + ["field_title"] = "", + ["data"] = record.Totp, + }; + extraFields.Add(totpField); + } + } + return new RecordExtra { files = record.Attachments?.Select(x => @@ -127,7 +324,7 @@ internal static RecordExtra ExtractRecordExtra(this PasswordRecord record, Recor name = x.Name, title = x.Title ?? x.Name, size = x.Size, - type = x.Type + type = x.MimeType }; if (x.Thumbnails != null && x.Thumbnails.Length > 0) { @@ -143,22 +340,76 @@ internal static RecordExtra ExtractRecordExtra(this PasswordRecord record, Recor return extraFile; }).ToArray(), - fields = record.ExtraFields?.Select(x => + fields = extraFields.ToArray(), + ExtensionData = existingExtra?.ExtensionData + }; + } + + internal static IEnumerable ExtractRecordRefs(this TypedRecord typedRecord) + { + foreach (var field in typedRecord.Fields.Concat(typedRecord.Custom)) + { + if (!(field is TypedField tfs)) continue; + if (!RecordTypesConstants.TryGetRecordField(tfs.FieldName, out var rf)) continue; + switch (rf.Type.Name) { - var map = new Dictionary - { - ["id"] = x.Id ?? "", - ["field_type"] = x.FieldType ?? "", - ["field_title"] = x.FieldTitle ?? "" - }; - foreach (var pair in x.Custom.Where(pair => pair.Value != null)) + case "fileRef": + case "addressRef": + case "cardRef": { - map[pair.Key] = pair.Value; + foreach (var value in tfs.Values) + { + yield return value; + } + + break; } + } + } + } - return map; - }).ToArray(), - ExtensionData = existingExtra?.ExtensionData + internal static RecordAuditData ExtractRecordAuditData(this KeeperRecord record) + { + var auditData = new RecordAuditData + { + Title = record.Title, + }; + string url = null; + if (record is PasswordRecord password) + { + url = password.Link; + } + else if (record is TypedRecord typed) + { + auditData.RecordType = typed.TypeName; + var urlField = typed.Fields.OfType>().FirstOrDefault(x => x.FieldName == "url") ?? + typed.Custom.OfType>().FirstOrDefault(x => x.FieldName == "url"); + url = urlField?.TypedValue; + } + + if (!string.IsNullOrEmpty(url)) + { + auditData.Url = url.StripUrl(); + } + + return auditData; + } + + internal static RecordTypeData ExtractRecordV3Data(this TypedRecord typedRecord) + { + return new RecordTypeData + { + Type = typedRecord.TypeName ?? "login", + Title = typedRecord.Title ?? "", + Notes = typedRecord.Notes ?? "", + Fields = typedRecord.Fields + .OfType() + .Select(x => x.ToRecordTypeDataField()) + .ToArray(), + Custom = typedRecord.Custom + .OfType() + .Select(x => x.ToRecordTypeDataField()) + .ToArray() }; } @@ -168,12 +419,37 @@ internal static RecordExtra ExtractRecordExtra(this PasswordRecord record, Recor private static readonly DataContractJsonSerializer ExtraSerializer = new DataContractJsonSerializer(typeof(RecordExtra), JsonUtils.JsonSettings); - internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) + public static KeeperRecord Load(this IStorageRecord r, byte[] key) + { + KeeperRecord record = null; + switch (r.Version) + { + case 0: + case 1: + case 2: + record = r.LoadV2(key); + break; + case 3: + case 6: + record = r.LoadV3(key); + break; + case 4: + record = r.LoadV4(key); + break; + case 5: + record = r.LoadV5(key); + break; + } + return record; + } + + public static PasswordRecord LoadV2(this IStorageRecord r, byte[] key) { var record = new PasswordRecord() { RecordKey = key, Uid = r.RecordUid, + Version = 2, Shared = r.Shared, Owner = r.Owner, ClientModified = r.ClientModifiedTime != 0 @@ -193,7 +469,7 @@ internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) record.Notes = parsedData.notes; if (parsedData.custom != null) { - foreach (var cr in parsedData.custom) + foreach (var cr in parsedData.custom.Where(x => x != null)) { record.Custom.Add(new CustomField { @@ -213,7 +489,7 @@ internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) var parsedExtra = (RecordExtra) ExtraSerializer.ReadObject(ms); if (parsedExtra.files != null && parsedExtra.files.Length > 0) { - foreach (var file in parsedExtra.files) + foreach (var file in parsedExtra.files.Where(x => x != null)) { var atta = new AttachmentFile { @@ -221,7 +497,7 @@ internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) Key = file.key, Name = file.name, Title = file.title ?? "", - Type = file.type ?? "", + MimeType = file.type ?? "", Size = file.size ?? 0, LastModified = file.lastModified != null ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(file.lastModified.Value) @@ -230,6 +506,7 @@ internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) if (file.thumbs != null) { atta.Thumbnails = file.thumbs + .Where(x => x != null) .Select(t => new AttachmentFileThumb { Id = t.id, @@ -245,29 +522,26 @@ internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) if (parsedExtra.fields != null) { - foreach (var field in parsedExtra.fields) + var totpField = parsedExtra.fields.FirstOrDefault(x => { - var fld = new ExtraField(); - foreach (var pair in field) + if (x.TryGetValue("field_type", out var value)) { - switch (pair.Key) + if (value is string field_type) { - case "id": - fld.Id = pair.Value.ToString(); - break; - case "field_type": - fld.FieldType = pair.Value.ToString(); - break; - case "field_title": - fld.FieldTitle = pair.Value.ToString(); - break; - default: - fld.Custom[pair.Key] = pair.Value; - break; + return string.Equals(field_type, "totp", StringComparison.InvariantCultureIgnoreCase); + } + } + return false; + }); + if (totpField != null) + { + if (totpField.TryGetValue("data", out var value)) + { + if (value is string totpUrl) + { + record.Totp = totpUrl; } } - - record.ExtraFields.Add(fld); } } } @@ -276,8 +550,130 @@ internal static PasswordRecord Load(this IPasswordRecord r, byte[] key) return record; } + internal static ITypedField ConvertToTypedField(this RecordTypeDataFieldBase field) + { + try + { + if (string.IsNullOrEmpty(field.Type)) + { + field.Type = "text"; + } + + var xb = JsonUtils.DumpJson(field); + Type dataType; + if (RecordTypesConstants.TryGetRecordField(field.Type, out var rf)) + { + dataType = rf.Type.Type; + } + else + { + dataType = typeof(AnyComplexField); + } + if (rf != null && RecordTypesConstants.GetJsonParser(rf.Type.Type, out var serializer)) + { + using (var ms = new MemoryStream(xb)) + { + var f = (RecordTypeDataFieldBase) serializer.ReadObject(ms); + return f.CreateTypedField(); + } + } + else + { + Debug.WriteLine($"Unsupported field type: {field.Type}"); + } + } + catch (Exception e) + { + Debug.WriteLine(e); + } + + return new UnsupportedField(field); + } + + public static TypedRecord LoadV3(this IStorageRecord r, byte[] key) + { + var data = CryptoUtils.DecryptAesV2(r.Data.Base64UrlDecode(), key); + var rtd = JsonUtils.ParseJson(data); + var typedRecord = new TypedRecord(rtd.Type) + { + Uid = r.RecordUid, + Version = 3, + RecordKey = key, + Shared = r.Shared, + Owner = r.Owner, + ClientModified = r.ClientModifiedTime != 0 + ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(r.ClientModifiedTime) + : DateTimeOffset.Now, + Title = rtd.Title, + Notes = rtd.Notes, + }; + + if (rtd.Fields != null) + { + typedRecord.Fields.AddRange(rtd.Fields.Select(ConvertToTypedField)); + } + + if (rtd.Custom != null) + { + typedRecord.Custom.AddRange(rtd.Custom.Select(ConvertToTypedField)); + } + + return typedRecord; + } + + public static FileRecord LoadV4(this IStorageRecord r, byte[] key) + { + var data = CryptoUtils.DecryptAesV2(r.Data.Base64UrlDecode(), key); + var rfd = JsonUtils.ParseJson(data); + var fileRecord = new FileRecord() + { + RecordKey = key, + Uid = r.RecordUid, + Version = 4, + Shared = r.Shared, + Owner = r.Owner, + ClientModified = r.ClientModifiedTime != 0 + ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(r.ClientModifiedTime) + : DateTimeOffset.Now, + Title = rfd.Title, + Name = rfd.Name, + FileSize = rfd.Size ?? 0, + MimeType = rfd.Type, + LastModified = rfd.LastModified != null + ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds((long)rfd.LastModified.Value) + : DateTimeOffset.Now + }; + if (!string.IsNullOrEmpty(r.Udata)) + { + var uData = JsonUtils.ParseJson(r.Udata.Base64UrlDecode()); + fileRecord.StorageFileSize = uData.FileSize; + fileRecord.StorageThumbnailSize = uData.ThumbnailSize; + } - internal static SharedFolder Load(this ISharedFolder sf, IEnumerable records, + return fileRecord; + } + + public static ApplicationRecord LoadV5(this IStorageRecord r, byte[] key) + { + var data = CryptoUtils.DecryptAesV2(r.Data.Base64UrlDecode(), key); + var rad = JsonUtils.ParseJson(data); + var applicationRecord = new ApplicationRecord() + { + RecordKey = key, + Uid = r.RecordUid, + Version = 5, + Shared = r.Shared, + Owner = r.Owner, + ClientModified = r.ClientModifiedTime != 0 + ? DateTimeOffsetExtensions.FromUnixTimeMilliseconds(r.ClientModifiedTime) + : DateTimeOffset.Now, + Title = rad.Title, + Type = rad.Type, + }; + return applicationRecord; + } + + public static SharedFolder Load(this ISharedFolder sf, IEnumerable records, IEnumerable users, byte[] sharedFolderKey) { var sharedFolder = new SharedFolder @@ -320,5 +716,20 @@ internal static SharedFolder Load(this ISharedFolder sf, IEnumerable + public bool RecordTypesLoaded { get; set; } + /// /// Gets User Interaction interface. /// @@ -98,6 +104,7 @@ public Task ScheduleSyncDown(TimeSpan delay) { _scheduledAt = DateTimeOffset.Now.ToUnixTimeMilliseconds() + 1000; await this.RunSyncDown(); + OnIdle(); } } finally @@ -142,53 +149,51 @@ protected override void Dispose(bool disposing) base.Dispose(disposing); } - /// - /// Creates a password record. - /// - /// Password Record. - /// Folder UID where the record to be created. Optional. - /// A task returning created password record. - /// - /// - public Task CreateRecord(PasswordRecord record, string folderUid = null) + /// + public void AuditLogRecordOpen(string recordUid) + { + _ = Task.Run(async () => + { + await Auth.AuditEventLogging("open_record", new AuditEventInput { RecordUid = recordUid }); + }); + } + + /// + public void AuditLogRecordCopyPassword(string recordUid) + { + _ = Task.Run(async () => + { + await Auth.AuditEventLogging("copy_password", new AuditEventInput { RecordUid = recordUid }); + }); + } + + + /// + public Task CreateRecord(KeeperRecord record, string folderUid = null) { return this.AddRecordToFolder(record, folderUid); } - /// - /// Modifies a password record. - /// - /// Password Record. - /// Do not update file attachment information on the record. - /// A task returning created password record. - /// - /// - public Task UpdateRecord(PasswordRecord record, bool skipExtra = true) + /// + public Task UpdateRecord(KeeperRecord record, bool skipExtra = true) { - return this.PutRecord(record, false, skipExtra); + return this.PutRecord(record, skipExtra); } - /// - /// Stores non shared (or per user) data associated with the record. - /// - /// App specific per-user data type - /// Record UID - /// Non shared data - /// Awaitable task. - /// Keeper API error - /// + /// + public Task> UpdateRecords(IEnumerable records) + { + return this.UpdateRecordBatch(records); + } + + + /// public Task StoreNonSharedData(string recordUid, T nonSharedData) where T : RecordNonSharedData, new() { return this.PutNonSharedData(recordUid, nonSharedData); } - /// - /// Deletes password records. - /// - /// an array of record paths. - /// Awaitable task. - /// - /// + /// public Task DeleteRecords(RecordPath[] records) { foreach (var path in records) @@ -208,17 +213,13 @@ public Task DeleteRecords(RecordPath[] records) return this.DeleteVaultObjects(records); } - /// - /// Moves records to a folder. - /// - /// an array of record paths. - /// Destination folder UID. - /// truecreates a link. The source record in not deleted; otherwise record will be removed from the source. - /// Awaitable task. - /// - /// + /// public async Task MoveRecords(RecordPath[] records, string dstFolderUid, bool link = false) { + var recordUids = new HashSet(); + + var toMove = new List(); + var toUnlink = new List(); foreach (var path in records) { if (string.IsNullOrEmpty(path.RecordUid)) continue; @@ -228,20 +229,30 @@ public async Task MoveRecords(RecordPath[] records, string dstFolderUid, bool li { throw new VaultException($"Record {path.RecordUid} not found in the folder {srcFolder.Name} ({srcFolder.FolderUid})"); } + if (recordUids.Contains(path.RecordUid)) + { + if (!link) + { + toUnlink.Add(path); + } + } + else + { + recordUids.Add(path.RecordUid); + toMove.Add(path); + } + } var dstFolder = this.GetFolder(dstFolderUid); - await this.MoveToFolder(records, dstFolder.FolderUid, link); + await this.MoveToFolder(toMove, dstFolder.FolderUid, link); + if (toUnlink.Count > 0) + { + await this.DeleteVaultObjects(toUnlink, true); + } } - /// - /// Moves a folder to the another folder. - /// - /// Source Folder UID. - /// Destination Folder UID. - /// truecreates a link. The source folder in not deleted; otherwise source folder will be removed. - /// Awaitable task. - /// + /// public async Task MoveFolder(string srcFolderUid, string dstFolderUid, bool link = false) { var srcFolder = this.GetFolder(srcFolderUid); @@ -250,16 +261,7 @@ public async Task MoveFolder(string srcFolderUid, string dstFolderUid, bool link await this.MoveToFolder(new[] {new RecordPath {FolderUid = srcFolder.FolderUid}}, dstFolder.FolderUid, link); } - /// - /// Creates a folder. - /// - /// Folder Name. - /// Parent Folder UID. - /// Shared Folder creation options. Optional. - /// A task returning created folder. - /// Pass parameter to create a Shared Folder. - /// - /// + /// public Task CreateFolder(string folderName, string parentFolderUid = null, SharedFolderOptions sharedFolderOptions = null) { if (string.IsNullOrEmpty(folderName)) @@ -280,30 +282,31 @@ public Task CreateFolder(string folderName, string parentFolderUid = return this.AddFolder(folderName, parentFolderUid, sharedFolderOptions); } - /// - /// Renames a folder. - /// - /// Folder UID. - /// New folder name. - /// A task returning renamed folder. - /// + /// public Task RenameFolder(string folderUid, string newName) { var folder = this.GetFolder(folderUid); - if (string.IsNullOrEmpty(folder.ParentUid)) + if (folder == null) { - throw new VaultException("Cannot rename the root folder"); + throw new VaultException($"Folder \"{folderUid}\" does not exist"); } return this.FolderUpdate(folder.FolderUid, newName); } - /// - /// Delete folder. - /// - /// Folder UID. - /// Awaitable task. - /// + /// + public Task UpdateFolder(string folderUid, string newName, SharedFolderOptions sharedFolderOptions = null) + { + var folder = this.GetFolder(folderUid); + if (folder == null) + { + throw new VaultException($"Folder \"{folderUid}\" does not exist"); + } + + return this.FolderUpdate(folder.FolderUid, newName, sharedFolderOptions); + } + + /// public Task DeleteFolder(string folderUid) { var folder = this.GetFolder(folderUid); @@ -319,12 +322,8 @@ public Task DeleteFolder(string folderUid) 1)); } - - /// - /// Retrieves all enterprise team descriptions. - /// - /// A list of all enterprise teams. (awaitable) - public async Task> GetAvailableTeams() + /// + public async Task> GetTeamsForShare() { var request = new GetAvailableTeamsCommand(); var response = await Auth.ExecuteAuthCommand(request); @@ -334,5 +333,388 @@ public async Task> GetAvailableTeams() Name = x.teamName, }); } + + /// + public async Task GetUsersForShare() + { + var rs = await Auth.ExecuteAuthRest("vault/get_share_objects", new GetShareObjectsRequest()); + + var response = new ShareWithUsers(); + var directUsers = new HashSet(); + directUsers.UnionWith(rs.ShareRelationships.Where(x => x.Status == ShareStatus.Active).Select(x => x.Username)); + response.SharesWith = directUsers.ToArray(); + + var familyUsers = new HashSet(); + familyUsers.UnionWith(rs.ShareFamilyUsers.Where(x => x.Status == ShareStatus.Active).Select(x => x.Username)); + familyUsers.ExceptWith(directUsers); + familyUsers.Remove(Auth.Username); + response.SharesFrom = familyUsers.ToArray(); + + var uniqueUsers = new HashSet(); + uniqueUsers.UnionWith(rs.ShareEnterpriseUsers.Where(x => x.Status == ShareStatus.Active).Select(x => x.Username)); + uniqueUsers.ExceptWith(directUsers); + uniqueUsers.ExceptWith(familyUsers); + uniqueUsers.Remove(Auth.Username); + response.GroupUsers = uniqueUsers.ToArray(); + + uniqueUsers.Clear(); + uniqueUsers.UnionWith(rs.ShareRelationships.Where(x => x.Status == ShareStatus.Active).Select(x => x.Username)); + + return response; + } + + /// + public async Task> GetSharesForRecords(IEnumerable recordUids) + { + var permissions = new List(); + + var records = new List(); + foreach (var recordUid in recordUids) + { + if (TryGetKeeperRecord(recordUid, out var record)) + { + if (record.Shared) + { + var rap = new RecordAccessPath + { + RecordUid = recordUid + }; + this.ResolveRecordAccessPath(rap); + records.Add(rap); + } + else + { + permissions.Add(new RecordSharePermissions + { + RecordUid = recordUid, + UserPermissions = new[] { new UserRecordPermissions { + Username = Auth.Username, + Owner = true, + CanEdit = true, + CanShare = true + } } + }); + } + } + } + if (records.Count == 0) + { + return Enumerable.Empty(); + } + var rq = new GetRecordsCommand + { + Include = new[] { "shares" }, + Records = records.ToArray() + }; + + var rs = await Auth.ExecuteAuthCommand(rq); + if (rs.Records != null) + { + permissions.AddRange(rs.Records.Select(x => + { + return new RecordSharePermissions + { + RecordUid = x.RecordUid, + UserPermissions = x.UserPermissions?.Select(y => new UserRecordPermissions + { + Username = y.Username, + Owner = y.Owner, + CanEdit = y.Editable, + CanShare = y.Sharable, + AwaitingApproval = y.AwaitingApproval + }).ToArray(), + SharedFolderPermissions = x.SharedFolderPermissions?.Select(y => new SharedFolderRecordPermissions + { + SharedFolderUid = y.SharedFolderUid, + CanEdit = y.Editable, + CanShare = y.Reshareable, + }).ToArray() + }; + })); + } + + return permissions; + } + + /// + public async Task CancelSharesWithUser(string username) { + var rq = new CancelShareCommand + { + FromEmail = Auth.Username, + ToEmail = username + }; + + await Auth.ExecuteAuthCommand(rq); + } + + /// + public async Task> GetUserPublicKeys(string username) + { + var pkRq = new AuthProto.GetPublicKeysRequest(); + pkRq.Usernames.Add(username); + + var pkRss = await Auth.ExecuteAuthRest("vault/get_public_keys", pkRq); + var pkRs = pkRss.KeyResponses.FirstOrDefault(x => string.Equals(x.Username, username, StringComparison.InvariantCultureIgnoreCase)); + if (pkRs == null) + { + throw new KeeperApiException("no_user_in_response", "User cannot be found"); + } + if (!string.IsNullOrEmpty(pkRs.ErrorCode)) + { + if (pkRs.ErrorCode == "no_active_share_exist") + { + throw new NoActiveShareWithUserException(username, pkRs.ErrorCode, pkRs.Message); + } + else + { + throw new KeeperApiException(pkRs.ErrorCode, pkRs.Message); + } + } + + return Tuple.Create(pkRs.PublicKey?.ToByteArray(), pkRs.PublicEccKey?.ToByteArray()); + } + + /// + public async Task SendShareInvitationRequest(string username) + { + var inviteRq = new AuthProto.SendShareInviteRequest + { + Email = username + }; + await Auth.ExecuteAuthRest("vault/send_share_invite", inviteRq); + } + + /// + public async Task ShareRecordWithUser(string recordUid, string username, bool? canReshare, bool? canEdit) + { + if (!TryGetKeeperRecord(recordUid, out var record)) + { + throw new KeeperApiException("not_found", "Record not found"); + } + + var recordShares = (await GetSharesForRecords(new[] { recordUid})).FirstOrDefault(x => x.RecordUid == recordUid); + + var targetPermission = recordShares?.UserPermissions + .FirstOrDefault(x => string.Equals(x.Username, username, StringComparison.InvariantCultureIgnoreCase)); + + var accessPath = new RecordAccessPath + { + RecordUid = recordUid, + }; + this.ResolveRecordAccessPath(accessPath, forShare: true); + + var request = new RecordShareUpdateRequest(); + var ro = new SharedRecord + { + ToUsername = username, + RecordUid = ByteString.CopyFrom(recordUid.Base64UrlDecode()), + }; + if (!string.IsNullOrEmpty(accessPath.SharedFolderUid)) + { + ro.SharedFolderUid = ByteString.CopyFrom(accessPath.SharedFolderUid.Base64UrlDecode()); + } + if (!string.IsNullOrEmpty(accessPath.TeamUid)) + { + ro.TeamUid = ByteString.CopyFrom(accessPath.TeamUid.Base64UrlDecode()); + } + + if (targetPermission == null) + { + var keyTuple = await GetUserPublicKeys(username); + var rsaKey = keyTuple.Item1; + var ecKey = keyTuple.Item2; + var useEcKey = ecKey != null && record.Version != 2; + if (useEcKey) + { + var pk = CryptoUtils.LoadPublicEcKey(ecKey); + ro.RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptEc(record.RecordKey, pk)); + ro.UseEccKey = true; + } + else + { + var pk = CryptoUtils.LoadPublicKey(rsaKey); + ro.RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptRsa(record.RecordKey, pk)); + } + ro.Shareable = canReshare ?? false; + ro.Editable = canEdit ?? false; + + request.AddSharedRecord.Add(ro); + } + else + { + ro.Shareable = canReshare ?? targetPermission.CanShare; + ro.Editable = canEdit ?? targetPermission.CanEdit; + + request.UpdateSharedRecord.Add(ro); + } + + var rsuRs = await Auth.ExecuteAuthRest("vault/records_share_update", request); + var statuses = targetPermission == null ? rsuRs.AddSharedRecordStatus : rsuRs.UpdateSharedRecordStatus; + var status = statuses.FirstOrDefault(x => x.RecordUid.SequenceEqual(recordUid.Base64UrlDecode()) && string.Equals(x.Username, username, StringComparison.InvariantCultureIgnoreCase)); + if (status != null && status.Status != "success") + { + throw new KeeperApiException(status.Status, status.Message); + } + } + + /// + public async Task TransferRecordToUser(string recordUid, string username) + { + var pkRq = new AuthProto.GetPublicKeysRequest(); + pkRq.Usernames.Add(username); + + var pkRss = await Auth.ExecuteAuthRest("vault/get_public_keys", pkRq); + var pkRs = pkRss.KeyResponses[0]; + ECPublicKeyParameters ecPk = null; + RsaKeyParameters rsaPk = null; + if (!pkRs.PublicEccKey.IsEmpty) { + ecPk = CryptoUtils.LoadPublicEcKey(pkRs.PublicEccKey.ToByteArray()); + } + else if (!pkRs.PublicKey.IsEmpty) { + rsaPk = CryptoUtils.LoadPublicKey(pkRs.PublicKey.ToByteArray()); + } + else + { + throw new KeeperApiException("public_key_error", pkRs.Message); + } + + if (!TryGetKeeperRecord(recordUid, out var record)) + { + throw new KeeperApiException("not_found", "Record not found"); + } + var tr = new TransferRecord + { + RecordUid = ByteString.CopyFrom(recordUid.Base64UrlDecode()), + Username = username, + }; + if (ecPk != null) + { + tr.RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptEc(record.RecordKey, ecPk)); + tr.UseEccKey = true; + } + else { + tr.RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptRsa(record.RecordKey, rsaPk)); + } + var request = new RecordsOnwershipTransferRequest(); + request.TransferRecords.Add(tr); + + var response = await Auth.ExecuteAuthRest("vault/records_ownership_transfer", request); + var status = response.TransferRecordStatus.FirstOrDefault(x => x.RecordUid.SequenceEqual(recordUid.Base64UrlDecode()) && string.Equals(x.Username, username, StringComparison.InvariantCultureIgnoreCase)); + if (status != null && status.Status != "transfer_record_success") + { + throw new KeeperApiException(status.Status, status.Message); + } + } + + /// + public async Task RevokeShareFromUser(string recordUid, string username) + { + if (!TryGetKeeperRecord(recordUid, out var record)) + { + throw new KeeperApiException("not_found", "Record not found"); + } + var accessPath = new RecordAccessPath + { + RecordUid = recordUid, + }; + this.ResolveRecordAccessPath(accessPath, forShare: true); + + var sr = new SharedRecord + { + ToUsername = username, + RecordUid = ByteString.CopyFrom(recordUid.Base64UrlDecode()), + }; + if (!string.IsNullOrEmpty(accessPath.SharedFolderUid)) + { + sr.SharedFolderUid = ByteString.CopyFrom(accessPath.SharedFolderUid.Base64UrlDecode()); + } + if (!string.IsNullOrEmpty(accessPath.TeamUid)) + { + sr.TeamUid = ByteString.CopyFrom(accessPath.TeamUid.Base64UrlDecode()); + } + + var request = new RecordShareUpdateRequest(); + request.RemoveSharedRecord.Add(sr); + + var response = await Auth.ExecuteAuthRest("vault/records_share_update", request); + var status = response.RemoveSharedRecordStatus.FirstOrDefault(x => x.RecordUid.SequenceEqual(recordUid.Base64UrlDecode()) && string.Equals(x.Username, username, StringComparison.InvariantCultureIgnoreCase)); + if (status != null && status.Status != "success") + { + throw new KeeperApiException(status.Status, status.Message); + } + } + + private readonly ISet _recordsForAudit = new HashSet(); + + internal void ScheduleForAudit(params string[] recordUids) + { + if (Auth?.AuthContext?.EnterprisePublicEcKey != null) + { + lock (_recordsForAudit) + { + _recordsForAudit.UnionWith(recordUids); + } + } + } + + internal void OnIdle() + { + string[] recordUids = null; + lock (_recordsForAudit) + { + if (_recordsForAudit.Count > 0) + { + recordUids = _recordsForAudit.ToArray(); + _recordsForAudit.Clear(); + } + } + + if (recordUids == null || recordUids.Length == 0) return; + var publicEcKey = Auth?.AuthContext?.EnterprisePublicEcKey; + if (publicEcKey == null) return; + + _ = Task.Run(async () => + { + var auditData = recordUids + .Select(x => TryGetKeeperRecord(x, out var r) ? r : null) + .OfType() + .Select(x => + { + var rad = x.ExtractRecordAuditData(); + return new Records.RecordAddAuditData + { + RecordUid = ByteString.CopyFrom(x.Uid.Base64UrlDecode()), + Revision = x.Revision, + Data = ByteString.CopyFrom(CryptoUtils.EncryptEc(JsonUtils.DumpJson(rad), publicEcKey)) + }; + + }) + .ToList(); + + try + { + while (auditData.Count > 0) + { + var rq = new AddAuditDataRequest(); + rq.Records.AddRange(auditData.Take(999)); + if (auditData.Count > 999) + { + auditData.RemoveRange(0, 999); + } + else + { + auditData.Clear(); + } + + await Auth.ExecuteAuthRest("vault/record_add_audit_data", rq); + } + } + catch (Exception e) + { + Debug.WriteLine(e.Message); + } + + }); + } } } \ No newline at end of file diff --git a/KeeperSdk/vault/VaultOnlineFunctions.cs b/KeeperSdk/vault/VaultOnlineFunctions.cs index 2c775da..89b8af2 100644 --- a/KeeperSdk/vault/VaultOnlineFunctions.cs +++ b/KeeperSdk/vault/VaultOnlineFunctions.cs @@ -1,33 +1,33 @@ using System; using System.Collections.Generic; -using System.Diagnostics; using System.IO; using System.Linq; using System.Runtime.Serialization.Json; using System.Text; using System.Threading.Tasks; +using Google.Protobuf; using KeeperSecurity.Commands; using KeeperSecurity.Authentication; using KeeperSecurity.Utils; +using Records; namespace KeeperSecurity.Vault { - /// - /// Represents shared folder record permissions. - /// + /// > public class SharedFolderRecordOptions : ISharedFolderRecordOptions { + /// > public bool? CanEdit { get; set; } + /// > public bool? CanShare { get; set; } } - /// - /// Defines shared folder user permissions. - /// - + /// > public class SharedFolderUserOptions : ISharedFolderUserOptions { + /// > public bool? ManageRecords { get; set; } + /// > public bool? ManageUsers { get; set; } } @@ -36,55 +36,47 @@ public class SharedFolderUserOptions : ISharedFolderUserOptions /// public class SharedFolderOptions : ISharedFolderRecordOptions, ISharedFolderUserOptions { + /// > public bool? CanEdit { get; set; } + /// > public bool? CanShare { get; set; } + /// > public bool? ManageUsers { get; set; } + /// > public bool? ManageRecords { get; set; } } internal static class VaultOnlineFunctions { - public static async Task AddRecordToFolder(this VaultOnline vault, PasswordRecord record, string folderUid = null) + public static async Task AddRecordToFolder(this VaultOnline vault, KeeperRecord record, + string folderUid = null) { + record.Uid = CryptoUtils.GenerateUid(); + record.RecordKey = CryptoUtils.GenerateEncryptionKey(); FolderNode node = null; if (!string.IsNullOrEmpty(folderUid)) { vault.TryGetFolder(folderUid, out node); } - record.Uid = CryptoUtils.GenerateUid(); - record.RecordKey = CryptoUtils.GenerateEncryptionKey(); - var recordAdd = new RecordAddCommand - { - RecordUid = record.Uid, - RecordKey = CryptoUtils.EncryptAesV1(record.RecordKey, vault.Auth.AuthContext.DataKey).Base64UrlEncode(), - RecordType = "password" - }; - if (node == null) - { - recordAdd.FolderType = "user_folder"; - } - else + folderUid = null; + byte[] folderKey = null; + if (node != null) { switch (node.FolderType) { case FolderType.UserFolder: - recordAdd.FolderType = "user_folder"; - recordAdd.FolderUid = node.FolderUid; + folderUid = node.FolderUid; break; case FolderType.SharedFolder: case FolderType.SharedFolderFolder: - recordAdd.FolderUid = node.FolderUid; - recordAdd.FolderType = node.FolderType == FolderType.SharedFolder - ? "shared_folder" - : "shared_folder_folder"; + folderUid = node.FolderUid; if (vault.TryGetSharedFolder(node.SharedFolderUid, out var sf)) { - recordAdd.FolderKey = CryptoUtils.EncryptAesV1(record.RecordKey, sf.SharedFolderKey) - .Base64UrlEncode(); + folderKey = sf.SharedFolderKey; } - if (string.IsNullOrEmpty(recordAdd.FolderKey)) + if (folderKey == null) { throw new Exception($"Cannot resolve shared folder for folder UID: {folderUid}"); } @@ -93,17 +85,142 @@ public static async Task AddRecordToFolder(this VaultOnline vaul } } - var dataSerializer = new DataContractJsonSerializer(typeof(RecordData), JsonUtils.JsonSettings); - var data = record.ExtractRecordData(); - using (var ms = new MemoryStream()) + if (record is PasswordRecord pr) + { + var ft = "user_folder"; + switch (node?.FolderType) + { + case FolderType.SharedFolder: + ft = "shared_folder"; + break; + case FolderType.SharedFolderFolder: + ft = "shared_folder_folder"; + break; + } + + var recordAdd = new RecordAddCommand + { + RecordUid = record.Uid, + RecordKey = CryptoUtils.EncryptAesV1(record.RecordKey, vault.Auth.AuthContext.DataKey) + .Base64UrlEncode(), + RecordType = "password", + FolderType = ft, + }; + if (!string.IsNullOrEmpty(folderUid)) + { + recordAdd.FolderUid = folderUid; + if (folderKey != null) + { + recordAdd.FolderKey = CryptoUtils.EncryptAesV1(record.RecordKey, folderKey).Base64UrlEncode(); + } + } + + var dataSerializer = new DataContractJsonSerializer(typeof(KeeperSecurity.Commands.RecordData), JsonUtils.JsonSettings); + var data = pr.ExtractRecordData(); + using (var ms = new MemoryStream()) + { + dataSerializer.WriteObject(ms, data); + recordAdd.Data = CryptoUtils.EncryptAesV1(ms.ToArray(), record.RecordKey).Base64UrlEncode(); + } + + await vault.Auth.ExecuteAuthCommand(recordAdd); + vault.ScheduleForAudit(record.Uid); + } + else if (record is TypedRecord typed) + { + var ft = Records.RecordFolderType.UserFolder; + switch (node?.FolderType) + { + case FolderType.SharedFolder: + ft = Records.RecordFolderType.SharedFolder; + break; + case FolderType.SharedFolderFolder: + ft = Records.RecordFolderType.SharedFolderFolder; + break; + } + + var recordAddProto = new Records.RecordAdd + { + RecordUid = ByteString.CopyFrom(typed.Uid.Base64UrlDecode()), + RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(record.RecordKey, + vault.Auth.AuthContext.DataKey)), + ClientModifiedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + FolderType = ft, + }; + if (!string.IsNullOrEmpty(folderUid)) + { + recordAddProto.FolderUid = ByteString.CopyFrom(folderUid.Base64UrlDecode()); + if (folderKey != null) + { + recordAddProto.FolderKey = + ByteString.CopyFrom(CryptoUtils.EncryptAesV2(record.RecordKey, folderKey)); + } + } + + vault.AdjustTypedRecord(typed); + var recordData = typed.ExtractRecordV3Data(); + var jsonData = JsonUtils.DumpJson(recordData); + jsonData = VaultExtensions.PadRecordData(jsonData); + recordAddProto.Data = + ByteString.CopyFrom(CryptoUtils.EncryptAesV2(jsonData, record.RecordKey)); + var refKeys = new Dictionary(); + foreach (var recordUid in typed.ExtractRecordRefs()) + { + if (refKeys.ContainsKey(recordUid)) continue; + if (vault.TryGetKeeperRecord(recordUid, out var keeperRecord)) + { + refKeys.Add(recordUid, keeperRecord.RecordKey); + } + } + + if (refKeys.Count > 0) + { + recordAddProto.RecordLinks.AddRange(refKeys.Select(pair => new Records.RecordLink + { + RecordUid = ByteString.CopyFrom(pair.Key.Base64UrlDecode()), + RecordKey = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(pair.Value, record.RecordKey)) + })); + } + + if (vault.Auth.AuthContext.EnterprisePublicEcKey != null) + { + var auditData = typed.ExtractRecordAuditData(); + var data = JsonUtils.DumpJson(auditData); + recordAddProto.Audit = new Records.RecordAudit + { + Version = 0, + Data = ByteString.CopyFrom(CryptoUtils.EncryptEc(data, + vault.Auth.AuthContext.EnterprisePublicEcKey)) + }; + } + + var rq = new Records.RecordsAddRequest + { + ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + }; + rq.Records.Add(recordAddProto); + var rs = await vault.Auth.ExecuteAuthRest( + "vault/records_add", rq); + var modifyResult = rs.Records[0]; + if (modifyResult.Status != Records.RecordModifyResult.RsSuccess) + { + var status = modifyResult.Status.ToString().ToSnakeCase(); + if (status.StartsWith("rs_")) + { + status = status.Substring(3); + } + + throw new KeeperApiException(status, modifyResult.Message); + } + } + else { - dataSerializer.WriteObject(ms, data); - recordAdd.Data = CryptoUtils.EncryptAesV1(ms.ToArray(), record.RecordKey).Base64UrlEncode(); + throw new Exception($"Unsupported record type: {record.GetType().Name}"); } - await vault.Auth.ExecuteAuthCommand(recordAdd); - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); - return vault.TryGetRecord(record.Uid, out var r) ? r : record; + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); + + return vault.TryGetKeeperRecord(record.Uid, out var r) ? r : record; } public static async Task MoveToFolder(this VaultOnline vault, IEnumerable objects, string toFolderUid, bool link = false) @@ -141,7 +258,7 @@ void TraverseFolderForRecords(FolderNode folder) foreach (var recordUid in folder.Records) { if (keyObjects.ContainsKey(recordUid)) continue; - if (!vault.TryGetRecord(recordUid, out var record)) + if (!vault.TryGetKeeperRecord(recordUid, out var record)) { keyObjects.Add(recordUid, new TransitionKey @@ -195,7 +312,7 @@ void TraverseFolderForRecords(FolderNode folder) } else { - if (!vault.TryGetRecord(mo.RecordUid, out var record)) + if (!vault.TryGetKeeperRecord(mo.RecordUid, out var record)) { throw new VaultException(""); } @@ -235,150 +352,244 @@ void TraverseFolderForRecords(FolderNode folder) }; await vault.Auth.ExecuteAuthCommand(request); + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); } - public static async Task PutRecord(this VaultOnline vault, PasswordRecord record, bool skipData = false, bool skipExtra = true) + public static async Task> UpdateRecordBatch(this VaultOnline vault, IEnumerable records) { - IPasswordRecord existingRecord = null; - if (!string.IsNullOrEmpty(record.Uid)) - { - existingRecord = vault.Storage.Records.GetEntity(record.Uid); - } - - if (existingRecord == null) - { - return await vault.AddRecordToFolder(record); - } - - var updateRecord = new RecordUpdateRecord - { - RecordUid = existingRecord.RecordUid - }; - - var rmd = vault.ResolveRecordAccessPath(updateRecord, true); - if (rmd != null) - { - if (rmd.RecordKeyType == (int) KeyType.NoKey || rmd.RecordKeyType == (int) KeyType.PrivateKey) + var v2Records = new Dictionary(); + var v3Records = new Dictionary(); + var results = new List(); + var passwordChanged = new HashSet(); + var isEnterpriseAccount = vault.Auth.AuthContext.EnterprisePublicEcKey != null; + foreach (var record in records) + { + var existingRecord = vault.Storage.Records.GetEntity(record.Uid); + if (existingRecord == null) { - updateRecord.RecordKey = CryptoUtils.EncryptAesV1(record.RecordKey, vault.Auth.AuthContext.DataKey) - .Base64UrlEncode(); + results.Add(new RecordUpdateStatus + { + RecordUid = record.Uid, + Status = "not_found", + Message = $"Record \"{record.Uid}\" not found.", + }); } - } - - updateRecord.Revision = existingRecord.Revision; - if (!skipData) - { - var dataSerializer = new DataContractJsonSerializer(typeof(RecordData), JsonUtils.JsonSettings); - RecordData existingData = null; - try + if (record is PasswordRecord password) { - var unencryptedData = - CryptoUtils.DecryptAesV1(existingRecord.Data.Base64UrlDecode(), record.RecordKey); - using (var ms = new MemoryStream(unencryptedData)) + if (!v2Records.ContainsKey(password.Uid)) { - existingData = (RecordData) dataSerializer.ReadObject(ms); + v2Records.Add(password.Uid, vault.ExtractPasswordRecordForUpdate(password, existingRecord)); + if (isEnterpriseAccount) + { + var er = existingRecord.LoadV2(record.RecordKey); + if ((er.Password ?? "") != (password.Password ?? "")) + { + passwordChanged.Add(record.Uid); + } + } } } - catch (Exception e) + else if (record is TypedRecord typed) { - Trace.TraceError("Decrypt Record: UID: {0}, {1}: \"{2}\"", - existingRecord.RecordUid, - e.GetType().Name, - e.Message); - } + if (!v3Records.ContainsKey(typed.Uid)) + { + v3Records.Add(typed.Uid, vault.ExtractTypedRecordForUpdate(typed, existingRecord)); + if (isEnterpriseAccount) + { + var er = existingRecord.LoadV3(record.RecordKey); + if (typed.FindTypedField(new RecordTypeField("password"), out var f1) && + er.FindTypedField(new RecordTypeField("password"), out var f2)) + { + var password1 = (f1.ObjectValue ?? "").ToString(); + var password2 = (f2.ObjectValue ?? "").ToString(); - var data = record.ExtractRecordData(existingData); - using (var ms = new MemoryStream()) + if (password1 != password2) + { + passwordChanged.Add(record.Uid); + } + } + } + } + } + else { - dataSerializer.WriteObject(ms, data); - updateRecord.Data = CryptoUtils.EncryptAesV1(ms.ToArray(), record.RecordKey).Base64UrlEncode(); + results.Add(new RecordUpdateStatus + { + RecordUid = record.Uid, + Status = "not_supported", + Message = $"Record \"{record.Uid}\" update is not supported.", + }); } } - - if (!skipExtra) + while (v2Records.Count > 0) { - var extraSerializer = new DataContractJsonSerializer(typeof(RecordExtra), JsonUtils.JsonSettings); - RecordExtra existingExtra = null; - try + var chunk = v2Records.Take(99).ToArray(); + foreach (var pair in chunk) { - var unencryptedExtra = - CryptoUtils.DecryptAesV1(existingRecord.Extra.Base64UrlDecode(), record.RecordKey); - using (var ms = new MemoryStream(unencryptedExtra)) + v2Records.Remove(pair.Key); + } + var command = new RecordUpdateCommand + { + deviceId = vault.Auth.Endpoint.DeviceName, + UpdateRecords = chunk.Select(x => x.Value).ToArray(), + }; + + var rs = await vault.Auth.ExecuteAuthCommand(command); + results.AddRange(rs.UpdateRecords); + + foreach (var status in rs.UpdateRecords) + { + if (status.Status == "success") { - existingExtra = (RecordExtra) extraSerializer.ReadObject(ms); + vault.ScheduleForAudit(status.RecordUid); } } - catch (Exception e) + if (v2Records.Count > 50) { - Trace.TraceError("Decrypt Record: UID: {0}, {1}: \"{2}\"", - existingRecord.RecordUid, - e.GetType().Name, - e.Message); - + await Task.Delay(TimeSpan.FromSeconds(5)); } - - var extra = record.ExtractRecordExtra(existingExtra); - using (var ms = new MemoryStream()) + } + while (v3Records.Count > 0) + { + var rq = new RecordsUpdateRequest + { + ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds() + }; + var chunk = v3Records.Take(900).ToArray(); + foreach (var pair in chunk) { - extraSerializer.WriteObject(ms, extra); - updateRecord.Extra = CryptoUtils.EncryptAesV1(ms.ToArray(), record.RecordKey).Base64UrlEncode(); + v3Records.Remove(pair.Key); } + rq.Records.AddRange(chunk.Select(x => x.Value).ToArray()); - var udata = new RecordUpdateUData(); - var ids = new HashSet(); - if (record.Attachments != null) + var rs = await vault.Auth.ExecuteAuthRest("vault/records_update", rq); + results.AddRange(rs.Records.Select(x => { - foreach (var atta in record.Attachments) + var recordUid = x.RecordUid.ToByteArray().Base64UrlEncode(); + if (x.Status == RecordModifyResult.RsSuccess) { - ids.Add(atta.Id); - if (atta.Thumbnails != null) + return new RecordUpdateStatus { - foreach (var thumb in atta.Thumbnails) - { - ids.Add(thumb.Id); - } + RecordUid = recordUid, + Status = "success", + }; + } + else + { + var status = Enum.GetName(typeof(RecordModifyResult), x.Status); + if (status.StartsWith("Rs")) + { + status = status.Substring(2); } + return new RecordUpdateStatus + { + RecordUid = recordUid, + Status = status.ToSnakeCase(), + Message = x.Message, + }; } + })); + if (v3Records.Count > 0) + { + await Task.Delay(TimeSpan.FromSeconds(5)); } - - udata.FileIds = ids.ToArray(); - updateRecord.Udata = udata; } - var command = new RecordUpdateCommand + if (vault.Auth.AuthContext.EnterprisePublicEcKey != null) { - deviceId = vault.Auth.Endpoint.DeviceName, - UpdateRecords = new[] {updateRecord} - }; + if (passwordChanged.Count > 0) { + foreach (var status in results) + { + if (passwordChanged.Contains(status.RecordUid) && status.Status == "success") + { + vault.Auth.ScheduleAuditEventLogging("record_password_change", new AuditEventInput { RecordUid = status.RecordUid }); + } + } + await vault.Auth.FlushAuditEvents(); + } + } - await vault.Auth.ExecuteAuthCommand(command); - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); - return vault.TryGetRecord(record.Uid, out var r) ? r : record; + return results; } - public static async Task PutNonSharedData(this VaultOnline vault, string recordUid, T nonSharedData) - where T : RecordNonSharedData, new() + public static async Task PutRecord(this VaultOnline vault, KeeperRecord record, bool skipExtra = true) { - var existingData = vault.LoadNonSharedData(recordUid) ?? new T(); - nonSharedData.ExtensionData = existingData.ExtensionData; - var data = JsonUtils.DumpJson(nonSharedData); + IStorageRecord existingRecord = null; + if (!string.IsNullOrEmpty(record.Uid)) + { + existingRecord = vault.Storage.Records.GetEntity(record.Uid); + } - var existingRecord = vault.Storage.Records.GetEntity(recordUid); - var updateRecord = new RecordUpdateRecord + if (existingRecord == null) { - RecordUid = recordUid, - Revision = existingRecord?.Revision ?? 0, - NonSharedData = CryptoUtils.EncryptAesV1(data, vault.Auth.AuthContext.DataKey).Base64UrlEncode() - }; - var command = new RecordUpdateCommand + return await vault.AddRecordToFolder(record); + } + + var statuses = await vault.UpdateRecords(new[] { record }); + if (statuses?.Count > 0) { - deviceId = vault.Auth.Endpoint.DeviceName, - UpdateRecords = new[] {updateRecord} - }; - await vault.Auth.ExecuteAuthCommand(command); - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + var status = statuses[0]; + if (status.Status != "success") + { + throw new KeeperApiException(status.Status, status.Message); + } + } + return vault.TryGetKeeperRecord(record.Uid, out var r) ? r : record; + } + + public static async Task PutNonSharedData(this VaultOnline vault, string recordUid, T nonSharedData) + where T : RecordNonSharedData, new() + { + if (vault.TryGetKeeperRecord(recordUid, out var record)) + { + var existingData = vault.LoadNonSharedData(record.Uid) ?? new T(); + nonSharedData.ExtensionData = existingData.ExtensionData; + var data = JsonUtils.DumpJson(nonSharedData); + + var existingRecord = vault.Storage.Records.GetEntity(recordUid); + if (record.Version >= 3) + { + var rq = new RecordsUpdateRequest + { + ClientTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + }; + rq.Records.Add(new RecordUpdate + { + RecordUid = ByteString.CopyFrom(recordUid.Base64UrlDecode()), + ClientModifiedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), + Revision = existingRecord?.Revision ?? 0, + NonSharedData = ByteString.CopyFrom(CryptoUtils.EncryptAesV2(data, vault.Auth.AuthContext.DataKey)), + }); + var rs = await vault.Auth.ExecuteAuthRest("vault/records_update", rq); + if (rs.Records.Count > 0) + { + var status = rs.Records[0]; + if (status.Status != RecordModifyResult.RsSuccess) + { + throw new KeeperApiException(status.Status.ToString(), status.Message); + } + } + } + else + { + var updateRecord = new RecordUpdateRecord + { + RecordUid = recordUid, + Revision = existingRecord?.Revision ?? 0, + NonSharedData = CryptoUtils.EncryptAesV1(data, vault.Auth.AuthContext.DataKey).Base64UrlEncode() + }; + var command = new RecordUpdateCommand + { + deviceId = vault.Auth.Endpoint.DeviceName, + UpdateRecords = new[] { updateRecord } + }; + await vault.Auth.ExecuteAuthCommand(command); + } + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); + } } public static async Task AddFolder(this VaultOnline vault, string folderName, string parentFolderUid = null, T sharedFolderOptions = null) @@ -437,7 +648,7 @@ public static async Task AddFolder(this VaultOnline vault, string } _ = await vault.Auth.ExecuteAuthCommand(request); - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); return vault.TryGetFolder(request.FolderUid, out var f) ? f : null; } @@ -477,25 +688,32 @@ public static async Task FolderUpdate(this VaultOnline vault, string SharedFolderUid = string.IsNullOrEmpty(folder.SharedFolderUid) ? null : folder.SharedFolderUid, }; - var existingRecord = vault.Storage.Folders.GetEntity(folderUid); - var data = string.IsNullOrEmpty(existingRecord?.Data) - ? new FolderData() - : JsonUtils.ParseJson(existingRecord.Data.Base64UrlDecode()); - data.name = folderName; - var dataBytes = JsonUtils.DumpJson(data); - - var encryptionKey = vault.Auth.AuthContext.DataKey; - if (folder.FolderType == FolderType.SharedFolderFolder) + FolderData data = null; + try { - encryptionKey = vault.GetSharedFolder(folder.SharedFolderUid).SharedFolderKey; + var existingFolder = vault.Storage.Folders.GetEntity(folderUid); + if (folder.FolderKey != null && !string.IsNullOrEmpty(existingFolder?.Data)) + { + data = JsonUtils.ParseJson(CryptoUtils.DecryptAesV1(existingFolder.Data.Base64UrlDecode(), folder.FolderKey)); + } + } + catch + { + // ignored } - request.Data = CryptoUtils.EncryptAesV1(dataBytes, encryptionKey).Base64UrlEncode(); + if (data == null) + { + data = new FolderData(); + } + data.name = folderName; + var dataBytes = JsonUtils.DumpJson(data); + request.Data = CryptoUtils.EncryptAesV1(dataBytes, folder.FolderKey).Base64UrlEncode(); if (folder.FolderType != FolderType.UserFolder) { var sharedFolderUid = folder.FolderType == FolderType.UserFolder ? folder.FolderUid : folder.SharedFolderUid; - var perm = vault.ResolveSharedFolderAccessPath(vault.Auth.Username, sharedFolderUid, true, true); + var perm = vault.ResolveSharedFolderAccessPath(vault.Auth.Username, sharedFolderUid, false, true); if (perm != null) { if (perm.UserType == UserType.Team) @@ -503,33 +721,28 @@ public static async Task FolderUpdate(this VaultOnline vault, string request.TeamUid = perm.UserId; } } - else - { - throw new VaultException($"You don't have permissions to modify shared folder ({sharedFolderUid})"); - } } - if (sharedFolderOptions != null && folder.FolderType == FolderType.SharedFolder) + if (folder.FolderType == FolderType.SharedFolder) { - if (!vault.TryGetSharedFolder(folder.FolderUid, out var sharedFolder)) + request.Name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(folderName), folder.FolderKey).Base64UrlEncode(); + + if (sharedFolderOptions != null) { - request.Name = CryptoUtils.EncryptAesV1(Encoding.UTF8.GetBytes(folderName), sharedFolder.SharedFolderKey).Base64UrlEncode(); + request.ManageUsers = sharedFolderOptions.ManageUsers; + request.ManageRecords = sharedFolderOptions.ManageRecords; + request.CanEdit = sharedFolderOptions.CanEdit; + request.CanShare = sharedFolderOptions.CanShare; } - - request.ManageUsers = sharedFolderOptions.ManageUsers; - request.ManageRecords = sharedFolderOptions.ManageRecords; - request.CanEdit = sharedFolderOptions.CanEdit; - request.CanShare = sharedFolderOptions.CanShare; } await vault.Auth.ExecuteAuthCommand(request); - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); return vault.TryGetFolder(request.FolderUid, out var f) ? f : null; } public static async Task DeleteVaultObjects(this VaultOnline vault, IEnumerable objectsToDelete, bool forceDelete = false) { - var sharedFoldersToDelete = new Dictionary>(); var preDeleteObjects = new Dictionary(); foreach (var toDelete in objectsToDelete) @@ -539,15 +752,13 @@ public static async Task DeleteVaultObjects(this VaultOnline vault, IEnumerable< if (folder.FolderType != FolderType.UserFolder) { var sharedFolderUid = folder.FolderType == FolderType.SharedFolder ? folder.FolderUid : folder.SharedFolderUid; - var perm = vault.ResolveSharedFolderAccessPath(vault.Auth.Username, sharedFolderUid, true, true); - if (perm == null) - { - throw new VaultException($"You don't have delete permissions in shared folder \"{folder.Name}\" ({sharedFolderUid})"); - } - - if (perm.UserType == UserType.Team) + var perm = vault.ResolveSharedFolderAccessPath(vault.Auth.Username, sharedFolderUid, false, true); + if (perm != null) { - teamUid = perm.UserId; + if (perm.UserType == UserType.Team) + { + teamUid = perm.UserId; + } } } @@ -558,8 +769,8 @@ public static async Task DeleteVaultObjects(this VaultOnline vault, IEnumerable< preDeleteObjects[folder.FolderUid] = new PreDeleteObject { fromUid = string.IsNullOrEmpty(folder.FolderUid) ? null : folder.FolderUid, - fromType = folder.FolderType == FolderType.UserFolder - ? FolderType.UserFolder.GetFolderTypeText() + fromType = folder.FolderType == FolderType.UserFolder + ? FolderType.UserFolder.GetFolderTypeText() : FolderType.SharedFolderFolder.GetFolderTypeText(), objectUid = toDelete.RecordUid, objectType = "record", @@ -578,92 +789,44 @@ public static async Task DeleteVaultObjects(this VaultOnline vault, IEnumerable< throw new VaultException("Cannot delete root folder."); } - if (folder.FolderType == FolderType.SharedFolder) + var parent = vault.GetFolder(folder.ParentUid); + preDeleteObjects[folder.FolderUid] = new PreDeleteObject { - sharedFoldersToDelete[folder.FolderUid] = Tuple.Create(vault.GetSharedFolder(folder.FolderUid), teamUid); - } - else - { - var parent = vault.GetFolder(folder.ParentUid); - preDeleteObjects[folder.FolderUid] = new PreDeleteObject - { - fromUid = string.IsNullOrEmpty(parent.FolderUid) ? null : parent.FolderUid, - fromType = parent.FolderType == FolderType.UserFolder - ? FolderType.UserFolder.GetFolderTypeText() - : FolderType.SharedFolderFolder.GetFolderTypeText(), - objectUid = folder.FolderUid, - objectType = folder.FolderType.GetFolderTypeText(), - deleteResolution = "unlink", - }; - } + fromUid = string.IsNullOrEmpty(parent.FolderUid) ? null : parent.FolderUid, + fromType = parent.FolderType == FolderType.UserFolder + ? FolderType.UserFolder.GetFolderTypeText() + : FolderType.SharedFolderFolder.GetFolderTypeText(), + objectUid = folder.FolderUid, + objectType = folder.FolderType.GetFolderTypeText(), + deleteResolution = "unlink", + }; } } - if (sharedFoldersToDelete.Count > 0) + if (preDeleteObjects.Count > 0) { - var requests = new List(); - var recordCount = 0; - foreach (var tuple in sharedFoldersToDelete.Values) + var preRequest = new PreDeleteCommand { - var sharedFolder = tuple.Item1; - var teamUid = tuple.Item2; - recordCount += sharedFolder.RecordPermissions?.Count ?? 0; - requests.Add(new SharedFolderUpdateCommand - { - pt = vault.Auth.AuthContext.SessionToken.Base64UrlEncode(), - operation = "delete", - shared_folder_uid = tuple.Item1.Uid, - from_team_uid = tuple.Item2, - }); - } + objects = preDeleteObjects.Values.ToArray(), + }; + var preResponse = await vault.Auth.ExecuteAuthCommand(preRequest); var ok = forceDelete || vault.VaultUi == null; if (!ok) { - var confirmation = $"Your request will result in the deletion of:\n{sharedFoldersToDelete.Count} Shared Folder(s)"; - if (recordCount > 0) - { - confirmation += $"{recordCount} Record(s)"; - } - - ok = await vault.VaultUi.Confirmation(confirmation); - if (ok) - { - foreach (var rq in requests) - { - _ = vault.Auth.ExecuteAuthCommand(rq); - } - } + ok = await vault.VaultUi.Confirmation(string.Join("\n", preResponse.preDeleteResponse.wouldDelete.deletionSummary)); } - } - else - { - if (preDeleteObjects.Count > 0) - { - var preRequest = new PreDeleteCommand - { - objects = preDeleteObjects.Values.ToArray(), - }; - var preResponse = await vault.Auth.ExecuteAuthCommand(preRequest); - var ok = forceDelete || vault.VaultUi == null; - if (!ok) - { - ok = await vault.VaultUi.Confirmation(string.Join("\n", preResponse.preDeleteResponse.wouldDelete.deletionSummary)); - } - - if (ok) + if (ok) + { + await vault.Auth.ExecuteAuthCommand(new DeleteCommand { - await vault.Auth.ExecuteAuthCommand(new DeleteCommand - { - preDeleteToken = preResponse.preDeleteResponse.preDeleteToken, - }); - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); - } + preDeleteToken = preResponse.preDeleteResponse.preDeleteToken, + }); } } - await vault.ScheduleSyncDown(TimeSpan.FromSeconds(0)); + await vault.ScheduleSyncDown(TimeSpan.FromMilliseconds(100)); } } -} +} \ No newline at end of file diff --git a/KeeperSdk/vault/VaultTypes.cs b/KeeperSdk/vault/VaultTypes.cs index 3109d34..2355d66 100644 --- a/KeeperSdk/vault/VaultTypes.cs +++ b/KeeperSdk/vault/VaultTypes.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using KeeperSecurity.Commands; using KeeperSecurity.Utils; +using System.Collections; namespace KeeperSecurity.Vault { @@ -47,20 +48,46 @@ public interface IVaultData /// Gets the number of all records in the vault. /// int RecordCount { get; } + /// /// Get the list of all records in the vault. /// + IEnumerable KeeperRecords { get; } + /// + /// Gets the Keeper record associated with the specified record UID from a record cache. + /// + /// Record UID + /// When this method returns true, contains requested record; otherwise null + /// true in the vault contains a record with specified UID; otherwise, false + /// + bool TryGetKeeperRecord(string recordUid, out KeeperRecord record); + + /// + /// Tries to load a Keeper from storage. + /// The loaded record can be modified and discarded without changing a record cache. + /// + /// Record UID + /// When this method returns true, contains requested record; otherwise null + /// true in the vault contains a record with specified UID; otherwise, false + /// + bool TryLoadKeeperRecord(string recordUid, out KeeperRecord record); + + /// + /// Get the list of all legacy records in the vault. + /// + [Obsolete("Use KeeperRecords")] IEnumerable Records { get; } /// - /// Gets the record associated with the specified record UID. + /// Gets the legacy record associated with the specified record UID. /// /// Record UID. /// When this method returns true, contains requested record; otherwise null. /// true in the vault contains a record with specified UID; otherwise, false + [Obsolete("Use TryGetKeeperRecord")] bool TryGetRecord(string recordUid, out PasswordRecord record); /// - /// Gets the number of all shared folders in the vault. + /// Gets number of all shared folders in the vault. /// int SharedFolderCount { get; } /// @@ -68,7 +95,7 @@ public interface IVaultData /// IEnumerable SharedFolders { get; } /// - /// Gets the shared folder associated with the specified record UID. + /// Gets shared folder associated with a specified record UID. /// /// Shared Folder UID /// When this method returns true, contains requested shared folder; otherwise null. @@ -80,11 +107,11 @@ public interface IVaultData /// int TeamCount { get; } /// - /// Get the list of all teams user is member of. + /// Get list of all teams user is member of. /// IEnumerable Teams { get; } /// - /// Gets the team associated with the specified team UID. + /// Gets a team associated with a specified team UID. /// /// Team UID. /// When this method returns true, contains requested team; otherwise null. @@ -98,6 +125,34 @@ public interface IVaultData /// Record UID /// Non shared data associated with the record T LoadNonSharedData(string recordUid) where T : RecordNonSharedData, new(); + + /// + /// Gets list of all registered record types. + /// + IEnumerable RecordTypes { get; } + /// + /// Gets record type meta data associated with the record type name. + /// + /// Record type name. + /// When this method returns true, contains requested record type; otherwise null. + /// true if record type exists; otherwise, false. + bool TryGetRecordTypeByName(string name, out RecordType recordType); + + /// + /// Gets number of all Keeper Secret Manager Applications. + /// + int ApplicationCount { get; } + /// + /// Gets list of all Keeper Secret Manager Applications. + /// + IEnumerable KeeperApplications { get; } + /// + /// Gets a KSM application associated with a specified team UID. + /// + /// Team UID. + /// When this method returns true, contains requested team; otherwise null. + /// true in the vault contains a application with specified UID; otherwise, false. + bool TryGetKeeperApplication(string applicationUid, out ApplicationRecord application); } /// @@ -160,6 +215,60 @@ public interface IVaultUi Task Confirmation(string information); } + /// + /// Represents an exception that occurs when current user requests other user's public for the first time. + /// + public class NoActiveShareWithUserException : Authentication.KeeperApiException + { + /// + public NoActiveShareWithUserException(string username, string code, string message) : base(code, message) + { + Username = username; + } + + /// + /// Gets user email to send share invite + /// + public string Username { get; } + } + + [Flags] + public enum RecordChange + { + RecordType = 1 << 0, + Title = 1 << 1, + Login = 1 << 2, + Password = 1 << 3, + Url = 1 << 4, + Totp = 1 << 5, + Hostname = 1 << 6, + Address = 1 << 7, + PaymentCard = 1 << 8, + Notes = 1 << 9, + File = 1 << 10, + CustomField = 1 << 11, + } + + /// + /// Represents a record history + /// + public class RecordHistory + { + /// + /// Keeper record + /// + public KeeperRecord KeeperRecord { get; internal set; } + /// + /// User modified the record + /// + public string Username { get; internal set; } + /// + /// Summary of changes + /// + public RecordChange RecordChange { get; internal set; } + } + + /// /// Defines methods for modifying the vault records and folders. /// @@ -176,26 +285,46 @@ public interface IVault : IVaultData /// bool AutoSync { get; set; } + /// + /// Records "open_record" audit event for enterprise accounts + /// + /// + void AuditLogRecordOpen(string recordUid); + + /// + /// Records "copy_password" audit event for enterprise accounts + /// + /// + void AuditLogRecordCopyPassword(string recordUid); + /// /// Creates a password record. /// - /// Password Record. + /// Keeper Record. /// Folder UID where the record to be created. Optional. /// A task returning created password record. /// - Task CreateRecord(PasswordRecord record, string folderUid = null); + Task CreateRecord(KeeperRecord record, string folderUid = null); /// /// Modifies a password record. /// - /// Password Record. + /// Keeper Record. /// Do not update file attachment information on the record. - /// A task returning created password record. + /// A task returning updated password record. /// - Task UpdateRecord(PasswordRecord record, bool skipExtra = true); + Task UpdateRecord(KeeperRecord record, bool skipExtra = true); /// - /// Deletes password records. + /// Modifies multiple password records. + /// + /// Keeper Records. + /// A task returning record update statuses. + /// + Task> UpdateRecords(IEnumerable records); + + /// + /// Deletes records. /// /// an array of record paths. /// Awaitable task. @@ -229,7 +358,7 @@ public interface IVault : IVaultData /// Parent Folder UID. /// Shared Folder creation options. Optional. /// A task returning created folder. - /// Pass parameter to create a Shared Folder. + /// Pass sharedFolderOptions parameter to create a Shared Folder. /// /// Task CreateFolder(string name, string parentFolderUid = null, SharedFolderOptions sharedFolderOptions = null); @@ -242,6 +371,15 @@ public interface IVault : IVaultData /// Task RenameFolder(string folderUid, string newName); /// + /// Renames a folder. + /// + /// Folder UID. + /// New folder name. + /// Shared Folder creation options. Optional. + /// A task returning renamed folder. + /// + Task UpdateFolder(string folderUid, string newName, SharedFolderOptions sharedFolderOptions = null); + /// /// Moves a folder to the another folder. /// /// Source Folder UID. @@ -257,6 +395,182 @@ public interface IVault : IVaultData /// Awaitable task. /// Task DeleteFolder(string folderUid); + + /// + /// Retrieves all enterprise team descriptions. + /// + /// A list of all enterprise teams. (awaitable) + Task> GetTeamsForShare(); + + /// + /// Retrieves all known users for sharing + /// + /// + Task GetUsersForShare(); + + /// + /// Gets user public keys. + /// + /// + /// + /// + /// Awaitable task returning RSA and ECC public keys + Task> GetUserPublicKeys(string username); + + /// + /// Sends share invitation request to the user. + /// + /// User email + /// Awaitable task + /// + Task SendShareInvitationRequest(string username); + + /// + /// Retrieves record sharing information. + /// + /// List of record UIDs + /// Awaitable task returning record share details + Task> GetSharesForRecords(IEnumerable recordUids); + + /// + /// Cancels all shares with a user. + /// + /// User account email. + /// Awaitable task. + /// + Task CancelSharesWithUser(string username); + + /// + /// Shares a record with a user + /// + /// Record UID. + /// User account email + /// Can record be re-shared + /// Can record be modified + /// + /// Awaitable task. + Task ShareRecordWithUser(string recordUid, string username, bool? canReshare, bool? canEdit); + + /// + /// Transfers a record to user + /// + /// Record UID. + /// User account email + /// Awaitable task. + Task TransferRecordToUser(string recordUid, string username); + + /// + /// Removes a record share from a user + /// + /// Record UID. + /// User account email + /// Awaitable task. + Task RevokeShareFromUser(string recordUid, string username); + + Task GetRecordHistory(string recordUid); + } + + /// + /// Defines properties of Secrets Manager configuration + /// + public interface ISecretManagerConfiguration + { + /// + /// Keeper Hostname + /// + string Hostname { get; } + /// + /// Client or Device ID + /// + string ClientId { get; } + /// + /// Device Private Key + /// + string PrivateKey { get; } + /// + /// Application Key + /// + string AppKey { get; } + /// + string ServerPublicKeyId { get; } + /// + /// Public Key for record creation + /// + string AppOwnerPublicKey { get; } + } + /// + /// Define methods for Keeper Secret Maneger (KSM) + /// + public interface ISecretManager + { + /// + /// Gets Keeper Secret Manager Application Details + /// + /// Application UID. + /// Force reloading + /// Secret Manager Application Info + Task GetSecretManagerApplication(string applicationUid, bool force = true); + + /// + /// Creates Secret Manager Application + /// + /// Application Title + /// Application Record + Task CreateSecretManagerApplication(string title); + + /// + /// Deletes Secret Manager Application + /// + /// + /// Awaitable Task + Task DeleteSecretManagerApplication(string applicationId); + + + /// + /// Grants Shared Folder or Record Access to Secret Manager Application + /// + /// Application ID + /// Shared Folder or Record UID + /// permission to edit + /// Secret Manager Application + Task ShareToSecretManagerApplication(string applicationId, string sharedFolderOrRecordUid, bool canEdit); + + /// + /// Revokes Shared Folder or Record access from Secret Manager Application + /// + /// Application ID + /// Shared Folder or Record UID + /// Secret Manager Application + Task UnshareFromSecretManagerApplication(string applicationId, string sharedFolderOrRecordUid); + + /// + /// Adds a client/device to Secret Manager Application + /// + /// Application ID + /// Optional. If false the first call from the client locks IP. If true no IP locking + /// Optional. First access duration in minutes. Default: an hour (60). Maximum: a day (1440) + /// Optional. Access Expiration duration in minutes. + /// Optional. Client/Device name + /// Tuple: Client Device, Client Key + Task> AddSecretManagerClient( + string applicationId, bool? unlockIp=null, int? firstAccessExpireInMinutes=null, + int? AccessExpiresInMinutes=null, string name=null); + + /// + /// Creates SecretsManager Configuration Storage + /// + /// One time token + /// Configuration Storage + Task GetConfiguration(string oneTimeToken); + + /// + /// Deletes a client/device from Secret Manager Application + /// + /// Application ID + /// Device ID or Name + /// Awaitable Task + Task DeleteSecretManagerClient(string applicationId, string deviceId); + } /// @@ -270,13 +584,14 @@ public interface IVaultSharedFolder /// /// Shared Folder UID. /// User email or Team UID. - /// Type of parameter. + /// Type of userId parameter. /// Shared Folder User Permissions. /// Awaitable task. /// - /// If parameter is null then user gets default user permissions when added./> + /// If optionsc> parameter is null then user gets default user permissions when added./> /// /// + /// /// Task PutUserToSharedFolder(string sharedFolderUid, string userId, UserType userType, ISharedFolderUserOptions options = null); /// @@ -284,7 +599,7 @@ public interface IVaultSharedFolder /// /// Shared Folder UID. /// User email or Team UID. - /// Type of parameter. + /// Type of userId parameter. /// Awaitable task. /// Task RemoveUserFromSharedFolder(string sharedFolderUid, string userId, UserType userType); @@ -335,126 +650,641 @@ public interface IAttachmentUploadTask /// string Title { get; } /// - /// Attachment MIME type. + /// Attachment MIME type. + /// + string MimeType { get; } + /// + /// Attachment read stream. + /// + Stream Stream { get; } + + /// + /// Thumbnail upload task. Optional. + /// + IThumbnailUploadTask Thumbnail { get; } + } + + /// + /// Defines methods to manipulate file attachments. + /// + public interface IVaultFileAttachment + { + /// + /// Returns Record attachments + /// + /// Keeper record + /// List od attachments + IEnumerable RecordAttachments(KeeperRecord record); + + /// + /// Downloads and decrypts file attachment. + /// + /// Keeper record. + /// Attachment name, title, or ID. + /// Writable stream. + /// Awaitable task. + Task DownloadAttachment(KeeperRecord record, string attachment, Stream destination); + + /// + /// Encrypts and uploads file attachment. + /// + /// Keeper record + /// Upload task + /// Awaitable task. + Task UploadAttachment(KeeperRecord record, IAttachmentUploadTask uploadTask); + + /// + /// Deletes file attachment. + /// + /// Keeper record. + /// Attachment ID + /// Awaitable task. + Task DeleteAttachment(KeeperRecord record, string attachmentId); + } + + /// + /// The exception that is thrown by the Vault module. + /// + public class VaultException : Exception + { + /// + public VaultException(string message) : base(message) + { + } + /// + public VaultException(string translationKey, string message) : base(message) + { + TranslationKey = translationKey; + } + + /// + public string TranslationKey { get; } + } + + /// + /// Represents generic Keeper Record + /// + public abstract class KeeperRecord + { + /// + /// Record UID. + /// + public string Uid { get; set; } + /// + /// Record version + /// + public int Version { get; set; } + /// + /// Record revision + /// + public long Revision { get; set; } + /// + /// Title. + /// + public string Title { get; set; } + /// + /// Last modification time. + /// + public DateTimeOffset ClientModified { get; internal set; } + /// + /// Is user Owner? + /// + public bool Owner { get; set; } + /// + /// Is record Shared? + /// + public bool Shared { get; set; } + /// + /// Record key. + /// + public byte[] RecordKey { get; set; } + } + + /// + public interface ICustomField + { + string Type { get; } + string Name { get; } + string Value { get; set; } + } + + /// + /// Defines properties for typed record field + /// + public interface ITypedField : IRecordTypeField + { + /// + /// Gets or sets the first field value + /// + object ObjectValue { get; set; } + + /// + /// Gets default field value. + /// + /// + object AppendValue(); + + /// + /// Deletes value at index. + /// + /// Index + void DeleteValueAt(int index); + + /// + /// Gets value at index + /// + /// Index + /// + object GetValueAt(int index); + + /// + /// Sets value at index. + /// + /// Index + /// Value + void SetValueAt(int index, object value); + + /// + /// Gets the number of values + /// + int Count { get; } + + /// + /// Gets required flag + /// + bool Required { get; set; } + } + + /// + /// Represents a Typed Record + /// + /// + public class TypedRecord : KeeperRecord + { + /// + /// Record notes + /// + public string Notes { get; set; } + + /// + /// Record type name. + /// + public string TypeName { get; set; } + + /// + public TypedRecord(string typeName) + { + TypeName = typeName; + } + /// + /// Record mandatory fields. + /// + public List Fields { get; } = new List(); + /// + /// Record custom data. + /// + public List Custom { get; } = new List(); + + internal Dictionary LinkedKeys; + } + + internal interface IToRecordTypeDataField + { + RecordTypeDataFieldBase ToRecordTypeDataField(); + } + + /// + public class UnsupportedField : ITypedField, IToRecordTypeDataField + { + private readonly RecordTypeDataFieldBase _dataField; + internal UnsupportedField(RecordTypeDataFieldBase dataField) + { + _dataField = dataField; + Required = dataField.Required; + } + + RecordTypeDataFieldBase IToRecordTypeDataField.ToRecordTypeDataField() + { + return _dataField; + } + + object ITypedField.ObjectValue { + get => null; + set { } + } + + object ITypedField.AppendValue() + { + return null; + } + + object ITypedField.GetValueAt(int index) + { + return null; + } + + void ITypedField.SetValueAt(int index, object value) + { + } + + void ITypedField.DeleteValueAt(int index) + { + } + int ITypedField.Count => 0; + + string IRecordTypeField.FieldName => _dataField.Type; + string IRecordTypeField.FieldLabel => _dataField.Label; + + public bool Required { get; set; } + } + + /// + /// Defines methods for typed field serialization + /// + public interface ISerializeTypedField + { + /// + /// Imports the content of typed field from text + /// + /// external field representation + void ImportTypedField(string text); + /// + /// Exports typed field to text + /// + /// external field representation + string ExportTypedField(); + } + + + + /// + /// Represents a typed field. + /// + /// Field Data Type + public class TypedField : ITypedField, IToRecordTypeDataField, ISerializeTypedField + { + internal TypedField(RecordTypeDataField dataField) + { + FieldName = dataField.Type; + FieldLabel = dataField.Label; + if (dataField.Value != null) + { + Values.AddRange(dataField.Value); + } + } + + /// + public TypedField() : this("") + { + } + + /// + public TypedField(string fieldType, string fieldLabel = null) + { + FieldName = string.IsNullOrEmpty(fieldType) ? "text" : fieldType; + FieldLabel = fieldLabel ?? ""; + } + + /// + /// Field type name. + /// + public string FieldName { get; } + + /// + /// Field Label. + /// + public string FieldLabel { get; set; } + + /// + /// Field values. + /// + public List Values { get; } = new List(); + + /// + public bool Required { get; set; } + + public T AppendTypedValue() + { + switch (Values) + { + case List ls: + ls.Add(""); + break; + case List ll: + ll.Add(0); + break; + case List lf: + lf.Add(false); + break; + default: + Values.Add((T) Activator.CreateInstance(typeof(T))); + break; + } + + return Values.Last(); + } + + /// + /// Default field value. + /// + public T TypedValue + { + get + { + if (Values.Count == 0) + { + return AppendTypedValue(); + } + + return Values[0]; + } + set + { + if (Values.Count == 0) + { + Values.Add(value); + } + else + { + Values[0] = value; + } + } + } + + /// + public object ObjectValue + { + get => TypedValue; + set + { + if (value is T tv) + { + TypedValue = tv; + } + else if (value is string sv) + { + var o = (object) TypedValue; + if (o is IFieldTypeSerialize fts) + { + fts.SetValueAsString(sv); + } + else + { + if (o is long lv) + { + if (sv.All(y => char.IsDigit(y))) + { + o = long.Parse(sv); + } + else if (FieldName == "date") + { + var dt = DateTimeOffset.Parse(sv); + o = dt.ToUnixTimeMilliseconds(); + } + } + else if (o is bool) { + o = (new string[] { "1", "on", "true" }).Any(y => string.Equals(y, sv, StringComparison.InvariantCultureIgnoreCase)); + } + TypedValue = (T) o; + } + } + else if (value is IDictionary dv) + { + var o = TypedValue; + if (o is IFieldTypeSerialize fts) + { + foreach (var key in dv.Keys) + { + var fv = dv[key]; + if (key is string skey && fv is string sfv) + { + fts.SetElementValue(skey, sfv); + } + } + } + TypedValue = o; + } + else + { + TypedValue = (T) value; + } + } + } + + /// + /// Gets field value at index /// - string MimeType { get; } + /// value index + /// + public object GetValueAt(int index) + { + if (index >= 0 && index < Values.Count) + { + return Values[index]; + } + + return default(T); + } + /// - /// Attachment read stream. + /// Deletes field value at index /// - Stream Stream { get; } + /// Value index + public void DeleteValueAt(int index) + { + if (index >= 0 && index < Values.Count) + { + Values.RemoveAt(index); + } + } /// - /// Thumbnail upload task. Optional. + /// Sets field value at index /// - IThumbnailUploadTask Thumbnail { get; } - } + /// Value index + /// Value + public void SetValueAt(int index, object value) + { + if (index >= 0 && index < Values.Count) + { + if (value is T tv) + { + Values[index] = tv; + } + } + } - /// - /// Defines methods to manipulate file attachments. - /// - public interface IVaultFileAttachment - { /// - /// Downloads and decrypts file attachment. + /// Value Count /// - /// Keeper record. - /// Attachment name, title, or ID. - /// Writable stream. - /// Awaitable task. - Task DownloadAttachment(PasswordRecord record, string attachment, Stream destination); + public int Count => Values.Count; + + RecordTypeDataFieldBase IToRecordTypeDataField.ToRecordTypeDataField() + { + return new RecordTypeDataField(this); + } + /// - /// Encrypts and uploads file attachment. + /// Appends a value. /// - /// Keeper record. - /// Upload task - /// Awaitable task. - Task UploadAttachment(PasswordRecord record, IAttachmentUploadTask uploadTask); - } - - /// - /// The exception that is thrown by the Vault module. - /// - public class VaultException : Exception - { - /// - public VaultException(string message) : base(message) + /// Default value + object ITypedField.AppendValue() { + return AppendTypedValue(); } - /// - public VaultException(string translationKey, string message) : base(message) + + void ISerializeTypedField.ImportTypedField(string text) { - TranslationKey = translationKey; + Values.Clear(); + if (string.IsNullOrEmpty(text)) + { + return; + } + + switch (Values) + { + case List ls: + ls.AddRange(text.Split('\n').Select(x => x.Replace("\\n", "\n").Trim())); + break; + case List ll: + { + ll.AddRange(text.Split('\n').Select(x => x.Trim()).Select(x => + { + if (x.All(y => char.IsDigit(y))) + { + return long.Parse(x); + } + else if (FieldName == "date") + { + var dt = DateTimeOffset.Parse(x); + return dt.ToUnixTimeMilliseconds(); + } + return 0; + }).Where(x => x > 0)); + } + break; + case List lb: + lb.AddRange(text.Split('\n').Select(x => + { + return (new string[] { "1", "on", "true"}).Any(y => string.Equals(y, "on", StringComparison.InvariantCultureIgnoreCase)); + })); + break; + + default: + if (typeof(IFieldTypeSerialize).IsAssignableFrom(typeof(T))) + { + Values.AddRange(text.Split('\n').Select(x => + { + var v = Activator.CreateInstance(); + ((IFieldTypeSerialize)v).SetValueAsString(x); + return v; + })); + } + else + { + throw new Exception($"Field type {typeof(T).Name} does not support serialization."); + } + break; + } } + string ISerializeTypedField.ExportTypedField() + { + if (Values.Count == 0) + { + return ""; + } + switch (Values) + { + case List ls: + return string.Join("\n", ls.Where(x => !string.IsNullOrEmpty(x)).Select(x => x.Replace("\n", "\\n"))); - /// - public string TranslationKey { get; } + case List ll: + { + return string.Join("\n", ll.Where(x => x > 0).Select(x => + { + if (FieldName == "date") + { + var dt = DateTimeOffsetExtensions.FromUnixTimeMilliseconds(x).Date; + return dt.ToString("yyyy-MM-dd"); + } + else + { + return x.ToString(); + } + })); + } + case List lb: + return string.Join("\n", lb.Select(x => x ? "1" : "0")); + + default: + if (typeof(IFieldTypeSerialize).IsAssignableFrom(typeof(T))) + { + return string.Join("\n", Values.OfType().Select(x => x.GetValueAsString()).Where(x => !string.IsNullOrEmpty(x))); + } + else + { + throw new Exception($"Field type {typeof(T).Name} does not support serialization."); + } + } + } } /// - /// Represents a decrypted Keeper Password Record. + /// Represents a Legacy Keeper Record. /// - public class PasswordRecord + public class PasswordRecord : KeeperRecord { /// - /// Record UID. - /// - public string Uid { get; set; } - /// - /// Is user Owner? - /// - public bool Owner { get; set; } - /// - /// Is record Shared? + /// Notes. /// - public bool Shared { get; set; } + public string Notes { get; set; } - /// - /// Title. - /// - public string Title { get; set; } /// /// Login or Username. /// public string Login { get; set; } + /// /// Password. /// public string Password { get; set; } + /// /// Web URL. /// public string Link { get; set; } + /// - /// Notes. - /// - public string Notes { get; set; } - /// - /// Last modification time. + /// TOTP URL. /// - public DateTimeOffset ClientModified { get; internal set; } + public string Totp { get; set; } + /// /// A list of Custom Fields. /// public IList Custom { get; } = new List(); + /// /// A list of Attachments. /// public IList Attachments { get; } = new List(); + /// - /// A list of Extra Fields. - /// - public IList ExtraFields { get; } = new List(); - /// - /// Record key. + /// Gets a custom field. /// - public byte[] RecordKey { get; set; } + /// Custom field Name. + /// Returns custom field or null is it was not found. + public ICustomField GetCustomField(string name) + { + return Custom.FirstOrDefault(x => string.Equals(name, x.Name, StringComparison.CurrentCultureIgnoreCase)); + } /// /// Deletes a custom field. /// - /// Custom field name. + /// Custom field Name. /// Deleted custom field or null is it was not found. - public CustomField DeleteCustomField(string name) + public ICustomField DeleteCustomField(string name) { var cf = Custom.FirstOrDefault(x => string.Equals(name, x.Name, StringComparison.CurrentCultureIgnoreCase)); if (cf != null) @@ -464,7 +1294,6 @@ public CustomField DeleteCustomField(string name) return cf; } } - return null; } @@ -474,7 +1303,7 @@ public CustomField DeleteCustomField(string name) /// Name. /// Value. /// Added or modified custom field. - public CustomField SetCustomField(string name, string value) + public ICustomField SetCustomField(string name, string value) { var cf = Custom.FirstOrDefault(x => string.Equals(name, x.Name, StringComparison.CurrentCultureIgnoreCase)); if (cf == null) @@ -485,8 +1314,8 @@ public CustomField SetCustomField(string name, string value) }; Custom.Add(cf); } - cf.Value = value ?? ""; + cf.Value = value ?? ""; return cf; } } @@ -494,7 +1323,7 @@ public CustomField SetCustomField(string name, string value) /// /// Represents a custom field. /// - public class CustomField + public class CustomField : ICustomField { /// /// Custom field name. @@ -553,10 +1382,46 @@ public class AttachmentFileThumb public int Size { get; internal set; } } + /// + /// Defines property for file attachment + /// + public interface IAttachment + { + /// + /// Attachment ID. + /// + string Id { get; } + /// + /// Attachment name. + /// + /// Usually it is an original file name. + string Name { get; } + /// + /// Attachment title. + /// + string Title { get; } + /// + /// Attachment MIME type. + /// + string MimeType { get; } + /// + /// Attachment size in bytes. + /// + long Size { get; } + /// + /// Last time modified. + /// + DateTimeOffset LastModified { get; } + /// + /// Attachment encryption key. + /// + byte[] AttachmentKey { get; } + } + /// /// Represents attachment file. /// - public class AttachmentFile + public class AttachmentFile : IAttachment { /// /// Attachment ID. @@ -578,7 +1443,7 @@ public class AttachmentFile /// /// Attachment MIME type. /// - public string Type { get; set; } + public string MimeType { get; set; } /// /// Attachment size in bytes. /// @@ -591,8 +1456,188 @@ public class AttachmentFile /// A list of thumbnails. /// public AttachmentFileThumb[] Thumbnails { get; internal set; } + + byte[] IAttachment.AttachmentKey => string.IsNullOrEmpty(Key) ? null : Key.Base64UrlDecode(); + } + + /// + /// Represents a Keeper File Record. + /// + public class FileRecord : KeeperRecord, IAttachment + { + /// + /// File Name. + /// + public string Name { get; set; } + + /// + /// File MIME type. + /// + public string MimeType { get; set; } + + /// + /// File size in bytes. + /// + public long FileSize { get; set; } + + /// + /// File size in bytes. + /// + public long ThumbnailSize { get; set; } + + /// + /// Last time modified. + /// + public DateTimeOffset LastModified { get; set; } + + /// + /// On storage file size in bytes. + /// + public long? StorageFileSize { get; internal set; } + + /// + /// On storage thumbnail size in bytes. + /// + public long? StorageThumbnailSize { get; internal set; } + + string IAttachment.Id => Uid; + long IAttachment.Size => FileSize; + byte[] IAttachment.AttachmentKey => RecordKey; + } + + /// + /// Represents a Keeper Secret Manager Application Record. + /// + public class ApplicationRecord : KeeperRecord + { + /// + /// Application Type. + /// + public string Type { get; set; } + } + + /// + public class SecretsManagerDevice + { + public string Name { get; internal set; } + public string DeviceId { get; internal set; } + public DateTimeOffset CreatedOn { get; internal set; } + public DateTimeOffset? FirstAccess { get; internal set; } + public DateTimeOffset? LastAccess { get; internal set; } + public byte[] PublicKey { get; internal set; } + public bool LockIp { get; internal set; } + public string IpAddress { get; internal set; } + public DateTimeOffset? FirstAccessExpireOn { get; internal set; } + public DateTimeOffset? AccessExpireOn { get; internal set; } + } + + /// + public enum SecretManagerSecretType + { + Record = 0, + Folder = 1, + } + + /// + public class SecretManagerShare + { + public string SecretUid { get; internal set; } + public SecretManagerSecretType SecretType { get; internal set; } + public bool Editable { get; internal set; } + public DateTimeOffset CreatedOn { get; internal set; } + } + + /// + public class SecretsManagerApplication : ApplicationRecord + { + public SecretsManagerDevice[] Devices { get; internal set; } + public SecretManagerShare[] Shares { get; internal set; } + public bool IsExternalShare { get; internal set; } + } + + /// + /// Represents record permissions for user. + /// + public class UserRecordPermissions + { + /// + /// Keeper username. + /// + public string Username { get; internal set; } + /// + /// Flag indicating if the user has share permissions. + /// + public bool CanShare { get; internal set; } + /// + /// Flag indicating if the user has rights to edit the record + /// + public bool CanEdit { get; internal set; } + /// + /// Flag indicating if the user is record owner. + /// + public bool Owner { get; internal set; } + /// + /// Flag indicating if the user has pending invitation. + /// + public bool AwaitingApproval { get; internal set; } + } + + /// + /// Represents record permissions in shared folder. + /// + public class SharedFolderRecordPermissions + { + /// + /// Shared Folder UID. + /// + public string SharedFolderUid { get; internal set; } + /// + /// Flag indicating if the shared folder has share permissions. + /// + public bool CanShare { get; internal set; } + /// + /// Flag indicating if the shared folder has rights to edit the record + /// + public bool CanEdit { get; internal set; } + } + + /// + /// Represent record sharing information + /// + public class RecordSharePermissions + { + /// + /// Record UID + /// + public string RecordUid { get; internal set; } + /// + /// List of direct record share permissions + /// + public UserRecordPermissions[] UserPermissions { get; internal set; } + /// + /// List of shared folder permissions + /// + public SharedFolderRecordPermissions[] SharedFolderPermissions { get; internal set; } } + /// + /// Represent user list available for sharing + /// + public class ShareWithUsers + { + /// + /// Array of users shared from + /// + public string[] SharesFrom { get; internal set; } + /// + /// Array of users shared to + /// + public string[] SharesWith { get; internal set; } + /// + /// Array of users in the enterprise + /// + public string[] GroupUsers { get; internal set; } + } /// /// Specifies shared folder user type. /// @@ -716,22 +1761,6 @@ public class TeamInfo /// public class Team: TeamInfo { - internal Team() - { - } - - internal Team(IEnterpriseTeam et, byte[] teamKey) - { - TeamKey = teamKey; - var pk = et.TeamPrivateKey.Base64UrlDecode(); - TeamPrivateKey = CryptoUtils.LoadPrivateKey(CryptoUtils.DecryptAesV1(pk, teamKey)); - TeamUid = et.TeamUid; - Name = et.Name; - RestrictEdit = et.RestrictEdit; - RestrictShare = et.RestrictShare; - RestrictView = et.RestrictView; - } - /// /// Team restricts record edit. /// @@ -810,6 +1839,11 @@ public class FolderNode /// A UID list of records. /// public IList Records { get; } = new List(); + + /// + /// Folder key + /// + public byte[] FolderKey { get; internal set; } } /// @@ -876,4 +1910,4 @@ public static string GetFolderTypeText(this FolderType folderType) return FolderTypes[folderType]; } } -} \ No newline at end of file +} diff --git a/OfflineStorageSqlite/Configuration.cs b/OfflineStorageSqlite/Configuration.cs index 59521ba..4b0457e 100644 --- a/OfflineStorageSqlite/Configuration.cs +++ b/OfflineStorageSqlite/Configuration.cs @@ -15,7 +15,8 @@ internal class InternalConfiguration internal class SqliteConfigurationLoader : SqliteRecordStorage, IJsonConfigurationLoader { - public SqliteConfigurationLoader(Func getConnection, string ownerId) : base(getConnection, ownerId) + public SqliteConfigurationLoader(Func getConnection, Tuple owner = null) + : base(getConnection, owner) { } diff --git a/OfflineStorageSqlite/DatabaseUtils.cs b/OfflineStorageSqlite/DatabaseUtils.cs index 2a515b6..ce07879 100644 --- a/OfflineStorageSqlite/DatabaseUtils.cs +++ b/OfflineStorageSqlite/DatabaseUtils.cs @@ -16,14 +16,14 @@ public class TableSchema public string[] PrimaryKey { get; private set; } public string[] Index1 { get; private set; } public string[] Index2 { get; private set; } - public string PartitionColumnName { get; set; } + public string OwnerColumnName { get; set; } public readonly List Columns = new List(); public readonly Dictionary ColumnMap = new Dictionary(StringComparer.InvariantCultureIgnoreCase); - public void LoadSchema(Type tableType) + public TableSchema(Type tableType, string ownerColumnName = null) { foreach (var attr in tableType.GetCustomAttributes(true)) { @@ -38,9 +38,7 @@ public void LoadSchema(Type tableType) throw new Exception($"Class {tableType.FullName} is SQL table class"); } - PartitionColumnName = null; - Columns.Clear(); - ColumnMap.Clear(); + OwnerColumnName = ownerColumnName; foreach (var member in tableType.GetProperties()) { if (member.MemberType != MemberTypes.Property) continue; @@ -75,6 +73,45 @@ static DatabaseUtils() TypeMap[typeof(string)] = ColumnType.String; } + public static DbType GetDbType(ColumnType columnType) + { + switch (columnType) + { + case ColumnType.Boolean: + return DbType.Boolean; + case ColumnType.Integer: + return DbType.Int32; + case ColumnType.Long: + return DbType.Int64; + case ColumnType.Decimal: + return DbType.Decimal; + case ColumnType.String: + return DbType.String; + default: + return DbType.String; + } + } + + public static string GetAddColumnStatement(TableSchema schema, string columnName) + { + var columnInfo = schema.ColumnMap + .Where(x => x.Key.Equals(columnName, StringComparison.InvariantCultureIgnoreCase)) + .Select(x => x.Value) + .FirstOrDefault(); + if (columnInfo == null) { + return null; + } + + var sqlAttr = columnInfo.GetCustomAttribute(); + + if (!TypeMap.TryGetValue(columnInfo.PropertyType, out var colType)) + { + colType = ColumnType.String; + } + + return $"ALTER TABLE {schema.TableName} ADD COLUMN {columnName} {GetSqliteType(colType)} NULL"; + } + public static IEnumerable GetDDLStatements(TableSchema schema) { var keys = new HashSet(StringComparer.InvariantCultureIgnoreCase); @@ -95,9 +132,9 @@ public static IEnumerable GetDDLStatements(TableSchema schema) var sb = new StringBuilder(); sb.Append($"CREATE TABLE {schema.TableName} (\n"); - if (!string.IsNullOrEmpty(schema.PartitionColumnName)) + if (!string.IsNullOrEmpty(schema.OwnerColumnName)) { - sb.Append($"\t{schema.PartitionColumnName} TEXT NOT NULL,\n"); + sb.Append($"\t{schema.OwnerColumnName} TEXT NOT NULL,\n"); } foreach (var column in schema.Columns) @@ -116,9 +153,9 @@ public static IEnumerable GetDDLStatements(TableSchema schema) } var idx = new List(); - if (!string.IsNullOrEmpty(schema.PartitionColumnName)) + if (!string.IsNullOrEmpty(schema.OwnerColumnName)) { - idx.Add(schema.PartitionColumnName); + idx.Add(schema.OwnerColumnName); } if (schema.PrimaryKey != null) @@ -132,16 +169,16 @@ public static IEnumerable GetDDLStatements(TableSchema schema) yield return sb.ToString(); var indexNo = 0; - foreach (var index in new[] {schema.Index1, schema.Index2}) + foreach (var index in new[] { schema.Index1, schema.Index2 }) { if (index == null) continue; indexNo++; sb.Length = 0; idx.Clear(); - if (!string.IsNullOrEmpty(schema.PartitionColumnName)) + if (!string.IsNullOrEmpty(schema.OwnerColumnName)) { - idx.Add(schema.PartitionColumnName); + idx.Add(schema.OwnerColumnName); } idx.AddRange(index); @@ -179,55 +216,55 @@ public static IEnumerable PopulateDataObjects(this TableSchema schema, I var column = schema.ColumnMap[schema.Columns[i]]; if (column.PropertyType == typeof(string)) { - column.SetMethod.Invoke(data, new object[] {reader.GetString(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetString(i) }); } else if (column.PropertyType == typeof(bool)) { - column.SetMethod.Invoke(data, new object[] {reader.GetBoolean(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetBoolean(i) }); } else if (column.PropertyType == typeof(int)) { - column.SetMethod.Invoke(data, new object[] {reader.GetInt32(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetInt32(i) }); } else if (column.PropertyType == typeof(uint)) { - column.SetMethod.Invoke(data, new object[] {(uint) reader.GetInt32(i)}); + column.SetMethod.Invoke(data, new object[] { (uint) reader.GetInt32(i) }); } else if (column.PropertyType == typeof(long)) { - column.SetMethod.Invoke(data, new object[] {reader.GetInt64(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetInt64(i) }); } else if (column.PropertyType == typeof(ulong)) { - column.SetMethod.Invoke(data, new object[] {(ulong) reader.GetInt64(i)}); + column.SetMethod.Invoke(data, new object[] { (ulong) reader.GetInt64(i) }); } else if (column.PropertyType == typeof(byte)) { - column.SetMethod.Invoke(data, new object[] {reader.GetByte(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetByte(i) }); } else if (column.PropertyType == typeof(sbyte)) { - column.SetMethod.Invoke(data, new object[] {(sbyte) reader.GetByte(i)}); + column.SetMethod.Invoke(data, new object[] { (sbyte) reader.GetByte(i) }); } else if (column.PropertyType == typeof(short)) { - column.SetMethod.Invoke(data, new object[] {reader.GetInt16(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetInt16(i) }); } else if (column.PropertyType == typeof(ushort)) { - column.SetMethod.Invoke(data, new object[] {(ushort) reader.GetInt16(i)}); + column.SetMethod.Invoke(data, new object[] { (ushort) reader.GetInt16(i) }); } else if (column.PropertyType == typeof(float)) { - column.SetMethod.Invoke(data, new object[] {reader.GetFloat(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetFloat(i) }); } else if (column.PropertyType == typeof(double)) { - column.SetMethod.Invoke(data, new object[] {reader.GetDouble(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetDouble(i) }); } else if (column.PropertyType == typeof(decimal)) { - column.SetMethod.Invoke(data, new object[] {reader.GetDecimal(i)}); + column.SetMethod.Invoke(data, new object[] { reader.GetDecimal(i) }); } } @@ -235,31 +272,65 @@ public static IEnumerable PopulateDataObjects(this TableSchema schema, I } } - public static bool VerifyDatabase(bool tryCreateMissingTables, DbConnection connection, IEnumerable tables, List ddlStatements) + public static bool VerifyDatabase(bool tryCreateMissingTables, DbConnection connection, IEnumerable schemas, List ddlStatements) { - var allTables = new HashSet(StringComparer.InvariantCultureIgnoreCase); + var allTables = new Dictionary>(StringComparer.InvariantCultureIgnoreCase); var dbTables = connection.GetSchema("Tables"); if (dbTables.Columns.Contains("TABLE_NAME")) { foreach (DataRow row in dbTables.Rows) { - allTables.Add(row["TABLE_NAME"].ToString()); + var tableName = row["TABLE_NAME"].ToString(); + allTables.Add(tableName, new HashSet(StringComparer.InvariantCultureIgnoreCase)); } } - var result = true; - using (var cmd = connection.CreateCommand()) + var dbColumns = connection.GetSchema("Columns"); + if (dbColumns.Columns.Contains("TABLE_NAME") && dbColumns.Columns.Contains("COLUMN_NAME")) { - var schema = new TableSchema(); + foreach (DataRow row in dbColumns.Rows) + { + var tableName = row["TABLE_NAME"].ToString(); + if (allTables.ContainsKey(tableName)) + { + allTables[tableName].Add(row["COLUMN_NAME"].ToString()); + } + } + } - foreach (var table in tables) + var result = true; + var statements = new List(); + foreach (var schema in schemas) + { + if (allTables.ContainsKey(schema.TableName)) + { + var columns = allTables[schema.TableName]; + if (columns.Count > 0) + { + foreach (var columnName in schema.Columns) + { + if (!columns.Contains(columnName)) + { + var stmt = GetAddColumnStatement(schema, columnName); + if (!string.IsNullOrEmpty(stmt)) + { + statements.Add(stmt); + } + } + } + } + } + else { - schema.LoadSchema(table); - if (allTables.Contains(schema.TableName)) continue; + statements.AddRange(GetDDLStatements(schema)); + } + } - var stmts = DatabaseUtils.GetDDLStatements(schema).ToArray(); - foreach (var stmt in stmts) + if (statements.Count > 0) { + using (var cmd = connection.CreateCommand()) + { + foreach (var stmt in statements) { try { @@ -279,183 +350,4 @@ public static bool VerifyDatabase(bool tryCreateMissingTables, DbConnection conn return result; } } - - internal abstract class SqliteStorage : TableSchema - { - public const string OwnerColumnName = "OwnerId"; - - protected SqliteStorage(Func getConnection, string ownerId, Type tableType) - { - LoadSchema(tableType); - PartitionColumnName = OwnerColumnName; - GetConnection = getConnection; - OwnerId = ownerId; - } - - private string _selectStatement; - - public IDbCommand GetSelectStatement() - { - lock (this) - { - if (string.IsNullOrEmpty(_selectStatement)) - { - _selectStatement = $"SELECT {string.Join(", ", Columns)} " - + $"FROM {TableName} " - + $"WHERE {PartitionColumnName} = @{PartitionColumnName}"; - } - } - - var cmd = GetConnection().CreateCommand(); - cmd.CommandText = _selectStatement; - var ownerParameter = cmd.CreateParameter(); - ownerParameter.ParameterName = $"@{PartitionColumnName}"; - ownerParameter.DbType = DbType.String; - ownerParameter.Direction = ParameterDirection.Input; - ownerParameter.Value = OwnerId; - cmd.Parameters.Add(ownerParameter); - - return cmd; - } - - private string _deleteStatement; - - public IDbCommand GetDeleteStatement() - { - lock (this) - { - if (string.IsNullOrEmpty(_deleteStatement)) - { - _deleteStatement = $"DELETE FROM {TableName} WHERE @{PartitionColumnName} = @{PartitionColumnName}"; - } - } - - var cmd = GetConnection().CreateCommand(); - cmd.CommandText = _deleteStatement; - var ownerParameter = cmd.CreateParameter(); - ownerParameter.ParameterName = $"@{PartitionColumnName}"; - ownerParameter.DbType = DbType.String; - ownerParameter.Direction = ParameterDirection.Input; - ownerParameter.Value = OwnerId; - cmd.Parameters.Add(ownerParameter); - - return cmd; - } - - private string _putStatement; - - public IDbCommand GetPutStatement() - { - lock (this) - { - if (string.IsNullOrEmpty(_putStatement)) - { - _putStatement = $"INSERT OR REPLACE INTO {TableName} ({PartitionColumnName}, {string.Join(", ", Columns)}) " - + $"VALUES (@{PartitionColumnName}, {string.Join(", ", Columns.Select(x => "@" + x))})"; - } - } - - var cmd = GetConnection().CreateCommand(); - cmd.CommandText = _putStatement; - - var ownerParameter = cmd.CreateParameter(); - ownerParameter.ParameterName = $"@{PartitionColumnName}"; - ownerParameter.DbType = DbType.String; - ownerParameter.Direction = ParameterDirection.Input; - ownerParameter.Value = OwnerId; - cmd.Parameters.Add(ownerParameter); - foreach (var column in Columns) - { - var prop = ColumnMap[column]; - var parameter = cmd.CreateParameter(); - parameter.ParameterName = $"@{column}"; - parameter.Direction = ParameterDirection.Input; - DbType dbType; - var columnType = DatabaseUtils.TypeMap[prop.PropertyType]; - switch (columnType) - { - case ColumnType.Boolean: - dbType = DbType.Boolean; - break; - case ColumnType.Integer: - dbType = DbType.Int32; - break; - case ColumnType.Long: - dbType = DbType.Int64; - break; - case ColumnType.Decimal: - dbType = DbType.Decimal; - break; - case ColumnType.String: - dbType = DbType.String; - break; - default: - dbType = DbType.String; - break; - } - - parameter.DbType = dbType; - cmd.Parameters.Add(parameter); - } - - return cmd; - } - - protected string OwnerId { get; } - protected Func GetConnection { get; } - } - - internal class SqliteDataStorage : SqliteStorage - where TD : class, new() - { - public SqliteDataStorage(Func getConnection, string ownerId) - : base(getConnection, ownerId, typeof(TD)) - { - } - - public void PopulateCommandParameters(IDbCommand command, TD data) - { - foreach (IDataParameter parameter in command.Parameters) - { - var parameterName = parameter.ParameterName.Substring(1); - if (parameterName == PartitionColumnName) - { - parameter.Value = OwnerId; - } - else - { - var column = ColumnMap[parameterName]; - parameter.Value = column.GetMethod.Invoke(data, null); - } - } - } - } - - internal class SqliteRecordStorage : SqliteDataStorage where TD : class, new() - { - public SqliteRecordStorage(Func getConnection, string ownerId) : base(getConnection, ownerId) - { - } - - public TD Get() - { - var cmd = GetSelectStatement(); - using (var reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) - { - return this.PopulateDataObjects(reader).FirstOrDefault(); - } - } - - public void Put(TD data) - { - var cmd = GetPutStatement(); - using (var txn = GetConnection().BeginTransaction()) - { - cmd.Transaction = txn; - PopulateCommandParameters(cmd, data); - cmd.ExecuteNonQuery(); - txn.Commit(); - } - } - } } diff --git a/OfflineStorageSqlite/OfflineStorageSqlite.csproj b/OfflineStorageSqlite/OfflineStorageSqlite.csproj index 758e290..26029f9 100644 --- a/OfflineStorageSqlite/OfflineStorageSqlite.csproj +++ b/OfflineStorageSqlite/OfflineStorageSqlite.csproj @@ -1,9 +1,9 @@ - + netstandard2.0 KeeperSecurity.OfflineStorage.Sqlite - 0.5.1 + 0.5.4 Keeper.Storage.Sqlite Keeper Security Inc. Keeper Security Inc. @@ -15,6 +15,9 @@ true snupkg en-US + 0.5.4.4 + 0.5.4.4 + false diff --git a/OfflineStorageSqlite/Storage.cs b/OfflineStorageSqlite/Storage.cs index d844484..362f211 100644 --- a/OfflineStorageSqlite/Storage.cs +++ b/OfflineStorageSqlite/Storage.cs @@ -2,37 +2,287 @@ using System.Collections.Generic; using System.Data; using System.Linq; +using System.Text; using KeeperSecurity.Utils; using KeeperSecurity.Vault; namespace KeeperSecurity.OfflineStorage.Sqlite { - internal class SqliteEntityStorage : SqliteDataStorage, IEntityStorage + + public abstract class SqliteStorage + { + private readonly TableSchema _schema; + + protected SqliteStorage(Func getConnection, TableSchema schema, object ownerId = null) + { + _schema = schema; + GetConnection = getConnection; + if (!string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + OwnerId = ownerId ?? throw new Exception($"Schema {Schema.TableName} requires owner column value"); + } + } + + private string _selectStatement; + + public IDbCommand GetSelectStatement(IEnumerable filterColumns = null) + { + lock (this) + { + if (string.IsNullOrEmpty(_selectStatement)) + { + _selectStatement = $"SELECT {string.Join(", ", Schema.Columns)} " + + $"FROM {Schema.TableName}"; + } + } + + var cmd = GetConnection().CreateCommand(); + + if (filterColumns == null && string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + cmd.CommandText = _selectStatement; + return cmd; + } + + StringBuilder selectQuery = new StringBuilder(_selectStatement); + var whereAdded = false; + if (!string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + selectQuery.Append($" WHERE {Schema.OwnerColumnName} = @{Schema.OwnerColumnName}"); + whereAdded = true; + var ownerParameter = cmd.CreateParameter(); + ownerParameter.ParameterName = $"@{Schema.OwnerColumnName}"; + ownerParameter.DbType = + DatabaseUtils.GetDbType(DatabaseUtils.TypeMap[OwnerId.GetType()]); + ownerParameter.Direction = ParameterDirection.Input; + ownerParameter.Value = OwnerId; + cmd.Parameters.Add(ownerParameter); + } + + if (filterColumns != null) + { + foreach (var column in filterColumns) + { + if (Schema.ColumnMap.TryGetValue(column, out var prop)) + { + if (whereAdded) + { + selectQuery.Append(" AND "); + } + else + { + selectQuery.Append(" WHERE "); + whereAdded = true; + } + selectQuery.Append($"{column} = @{column}"); + + var filterParameter = cmd.CreateParameter(); + filterParameter.ParameterName = $"@{column}"; + filterParameter.DbType = + DatabaseUtils.GetDbType(DatabaseUtils.TypeMap[prop.PropertyType]); + filterParameter.Direction = ParameterDirection.Input; + cmd.Parameters.Add(filterParameter); + } + else + { + throw new Exception($"Schema {Schema.TableName} does not contain column {column}"); + } + } + } + cmd.CommandText = selectQuery.ToString(); + return cmd; + } + + public IDbCommand GetDeleteStatement(IEnumerable filterColumns = null) + { + var cmd = GetConnection().CreateCommand(); + + StringBuilder deleteQuery = new StringBuilder($"DELETE FROM {Schema.TableName}"); + + var whereAdded = false; + if (!string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + deleteQuery.Append($" WHERE {Schema.OwnerColumnName} = @{Schema.OwnerColumnName}"); + whereAdded = true; + var ownerParameter = cmd.CreateParameter(); + ownerParameter.ParameterName = $"@{Schema.OwnerColumnName}"; + ownerParameter.DbType = + DatabaseUtils.GetDbType(DatabaseUtils.TypeMap[OwnerId.GetType()]); + ownerParameter.Direction = ParameterDirection.Input; + ownerParameter.Value = OwnerId; + cmd.Parameters.Add(ownerParameter); + } + + if (filterColumns != null) + { + foreach (var columnName in filterColumns) + { + if (Schema.ColumnMap.TryGetValue(columnName, out var prop)) + { + + if (whereAdded) + { + deleteQuery.Append(" AND "); + } + else + { + deleteQuery.Append(" WHERE "); + whereAdded = true; + } + deleteQuery.Append($"{columnName} = @{columnName}"); + + var filterParameter = cmd.CreateParameter(); + filterParameter.ParameterName = $"@{columnName}"; + filterParameter.DbType = + DatabaseUtils.GetDbType(DatabaseUtils.TypeMap[prop.PropertyType]); + filterParameter.Direction = ParameterDirection.Input; + cmd.Parameters.Add(filterParameter); + } + } + } + cmd.CommandText = deleteQuery.ToString(); + + return cmd; + } + + private string _putStatement; + + public IDbCommand GetPutStatement() + { + lock (this) + { + if (string.IsNullOrEmpty(_putStatement)) + { + var stmt = new StringBuilder($"INSERT OR REPLACE INTO {Schema.TableName} ("); + if (!string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + stmt.Append($"{Schema.OwnerColumnName}, "); + } + stmt.Append(string.Join(", ", Schema.Columns)); + stmt.Append(") VALUES ("); + if (!string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + stmt.Append($"@{Schema.OwnerColumnName}, "); + } + stmt.Append(string.Join(", ", Schema.Columns.Select(x => $"@{x}"))); + stmt.Append(")"); + + _putStatement = stmt.ToString(); + } + } + + var cmd = GetConnection().CreateCommand(); + cmd.CommandText = _putStatement; + + if (!string.IsNullOrEmpty(Schema.OwnerColumnName)) + { + var ownerParameter = cmd.CreateParameter(); + ownerParameter.ParameterName = $"@{Schema.OwnerColumnName}"; + ownerParameter.DbType = + DatabaseUtils.GetDbType(DatabaseUtils.TypeMap[OwnerId.GetType()]); + ownerParameter.Direction = ParameterDirection.Input; + ownerParameter.Value = OwnerId; + cmd.Parameters.Add(ownerParameter); + } + + foreach (var column in Schema.Columns) + { + var prop = Schema.ColumnMap[column]; + var parameter = cmd.CreateParameter(); + parameter.ParameterName = $"@{column}"; + parameter.Direction = ParameterDirection.Input; + parameter.DbType = + DatabaseUtils.GetDbType(DatabaseUtils.TypeMap[prop.PropertyType]); ; + cmd.Parameters.Add(parameter); + } + + return cmd; + } + + protected TableSchema Schema => _schema; + protected object OwnerId { get; } + protected Func GetConnection { get; } + } + + public class SqliteDataStorage : SqliteStorage + where TD : class, new() + { + public SqliteDataStorage(Func getConnection, Tuple owner = null) + : base(getConnection, new TableSchema(typeof(TD), owner != null ? owner.Item1 : null), + owner != null ? owner.Item2 : null) + { + } + + public void PopulateCommandParameters(IDbCommand command, TD data) + { + foreach (IDataParameter parameter in command.Parameters) + { + var parameterName = parameter.ParameterName.Substring(1); + if (parameterName == Schema.OwnerColumnName) + { + parameter.Value = OwnerId; + } + else + { + var column = Schema.ColumnMap[parameterName]; + parameter.Value = column.GetMethod.Invoke(data, null); + } + } + } + } + + public class SqliteRecordStorage : SqliteDataStorage where TD : class, new() + { + public SqliteRecordStorage(Func getConnection, Tuple owner = null) + : base(getConnection, owner) + { + } + + public TD Get() + { + var cmd = GetSelectStatement(); + using (var reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) + { + return Schema.PopulateDataObjects(reader).FirstOrDefault(); + } + } + + public void Put(TD data) + { + var cmd = GetPutStatement(); + using (var txn = GetConnection().BeginTransaction()) + { + cmd.Transaction = txn; + PopulateCommandParameters(cmd, data); + cmd.ExecuteNonQuery(); + txn.Commit(); + } + } + } + + + public class SqliteEntityStorage : SqliteDataStorage, IEntityStorage where T : IUid where TD : class, IEntity, T, IEntityCopy, new() { protected string EntityColumnName { get; } - public SqliteEntityStorage(Func getConnection, string ownerId) : base(getConnection, ownerId) + public SqliteEntityStorage(Func getConnection, Tuple owner = null) + : base(getConnection, owner) { - EntityColumnName = PrimaryKey[0]; + EntityColumnName = Schema.PrimaryKey[0]; } public T GetEntity(string uid) { - var cmd = GetSelectStatement(); - cmd.CommandText += $" AND {EntityColumnName} = @{EntityColumnName}"; - var entityParameter = cmd.CreateParameter(); - entityParameter.ParameterName = $"@{EntityColumnName}"; - entityParameter.DbType = DbType.String; - entityParameter.Direction = ParameterDirection.Input; + var cmd = GetSelectStatement(new[] { EntityColumnName }); + var entityParameter = (IDbDataParameter) cmd.Parameters[$"@{EntityColumnName}"]; entityParameter.Value = uid; - cmd.Parameters.Add(entityParameter); using (var reader = cmd.ExecuteReader(CommandBehavior.SingleRow)) { - return this.PopulateDataObjects(reader).FirstOrDefault(); + return Schema.PopulateDataObjects(reader).FirstOrDefault(); } } @@ -56,14 +306,8 @@ public void PutEntities(IEnumerable entities) public void DeleteUids(IEnumerable uids) { - var cmd = GetDeleteStatement(); - cmd.CommandText += $" AND {EntityColumnName} = @{EntityColumnName}"; - var entityParameter = cmd.CreateParameter(); - entityParameter.ParameterName = $"@{EntityColumnName}"; - entityParameter.DbType = DbType.String; - entityParameter.Direction = ParameterDirection.Input; - cmd.Parameters.Add(entityParameter); - + var cmd = GetDeleteStatement(new[] { EntityColumnName }); + var entityParameter = (IDbDataParameter) cmd.Parameters[$"@{EntityColumnName}"]; using (var txn = GetConnection().BeginTransaction()) { cmd.Transaction = txn; @@ -82,23 +326,23 @@ public IEnumerable GetAll() var cmd = GetSelectStatement(); using (var reader = cmd.ExecuteReader(CommandBehavior.Default)) { - return this.PopulateDataObjects(reader).ToArray(); + return Schema.PopulateDataObjects(reader).ToArray(); } } } - internal class SqliteLinkStorage : SqliteDataStorage, IPredicateStorage + public class SqliteLinkStorage : SqliteDataStorage, IPredicateStorage where T : IUidLink where TD : class, IEntityLink, T, IEntityCopy, new() { protected string SubjectColumnName { get; } protected string ObjectColumnName { get; } - public SqliteLinkStorage(Func getConnection, string ownerId) - : base(getConnection, ownerId) + public SqliteLinkStorage(Func getConnection, Tuple owner = null) + : base(getConnection, owner) { - SubjectColumnName = PrimaryKey[0]; - ObjectColumnName = PrimaryKey[1]; + SubjectColumnName = Schema.PrimaryKey[0]; + ObjectColumnName = Schema.PrimaryKey[1]; } public void PutLinks(IEnumerable links) @@ -121,20 +365,9 @@ public void PutLinks(IEnumerable links) public void DeleteLinks(IEnumerable links) { - var cmd = GetDeleteStatement(); - cmd.CommandText += $" AND {SubjectColumnName} = @{SubjectColumnName} AND {ObjectColumnName} = @{ObjectColumnName}"; - - var subjectParameter = cmd.CreateParameter(); - subjectParameter.ParameterName = $"@{SubjectColumnName}"; - subjectParameter.DbType = DbType.String; - subjectParameter.Direction = ParameterDirection.Input; - cmd.Parameters.Add(subjectParameter); - - var objectParameter = cmd.CreateParameter(); - objectParameter.ParameterName = $"@{ObjectColumnName}"; - objectParameter.DbType = DbType.String; - objectParameter.Direction = ParameterDirection.Input; - cmd.Parameters.Add(objectParameter); + var cmd = GetDeleteStatement(new[] { SubjectColumnName, ObjectColumnName }); + var subjectParameter = (IDbDataParameter) cmd.Parameters[$"@{SubjectColumnName}"]; + var objectParameter = (IDbDataParameter) cmd.Parameters[$"@{ObjectColumnName}"]; using (var txn = GetConnection().BeginTransaction()) { @@ -152,14 +385,8 @@ public void DeleteLinks(IEnumerable links) public void DeleteLinksForSubjects(IEnumerable subjectUids) { - var cmd = GetDeleteStatement(); - cmd.CommandText += $" AND {SubjectColumnName} = @{SubjectColumnName}"; - - var subjectParameter = cmd.CreateParameter(); - subjectParameter.ParameterName = $"@{SubjectColumnName}"; - subjectParameter.DbType = DbType.String; - subjectParameter.Direction = ParameterDirection.Input; - cmd.Parameters.Add(subjectParameter); + var cmd = GetDeleteStatement(new[] { SubjectColumnName }); + var subjectParameter = (IDbDataParameter) cmd.Parameters[$"@{SubjectColumnName}"]; using (var txn = GetConnection().BeginTransaction()) { @@ -176,14 +403,8 @@ public void DeleteLinksForSubjects(IEnumerable subjectUids) public void DeleteLinksForObjects(IEnumerable objectUids) { - var cmd = GetDeleteStatement(); - cmd.CommandText += $" AND {ObjectColumnName} = @{ObjectColumnName}"; - - var objectParameter = cmd.CreateParameter(); - objectParameter.ParameterName = $"@{ObjectColumnName}"; - objectParameter.DbType = DbType.String; - objectParameter.Direction = ParameterDirection.Input; - cmd.Parameters.Add(objectParameter); + var cmd = GetDeleteStatement(new[] { ObjectColumnName }); + var objectParameter = (IDbDataParameter) cmd.Parameters[$"@{ObjectColumnName}"]; using (var txn = GetConnection().BeginTransaction()) { @@ -200,33 +421,23 @@ public void DeleteLinksForObjects(IEnumerable objectUids) public IEnumerable GetLinksForSubject(string subjectUid) { - var cmd = GetSelectStatement(); - cmd.CommandText += $" AND {SubjectColumnName} = @{SubjectColumnName}"; - var subjectParameter = cmd.CreateParameter(); - subjectParameter.ParameterName = $"@{SubjectColumnName}"; - subjectParameter.DbType = DbType.String; - subjectParameter.Direction = ParameterDirection.Input; + var cmd = GetSelectStatement(new[] { SubjectColumnName }); + var subjectParameter = (IDbDataParameter) cmd.Parameters[$"@{SubjectColumnName}"]; subjectParameter.Value = subjectUid; - cmd.Parameters.Add(subjectParameter); using (var reader = cmd.ExecuteReader(CommandBehavior.Default)) { - return this.PopulateDataObjects(reader).ToArray(); + return Schema.PopulateDataObjects(reader).ToArray(); } } public IEnumerable GetLinksForObject(string objectUid) { - var cmd = GetSelectStatement(); - cmd.CommandText += $" AND {ObjectColumnName} = @{ObjectColumnName}"; - var objectParameter = cmd.CreateParameter(); - objectParameter.ParameterName = $"@{ObjectColumnName}"; - objectParameter.DbType = DbType.String; - objectParameter.Direction = ParameterDirection.Input; + var cmd = GetSelectStatement(new[] { ObjectColumnName }); + var objectParameter = (IDbDataParameter) cmd.Parameters[$"@{ObjectColumnName}"]; objectParameter.Value = objectUid; - cmd.Parameters.Add(objectParameter); using (var reader = cmd.ExecuteReader(CommandBehavior.Default)) { - return this.PopulateDataObjects(reader).ToArray(); + return Schema.PopulateDataObjects(reader).ToArray(); } } @@ -235,84 +446,7 @@ public IEnumerable GetAllLinks() var cmd = GetSelectStatement(); using (var reader = cmd.ExecuteReader(CommandBehavior.Default)) { - return this.PopulateDataObjects(reader).ToArray(); - } - } - } - - [SqlTable(Name = "UserSettings")] - internal class InternalUserAccount - { - [SqlColumn] - public long Revision { get; set; } - } - - - internal class SqliteKeeperStorage : IKeeperStorage - { - private readonly Func GetConnection; - - public SqliteKeeperStorage(Func getConnection, string ownerId) - { - GetConnection = getConnection; - PersonalScopeUid = ownerId; - - Records = new SqliteEntityStorage(getConnection, ownerId); - SharedFolders = new SqliteEntityStorage(getConnection, ownerId); - Teams = new SqliteEntityStorage(getConnection, ownerId); - NonSharedData = new SqliteEntityStorage(getConnection, ownerId); - RecordKeys = new SqliteLinkStorage(getConnection, ownerId); - SharedFolderKeys = new SqliteLinkStorage(getConnection, ownerId); - SharedFolderPermissions = new SqliteLinkStorage(getConnection, ownerId); - Folders = new SqliteEntityStorage(getConnection, ownerId); - FolderRecords = new SqliteLinkStorage(getConnection, ownerId); - - _userStorage = new SqliteRecordStorage(getConnection, ownerId); - } - - public string PersonalScopeUid { get; } - - private SqliteRecordStorage _userStorage; - - public long Revision - { - get => _userStorage.Get()?.Revision ?? 0; - set - { - var user = _userStorage.Get() ?? new InternalUserAccount(); - user.Revision = value; - _userStorage.Put(user); - } - } - - public IEntityStorage Records { get; } - public IEntityStorage SharedFolders { get; } - public IEntityStorage Teams { get; } - public IEntityStorage NonSharedData { get; } - public IPredicateStorage RecordKeys { get; } - public IPredicateStorage SharedFolderKeys { get; } - public IPredicateStorage SharedFolderPermissions { get; } - public IEntityStorage Folders { get; } - public IPredicateStorage FolderRecords { get; } - - public void Clear() - { - Revision = 0; - var tables = new object[] - { - Records, SharedFolders, Teams, NonSharedData, RecordKeys, SharedFolderKeys, - SharedFolderPermissions, Folders, FolderRecords, _userStorage - }; - using (var txn = GetConnection().BeginTransaction()) - { - foreach (var table in tables.Cast()) - { - var cmd = table.GetDeleteStatement(); - cmd.Transaction = txn; - cmd.ExecuteNonQuery(); - } - - txn.Commit(); + return Schema.PopulateDataObjects(reader).ToArray(); } } } diff --git a/OfflineStorageSqlite/Loader.cs b/OfflineStorageSqlite/VaultLoader.cs similarity index 88% rename from OfflineStorageSqlite/Loader.cs rename to OfflineStorageSqlite/VaultLoader.cs index 44393cc..45ec8c6 100644 --- a/OfflineStorageSqlite/Loader.cs +++ b/OfflineStorageSqlite/VaultLoader.cs @@ -1,5 +1,6 @@ using System; using System.Data.Common; +using System.Linq; using KeeperSecurity.Configuration; using KeeperSecurity.Utils; using KeeperSecurity.Vault; @@ -46,19 +47,22 @@ public bool VerifyDatabase() typeof(ExternalSharedFolderPermission), typeof(ExternalFolder), typeof(ExternalFolderRecordLink), + typeof(ExternalRecordType), typeof(InternalUserAccount), typeof(InternalConfiguration), }; - return DatabaseUtils.VerifyDatabase(true, connection, tables, null); + return DatabaseUtils.VerifyDatabase(true, connection, tables.Select(x => new TableSchema(x, SqliteKeeperStorage.OwnerColumnName)), null); } public IConfigurationStorage GetConfigurationStorage(string configurationName, IConfigurationProtectionFactory protection) { if (string.IsNullOrEmpty(configurationName)) configurationName = "default"; - var loader = new SqliteConfigurationLoader(GetConnection, configurationName); + var owner = Tuple.Create(SqliteKeeperStorage.OwnerColumnName, configurationName); + + var loader = new SqliteConfigurationLoader(GetConnection, owner); var cache = new JsonConfigurationCache(loader) { - WriteTimeout = 1000, + WriteTimeout = 1000, ConfigurationProtection = protection }; return new JsonConfigurationStorage(cache); diff --git a/OfflineStorageSqlite/VaultStorage.cs b/OfflineStorageSqlite/VaultStorage.cs new file mode 100644 index 0000000..542921d --- /dev/null +++ b/OfflineStorageSqlite/VaultStorage.cs @@ -0,0 +1,90 @@ +using KeeperSecurity.Utils; +using KeeperSecurity.Vault; +using System; +using System.Data; +using System.Linq; + +namespace KeeperSecurity.OfflineStorage.Sqlite +{ + [SqlTable(Name = "UserSettings")] + internal class InternalUserAccount + { + [SqlColumn] + public long Revision { get; set; } + } + + + internal class SqliteKeeperStorage : IKeeperStorage + { + public const string OwnerColumnName = "OwnerId"; + private readonly Func GetConnection; + + public SqliteKeeperStorage(Func getConnection, string ownerId) + { + GetConnection = getConnection; + PersonalScopeUid = ownerId; + + var owner = Tuple.Create(OwnerColumnName, ownerId); + + Records = new SqliteEntityStorage(getConnection, owner); + SharedFolders = new SqliteEntityStorage(getConnection, owner); + Teams = new SqliteEntityStorage(getConnection, owner); + NonSharedData = new SqliteEntityStorage(getConnection, owner); + RecordKeys = new SqliteLinkStorage(getConnection, owner); + SharedFolderKeys = new SqliteLinkStorage(getConnection, owner); + SharedFolderPermissions = new SqliteLinkStorage(getConnection, owner); + Folders = new SqliteEntityStorage(getConnection, owner); + FolderRecords = new SqliteLinkStorage(getConnection, owner); + RecordTypes = new SqliteEntityStorage(getConnection, owner); + + _userStorage = new SqliteRecordStorage(getConnection, owner); + } + + public string PersonalScopeUid { get; } + + private SqliteRecordStorage _userStorage; + + public long Revision + { + get => _userStorage.Get()?.Revision ?? 0; + set + { + var user = _userStorage.Get() ?? new InternalUserAccount(); + user.Revision = value; + _userStorage.Put(user); + } + } + + public IEntityStorage Records { get; } + public IEntityStorage SharedFolders { get; } + public IEntityStorage Teams { get; } + public IEntityStorage NonSharedData { get; } + public IPredicateStorage RecordKeys { get; } + public IPredicateStorage SharedFolderKeys { get; } + public IPredicateStorage SharedFolderPermissions { get; } + public IEntityStorage Folders { get; } + public IPredicateStorage FolderRecords { get; } + public IEntityStorage RecordTypes { get; } + + public void Clear() + { + Revision = 0; + var tables = new object[] + { + Records, SharedFolders, Teams, NonSharedData, RecordKeys, SharedFolderKeys, + SharedFolderPermissions, Folders, FolderRecords, _userStorage + }; + using (var txn = GetConnection().BeginTransaction()) + { + foreach (var table in tables.Cast()) + { + var cmd = table.GetDeleteStatement(); + cmd.Transaction = txn; + cmd.ExecuteNonQuery(); + } + + txn.Commit(); + } + } + } +} diff --git a/PowerCommander/AttachmentCommands.ps1 b/PowerCommander/AttachmentCommands.ps1 new file mode 100644 index 0000000..2d0df5c --- /dev/null +++ b/PowerCommander/AttachmentCommands.ps1 @@ -0,0 +1,158 @@ +#requires -Version 5.1 + + +function Copy-KeeperFileAttachment { + <# + .Synopsis + Download record attachments + + .Folder + Keeper Folder + + .Record + Keeper Record + + .Parameter Path + Download folder path +#> + + [CmdletBinding()] + Param ( + [Parameter(ParameterSetName = 'folder', Mandatory = $true)][string] $Folder, + [Parameter(ParameterSetName = 'folder')][Switch] $Recursive, + [Parameter(ParameterSetName = 'record', Mandatory = $true)][string] $Record, + [Parameter()][string] $Name, + [Parameter(Position = 0)][string] $Path + ) + + Begin { + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + if (-not $Path) { + $Path = '.' + } + $records = $null + if ($Record) { + $r = Get-KeeperRecord $record + if ($r) { + $records = @() + $records += $r.Uid + } + + } elseif ($Folder) { + if ($Recursive.IsPresent) { + $records = Get-KeeperChildItem $Folder -Recursive -SkipGrouping -ObjectType Record | Select-Object -ExpandProperty "Uid" + } else { + $records = Get-KeeperChildItem $Folder -SkipGrouping -ObjectType Record | Select-Object -ExpandProperty "Uid" + } + } + if (-not $records) { + Write-Error "No records were found" -ErrorAction Stop + } + } + + Process { + if (-not (Test-Path $Path -PathType Container)) { + New-Item -ItemType Directory -Path $Path | Out-Null + } + [KeeperSecurity.Vault.KeeperRecord]$keeperRecord + [KeeperSecurity.Vault.IAttachment]$atta + foreach($recordUid in $records) { + $keeperRecord = Get-KeeperRecord $recordUid + if (-not $keeperRecord) { + continue + } + foreach ($atta in $vault.RecordAttachments($keeperRecord)) { + if ($Name) { + if (-not (($atta.Name, $atta.Title) -contains $Name)) { + continue + } + } + $fileName = $atta.Id + if ($atta.Title) { + $fileName = $atta.Title + } elseif ($atta.Name) { + $fileName = $atta.Name + } + $filePath = Join-Path $path $fileName + if (Test-Path $filePath -PathType Leaf) { + $filePath = Join-Path $path "$($atta.Id) - $fileName" + if (Test-Path $filePath -PathType Leaf) { + Write-Information -MessageData "File `"$filePath`" already exists" + continue + } + } + Write-Information -MessageData "Downloading `"$fileName`" into `"$filePath`"" + $newFile = New-Item -Name $filePath -ItemType File + $fileStream = $newFile.OpenWrite() + try { + $vault.DownloadAttachment($keeperRecord, $atta.Id, $fileStream).GetAwaiter().GetResult() | Out-Null + } + finally { + $fileStream.Dispose() + } + } + } + } +} +New-Alias -Name kda -Value Copy-KeeperFileAttachment + +function Copy-KeeperFileAttachmentToStream { + <# + .Synopsis + Get Attachment as stream + + .Record + Keeper Record Uid + + .AttachmentName + Attachment Name + + .Stream + Attachment will be written to this stream + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)][string] $Record, + [Parameter()][string] $AttachmentName, + [Parameter(Position = 0, Mandatory = $true)][System.IO.Stream] $Stream + ) + + $keeperRecord = Get-KeeperRecord $Record + if ($keeperRecord.Length -ne 1) { + Write-Error "Record `"$Record`" was not found" -ErrorAction Stop + } + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $vault.DownloadAttachment($keeperRecord, $AttachmentName, $Stream).GetAwaiter().GetResult() | Out-Null +} + +function Copy-FileToKeeperRecord { + <# + .Synopsis + Upload file attachment to a record + + .Record + Keeper Record Uid + + .Filename + File path + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)][string] $Record, + [Parameter(Position = 0, Mandatory = $true)][string] $Filename + ) + + $keeperRecord = Get-KeeperRecord $Record + if ($keeperRecord.Length -ne 1) { + Write-Error "Record `"$Record`" was not found" -ErrorAction Stop + } + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $path = Resolve-Path $Filename -ErrorAction Stop + $uploadTask = New-Object -TypeName KeeperSecurity.Vault.FileAttachmentUploadTask -ArgumentList $path.Path, $null + + $vault.UploadAttachment($keeperRecord, $uploadTask).GetAwaiter().GetResult() | Out-Null +} diff --git a/PowerCommander/AuthCommands.ps1 b/PowerCommander/AuthCommands.ps1 index 3f2c3c7..03fed1f 100644 --- a/PowerCommander/AuthCommands.ps1 +++ b/PowerCommander/AuthCommands.ps1 @@ -1,111 +1,203 @@ -#requires -Version 5.0 +#requires -Version 5.1 -using namespace KeeperSecurity +$expires = @( + [KeeperSecurity.Authentication.TwoFactorDuration]::EveryLogin, + [KeeperSecurity.Authentication.TwoFactorDuration]::Every30Days, + [KeeperSecurity.Authentication.TwoFactorDuration]::Forever) -class VaultCallback : Vault.IVaultUi { - [System.Threading.Tasks.Task[bool]]Confirmation([string]$information) { - Write-Host $information - Write-Host - $answer = Read-Host -Prompt 'Please confirm (Y/N)' - return [System.Threading.Tasks.Task]::FromResult($answer -eq 'Y') +function Test-InteractiveSession { + return $Host.Name -eq 'ConsoleHost' -and $Host.UI.SupportsVirtualTerminal +} + +function twoFactorChannelToText ([KeeperSecurity.Authentication.TwoFactorChannel] $channel) { + if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::Authenticator) { + return 'authenticator' + } + if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::TextMessage) { + return 'sms' + } + if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::DuoSecurity) { + return 'duo' + } + if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::RSASecurID) { + return 'rsa' + } + if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::KeeperDNA) { + return 'dna' + } + return '' +} + +function deviceApprovalChannelToText ([KeeperSecurity.Authentication.DeviceApprovalChannel]$channel) { + if ($channel -eq [KeeperSecurity.Authentication.DeviceApprovalChannel]::Email) { + return 'email' + } + if ($channel -eq [KeeperSecurity.Authentication.DeviceApprovalChannel]::KeeperPush) { + return 'keeper' + } + if ($channel -eq [KeeperSecurity.Authentication.DeviceApprovalChannel]::TwoFactorAuth) { + return '2fa' + } + return '' +} + +function twoFactorDurationToExpire ([KeeperSecurity.Authentication.TwoFactorDuration] $duration) { + if ($duration -eq [KeeperSecurity.Authentication.TwoFactorDuration]::EveryLogin) { + return 'now' } + if ($duration -eq [KeeperSecurity.Authentication.TwoFactorDuration]::Forever) { + return 'never' + } + return "$([int]$duration)_days" } -class AuthFlowCallback : Authentication.Sync.IAuthSyncCallback, Authentication.IAuthInfoUI { - [bool]$ReadingInput = $false - [void]RegionChanged([string]$newRegion) { - Write-Information -MessageData "Region changed: $newRegion" +function getStepPrompt ([KeeperSecurity.Authentication.IAuthentication] $auth) { + $prompt = "`nUnsupported ($($auth.step.State.ToString()))" + if ($auth.step -is [KeeperSecurity.Authentication.Sync.DeviceApprovalStep]) { + $prompt = "`nDevice Approval ($(deviceApprovalChannelToText $auth.step.DefaultChannel))" + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.TwoFactorStep]) { + $channelText = twoFactorChannelToText $auth.step.DefaultChannel + $prompt = "`n2FA channel($($channelText)) expire[$(twoFactorDurationToExpire $auth.step.Duration)]" } - [void]SelectedDevice([string]$deviceToken) { + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.PasswordStep]) { + $prompt = "`nMaster Password" } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.SsoTokenStep]) { + $prompt = "`nSSO Token" + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.SsoDataKeyStep]) { + $prompt = "`nSSO Login Approval" + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.ReadyToLoginStep]) { + $prompt = "`nLogin" + } + + return $prompt +} - [void]OnNextStep() { - if ($this.ReadingInput) { - [Console]::WriteLine("`n to resume."); +function printStepHelp ([KeeperSecurity.Authentication.IAuthentication] $auth) { + $commands = @() + if ($auth.step -is [KeeperSecurity.Authentication.Sync.DeviceApprovalStep]) { + $channels = @() + foreach ($ch in $auth.step.Channels) { + $channels += deviceApprovalChannelToText $ch + } + if ($channels) { + $commands += "channel=<$($channels -join ' | ')> to change channel." } + $commands += "`"push`" to send a push to the channel" + $commands += ' to send a code to the channel' } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.TwoFactorStep]) { + $channels = @() + foreach ($ch in $auth.step.Channels) { + $channelText = twoFactorChannelToText $ch + if ($channelText) { + $channels += $channelText + } + } + if ($channels) { + $commands += "channel=<$($channels -join ' | ')> to change channel." + } - $expires = @([Authentication.TwoFactorDuration]::EveryLogin, [Authentication.TwoFactorDuration]::Every30Days, [Authentication.TwoFactorDuration]::Forever) - [string]TwoFactorDurationToExpire([Authentication.TwoFactorDuration]$duration) { - if ($duration -eq [Authentication.TwoFactorDuration]::EveryLogin) { - return 'now' + $channels = @() + foreach ($ch in $auth.step.Channels) { + $pushes = $auth.step.GetChannelPushActions($ch) + if ($null -ne $pushes) { + foreach ($push in $pushes) { + $channels += [KeeperSecurity.Authentication.AuthUIExtensions]::GetPushActionText($push) + } + } + } + if ($channels) { + $commands += "`"$($channels -join ' | ')`" to send a push/code" } - if ($duration -eq [Authentication.TwoFactorDuration]::Forever) { - return 'never' + + $channels = @() + foreach ($exp in $expires) { + $channels += twoFactorDurationToExpire $exp } - return "$([int]$duration)_days" + $commands += "expire=<$($channels -join ' | ')> to set 2fa expiration." + $commands += ' to send a 2fa code.' + } + + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.PasswordStep]) { + $commands += ' to send a master password.' } - [bool]TryExpireToTwoFactorDuration([string]$expire, [ref]$duration) - { + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.SsoTokenStep]) { + $commands += $auth.step.SsoLoginUrl + $commands += '' + if (-not $auth.step.LoginAsProvider) { + $commands += '"password" to login using master password.' + } + $commands += ' paste SSO login token.' + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.SsoDataKeyStep]) { + $channels = @() + foreach ($ch in $auth.step.Channels) { + $channels += [KeeperSecurity.Authentication.AuthUIExtensions]::SsoDataKeyShareChannelText($ch) + } + if ($channels) { + $commands += "`"$($channels -join ' | ')`" to request login approval" + } + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.ReadyToLoginStep]) { + $commands += '"login " login to Keeper as user' + $commands += '"login_sso " login to Enterprise Domain' + } + + if ($commands) { + Write-Output "`nAvailable Commands`n" + foreach ($command in $commands) { + Write-Output $command + } + Write-Output ' to resume' + } +} + +function executeStepAction ([KeeperSecurity.Authentication.IAuthentication] $auth, [string] $action) { + + function tryExpireToTwoFactorDuration ([string] $expire, [ref] [KeeperSecurity.Authentication.TwoFactorDuration] $duration) { $result = $true if ($expire -eq 'now') { - $duration.Value = [Authentication.TwoFactorDuration]::EveryLogin + $duration.Value = [KeeperSecurity.Authentication.TwoFactorDuration]::EveryLogin } elseif ($expire -eq 'never') { - $duration.Value = [Authentication.TwoFactorDuration]::Forever + $duration.Value = [KeeperSecurity.Authentication.TwoFactorDuration]::Forever } elseif ($expire -eq '30_days') { - $duration.Value = [Authentication.TwoFactorDuration]::Every30Days - } else { - $duration.Value = [Authentication.TwoFactorDuration]::EveryLogin + $duration.Value = [KeeperSecurity.Authentication.TwoFactorDuration]::Every30Days + } + else { + $duration.Value = [KeeperSecurity.Authentication.TwoFactorDuration]::EveryLogin } return $result } - [string]DeviceApprovalChannelToText([Authentication.DeviceApprovalChannel]$channel) { - if ($channel -eq [Authentication.DeviceApprovalChannel]::Email) { - return 'email' - } - if ($channel -eq [Authentication.DeviceApprovalChannel]::KeeperPush) { - return 'keeper' - } - if ($channel -eq [Authentication.DeviceApprovalChannel]::TwoFactorAuth) { - return '2fa' - } - return '' - } - [bool]TryTextToDeviceApprovalChannel([string]$text, [ref]$channel) - { + function tryTextToDeviceApprovalChannel ([string] $text, [ref] [KeeperSecurity.Authentication.DeviceApprovalChannel] $channel) { $result = $true if ($text -eq 'email') { - $channel.Value = [Authentication.DeviceApprovalChannel]::Email + $channel.Value = [KeeperSecurity.Authentication.DeviceApprovalChannel]::Email } elseif ($text -eq 'keeper') { - $channel.Value = [Authentication.DeviceApprovalChannel]::KeeperPush + $channel.Value = [KeeperSecurity.Authentication.DeviceApprovalChannel]::KeeperPush } elseif ($text -eq '2fa') { - $channel.Value = [Authentication.DeviceApprovalChannel]::TwoFactorAuth - } else { - Write-Host 'Unsupported device approval channel:', $text + $channel.Value = [KeeperSecurity.Authentication.DeviceApprovalChannel]::TwoFactorAuth + } + else { + Write-Output 'Unsupported device approval channel:', $text $result = $false } return $result } - [string]TwoFactorChannelToText([KeeperSecurity.Authentication.TwoFactorChannel]$channel) { - if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::Authenticator) { - return 'authenticator' - } - if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::TextMessage) { - return 'sms' - } - if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::DuoSecurity) { - return 'duo' - } - if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::RSASecurID) { - return 'rsa' - } - if ($channel -eq [KeeperSecurity.Authentication.TwoFactorChannel]::KeeperDNA) { - return 'dna' - } - return '' - } - [bool]TryTextToTwoFactorChannel([string]$text, [ref]$channel) - { + function tryTextToTwoFactorChannel ([string] $text, [ref] [KeeperSecurity.Authentication.TwoFactorChannel] $channel) { $result = $true if ($text -eq 'authenticator') { $channel.Value = [KeeperSecurity.Authentication.TwoFactorChannel]::Authenticator @@ -121,269 +213,169 @@ class AuthFlowCallback : Authentication.Sync.IAuthSyncCallback, Authentication.I } elseif ($text -eq 'dna') { $channel.Value = [KeeperSecurity.Authentication.TwoFactorChannel]::KeeperDNA - } else { - Write-Host 'Unsupported 2FA channel:', $text + } + else { + Write-Output 'Unsupported 2FA channel:', $text $result = $false } return $result } - [void]ExecuteStepAction($auth, $action) { - if ($auth.step -is [Authentication.Sync.DeviceApprovalStep]) { - if ($action -eq 'push') { - $_ = $auth.step.SendPush($auth.step.DefaultChannel).GetAwaiter().GetResult() - } - elseif ($action -match 'channel\s*=\s*(.*)') { - $ch = $Matches.1 - [Authentication.DeviceApprovalChannel]$cha = $auth.step.DefaultChannel - if ($this.TryTextToDeviceApprovalChannel($ch, [ref]$cha)) { - $auth.step.DefaultChannel = $cha - } - } else { - Try { - $_ = $auth.step.SendCode($auth.step.DefaultChannel, $action).GetAwaiter().GetResult() - } - Catch [Authentication.KeeperApiException]{ - Write-Host $_ -ForegroundColor Red - } - Catch { - Write-Host $_ -ForegroundColor Red - } - } + if ($auth.step -is [KeeperSecurity.Authentication.Sync.DeviceApprovalStep]) { + if ($action -eq 'push') { + $auth.step.SendPush($auth.step.DefaultChannel).GetAwaiter().GetResult() | Out-Null } - elseif ($auth.step -is [Authentication.Sync.TwoFactorStep]) { - if ($action -match 'channel\s*=\s*(.*)') { - $ch = $Matches.1 - [KeeperSecurity.Authentication.TwoFactorChannel]$cha = $auth.step.DefaultChannel - if ($this.TryTextToTwoFactorChannel($ch, [ref]$cha)) { - $auth.step.DefaultChannel = $cha - } - } - elseif ($action -match 'expire\s*=\s*(.*)') { - $exp = $Matches.1 - [Authentication.TwoFactorDuration]$dur = $auth.step.Duration - if ($this.TryExpireToTwoFactorDuration($exp, [ref]$dur)) { - $auth.step.Duration = $dur - } - } else { - foreach($cha in $auth.step.Channels) { - $pushes = $auth.step.GetChannelPushActions($cha) - if ($pushes -ne $null) { - foreach($push in $pushes) { - if ($action -eq [Authentication.AuthUIExtensions]::GetPushActionText($push)) { - $_ = $auth.step.SendPush($push).GetAwaiter().GetResult() - return - } - } - } - Try { - $_ = $auth.step.SendCode($auth.step.DefaultChannel, $action).GetAwaiter().GetResult() - } - Catch { - Write-Host $_ -ForegroundColor Red - } - } + elseif ($action -match 'channel\s*=\s*(.*)') { + $ch = $Matches.1 + [KeeperSecurity.Authentication.DeviceApprovalChannel]$cha = $auth.step.DefaultChannel + if (tryTextToDeviceApprovalChannel ($ch) ([ref]$cha)) { + $auth.step.DefaultChannel = $cha } } - elseif ($auth.step -is [Authentication.Sync.PasswordStep]) { + else { Try { - $_ = $auth.step.VerifyPassword($action).GetAwaiter().GetResult() + $auth.step.SendCode($auth.step.DefaultChannel, $action).GetAwaiter().GetResult() | Out-Null } - Catch [Authentication.KeeperAuthFailed]{ - Write-Host 'Invalid password' -ForegroundColor Red + Catch [KeeperSecurity.Authentication.KeeperApiException] { + Write-Warning $_ } Catch { - Write-Host $_ -ForegroundColor Red - } - } - elseif ($auth.step -is [Authentication.Sync.SsoTokenStep]) { - if ($action -eq 'password') { - $_ = $auth.step.LoginWithPassword().GetAwaiter().GetResult() - } else { - $_ = $auth.step.SetSsoToken($action).GetAwaiter().GetResult() + Write-Error $_ } } - elseif ($auth.step -is [Authentication.Sync.SsoDataKeyStep]) { - [Authentication.DataKeyShareChannel]$channel = [Authentication.DataKeyShareChannel]::KeeperPush - if ([Authentication.AuthUIExtensions]::TryParseDataKeyShareChannel($action, [ref]$channel)) { - $_ = $auth.step.RequestDataKey($channel).GetAwaiter().GetResult() + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.TwoFactorStep]) { + if ($action -match 'channel\s*=\s*(.*)') { + $ch = $Matches.1 + [KeeperSecurity.Authentication.TwoFactorChannel]$cha = $auth.step.DefaultChannel + if (tryTextToTwoFactorChannel($ch) ([ref]$cha)) { + $auth.step.DefaultChannel = $cha } } - elseif ($auth.step -is [Authentication.Sync.ReadyToLoginStep]) { - if ($action -match '^login\s+(.*)$') { - $username = $Matches.1 - $_ = $auth.Login($username).GetAwaiter().GetResult() - } - elseif ($action -match '^login_sso\s+(.*)$') { - $providerName = $Matches.1 - $_ = $auth.LoginSso($providerName).GetAwaiter().GetResult() + elseif ($action -match 'expire\s*=\s*(.*)') { + $exp = $Matches.1 + [KeeperSecurity.Authentication.TwoFactorDuration]$dur = $auth.step.Duration + if (tryExpireToTwoFactorDuration($exp) ([ref]$dur)) { + $auth.step.Duration = $dur } } - elseif ($auth.step -is [Authentication.Sync.HttpProxyStep]) { - $args = Invoke-Expression ".{`$args} $action" - if ($args.Count -eq 3 -and $args[0] -eq 'login') { - $_ = $auth.step.SetProxyCredentials($args[1], $args[2]).GetAwaiter().GetResult() + else { + foreach ($cha in $auth.step.Channels) { + $pushes = $auth.step.GetChannelPushActions($cha) + if ($null -ne $pushes) { + foreach ($push in $pushes) { + if ($action -eq [KeeperSecurity.Authentication.AuthUIExtensions]::GetPushActionText($push)) { + $auth.step.SendPush($push).GetAwaiter().GetResult() | Out-Null + return + } + } + } + Try { + $auth.step.SendCode($auth.step.DefaultChannel, $action).GetAwaiter().GetResult() | Out-Null + } + Catch { + Write-Error $_ + } } } } - - [string]GetStepPrompt($auth) { - $prompt = "`nUnsupported ($($auth.step.State.ToString()))" - if ($auth.step -is [Authentication.Sync.DeviceApprovalStep]) { - $prompt = "`nDevice Approval ($($this.DeviceApprovalChannelToText($auth.step.DefaultChannel)))" - } - elseif ($auth.step -is [Authentication.Sync.TwoFactorStep]) { - $channelText = $this.TwoFactorChannelToText($auth.step.DefaultChannel) - $prompt = "`n2FA channel($($channelText)) expire[$($this.TwoFactorDurationToExpire($auth.step.Duration))]" - } - - elseif ($auth.step -is [Authentication.Sync.PasswordStep]) { - $prompt = "`nMaster Password" - } - elseif ($auth.step -is [Authentication.Sync.SsoTokenStep]) { - $prompt = "`nSSO Token" - } - elseif ($auth.step -is [Authentication.Sync.SsoDataKeyStep]) { - $prompt = "`nSSO Login Approval" + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.PasswordStep]) { + Try { + $auth.step.VerifyPassword($action).GetAwaiter().GetResult() | Out-Null } - elseif ($auth.step -is [Authentication.Sync.ReadyToLoginStep]) { - $prompt = "`nLogin" + Catch [KeeperSecurity.Authentication.KeeperAuthFailed] { + Write-Warning 'Invalid password' } - elseif ($auth.step -is [Authentication.Sync.HttpProxyStep]) { - $prompt = "`nHTTP Proxy Login" + Catch { + Write-Error $_ } - - return $prompt } - - [void]PrintStepHelp($auth) { - $commands = @() - if ($auth.step -is [Authentication.Sync.DeviceApprovalStep]) { - $channels = @() - foreach($ch in $auth.step.Channels) { - $channels += $this.DeviceApprovalChannelToText($ch) - } - if ($channels) { - $commands += "channel=<$($channels -join ' | ')> to change channel." - } - $commands += "`"push`" to send a push to the channel" - $commands += ' to send a code to the channel' - } - elseif ($auth.step -is [Authentication.Sync.TwoFactorStep]) { - $channels = @() - foreach($ch in $auth.step.Channels) { - $channelText = $this.TwoFactorChannelToText($ch) - if ($channelText) { - $channels += $channelText - } - } - if ($channels) { - $commands += "channel=<$($channels -join ' | ')> to change channel." - } - - $channels = @() - foreach($ch in $auth.step.Channels) { - $pushes = $auth.step.GetChannelPushActions($ch) - if ($pushes -ne $null) { - foreach($push in $pushes) { - $channels += [Authentication.AuthUIExtensions]::GetPushActionText($push) - } - } - } - if ($channels) { - $commands += "`"$($channels -join ' | ')`" to send a push/code" - } - - $channels = @() - foreach($exp in $this.Expires) { - $channels += $this.TwoFactorDurationToExpire($exp) - } - $commands += "expire=<$($channels -join ' | ')> to set 2fa expiration." - $commands += ' to send a 2fa code.' + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.SsoTokenStep]) { + if ($action -eq 'password') { + $auth.step.LoginWithPassword().GetAwaiter().GetResult() | Out-Null } - - elseif ($auth.step -is [Authentication.Sync.PasswordStep]) { - $commands += ' to send a master password.' + else { + $auth.step.SetSsoToken($action).GetAwaiter().GetResult() | Out-Null } - elseif ($auth.step -is [Authentication.Sync.SsoTokenStep]) { - $commands += $auth.step.SsoLoginUrl - $commands += '' - if (-not $auth.step.LoginAsProvider) { - $commands += '"password" to login using master password.' - } - $commands += ' paste SSO login token.' - } - elseif ($auth.step -is [Authentication.Sync.SsoDataKeyStep]) { - $channels = @() - foreach($ch in $auth.step.Channels) { - $channels += [Authentication.AuthUIExtensions]::SsoDataKeyShareChannelText($ch) - } - if ($channels) { - $commands += "`"$($channels -join ' | ')`" to request login approval" - } + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.SsoDataKeyStep]) { + [KeeperSecurity.Authentication.DataKeyShareChannel]$channel = [KeeperSecurity.Authentication.DataKeyShareChannel]::KeeperPush + if ([KeeperSecurity.Authentication.AuthUIExtensions]::TryParseDataKeyShareChannel($action, [ref]$channel)) { + $auth.step.RequestDataKey($channel).GetAwaiter().GetResult() | Out-Null } - elseif ($auth.step -is [Authentication.Sync.ReadyToLoginStep]) { - $commands += '"login " login to Keeper as user' - $commands += '"login_sso " login to Enterprise Domain' + } + elseif ($auth.step -is [KeeperSecurity.Authentication.Sync.ReadyToLoginStep]) { + if ($action -match '^login\s+(.*)$') { + $username = $Matches.1 + $auth.Login($username).GetAwaiter().GetResult() | Out-Null } - - if ($commands) { - Write-Host "`nAvailable Commands`n" - foreach ($command in $commands) { - Write-Host $command - } - Write-Host ' to resume' + elseif ($action -match '^login_sso\s+(.*)$') { + $providerName = $Matches.1 + $auth.LoginSso($providerName).GetAwaiter().GetResult() | Out-Null } } } function Connect-Keeper { -<# + <# .Synopsis Login to Keeper .Parameter Username User email - + + .Parameter Password + User password + .Parameter NewLogin Do not use Last Login information .Parameter SsoPassword Use Master Password for SSO account + .Parameter SsoProvider + Login using SSO provider + .Parameter Server Change default keeper server + + .Parameter Config + Config file name #> [CmdletBinding(DefaultParameterSetName = 'regular')] Param( [Parameter(Position = 0)][string] $Username, - [Parameter()][string] $Password, + [Parameter()] [SecureString]$Password, [Parameter()][switch] $NewLogin, - [Parameter(ParameterSetName='sso_password')][switch] $SsoPassword, - [Parameter(ParameterSetName='sso_provider')][switch] $SsoProvider, - [Parameter()][string] $Server + [Parameter(ParameterSetName = 'sso_password')][switch] $SsoPassword, + [Parameter(ParameterSetName = 'sso_provider')][switch] $SsoProvider, + [Parameter()][string] $Server, + [Parameter()][string] $Config ) - $_ = Disconnect-Keeper -Resume + Disconnect-Keeper -Resume | Out-Null + if ($Config) { + $storage = New-Object KeeperSecurity.Configuration.JsonConfigurationStorage $Config + } else { + $storage = New-Object KeeperSecurity.Configuration.JsonConfigurationStorage + } - $storage = New-Object Configuration.JsonConfigurationStorage if (-not $Server) { $Server = $storage.LastServer if ($Server) { Write-Information -MessageData "`nUsing Keeper Server: $Server`n" - } else { - Write-Information -MessageData "`nUsing Default Keeper Server: $([Authentication.KeeperEndpoint]::DefaultKeeperServer)`n" + } + else { + Write-Information -MessageData "`nUsing Default Keeper Server: $([KeeperSecurity.Authentication.KeeperEndpoint]::DefaultKeeperServer)`n" } } - - $endpoint = New-Object Authentication.KeeperEndpoint($Server, $storage.Servers) - $endpoint.DeviceName = 'PowerShell Commander' - $authFlow = New-Object Authentication.Sync.AuthSync($storage, $endpoint) - $authFlow.UiCallback = New-Object AuthFlowCallback - $authFlow.UiCallback.ReadingInput = $false + $endpoint = New-Object KeeperSecurity.Authentication.KeeperEndpoint($Server, $storage.Servers) + $endpoint.DeviceName = 'PowerShell Commander' + $endpoint.ClientVersion = 'c16.1.0' + $authFlow = New-Object KeeperSecurity.Authentication.Sync.AuthSync($storage, $endpoint) $authFlow.ResumeSession = $true $authFlow.AlternatePassword = $SsoPassword.IsPresent @@ -400,83 +392,93 @@ function Connect-Keeper { } if ($Username) { - Write-Host "$(($namePrompt + ': ').PadLeft(21, ' ')) $Username" - } else { + Write-Output "$(($namePrompt + ': ').PadLeft(21, ' ')) $Username" + } + elseif (Test-InteractiveSession) { while (-not $Username) { $Username = Read-Host -Prompt $namePrompt.PadLeft(20, ' ') - } + } + } else { + Write-Error "Non-interactive session detected" -ErrorAction Stop } + if ($SsoProvider.IsPresent) { - $_ = $authFlow.LoginSso($Username).GetAwaiter().GetResult() - } else { + $authFlow.LoginSso($Username).GetAwaiter().GetResult() | Out-Null + } + else { $passwords = @() if ($Password) { - $passwords += $Password + if ($Password -is [SecureString]) { + $passwords += [Net.NetworkCredential]::new('', $Password).Password + } + elseif ($Password -is [String]) { + $passwords += $Password + } } - $_ = $authFlow.Login($Username, $passwords).GetAwaiter().GetResult() + $authFlow.Login($Username, $passwords).GetAwaiter().GetResult() | Out-Null } - $lastState = $null Write-Output "" - while(-not $authFlow.IsCompleted) { + while (-not $authFlow.IsCompleted) { if ($lastStep -ne $authFlow.Step.State) { - $authFlow.UiCallback.PrintStepHelp($authFlow) + printStepHelp $authFlow $lastStep = $authFlow.Step.State } - $prompt = $authFlow.UiCallback.GetStepPrompt($authFlow) + $prompt = getStepPrompt $authFlow - $authFlow.UiCallback.ReadingInput = $true - if ($authFlow.Step -is [Authentication.Sync.PasswordStep]) { - $securedPassword = Read-Host -Prompt $prompt -AsSecureString - if ($securedPassword.Length -gt 0) { - $action = [Net.NetworkCredential]::new('',$securedPassword).Password + if ($authFlow.Step -is [KeeperSecurity.Authentication.Sync.PasswordStep]) { + if (Test-InteractiveSession) { + $securedPassword = Read-Host -Prompt $prompt -AsSecureString + if ($securedPassword.Length -gt 0) { + $action = [Net.NetworkCredential]::new('', $securedPassword).Password + } + else { + $action = '' + } } else { - $action = '' + Write-Error "Non-interactive session detected" -ErrorAction Stop } - } - elseif ($authFlow.Step -is [Authentication.Sync.HttpProxyStep]) { - $proxyUser = Read-Host -Prompt 'Proxy username' - $securedPassword = Read-Host -Prompt 'Proxy password' -AsSecureString - if ($securedPassword.Length -gt 0) { - $action = [Net.NetworkCredential]::new('',$securedPassword).Password + } + else { + if (Test-InteractiveSession) { + $action = Read-Host -Prompt $prompt + } else { + Write-Error "Non-interactive session detected" -ErrorAction Stop } - $action = "login `"$proxyUser`" `"$proxyPassword`"" - } else { - $action = Read-Host -Prompt $prompt } - $authFlow.UiCallback.ReadingInput = $false if ($action) { if ($action -eq '?') { - $lastState = $null - } else { - $authFlow.UiCallback.ExecuteStepAction($authFlow, $action) + } + else { + executeStepAction $authFlow $action } } } - if ($authFlow.Step.State -ne [Authentication.Sync.AuthState]::Connected) { - if ($authFlow.Step -is [Authentication.Sync.ErrorStep]) { - Write-Host $authFlow.Step.Message -ForegroundColor Red + if ($authFlow.Step.State -ne [KeeperSecurity.Authentication.Sync.AuthState]::Connected) { + if ($authFlow.Step -is [KeeperSecurity.Authentication.Sync.ErrorStep]) { + Write-Warning $authFlow.Step.Message } return } $auth = $authFlow - if ([Authentication.AuthExtensions]::IsAuthenticated($auth)) { - $Script:Auth = $auth + if ([KeeperSecurity.Authentication.AuthExtensions]::IsAuthenticated($auth)) { Write-Debug -Message "Connected to Keeper as $Username" - $Script:Vault = New-Object Vault.VaultOnline($auth) - $task = $Script:Vault.SyncDown() + $vault = New-Object KeeperSecurity.Vault.VaultOnline($auth) + $task = $vault.SyncDown() Write-Information -MessageData 'Syncing ...' - $_ = $task.GetAwaiter().GetResult() - $Script:Vault.AutoSync = $true + $task.GetAwaiter().GetResult() | Out-Null + $vault.AutoSync = $true + + $Script:Context.Auth = $auth + $Script:Context.Vault = $vault - [Vault.VaultData]$vault = $Script:Vault - $vault.VaultUi = New-Object VaultCallback - Write-Information -MessageData "Decrypted $($vault.RecordCount) record(s)" - $_ = Set-KeeperLocation -Path '\' + [KeeperSecurity.Vault.VaultData]$vaultData = $vault + Write-Information -MessageData "Decrypted $($vaultData.RecordCount) record(s)" + Set-KeeperLocation -Path '\' | Out-Null } } @@ -486,14 +488,13 @@ $Keeper_ConfigServerCompleter = { $prefixes = @('', 'dev.', 'qa.') $suffixes = $('.com', '.eu') - $prefixes | % { $p = $_; $suffixes | % {$s = $_; "${p}keepersecurity${s}" }} | Where {$_.StartsWith($wordToComplete)} + $prefixes | ForEach-Object { $p = $_; $suffixes | ForEach-Object { $s = $_; "${p}keepersecurity${s}" } } | Where-Object { $_.StartsWith($wordToComplete) } } Register-ArgumentCompleter -Command Connect-Keeper -ParameterName Server -ScriptBlock $Keeper_ConfigServerCompleter - New-Alias -Name kc -Value Connect-Keeper function Disconnect-Keeper { -<# + <# .Synopsis Logout from Keeper #> @@ -503,57 +504,383 @@ function Disconnect-Keeper { [Parameter()][switch] $Resume ) - $vault = $Script.Vault - if ($vault -ne $null) { - $_ = $vault.Dispose() + $Script:Context.AvailableTeams = $null + $Script:Context.AvailableUsers = $null + + $Script:Context.ManagedCompanyId = 0 + $Script:Context.Enterprise = $null + + $vault = $Script:Context.Vault + if ($vault) { + $vault.Dispose() | Out-Null } - $Script:Vault = $null + $Script:Context.Vault = $null - [Authentication.IAuthentication] $auth = $Script:Auth - if ($auth -ne $null) { + [KeeperSecurity.Authentication.IAuthentication] $auth = $Script:Context.Auth + if ($auth) { if (-not $Resume.IsPresent) { - $_ = $auth.Logout().GetAwaiter().GetResult() + $auth.Logout().GetAwaiter().GetResult() | Out-Null } - $_ = $auth.Dispose() + $auth.Dispose() | Out-Null } - $Script:Auth = $null + $Script:Context.Auth = $null } New-Alias -Name kq -Value Disconnect-Keeper function Sync-Keeper { -<# + <# .Synopsis Sync down with Keeper #> [CmdletBinding()] - [Vault.VaultOnline]$vault = $Script:Vault + [KeeperSecurity.Vault.VaultOnline]$vault = $Script:Context.Vault if ($vault) { $task = $vault.SyncDown() - $_ = $task.GetAwaiter().GetResult() - } else { - Write-Error -Message "Not connected" + $task.GetAwaiter().GetResult() | Out-Null + } + else { + Write-Error -Message "Not connected" -ErrorAction Stop } } New-Alias -Name ks -Value Sync-Keeper -function Out-Keeper { -<# +function Get-KeeperInformation { + <# .Synopsis - Get access to SDK Library classes + Prints account license information + #> + + $vault = getVault + [KeeperSecurity.Authentication.IAuthentication]$auth = $vault.Auth + + [KeeperSecurity.Authentication.AccountLicense]$license = $auth.AuthContext.License + switch ($license.AccountType) { + 0 { $accountType = $license.ProductTypeName } + 1 { $accountType = 'Family Plan'} + 2 { $accountType = 'Enterprise' } + Default { $accountType = $license.ProductTypeName } + } + $accountType = 'Enterprise' + [PSCustomObject]@{ + PSTypeName = "KeeperSecurity.License.Info" + User = $auth.Username + Server = $auth.Endpoint.Server + Admin = $auth.AuthContext.IsEnterpriseAdmin + AccountType = $accountType + RenewalDate = $license.ExpirationDate + StorageCapacity = [int] [Math]::Truncate($license.BytesTotal / (1024 * 1024 * 1024)) + StorageUsage = [int] [Math]::Truncate($license.BytesUsed * 100 / $license.BytesTotal) + StorageExpires = $license.StorageExpirationDate + } - .Parameter ObjectType - Object Type + if ($license.AccountType -eq 2) { + $enterprise = getEnterprise + if ($enterprise) { + $enterpriseLicense = $enterprise.enterpriseData.EnterpriseLicense + $productTypeId = $enterpriseLicense.ProductTypeId + if ($productTypeId -in @(2, 5)) { + $tier = $enterpriseLicense.Tier + if ($tier -eq 1) { + $plan = 'Enterprise' + } else { + $plan = 'Business' + } + } + elseif ($productTypeId -in @(9, 10)) { + $distributor = $enterpriseLicense.Distributor + if ($distributor -eq $true) { + $plan = 'Distributor' + } else { + $plan = 'Managed MSP' + } + } + elseif ($productTypeId -in @(11, 12)) { + $plan = 'Keeper MSP' + } + elseif ($productTypeId -eq 8) { + $tier = $enterpriseLicense.Tier + if ($tier -eq 1) { + $plan = 'Enterprise' + } else { + $plan = 'Business' + } + $plan = "MC $plan" + } else { + $plan = 'Unknown' + } + if ($productTypeId -in @(5, 10, 12)) { + $plan = "$plan Trial" + } + + $enterpriseInfo = [PSCustomObject]@{ + PSTypeName = "KeeperSecurity.License.EnterpriseInfo" + LicenseType = 'Enterprise' + EnterpriseName = $enterprise.loader.EnterpriseName + BasePlan = $plan + } + if ($enterpriseLicense.Paid) { + $expiration = $enterpriseLicense.Expiration + if ($expiration -gt 0) { + $exp = [KeeperSecurity.Utils.DateTimeOffsetExtensions]::FromUnixTimeMilliseconds($expiration) + $expDate = $exp.ToString('d') + Add-Member -InputObject $enterpriseInfo -MemberType NoteProperty -Name 'Expires' -Value $expDate + } + + switch ($enterpriseLicense.filePlanTypeId) { + -1 { $filePlan = 'No Storage' } + 0 { $filePlan = 'Trial' } + 1 { $filePlan = '1GB' } + 2 { $filePlan = '10GB' } + 3 { $filePlan = '50GB' } + 4 { $filePlan = '100GB' } + 5 { $filePlan = '250GB' } + 6 { $filePlan = '500GB' } + 7 { $filePlan = '1TB' } + 8 { $filePlan = '10TB' } + Default { $filePlan = '???' } + } + Add-Member -InputObject $enterpriseInfo -MemberType NoteProperty -Name 'StorageCapacity' -Value $filePlan + + $numberOfSeats = $enterpriseLicense.NumberOfSeats + if ($numberOfSeats -gt 0) { + Add-Member -InputObject $enterpriseInfo -MemberType NoteProperty -Name 'TotalUsers' -Value $numberOfSeats + } + $seatsAllocated = $enterpriseLicense.SeatsAllocated + if ($seatsAllocated -gt 0) { + Add-Member -InputObject $enterpriseInfo -MemberType NoteProperty -Name 'ActiveUsers' -Value $seatsAllocated + } + $seatsPending = $enterpriseLicense.SeatsPending + if ($seatsAllocated -gt 0) { + Add-Member -InputObject $enterpriseInfo -MemberType NoteProperty -Name 'InvitedUsers' -Value $SeatsPending + } + + } + $enterpriseInfo + } + } +} +New-Alias -Name kwhoami -Value Get-KeeperInformation + +function compareArrays { + param ($array1, $array2) + + if ($array1.Length -eq $array2.Length) { + foreach ($i in 0..($array1.Length-1)) { + if ($array1[$i] -ne $array2[$i]) { + return $false + } + } + return $true + } + return $false +} + +function formatTimeout { + param ($timeout) + + if ($timeout -gt 0) { + $dayMillis = [TimeSpan]::FromDays(1).TotalMilliseconds + if ($logoutTimer -gt $dayMillis) { + return "$([Math]::Round($logoutTimer / $dayMillis)) day(s)" + } + + $hourMillis = [TimeSpan]::FromHours(1).TotalMilliseconds + if ($logoutTimer -gt $hourMillis) { + return "$([Math]::Round($logoutTimer / $hourMillis)) hour(s)" + } + + $minuteMillis = [TimeSpan]::FromMinutes(1).TotalMilliseconds + return "$([Math]::Round($logoutTimer / $minuteMillis)) minute(s)" + } +} + +function Get-KeeperDeviceSettings { + <# + .SYNOPSIS + Display settings of the current device + #> + + $vault = getVault + $auth = $vault.Auth + + $accountSummary = [KeeperSecurity.Authentication.AuthExtensions]::LoadAccountSummary($auth).GetAwaiter().GetResult() + $device = $accountSummary.Devices | Where-Object { compareArrays $_.EncryptedDeviceToken $auth.DeviceToken } | Select-Object -First 1 + if (-not $device) { + Write-Error -Message "The current device could not be found" -ErrorAction Stop + } + + $logoutTimer = $accountSummary.Settings.LogoutTimer + if ($logoutTimer -gt 0) { + $logoutTimerText = formatTimeout $logoutTimer + } else { + $logoutTimerText = '1 hour(s)' + } + + $persistentLoginRestricted = $false + if ($accountSummary.Enforcements.Booleans) { + $plp = $accountSummary.Enforcements.Booleans | Where-Object { $_.Key -eq 'restrict_persistent_login' } | Select-Object -First 1 + if ($plp) { + $persistentLoginRestricted = $plp.Value + } + } + $persistentLoginEnabled = $false + if (-not $persistentLoginRestricted) { + $persistentLoginEnabled = $accountSummary.Settings.PersistentLogin + } + + $settings = [PSCustomObject]@{ + PSTypeName = "KeeperSecurity.Authentication.DeviceInfo" + DeviceName = $device.DeviceName + PersistentLogin = $persistentLoginEnabled + DataKeyPresent = $device.EncryptedDataKeyPresent + IpAutoApprove = -not $accountSummary.Settings.IpDisableAutoApprove + IsSsoUser = $accountSummary.Settings.SsoUser + DeviceLogoutTimeout = $logoutTimerText + } + + if ($accountSummary.Enforcements.Longs) { + $enf = $accountSummary.Enforcements.Longs | Where-Object { $_.Key -eq 'logout_timer_desktop' } | Select-Object -First 1 + if ($enf.Length -eq 1) { + $entLogoutTimer = $enf.Value + if ($entLogoutTimer -gt 0) { + $entLogoutTimerText = formatTimeout $entLogoutTimer + Add-Member -InputObject $settings -MemberType NoteProperty -Name 'EnterpriseLogoutTimeout' -Value $entLogoutTimerText + } + } + } + $settings +} + +function Set-KeeperDeviceSettings { + <# + .SYNOPSIS + Modifies the current device settings + + .PARAMETER NewName + Modifies device name + + .PARAMETER Timeout + Sets inactivity timeout. Format: NUMBER[h|d] + default - minutes, h - hours, d - days + + .PARAMETER Register + Register current device for Persistent Login + + .PARAMETER PersistentLogin + Enables or disables Persistent login for account + ON | OFF + + .PARAMETER IpAutoApprove + Enables or disables Automatic Approval by IP address for account + ON | OFF + + .EXAMPLE + C:\PS> Set-KeeperDeviceSettings -NewName 'Azure' -Timeout 30d -PersistentLogin ON -Register + #> -#> [CmdletBinding()] - Param( - [Parameter(Mandatory=$true, Position=0)][ValidateSet('Vault' ,'Auth')][string] $ObjectType + Param ( + [Parameter()][String] $NewName, + [Parameter(HelpMessage='NUMBER[h|d]')][String] $Timeout, + [Parameter()][Switch] $Register, + [Parameter()][ValidateSet('ON', 'OFF')][String] $PersistentLogin, + [Parameter()][ValidateSet('ON', 'OFF')][String] $IpAutoApprove ) - switch ($ObjectType) { - 'Auth' { $Script:Auth } - 'Vault' { $Script:Vault } + + $vault = getVault + $auth = $vault.Auth + + $accountSummary = [KeeperSecurity.Authentication.AuthExtensions]::LoadAccountSummary($auth).GetAwaiter().GetResult() + $device = $accountSummary.Devices | Where-Object { compareArrays $_.EncryptedDeviceToken $auth.DeviceToken } | Select-Object -First 1 + if (-not $device) { + Write-Error -Message "The current device could not be found" -ErrorAction Stop + } + + $changed = $false + + if ($NewName) { + $request = New-Object Authentication.DeviceUpdateRequest + $request.ClientVersion = $auth.Endpoint.ClientVersion + $request.DeviceStatus = [Authentication.DeviceStatus]::DeviceOk + $request.DeviceName = $NewName + $request.EncryptedDeviceToken = $device.EncryptedDeviceToken + + $auth.ExecuteAuthRest("authentication/update_device", $request, $null, 0).GetAwaiter().GetResult() | Out-Null + Write-Information "Device name was changed to `"$NewName`"" + $changed = $true + } + + $persistentLoginRestricted = $false + if ($accountSummary.Enforcements.Booleans) { + $plp = $accountSummary.Enforcements.Booleans | Where-Object { $_.Key -eq 'restrict_persistent_login' } | Select-Object -First 1 + if ($plp) { + $persistentLoginRestricted = $plp.Value + } + } + if ($Register.IsPresent) { + if ($persistentLoginRestricted -eq $true) { + Write-Error "Persistent Login feature is restricted by Enterprise Administrator" -ErrorAction Stop + } + + $registered = [KeeperSecurity.Authentication.AuthExtensions]::RegisterDataKeyForDevice($auth, $device).GetAwaiter().GetResult() + if ($registered) { + Write-Information "Device is registered for Persistent Login" + } + $changed = $true } -} + if ($PersistentLogin) { + if ($persistentLoginRestricted -eq $true) { + Write-Error "Persistent Login feature is restricted by Enterprise Administrator" -ErrorAction Stop + } + $value = '0' + if ($PersistentLogin -eq 'ON') { + $value = '1' + } + [KeeperSecurity.Authentication.AuthExtensions]::SetSessionParameter($auth, 'persistent_login', $value).GetAwaiter().GetResult() | Out-Null + $changed = $true + } + + if ($IpAutoApprove) { + $value = '1' + if ($IpAutoApprove -eq 'ON') { + $value = '0' + } + [KeeperSecurity.Authentication.AuthExtensions]::SetSessionParameter($auth, 'ip_disable_auto_approve', $value).GetAwaiter().GetResult() | Out-Null + $changed = $true + } + + if ($Timeout) { + $lastLetter = $Timeout[-1] + if ($lastLetter -eq 'd') { + $timeoutInt = $Timeout.Substring(0, $Timeout.Length - 1) + } + elseif ($lastLetter -eq 'h') { + $timeoutInt = $Timeout.Substring(0, $Timeout.Length - 1) + } else { + $lastLetter = '' + $timeoutInt = $Timeout + } + + $minutes = $null + $b = [int]::TryParse($timeoutInt, [ref]$minutes) + if (-not $b) { + Write-Error "Invalid timeout value `"$Timeout`". Format NUMBER[h|d]. d-days, h-hours. default minutes " -ErrorAction Stop + } + if ($lastLetter -eq 'h') { + $minutes = $minutes * 60 + } + elseif ($lastLetter -eq 'd') { + $minutes = $minutes * (60 * 24) + } + [KeeperSecurity.Authentication.AuthExtensions]::SetSessionInactivityTimeout($auth, $minutes).GetAwaiter().GetResult() | Out-Null + $changed = $true + } + + if (-not $changed) { + Get-KeeperDeviceSettings + } +} +New-Alias -Name this-device -Value Set-KeeperDeviceSettings \ No newline at end of file diff --git a/PowerCommander/BouncyCastle.Crypto.dll b/PowerCommander/BouncyCastle.Crypto.dll index 967a933..5ef4591 100644 Binary files a/PowerCommander/BouncyCastle.Crypto.dll and b/PowerCommander/BouncyCastle.Crypto.dll differ diff --git a/PowerCommander/Enterprise.format.ps1xml b/PowerCommander/Enterprise.format.ps1xml new file mode 100644 index 0000000..c9c9a4d --- /dev/null +++ b/PowerCommander/Enterprise.format.ps1xml @@ -0,0 +1,510 @@ + + + + + KeeperSecurity.Enterprise.EnterpriseUser_TableView + + KeeperSecurity.Enterprise.EnterpriseUser + + + + + + + + + + + + + + + Id + + + DisplayName + + + Email + + + UserStatus + + + NodeName + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseUser_ListView + + KeeperSecurity.Enterprise.EnterpriseUser + + + + + + + Id + + + DisplayName + + + Email + + + UserStatus + + + ParentNodeId + + + NodeName + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseNode_TableView + + KeeperSecurity.Enterprise.EnterpriseNode + + + + + + + + + + + + + + + Id + + + DisplayName + + + ParentNodeName + + + RestrictVisibility + + + Provisioning + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseNode_ListView + + KeeperSecurity.Enterprise.EnterpriseNode + + + + + + + Id + + + DisplayName + + + Email + + + ParentNodeId + + + ParentNodeName + + + RestrictVisibility + + + Provisioning + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseTeam_TableView + + KeeperSecurity.Enterprise.EnterpriseTeam + + + + + + + + + + + + + + + + Uid + + + Name + + + RestrictSharing + + + RestrictEdit + + + RestrictView + + + NodeName + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseTeam_ListView + + KeeperSecurity.Enterprise.EnterpriseTeam + + + + + + + Uid + + + Name + + + RestrictSharing + + + RestrictEdit + + + RestrictView + + + ParentNodeId + + + NodeName + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseManagedCompany_TableView + + KeeperSecurity.Enterprise.EnterpriseManagedCompany + + + + + + + + + + Right + + + Right + + + + + + + + CompanyId + + + CompanyName + + + PlanId + + + PlanName + + + FilePlanName + + + Allocated + + + Active + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseManagedCompany_ListView + + KeeperSecurity.Enterprise.EnterpriseManagedCompany + + + + + + + CompanyId + + + CompanyName + + + PlanId + + + PlanName + + + Allocated + + + Active + + + ParentNodeId + + + ParentNodeName + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseRole_TableView + + KeeperSecurity.Enterprise.EnterpriseRole + + + + + + + + + Center + + + Center + + + Center + + + + Center + + + + + + + + Id + + + DisplayName + + + NodeName + + + + if ($_.NewUserInherit -eq $true) {'X'} else {'-'} + + + + Users + + + Teams + + + + if ($_.IsAdminRole -eq $true) {'X'} else {'-'} + + + + + + + + + KeeperSecurity.Enterprise.EnterpriseRole_ListView + + KeeperSecurity.Enterprise.EnterpriseRole + + + + + + + Id + + + DisplayName + + + ParentNodeId + + + NodeName + + + NewUserInherit + + + UserList + + + TeamList + + + + + + + + + KeeperSecurity.Enterprise.RolePermissions_TableView + + KeeperSecurity.Enterprise.RolePermissions + + + + + + + + Center + + + + Center + + + + Center + + + + Center + + + + Center + + + + Center + + + + Center + + + + Center + + + + + + + + RoleName + + + NodeName + + + + if ($_.Cascade -eq $true) {'X'} else {'-'} + + + + + if ($_.ManageNodes -eq $true) {'X'} else {'-'} + + + + + if ($_.ManageUsers -eq $true) {'X'} else {'-'} + + + + + if ($_.ManageRoles -eq $true) {'X'} else {'-'} + + + + + if ($_.ManageTeams -eq $true) {'X'} else {'-'} + + + + + if ($_.ManageCompanies -eq $true) {'X'} else {'-'} + + + + + if ($_.ShareAdmin -eq $true) {'X'} else {'-'} + + + + + if ($_.TransferAccount -eq $true) {'X'} else {'-'} + + + + + + + + + + \ No newline at end of file diff --git a/PowerCommander/Enterprise.ps1 b/PowerCommander/Enterprise.ps1 new file mode 100644 index 0000000..1affdc4 --- /dev/null +++ b/PowerCommander/Enterprise.ps1 @@ -0,0 +1,779 @@ +function getEnterprise { + [KeeperSecurity.Authentication.IAuthentication] $auth = $Script:Context.Auth + if (-not $auth) { + Write-Error -Message "Not Connected" -ErrorAction Stop + } + if (-not $auth.AuthContext.IsEnterpriseAdmin) { + Write-Error -Message "Not an Enterprise Administrator" -ErrorAction Stop + } + $enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + $enterprise = New-Object Enterprise + + $enterprise.enterpriseData = New-Object KeeperSecurity.Enterprise.EnterpriseData + $enterprise.roleData = New-Object KeeperSecurity.Enterprise.RoleData + $enterprise.mspData = New-Object KeeperSecurity.Enterprise.ManagedCompanyData + + [KeeperSecurity.Enterprise.EnterpriseDataPlugin[]] $plugins = $enterprise.enterpriseData, $enterprise.roleData, $enterprise.mspData + + $enterprise.loader = New-Object KeeperSecurity.Enterprise.EnterpriseLoader($auth, $plugins) + $enterprise.loader.Load().GetAwaiter().GetResult() | Out-Null + + if ($enterprise.enterpriseData.EnterpriseLicense.licenseStatus.StartsWith("msp")) { + $enterprise.ManagedCompanies = @{} + } + + $Script:Context.Enterprise = $enterprise + $Script:Context.ManagedCompanyId = 0 + } + + if ($Script:Context.ManagedCompanyId -gt 0) { + if ($null -ne $enterprise.ManagedCompanies) { + $enterpriseMc = $enterprise.ManagedCompanies[$Script:Context.ManagedCompanyId] + if ($null -eq $enterpriseMc) { + $authMc = New-Object KeeperSecurity.Enterprise.ManagedCompanyAuth + $authMc.LoginToManagedCompany($Script:Context.Enterprise.loader, $Script:Context.ManagedCompanyId).GetAwaiter().GetResult() | Out-Null + + $enterpriseMc = New-Object Enterprise + $enterpriseMc.enterpriseData = New-Object KeeperSecurity.Enterprise.EnterpriseData + $enterpriseMc.roleData = New-Object KeeperSecurity.Enterprise.RoleData + + [KeeperSecurity.Enterprise.EnterpriseDataPlugin[]] $plugins = $enterpriseMc.enterpriseData, $enterpriseMc.roleData + + $enterpriseMc.loader = New-Object KeeperSecurity.Enterprise.EnterpriseLoader($authMc, $plugins) + $enterpriseMc.loader.Load().GetAwaiter().GetResult() | Out-Null + $enterprise.ManagedCompanies[$Script:Context.ManagedCompanyId] = $enterpriseMc + } + $enterprise = $enterpriseMc + } else { + $Script:Context.ManagedCompanyId = 0 + } + } + + return $enterprise +} + +function Sync-KeeperEnterprise { + <# + .Synopsis + Sync Keeper Enterprise Information + #> + + [CmdletBinding()] + [Enterprise]$enterprise = getEnterprise + $task = $enterprise.loader.Load() + $task.GetAwaiter().GetResult() | Out-Null +} +New-Alias -Name ked -Value Sync-KeeperEnterprise + + +function Get-KeeperEnterpriseUser { + <# + .Synopsis + Get a list of enterprise users + #> + [CmdletBinding()] + + [Enterprise]$enterprise = getEnterprise + return $enterprise.enterpriseData.Users +} +New-Alias -Name keu -Value Get-KeeperEnterpriseUser + +function Get-KeeperEnterpriseTeam { + <# + .Synopsis + Get a list of enterprise teams + #> + [CmdletBinding()] + + [Enterprise]$enterprise = getEnterprise + return $enterprise.enterpriseData.Teams +} +New-Alias -Name ket -Value Get-KeeperEnterpriseTeam + +$Keeper_TeamNameCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [Enterprise]$enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + return $null + } + if ($wordToComplete) { + $to_complete = $wordToComplete + '*' + } + else { + $to_complete = '*' + } + foreach ($team in $enterprise.enterpriseData.Teams) { + if ($team.Name -like $to_complete) { + $teamName = $team.Name + if ($teamName -match '[\s'']') { + $teamName = $teamName -replace '''', '''''' + $teamName = "'${teamName}'" + } + + $result += $teamName + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function Get-KeeperEnterpriseTeamUser { + <# + .Synopsis + Get a list of enterprise users for team + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$Team + ) + + [Enterprise]$enterprise = getEnterprise + $enterpriseData = $enterprise.enterpriseData + $uid = $null + + if ($Team -is [String]) { + $uids = Get-KeeperEnterpriseTeam | Where-Object { $_.Uid -ceq $Team -or $_.Name -ieq $Team } | Select-Object -Property Uid + if ($uids.Length -gt 1) { + Write-Error -Message "Team name `"$Team`" is not unique. Use Team UID" -ErrorAction Stop + } + + if ($null -ne $uids.Uid) { + $uid = $uids.Uid + } + } + elseif ($null -ne $Team.Uid) { + $uid = $Team.Uid + } + if ($uid) { + $team = $null + if ($enterpriseData.TryGetTeam($uid, [ref]$team)) { + foreach ($userId in $enterpriseData.GetUsersForTeam($uid)) { + $user = $null + foreach ($userId in $enterpriseData.TryGetUserById($userId, [ref]$user)) { + $user + } + } + } + else { + Write-Error -Message "Team `"$uid`" not found" -ErrorAction Stop + } + } + else { + Write-Error -Message "Team `"$Team`" not found" -ErrorAction Stop + } +} +New-Alias -Name ketu -Value Get-KeeperEnterpriseTeamUser +Register-ArgumentCompleter -CommandName Get-KeeperEnterpriseTeamUser -ParameterName Team -ScriptBlock $Keeper_TeamNameCompleter + +$Keeper_ActiveUserCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [Enterprise]$enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + return $null + } + if ($wordToComplete) { + $to_complete = '*' + $wordToComplete + '*' + } + else { + $to_complete = '*' + } + foreach ($user in $enterprise.enterpriseData.Users) { + if ($user.UserStatus -in @([KeeperSecurity.Enterprise.UserStatus]::Active, [KeeperSecurity.Enterprise.UserStatus]::Disabled, [KeeperSecurity.Enterprise.UserStatus]::Blocked)) { + if ($user.Email -like $to_complete) { + $result += $user.Email + } + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function New-KeeperEnterpriseNode { + <# + .SYNOPSIS + Creates Enterprise Node + + .PARAMETER ParentNode + Parent Node name or ID + + .PARAMETER NodeName + Node name + #> + [CmdletBinding()] + Param ( + [Parameter()][string] $ParentNode, + [Parameter(Position = 0, Mandatory = $true)] $NodeName + ) + + [Enterprise]$enterprise = getEnterprise + + [KeeperSecurity.Enterprise.EnterpriseNode] $parent = $null + if ($ParentNode) { + $parent = resolveSingleNode $ParentNode + } + + $n = [KeeperSecurity.Enterprise.EnterpriseExtensions]::CreateNode($enterprise.enterpriseData, $NodeName, $parent).GetAwaiter().GetResult() + Write-Information "Added node `"$($n.DisplayName)`"" +} +New-Alias -Name kena -Value New-KeeperEnterpriseNode + +function Add-KeeperEnterpriseUser { + <# + .SYNOPSIS + Invites Enterprise Users + + .PARAMETER Node + Node Name or ID + + .PARAMETER Email + Email address to invite + + .PARAMETER Emails + Extra email addresses to invite + #> + [CmdletBinding()] + Param ( + [Parameter()][string] $FullName, + [Parameter()][string] $Node, + [Parameter(Position = 0, Mandatory = $true)] $Email, + [Parameter(ValueFromRemainingArguments = $true)] $Emails + ) + + [Enterprise]$enterprise = getEnterprise + [Int64] $nodeId = 0 + if ($Node) { + $n = resolveSingleNode $Node + if ($n) { + $nodeId = $n.Id + } + } + + $inviteOptions = New-Object KeeperSecurity.Enterprise.InviteUserOptions + if ($nodeId -gt 0) { + $inviteOptions.NodeId = $nodeId + } + if ($FullName) { + $inviteOptions.FullName = $FullName + } + + $user = $enterprise.enterpriseData.InviteUser($Email, $inviteOptions).GetAwaiter().GetResult() + if ($user) { + Write-Output "User `"$Email`" is invited" + } + + $inviteOptions.FullName = $null + foreach ($e in $Emails) { + $user = $enterprise.enterpriseData.InviteUser($e, $inviteOptions).GetAwaiter().GetResult() + if ($user) { + Write-Output "User `"$e`" is invited" + } + } +} +New-Alias -Name invite-user -Value Add-KeeperEnterpriseUser + +function Lock-KeeperEnterpriseUser { + <# + .Synopsis + Locks Enterprise User + + .Parameter User + User email, enterprise Id, or instance. + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$User + ) + + [Enterprise]$enterprise = getEnterprise + $userObject = resolveUser $enterprise.enterpriseData $User + if ($userObject) { + $saved = $enterprise.enterpriseData.SetUserLocked($userObject, $true).GetAwaiter().GetResult() + if ($saved) { + Write-Output "User `"$($saved.Email)`" was locked" + } + } +} +Register-ArgumentCompleter -CommandName Lock-KeeperEnterpriseUser -ParameterName User -ScriptBlock $Keeper_ActiveUserCompleter +New-Alias -Name lock-user -Value Lock-KeeperEnterpriseUser + +$Keeper_LockedUserCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [Enterprise]$enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + return $null + } + if ($wordToComplete) { + $to_complete = '*' + $wordToComplete + '*' + } + else { + $to_complete = '*' + } + foreach ($user in $enterprise.enterpriseData.Users) { + if ($user.UserStatus -eq [KeeperSecurity.Enterprise.UserStatus]::Locked) { + if ($user.Email -like $to_complete) { + $result += $user.Email + } + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function Unlock-KeeperEnterpriseUser { + <# + .Synopsis + Unlocks Enterprise User + + .Parameter User + User email, enterprise Id, or instance. + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$User + ) + + [Enterprise]$enterprise = getEnterprise + $userObject = resolveUser $enterprise.enterpriseData $User + if ($userObject) { + $saved = $enterprise.enterpriseData.SetUserLocked($userObject, $false).GetAwaiter().GetResult() + if ($saved) { + Write-Output "User `"$($saved.Email)`" was unlocked" + } + } +} +Register-ArgumentCompleter -CommandName Unlock-KeeperEnterpriseUser -ParameterName User -ScriptBlock $Keeper_LockedUserCompleter +New-Alias -Name unlock-user -Value Unlock-KeeperEnterpriseUser + +$Keeper_EnterpriseUserCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [Enterprise]$enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + return $null + } + if ($wordToComplete) { + $to_complete = '*' + $wordToComplete + '*' + } + else { + $to_complete = '*' + } + foreach ($user in $enterprise.enterpriseData.Users) { + if ($user.Email -like $to_complete) { + $result += $user.Email + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function Move-KeeperEnterpriseUser { + <# + .Synopsis + Transfers enterprise user account to another user + + .Parameter FromUser + email or user ID to transfer vault from user + + .Parameter TargetUser + email or user ID to transfer vault to user + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$FromUser, + [Parameter(Position = 1, Mandatory = $true)]$TargetUser, + [Switch] $Force + ) + + [Enterprise]$enterprise = getEnterprise + + $fromUserObject = resolveUser $enterprise.enterpriseData $FromUser + if (-not $fromUserObject) { + return + } + $targetUserObject = resolveUser $enterprise.enterpriseData $TargetUser + if (-not $targetUserObject) { + return + } + if (-not $Force.IsPresent) { + if (Test-InteractiveSession) { + Write-Output "This action cannot be undone.`n" + $answer = Read-Host -Prompt "Do you want to proceed with transferring $($fromUserObject.Email) account (Yes/No)? > " + } else { + Write-Output('Non-interactive session. Use -Force parameter') + $answer = 'no' + } + if ($answer -ne 'yes' -and $answer -ne 'y') { + return + } +} + $transferResult = $enterprise.enterpriseData.TransferUserAccount($enterprise.roleData, $fromUserObject, $targetUserObject).GetAwaiter().GetResult() + if ($transferResult) { + Write-Information "Successfully Transfered:" + Write-Information " Records: $($transferResult.RecordsTransfered)" + Write-Information " Shared Folders: $($transferResult.SharedFoldersTransfered)" + Write-Information " Team: $($transferResult.TeamsTransfered)" + if ($transferResult.RecordsCorrupted -gt 0 -or $transferResult.SharedFoldersCorrupted -gt 0 -or $transferResult.TeamsCorrupted -gt 0) { + Write-Information "Failed to Transfer:" + if ($transferResult.RecordsCorrupted -gt 0) { + Write-Information " Records: $($transferResult.RecordsCorrupted)" + } + if ($transferResult.SharedFoldersCorrupted -gt 0) { + Write-Information " Shared Folders: $($transferResult.SharedFoldersCorrupted)" + } + if ($transferResult.TeamsCorrupted -gt 0) { + Write-Information " Team: $($transferResult.TeamsCorrupted)" + } + } + } +} +Register-ArgumentCompleter -CommandName Move-KeeperEnterpriseUser -ParameterName FromUser -ScriptBlock $Keeper_LockedUserCompleter +Register-ArgumentCompleter -CommandName Move-KeeperEnterpriseUser -ParameterName TargetUser -ScriptBlock $Keeper_ActiveUserCompleter +New-Alias -Name transfer-user -Value Move-KeeperEnterpriseUser + +function Remove-KeeperEnterpriseUser { + <# + .Synopsis + Removes Enterprise User + + .Parameter User + User email, enterprise Id, or instance. + #> + [CmdletBinding(SupportsShouldProcess=$true, ConfirmImpact = 'High')] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$User, + [Switch] $Force + ) + + [Enterprise]$enterprise = getEnterprise + $userObject = resolveUser $enterprise.enterpriseData $User + if ($userObject) { + if (-not $Force.IsPresent) { + Write-Output "`nDeleting a user will also delete any records owned and shared by this user." + "Before you delete this user, we strongly recommend you lock their account" + "and transfer any important records to other user.`n" + "This action cannot be undone." + + if ($PSCmdlet.ShouldProcess($userObject.Email, "Removing Enterprise User")) { + $enterprise.enterpriseData.DeleteUser($userObject).GetAwaiter().GetResult() | Out-Null + Write-Output "User $($userObject.Email) has been deleted" + } + } + } +} +Register-ArgumentCompleter -CommandName Remove-KeeperEnterpriseUser -ParameterName User -ScriptBlock $Keeper_EnterpriseUserCompleter +New-Alias -Name delete-user -Value Remove-KeeperEnterpriseUser + +function resolveUser { + Param ( + $enterpriseData, + $user + ) + [KeeperSecurity.Enterprise.EnterpriseUser] $u = $null + + if ($user -is [long]) { + if ($enterpriseData.TryGetUserById($user, [ref]$u)) { + return $u + } + } + elseif ($user -is [string]) { + if ($enterpriseData.TryGetUserByEmail($user, [ref]$u)) { + return $u + } + } + elseif ($user -is [KeeperSecurity.Enterprise.EnterpriseUser]) { + if ($enterpriseData.TryGetUserById($user.Id, [ref]$u)) { + return $u + } + } + Write-Error "`"${user}`" cannot be resolved as enterprise user" -ErrorAction Stop +} + +function resolveSingleNode { + Param ($node) + + if ($node) { + $nodes = Get-KeeperEnterpriseNode | Where-Object { $_.Id -eq $node } + if ($nodes.Length -eq 0) { + $nodes = Get-KeeperEnterpriseNode | Where-Object { $_.DisplayName -like $node + '*' } + } + if ($nodes.Length -eq 0) { + Write-Error -Message "Node `"$node`" not found" -ErrorAction Stop + } + if ($nodes.Length -gt 1) { + Write-Error -Message "Node name `"$node`" is not unique. Use Node ID." -ErrorAction Stop + } + $nodes[0] + } +} + +function Get-KeeperEnterpriseNode { + <# + .Synopsis + Get a list of enterprise nodes + #> + [CmdletBinding()] + + [Enterprise]$enterprise = getEnterprise + return $enterprise.enterpriseData.Nodes +} +New-Alias -Name ken -Value Get-KeeperEnterpriseNode + +function Get-KeeperEnterpriseRole { + <# + .SYNOPSIS + Get a list of enterprise roles + + .PARAMETER Role + Role Name or ID + #> + [CmdletBinding()] + + [Enterprise]$enterprise = getEnterprise + return $enterprise.roleData.Roles +} +New-Alias -Name ker -Value Get-KeeperEnterpriseRole + +$Keeper_RoleNameCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [Enterprise]$enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + return $null + } + if ($wordToComplete) { + $to_complete = $wordToComplete + '*' + } + else { + $to_complete = '*' + } + foreach ($role in $enterprise.roleData.Roles) { + if ($role.DisplayName -like $to_complete) { + $roleName = $role.DisplayName + if ($roleName -match '[\s'']') { + $roleName = $roleName -replace '''', '''''' + $roleName = "'${roleName}'" + } + + $result += $roleName + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function Get-KeeperEnterpriseRoleUsers { + <# + .SYNOPSIS + Get a list of enterprise users for a role + + .PARAMETER Role + Role Name or ID + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$Role + ) + + [Enterprise]$enterprise = getEnterprise + $enterpriseData = $enterprise.enterpriseData + $roleData = $enterprise.roleData + $roleId = $null + + if ($Role -is [String]) { + $ids = Get-KeeperEnterpriseRole | Where-Object { $_.Id -eq $Role -or $_.DisplayName -ieq $Role } | Select-Object -Property Id + if ($ids.Length -gt 1) { + Write-Error -Message "Role name `"$Role`" is not unique. Use Role ID" -ErrorAction Stop + } + + if ($null -ne $ids.Id) { + $roleId = $ids.Id + } + } + elseif ($Role -is [long]) { + $ids = Get-KeeperEnterpriseRole | Where-Object { $_.Id -ceq $Role } | Select-Object -First 1 + if ($ids.Length -eq 1) { + $roleId = $ids[0].Id + } + } + elseif ($null -ne $Role.Id) { + $roleId = $Role.Id + } + if ($roleId) { + $erole = $null + if ($roleData.TryGetRole($roleId, [ref]$erole)) { + foreach ($userId in $roleData.GetUsersForRole($erole.Id)) { + $user = $null + if ($enterpriseData.TryGetUserById($userId, [ref]$user)) { + $user + } + } + } + else { + Write-Error -Message "Role `"$roleId`" not found" -ErrorAction Stop + } + } + else { + Write-Error -Message "Role `"$Role`" not found" -ErrorAction Stop + } +} +New-Alias -Name keru -Value Get-KeeperEnterpriseRoleUsers +Register-ArgumentCompleter -CommandName Get-KeeperEnterpriseRoleUsers -ParameterName Role -ScriptBlock $Keeper_RoleNameCompleter + +function Get-KeeperEnterpriseRoleTeams { + <# + .SYNOPSIS + Get a list of enterprise teams for a role + + .PARAMETER Role + Role Name or ID + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)]$Role + ) + + [Enterprise]$enterprise = getEnterprise + $enterpriseData = $enterprise.enterpriseData + $roleData = $enterprise.roleData + $roleId = $null + + if ($Role -is [String]) { + $ids = Get-KeeperEnterpriseRole | Where-Object { $_.Id -eq $Role -or $_.DisplayName -ieq $Role } | Select-Object -Property Id + if ($ids.Length -gt 1) { + Write-Error -Message "Role name `"$Role`" is not unique. Use Role ID" -ErrorAction Stop + } + + if ($null -ne $ids.Id) { + $roleId = $ids.Id + } + } + elseif ($Role -is [long]) { + $ids = Get-KeeperEnterpriseRole | Where-Object { $_.Id -ceq $Role } | Select-Object -First 1 + if ($ids.Length -eq 1) { + $roleId = $ids[0].Id + } + } + elseif ($null -ne $Role.Id) { + $roleId = $Role.Id + } + if ($roleId) { + $erole = $null + if ($roleData.TryGetRole($roleId, [ref]$erole)) { + foreach ($teamUid in $roleData.GetTeamsForRole($erole.Id)) { + $team = $null + if ($enterpriseData.TryGetTeam($teamUid, [ref]$team)) { + $team + } + } + } + else { + Write-Error -Message "Role `"$roleId`" not found" -ErrorAction Stop + } + } + else { + Write-Error -Message "Role `"$Role`" not found" -ErrorAction Stop + } +} +New-Alias -Name kert -Value Get-KeeperEnterpriseRoleTeams +Register-ArgumentCompleter -CommandName Get-KeeperEnterpriseRoleTeams -ParameterName Role -ScriptBlock $Keeper_RoleNameCompleter + +function Get-KeeperEnterpriseAdminRole { + <# + .SYNOPSIS + Get a list of Administrator Permissions + + .PARAMETER Pattern + Role search pattern + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $false)]$Pattern + ) + + [Enterprise]$enterprise = getEnterprise + $roleData = $enterprise.roleData + $roles = $null + + if ($Pattern -is [String]) { + $roles = Get-KeeperEnterpriseRole | Where-Object { $_.Id -eq $Pattern -or $_.DisplayName -match $Pattern } + } + elseif ($Pattern -is [long]) { + $roles = Get-KeeperEnterpriseRole | Where-Object { $_.Id -eq $Pattern } + } + elseif ($null -ne $Pattern.Id) { + $roles = $Pattern + } + else { + $roles = Get-KeeperEnterpriseRole + } + if ($null -ne $roles -and $roles.Length -gt 0 ) { + $roles = $roles | Sort-Object -Property DisplayName + foreach ($role in $roles) { + if ($null -ne $role.Id) { + foreach ($rp in $roleData.GetRolePermissions($role.Id)) { + $rp + } + } + } + } + else { + Write-Error -Message "Role `"$Role`" not found" -ErrorAction Stop + } +} +New-Alias -Name kerap -Value Get-KeeperEnterpriseAdminRole + +function Script:Get-KeeperNodeName { + Param ( + [long]$nodeId + ) + $enterprise = getEnterprise + [KeeperSecurity.Enterprise.EnterpriseNode]$node = $null + if ($enterprise.enterpriseData.TryGetNode($nodeId, [ref]$node)) { + if ($node.ParentNodeId -gt 0) { + return $node.DisplayName + } + else { + return $enterprise.loader.EnterpriseName + } + } +} + +function Script:Get-KeeperRoleName { + Param ( + [long]$roleId + ) + $enterprise = getEnterprise + [KeeperSecurity.Enterprise.EnterpriseRole]$role = $null + if ($enterprise.roleData.TryGetRole($roleId, [ref]$role)) { + return $role.DisplayName + } +} diff --git a/PowerCommander/Enterprise.types.ps1xml b/PowerCommander/Enterprise.types.ps1xml new file mode 100644 index 0000000..2517bf8 --- /dev/null +++ b/PowerCommander/Enterprise.types.ps1xml @@ -0,0 +1,179 @@ + + + + KeeperSecurity.Enterprise.EnterpriseUser + + + NodeName + + Get-KeeperNodeName $this.ParentNodeId + + + + + + + KeeperSecurity.Enterprise.EnterpriseNode + + + ParentNodeName + + Get-KeeperNodeName $this.ParentNodeId + + + + Provisioning + + $provisioning = @() + if ($this.BridgeId -gt 0) { + $provisioning += "Bridge" + } + if ($this.ScimId -gt 0) { + $provisioning += "SCIM" + } + if ($this.SsoServiceProviderIds -and $this.SsoServiceProviderIds.Length -gt 0) { + $provisioning += "SSO" + } + $provisioning + + + + + + + KeeperSecurity.Enterprise.EnterpriseTeam + + + NodeName + + Get-KeeperNodeName $this.ParentNodeId + + + + + + + KeeperSecurity.Enterprise.EnterpriseManagedCompany + + + PlanName + + Switch ($this.ProductId) { + "business" {"Business"} + "businessPlus" {"Business Plus"} + "enterprise" {"Enterprise"} + "enterprisePlus" {"Enterprise Plus"} + Default {$this.ProductId} + } + + + + + FilePlanName + + Switch ($this.FilePlanType) { + "STORAGE_100GB" {"100GB"} + "STORAGE_1000GB" {"1TB"} + "STORAGE_10000GB" {"10TB"} + Default {$this.FilePlanType} + } + + + + + ParentNodeName + + Get-KeeperNodeName $this.ParentNodeId + + + + PlanId + ProductId + + + CompanyId + EnterpriseId + + + CompanyName + EnterpriseName + + + Active + NumberOfUsers + + + Allocated + NumberOfSeats + + + + + KeeperSecurity.Enterprise.EnterpriseRole + + + NodeName + + Get-KeeperNodeName $this.ParentNodeId + + + + Users + + (Get-KeeperEnterpriseRoleUsers $this.Id).Count + + + + Teams + + (Get-KeeperEnterpriseRoleTeams $this.Id).Count + + + + IsAdminRole + + (Get-KeeperEnterpriseAdminRole $this.Id).Count -gt 0 + + + + UserList + + $users = @() + foreach ($user in Get-KeeperEnterpriseRoleUsers $this.Id) { + $users += $user.Email + } + $users -join "`r`n" + + + + TeamList + + $teams = @() + foreach ($team in Get-KeeperEnterpriseRoleTeams $this.Id) { + $teams += $team.Name + } + $teams -join "`r`n" + + + + + + + KeeperSecurity.Enterprise.RolePermissions + + + NodeName + + Get-KeeperNodeName $this.NodeId + + + + RoleName + + Get-KeeperRoleName $this.RoleId + + + + + + \ No newline at end of file diff --git a/PowerCommander/FolderCommands.ps1 b/PowerCommander/FolderCommands.ps1 index 0a685f5..63a270b 100644 --- a/PowerCommander/FolderCommands.ps1 +++ b/PowerCommander/FolderCommands.ps1 @@ -1,9 +1,7 @@ -#requires -Version 5.0 - -using namespace KeeperSecurity +#requires -Version 5.1 function Add-KeeperFolder { -<# + <# .Synopsis Creates a Keeper folder. @@ -30,61 +28,56 @@ function Add-KeeperFolder { #> - [CmdletBinding(DefaultParameterSetName = 'Default')] - Param ( - [Parameter(Position = 0, Mandatory = $true)][string] $Name, - [Parameter()][string] $ParentFolderUid, - [Parameter()][switch] $Shared, - [Parameter()][switch] $CanEdit, - [Parameter()][switch] $CanShare, - [Parameter()][switch] $ManageUsers, - [Parameter()][switch] $ManageRecords - ) - - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - $objs = Get-KeeperChildItems -ObjectType Folder | where Name -eq $Name - if ($objs.Length -gt 0 ) { - Write-Error -Message "Folder `"$Name`" already exists" - return - } - - $parentUid = $Script:CurrentFolder - if ($ParentFolderUid) { - [Vault.FolderNode]$folder = $null - if (-not $vault.TryGetFolder($ParentFolderUid, [ref]$folder)) { - Write-Error -Message "Folder UID `"$ParentFolderUid`" does not exist" - return - } - $parentUid = $ParentFolderUid - } - - $options = $null - if ($Shared.IsPresent) { - $options = New-Object KeeperSecurity.Vault.SharedFolderOptions - if ($CanEdit.IsPresent) { - $options.CanEdit = $true - } - if ($CanShare.IsPresent) { - $options.CanShare = $true - } - if ($ManageUsers.IsPresent) { - $options.ManageUsers = $true - } - if ($ManageRecords.IsPresent) { - $options.ManageRecords = $true - } - } - $task = $vault.CreateFolder($Name, $parentUid, $options) - $task.GetAwaiter().GetResult() + [CmdletBinding(DefaultParameterSetName = 'Default')] + Param ( + [Parameter(Position = 0, Mandatory = $true)][string] $Name, + [Parameter()][string] $ParentFolderUid, + [Parameter()][switch] $Shared, + [Parameter()][switch] $CanEdit, + [Parameter()][switch] $CanShare, + [Parameter()][switch] $ManageUsers, + [Parameter()][switch] $ManageRecords + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $objs = Get-KeeperChildItem -ObjectType Folder | Where-Object Name -eq $Name + if ($objs.Length -gt 0 ) { + Write-Error -Message "Folder `"$Name`" already exists" -ErrorAction Stop + } + + $parentUid = $Script:Context.CurrentFolder + if ($ParentFolderUid) { + [KeeperSecurity.Vault.FolderNode]$folder = $null + if (-not $vault.TryGetFolder($ParentFolderUid, [ref]$folder)) { + Write-Error -Message "Folder UID `"$ParentFolderUid`" does not exist" -ErrorAction Stop + } + $parentUid = $ParentFolderUid + } + + $options = $null + if ($Shared.IsPresent) { + $options = New-Object KeeperSecurity.Vault.SharedFolderOptions + if ($CanEdit.IsPresent) { + $options.CanEdit = $true + } + if ($CanShare.IsPresent) { + $options.CanShare = $true + } + if ($ManageUsers.IsPresent) { + $options.ManageUsers = $true + } + if ($ManageRecords.IsPresent) { + $options.ManageRecords = $true + } + + } + $vault.CreateFolder($Name, $parentUid, $options).GetAwaiter().GetResult() } New-Alias -Name kmkdir -Value Add-KeeperFolder function Remove-KeeperFolder { -<# + <# .Synopsis Delete Keeper folder. @@ -92,35 +85,30 @@ function Remove-KeeperFolder { Folder name or Folder UID #> - [CmdletBinding(DefaultParameterSetName = 'Default')] - Param ( - [Parameter(Position = 0, Mandatory = $true)][string] $Name - ) - - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - $folderUid = $null - $folder = $null - if ($vault.TryGetFolder($Name, [ref]$folder)) { - $folderUid = $folder.FolderUid - } - if (-not $folderUid) { - $objs = Get-KeeperChildItems -ObjectType Folder | where Name -eq $Name - if (-not $objs) { - Write-Error -Message "Folder `"$Name`" does not exist" - return - } - if ($objs.Length -gt 1) { - Write-Error -Message "There are more than one folders with name `"$Name`". Use Folder UID do delete the correct one." - return - } - $folderUid = $objs[0].Uid - } - - $task = $vault.DeleteFolder($folderUid) - $_ = $task.GetAwaiter().GetResult() + [CmdletBinding(DefaultParameterSetName = 'Default')] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] + Param ( + [Parameter(Position = 0, Mandatory = $true)][string] $Name + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $folderUid = $null + $folder = $null + if ($vault.TryGetFolder($Name, [ref]$folder)) { + $folderUid = $folder.FolderUid + } + if (-not $folderUid) { + $objs = Get-KeeperChildItem -ObjectType Folder | Where-Object Name -eq $Name + if (-not $objs) { + Write-Error -Message "Folder `"$Name`" does not exist" -ErrorAction Stop + } + if ($objs.Length -gt 1) { + Write-Error -Message "There are more than one folders with name `"$Name`". Use Folder UID do delete the correct one." -ErrorAction Stop + } + $folderUid = $objs[0].Uid + } + + $vault.DeleteFolder($folderUid).GetAwaiter().GetResult() | Out-Null } New-Alias -Name krmdir -Value Remove-KeeperFolder diff --git a/PowerCommander/Google.Protobuf.dll b/PowerCommander/Google.Protobuf.dll index 77b93c7..b90d861 100644 Binary files a/PowerCommander/Google.Protobuf.dll and b/PowerCommander/Google.Protobuf.dll differ diff --git a/PowerCommander/KeeperSdk.dll b/PowerCommander/KeeperSdk.dll index 3a0f5f1..7ca6e70 100644 Binary files a/PowerCommander/KeeperSdk.dll and b/PowerCommander/KeeperSdk.dll differ diff --git a/PowerCommander/LICENSE b/PowerCommander/LICENSE new file mode 100644 index 0000000..e9e07dd --- /dev/null +++ b/PowerCommander/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2023 Keeper Security Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/PowerCommander/Library.format.ps1xml b/PowerCommander/Library.format.ps1xml index b464764..afaea02 100644 --- a/PowerCommander/Library.format.ps1xml +++ b/PowerCommander/Library.format.ps1xml @@ -1,335 +1,529 @@ - + - - - KeeperSecurity.Authentication.Auth - - KeeperSecurity.Authentication.Auth - - - - - - - - - - - - - - - - - - - Username - - - if ($_.SessionToken) {$_.IsEnterpriseAdmin} - - - $_.Endpoint.Server - - - - - - - - - KeeperSecurity.Authentication.Auth - - KeeperSecurity.Authentication.Auth - - - - - - - Username - - - - if ($_.SessionToken) {$_.IsEnterpriseAdmin} - - - TwoFactorToken - - - SessionToken - - - - $_.Endpoint.Server - - - - ConfigurationInfo - - - - - - + + + KeeperSecurity.Authentication.AuthCommon_TableView + + KeeperSecurity.Authentication.AuthCommon + + + + + + + + + + + + + + + + + + + Username + + + $_.AuthContext.IsEnterpriseAdmin + + + $_.Endpoint.Server + + + + + + - - KeeperSecurity.Vault.VaultOnline - - KeeperSecurity.Vault.VaultOnline - - - - - - - - - Right - - - - Right - - - - Right - - - - - - - - $_.Auth.Username - - - RecordCount - - - SharedFolderCount - - - TeamCount - - - - - - + + KeeperSecurity.Authentication.AuthCommon_ListView + + KeeperSecurity.Authentication.AuthCommon + + + + + + + Username + + + + $_.AuthContext.IsEnterpriseAdmin + + + + $_.Endpoint.Server + + + + ConfigurationInfo + + + + + + - - KeeperSecurity.Vault.Vault - - KeeperSecurity.Vault.Vault - - - - - - - - $_.Auth.Username - - - - RecordCount - - - - SharedFolderCount - - - - TeamCount - - - - - - + + KeeperSecurity.Vault.VaultOnline_TableView + + KeeperSecurity.Vault.VaultOnline + + + + + + + + + Right + + + + Right + + + + Right + + + + + + + + $_.Auth.Username + + + RecordCount + + + SharedFolderCount + + + TeamCount + + + + + + - - KeeperSecurity.Vault.PasswordRecord - - KeeperSecurity.Vault.PasswordRecord - - - - - - - - - - - - - - - - - - - - Uid - - - Title - - - Login - - - DisplayedPassword - - - Link - - - - - - + + KeeperSecurity.Vault.Vault_ListView + + KeeperSecurity.Vault.Vault + + + + + + + + $_.Auth.Username + + + + RecordCount + + + + SharedFolderCount + + + + TeamCount + + + + + + - - KeeperSecurity.Vault.PasswordRecord - - KeeperSecurity.Vault.PasswordRecord - - - - - - - - Uid - - - Title - - - Login - - - - DisplayedPassword - - - - Link - - - Notes - - - - CustomFields - - - - AttachmentsInfo - - - - - - + + KeeperSecurity.Vault.KeeperRecord_TableView + + KeeperSecurity.Vault.PasswordRecord + KeeperSecurity.Vault.TypedRecord + KeeperSecurity.Vault.FileRecord + + + + + + + + + 6 + + + + + + + + + + + Uid + + + TypeName + + + Title + + + PublicInformation + + + + + + - - KeeperSecurity.Vault.SharedFolder - - KeeperSecurity.Vault.SharedFolder - - - - - - - - - - - - - - - - - - - - - - - - - Uid - - - Name - - - DefaultManageRecords - - - DefaultManageUsers - - - DefaultCanEdit - - - DefaultCanShare - - - - - - + + KeeperSecurity.Vault.KeeperRecord_ListView + + KeeperSecurity.Vault.FileRecord + KeeperSecurity.Vault.TypedRecord + KeeperSecurity.Vault.PasswordRecord + + + - - KeeperSecurity.Vault.SharedFolder - - KeeperSecurity.Vault.SharedFolder - - - - - - - - Uid - - - Name - - - - DefaultManageRecords - - - - DefaultManageUsers - - - - DefaultCanEdit - - - - DefaultCanShare - - - Users - - - Records - - - - - - + + + + + Uid + + + + TypeName + + + Title + + + Notes + + + - + + + KeeperSecurity.Vault.FileRecord + + + + + Uid + + + + TypeName + + + Title + + + Notes + + + Name + + + MimeType + + + FileSize + + + + + + KeeperSecurity.Vault.TypedRecord + + + + + Uid + + + + TypeName + + + Title + + + Notes + + + MainFields + + + CustomFields + + + + AttachmentsInfo + + + + + + + KeeperSecurity.Vault.PasswordRecord + + + + + Uid + + + + TypeName + + + Title + + + Login + + + + DisplayedPassword + + + + Link + + + Notes + + + + CustomFields + + + + AttachmentsInfo + + + + + + + + + KeeperSecurity.Vault.SharedFolder_TableView + + KeeperSecurity.Vault.SharedFolder + + + + + + + + + + + Right + + + Right + + + + + + + Uid + + + Name + + + DefaultManageRecords + + + DefaultManageUsers + + + DefaultCanEdit + + + DefaultCanShare + + + UserCount + + + RecordCount + + + + + + + + + KeeperSecurity.Vault.SharedFolder_ListView + + KeeperSecurity.Vault.SharedFolder + + + + + + + Uid + + + Name + + + DefaultManageRecords + + + DefaultManageUsers + + + DefaultCanEdit + + + DefaultCanShare + + + Users + + + RecordCount + + + + + + + + + KeeperSecurity.Vault.FolderNode_TableView + + KeeperSecurity.Vault.FolderNode + + + + + + + + + + + + + + + FolderUid + + + Name + + + FolderType + + + ParentUid + + + SubfolderCount + + + RecordCount + + + + + + + + + KeeperSecurity.Vault.RecordSharePermissions_TableView + + KeeperSecurity.Vault.RecordSharePermissions + + + + + + + + Right + + + Right + + + + + + + + RecordUid + + + RecordTitle + + + Owner + + + Users + + + Folders + + + + + + + + + KeeperSecurity.Vault.RecordSharePermissions_ListView + + KeeperSecurity.Vault.RecordSharePermissions + + + + + + + RecordUid + + + RecordTitle + + + Owner + + + UserShares + + + FolderShares + + + + + + + + \ No newline at end of file diff --git a/PowerCommander/Library.types.ps1xml b/PowerCommander/Library.types.ps1xml index 7d53b0a..071a50d 100644 --- a/PowerCommander/Library.types.ps1xml +++ b/PowerCommander/Library.types.ps1xml @@ -1,190 +1,473 @@ - + - - KeeperSecurity.Authentication.Auth - - - ConfigurationInfo - - $conf = @() - if ($this.Storage -is [KeeperSecurity.Configuration.JsonConfigurationStorage]) { - $conf += $this.Storage.FilePath - } - $c = $this.Storage.Get() - $conf += "Last Login: $($c.LastLogin)" - $conf += "Last Server: $($c.LastServer)" - $conf -join "`n" - - - - + + KeeperSecurity.Authentication.AuthCommon + + + ConfigurationInfo + + $conf = @() + if ($this.Storage -is [KeeperSecurity.Configuration.JsonConfigurationStorage]) { + if ($this.Storage.Cache.Loader -is + [KeeperSecurity.Configuration.JsonConfigurationFileLoader]) { + $conf += $this.Storage.Cache.Loader.FilePath + } + } + $conf -join "`n" + + + + + + + KeeperSecurity.Vault.FileRecord + + + TypeName + file + + + PublicInformation + + [KeeperSecurity.Utils.RecordTypesUtils]::KeeperRecordPublicInformation($this) + + + + + + + KeeperSecurity.Vault.TypedRecord + + + PublicInformation + + [KeeperSecurity.Utils.RecordTypesUtils]::KeeperRecordPublicInformation($this) + + + + MainFields + + $values = @() + foreach ($f in $this.Fields) { + if ($f.FieldName -ne 'fileRef') { + $name = [KeeperSecurity.Utils.RecordTypesUtils]::GetTypedFieldName($f) + if (Get-KeeperPasswordVisible) { + $value = "$([KeeperSecurity.Utils.RecordTypesUtils]::GetTypedFieldValues($f))" + } else { + $value = + "$([KeeperSecurity.Utils.RecordTypesUtils]::GetTypedFieldInformation($f))" + } + $values += , @($name, $value) + } + } + $m = 16 + foreach ($p in $values) { + if ($p[0].Length -gt $m) { + $m = $p[0].Length + } + } + $ff = @() + $m = -$m + foreach ($p in $values) { + $ff += "{0, $m} | {1}" -f $p[0], $p[1] + } + $ff -join "`n" + + + + CustomFields + + $values = @() + foreach ($f in $this.Custom) { + if ($f.FieldName -ne 'fileRef') { + $name = [KeeperSecurity.Utils.RecordTypesUtils]::GetTypedFieldName($f) + if (Get-KeeperPasswordVisible) { + $value = "$([KeeperSecurity.Utils.RecordTypesUtils]::GetTypedFieldValues($f))" + } else { + $value = + "$([KeeperSecurity.Utils.RecordTypesUtils]::GetTypedFieldInformation($f))" + } + $values += , @($name, $value) + } + } + $m = 16 + foreach ($p in $values) { + if ($p[0].Length -gt $m) { + $m = $p[0].Length + } + } + $ff = @() + $m = -$m + foreach ($p in $values) { + $ff += "{0, $m} | {1}" -f $p[0], $p[1] + } + $ff -join "`n" + + + + AttachmentsInfo + + $private:vault = $Script:Vault + if ($vault) { + foreach ($a in $vault.RecordAttachments($this)) { + $af += "$($a.Id) | Name=$(if ($a.Title) {$a.Title} else {$a.Name}) ; + Size=$($a.Size)" + } + } + $af -join "`n" + + + + + + + KeeperSecurity.Vault.PasswordRecord + + + TypeName + legacy + + + DisplayedPassword + + if (Get-KeeperPasswordVisible) { + $this.Password + } else { + if ($this.Password) { + "$([char]0x2022)$([char]0x2022)$([char]0x2022)$([char]0x2022)$([char]0x2022)$([char]0x2022)" + } + } + + + + CustomFields + + if ($this.Custom) { + $values = @() + foreach ($c in $this.Custom) { + $name = $c.Name + $value = $c.Value + $values += , @($name, $value) + } + $m = 16 + foreach ($p in $values) { + if ($p[0].Length -gt $m) { + $m = $p[0].Length + } + } + $ff = @() + $m = -$m + foreach ($p in $values) { + $ff += "{0, $m} | {1}" -f $p[0], $p[1] + } + $ff -join "`n" + } + + + + AttachmentsInfo + + if ($this.Attachments) { + $af = @() + foreach ($a in $this.Attachments) { + $af += "$($a.Id) | Name=$(if ($a.Title) {$a.Title} else {$a.Name}) ; + Size=$($a.Size)" + } + $af -join "`r`n" + } + + + + - - KeeperSecurity.Vault.PasswordRecord - - - DisplayedPassword - - if (Get-KeeperPasswordVisible) { - $this.Password - } else { - if ($this.Password) { - "$([char]0x2022)$([char]0x2022)$([char]0x2022)$([char]0x2022)$([char]0x2022)$([char]0x2022)" - } - } - - - - CustomFields - - if ($this.Custom) { - $cf = @() - foreach ($c in $this.Custom) { - $cf += "$($c.Name) : $($c.Value)" - } - $cf -join "`n" - } - - - - AttachmentsInfo - - if ($this.Attachments) { - $af = @() - foreach ($a in $this.Attachments) { - $af += "Id: $($a.Id) ; Name: $(if ($a.Title) {$a.Title} else {$a.Name}) ; Size: $($a.Size)" - } - $af -join "`n" - } - - - - PSStandardMembers + + KeeperSecurity.Vault.SharedFolder - - DefaultDisplayPropertySet - - Uid - Title - Login - DisplayedPassword - Link - Notes - CustomFields - AttachmentsInfo - - + + Users + + $ul = @() + foreach ($up in $this.UsersPermissions) { + $ul += "$($up.UserType): $($up.Name) ($($up.ShareStatus))" + } + $ul -join "`r`n" + + + + UserCount + $this.UsersPermissions.Count + + + RecordCount + $this.RecordPermissions.Count + - - - + - - KeeperSecurity.Vault.SharedFolder - - - Users - $this.UsersPermissions.Count - - - Records - $this.RecordPermissions.Count - + + KeeperSecurity.Vault.Team + + + PSStandardMembers + + + DefaultDisplayPropertySet + + TeamUid + Name + RestrictEdit + RestrictShare + RestrictView + + + + + + + + + KeeperSecurity.Vault.SharedFolderPermission + + + Name + + if ($this.UserType -eq [KeeperSecurity.Vault.UserType]::Team) { + Get-KeeperObject $this.UserId -ObjectType Team -PropertyName Name + } else { + $this.UserId + } + + + + ShareStatus + + if ($this.ManageRecords -and $this.ManageUsers) { + $status = "Can Manage Users & Records" + } elseif ($this.ManageRecords) { + $status = "Can Manage Records" + } elseif ($this.ManageUsers) { + $status = "Can Manage Users" + } else { + $status = "No User Permission" + } + $status + + + + + PSStandardMembers + + + DefaultDisplayPropertySet + + UserType + Name + ManageRecords + ManageUsers + + + + + + + + + KeeperSecurity.Vault.SharedFolderRecord + + + RecordTitle + + Get-KeeperObject $this.RecordUid -ObjectType Record -PropertyName Title + + + + PSStandardMembers + + + DefaultDisplayPropertySet + + RecordUid + RecordTitle + CanShare + CanEdit + + + + + + + + + KeeperSecurity.Vault.FolderNode + + + RecordCount + + $this.Records.Count + + + + SubfolderCount + + $this.Subfolders.Count + + + + PSStandardMembers + + + DefaultDisplayPropertySet + + FolderUid + Name + FolderType + ParentUid + SharedFolderUid + Subfolders + Records + SubfolderCount + RecordCount + + + + + + - - PSStandardMembers + + KeeperSecurity.Vault.RecordSharePermissions - - DefaultDisplayPropertySet - - Uid - Name - DefaultManageRecords - DefaultManageUsers - DefaultCanEdit - DefaultCanShare - - + + RecordTitle + + (Get-KeeperObject -Uid $this.RecordUid -ObjectType Record).Title + + - - - + - - KeeperSecurity.Vault.EnterpriseTeam - - - PSStandardMembers + + KeeperSecurity.Vault.UserRecordPermissions - - DefaultDisplayPropertySet - - TeamUid - Name - RestrictEdit - RestrictShare - RestrictView - - + + ShareStatus + + if ($this.Owner) { + "Owner" + } elseif ($this.AwaitingApproval) { + "Awaiting Approval" + } elseif ($this.CanShare -and $this.CanEdit) { + "Can Edit & Share" + } elseif ($this.CanShare) { + "Can Share" + } elseif ($this.CanEdit) { + "Can Edit" + } else { + "Read Only" + } + + + + PSStandardMembers + + + DefaultDisplayPropertySet + + Username + ShareStatus + + + + - - - + - - KeeperSecurity.Vault.SharedFolderPermission - - - Name - - if ($this.UserType -eq [KeeperSecurity.Sdk.UserType]::Team) { - Get-KeeperObject $this.UserId -ObjectType Team -PropertyName Name - } else { - $this.UserId - } - - - - PSStandardMembers + + KeeperSecurity.Vault.SharedFolderRecordPermissions - - DefaultDisplayPropertySet - - UserType - Name - ManageRecords - ManageUsers - - + + ShareStatus + + if ($this.CanShare -and $this.CanEdit) { + "Can Edit & Share" + } elseif ($this.CanShare) { + "Can Share" + } elseif ($this.CanEdit) { + "Can Edit" + } else { + "Read Only" + } + + + + SharedFolderName + + (Get-KeeperObject -Uid $this.SharedFolderUid -ObjectType SharedFolder).Name + + + + PSStandardMembers + + + DefaultDisplayPropertySet + + SharedFolderUid + SharedFolderName + ShareStatus + + + + - - - + - - KeeperSecurity.Vault.SharedFolderRecord - - - RecordTitle - - Get-KeeperObject $this.RecordUid -ObjectType Record -PropertyName Title - - - - PSStandardMembers + + KeeperSecurity.Vault.RecordSharePermissions - - DefaultDisplayPropertySet - - RecordUid - RecordTitle - CanShare - CanEdit - - + + Owner + + $this.UserPermissions | Where-Object { $_.Owner } | Select-Object + -ExpandProperty Username + + + + Users + + ($this.UserPermissions | Where-Object { -not $_.Owner }).Count + + + + Folders + + $this.SharedFolderPermissions.Count + + + + UserShares + + $shares = @() + foreach($up in $this.UserPermissions) { + if ($up.Owner) { + continue + } + $shares += "$($up.Username) ($($up.ShareStatus))" + } + $shares -join "`r`n" + + + + FolderShares + + $shares = @() + foreach($Sp in $this.SharedFolderPermissions) { + $shares += "$($sp.SharedFolderName)[$($sp.SharedFolderUid)] + ($($sp.ShareStatus))" + } + $shares -join "`r`n" + + - - - + \ No newline at end of file diff --git a/PowerCommander/ManagedCompany.ps1 b/PowerCommander/ManagedCompany.ps1 new file mode 100644 index 0000000..4503e94 --- /dev/null +++ b/PowerCommander/ManagedCompany.ps1 @@ -0,0 +1,398 @@ +function Switch-KeeperMC { + <# + .Synopsis + Switch to managed company + + .Parameter Name + Managed Company ID or Name + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, Position = 0)][string] $Name + ) + + [Enterprise]$enterprise = getMspEnterprise + + $mc = $enterprise.mspData.ManagedCompanies | Where-Object { ($_.EnterpriseId -eq $Name) } + if ($mc.Length -eq 0) { + $mc = $enterprise.mspData.ManagedCompanies | Where-Object { ($_.EnterpriseName -like $Name + '*') } + } + + if ($mc.Length -eq 0) { + Write-Error -Message "Managed Company`"$Name`" not found" -ErrorAction Stop + } + elseif ($mc.Length -gt 1) { + Write-Error -Message "Managed Company`"$Name`" is not unique. Use Company ID." -ErrorAction Stop + } + + $Script:Context.ManagedCompanyId = $mc.EnterpriseId + Sync-KeeperEnterprise + + Write-Information "Switched to MC `"$($mc.EnterpriseName)`"" +} +New-Alias -Name switch-to-mc -Value Switch-KeeperMC + +function Switch-KeeperMSP { + <# + .Synopsis + Switch to MSP + #> + [CmdletBinding()] + + [Enterprise]$enterprise = getMspEnterprise + + $Script:Context.ManagedCompanyId = 0 + Sync-KeeperEnterprise + + Write-Information "Switched to MSP" +} +New-Alias -Name switch-to-msp -Value Switch-KeeperMSP + + +function Get-KeeperManagedCompany { + <# + .Synopsis + Get a list of managed companies + .Parameter Filter + Managed Company ID or Name + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $false)][string] $Filter + ) + + [Enterprise]$enterprise = getMspEnterprise + if ($Name) { + $enterprise.mspData.ManagedCompanies | Where-Object { ($_.EnterpriseId -eq $Filter) -or ($_.EnterpriseName -like $Filter + '*') } + } + else { + $enterprise.mspData.ManagedCompanies + } +} +New-Alias -Name kmc -Value Get-KeeperManagedCompany + +$Keeper_MspAddonName = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + $msp_addons = @('enterprise_breach_watch', 'compliance_report', 'enterprise_audit_and_reporting', 'msp_service_and_support', 'secrets_manager', 'connection_manager', 'chat') + + $toComplete = $wordToComplete += '*' + foreach ($addon in $msp_addons) { + if ($addon -like $toComplete) { + $result += $addon + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function New-KeeperManagedCompany { + <# + .Synopsis + Adds new Managed Company + .Parameter Name + Managed Company Name + .Parameter PlanId + Managed Company Plan + .Parameter MaximumSeats + Maximum Number of Seats + .Parameter Storage + Storage Plan + .Parameter Addons + Addons + .Parameter Node + Node Name or ID + #> + [CmdletBinding(SupportsShouldProcess=$true)] + Param ( + [Parameter(Mandatory = $true, Position = 0)][string] $Name, + [Parameter(Mandatory = $true)][ValidateSet('business', 'businessPlus', 'enterprise', 'enterprisePlus')][string] $PlanId, + [Parameter(Mandatory = $true)][int] $MaximumSeats, + [Parameter(Mandatory = $false)][ValidateSet('100GB', '1TB', '10TB')][string] $Storage, + [Parameter(Mandatory = $false)][string[]] $Addons, + [Parameter(Mandatory = $false)][string] $Node + ) + + [Enterprise]$enterprise = getMspEnterprise + + $options = New-Object KeeperSecurity.Enterprise.ManagedCompanyOptions + $options.Name = $Name + $options.ProductId = $PlanId + $options.NumberOfSeats = $MaximumSeats + if ($Node) { + $n = findEnterpriseNode $Node + if ($n) { + $options.NodeId = $n.Id + } + else { + Write-Error -Message "Node ${Node} not found" -ErrorAction Stop + } + } + else { + $options.NodeId = $enterprise.enterpriseData.RootNode.Id + } + switch ($Storage) { + '100GB' { $options.FilePlanType = [KeeperSecurity.Enterprise.ManagedCompanyConstants]::StoragePlan100GB } + '1TB' { $options.FilePlanType = [KeeperSecurity.Enterprise.ManagedCompanyConstants]::StoragePlan1TB } + '10TB' { $options.FilePlanType = [KeeperSecurity.Enterprise.ManagedCompanyConstants]::StoragePlan10TB } + } + if ($Addons) { + $aons = @() + foreach ($addon in $Addons) { + $parts = $addon -split ':' + $addonOption = New-Object KeeperSecurity.Enterprise.ManagedCompanyAddonOptions + $addonOption.Addon = $parts[0] + if ($parts.Length -gt 1) { + $addonOption.NumberOfSeats = $parts[1] -as [int] + } + $aons += $addonOption + } + $options.Addons = $aons + } + + + if ($PSCmdlet.ShouldProcess($Name, "Creating Managed Company")) { + return $enterprise.mspData.CreateManagedCompany($options).GetAwaiter().GetResult() + } +} +New-Alias -Name kamc -Value New-KeeperManagedCompany +Register-ArgumentCompleter -CommandName New-KeeperManagedCompany -ParameterName Addons -ScriptBlock $Keeper_MspAddonName + +function Remove-KeeperManagedCompany { + <# + .Synopsis + Removes Managed Company + .Parameter Name + Managed Company Id or Name + #> + [CmdletBinding(SupportsShouldProcess=$true)] + Param ( + [Parameter(Position = 0, Mandatory = $true)][string] $Name + ) + + [Enterprise]$enterprise = getMspEnterprise + $mc = findManagedCompany $Name + if (-not $mc) { + Write-Error -Message "Managed Company ${Name} not found" -ErrorAction Stop + } + + if ($PSCmdlet.ShouldProcess($mc.EnterpriseName, "Removing Managed Company")) { + $enterprise.mspData.RemoveManagedCompany($mc.EnterpriseId).GetAwaiter().GetResult() | Out-Null + Write-Information "Removed Managed Company `"$($mc.EnterpriseName)`" ID: $($mc.EnterpriseId)" + } +} +New-Alias -Name krmc -Value Remove-KeeperManagedCompany + +function Edit-KeeperManagedCompany { + <# + .Synopsis + Removes Managed Company + .Parameter Name + Managed Company New Name + .Parameter PlanId + Managed Company Plan + .Parameter MaximumSeats + Maximum Number of Seats + .Parameter Storage + Storage Plan + .Parameter Addons + Addons + .Parameter Node + Node Name or ID + .Parameter Id + Managed Company Name or Id + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $false)][string] $Name, + [Parameter(Mandatory = $false)][ValidateSet('business', 'businessPlus', 'enterprise', 'enterprisePlus')][string] $PlanId, + [Parameter(Mandatory = $false)][int] $MaximumSeats, + [Parameter(Mandatory = $false)][ValidateSet('100GB', '1TB', '10TB')][string] $Storage, + [Parameter(Mandatory = $false)][string[]] $Addons, + [Parameter(Mandatory = $false)][string] $Node, + [Parameter(Position = 0, Mandatory = $true)][string] $Id + ) + + [Enterprise]$enterprise = getMspEnterprise + $mc = findManagedCompany $Id + if (-not $mc) { + Write-Error -Message "Managed Company ${Id} not found" -ErrorAction Stop + } + + $options = New-Object KeeperSecurity.Enterprise.ManagedCompanyOptions + if ($Name) { + $options.Name = $Name + } + if ($PlanId) { + $options.ProductId = $PlanId + } + if ($MaximumSeats) { + $options.NumberOfSeats = $MaximumSeats + } + switch ($Storage) { + '100GB' { $options.FilePlanType = [KeeperSecurity.Enterprise.ManagedCompanyConstants]::StoragePlan100GB } + '1TB' { $options.FilePlanType = [KeeperSecurity.Enterprise.ManagedCompanyConstants]::StoragePlan1TB } + '10TB' { $options.FilePlanType = [KeeperSecurity.Enterprise.ManagedCompanyConstants]::StoragePlan10TB } + } + if ($Addons) { + $aons = @() + foreach ($addon in $Addons) { + $parts = $addon -split ':' + $addonOption = New-Object KeeperSecurity.Enterprise.ManagedCompanyAddonOptions + $addonOption.Addon = $parts[0] + if ($parts.Length -gt 1) { + $addonOption.NumberOfSeats = $parts[1] -as [int] + } + $aons += $addonOption + } + $options.Addons = $aons + } + if ($Node) { + $n = findEnterpriseNode $Node + if ($n) { + $options.NodeId = $n.Id + } + else { + Write-Error -Message "Node ${Node} not found" -ErrorAction Stop + } + } + else { + $options.NodeId = $enterprise.enterpriseData.RootNode.Id + } + $enterprise.mspData.UpdateManagedCompany($mc.EnterpriseId, $options).GetAwaiter().GetResult() +} +New-Alias -Name kemc -Value Edit-KeeperManagedCompany +Register-ArgumentCompleter -CommandName Edit-KeeperManagedCompany -ParameterName Addons -ScriptBlock $Keeper_MspAddonName + +class MspDailySnapshotAddon { + [string]$Addon + [int]$Units +} +class MspDailySnapshotRecord { + [System.DateTime]$Date + [int]$McEnterpriseId + [int]$LicenseCount + [string]$ProductPlan + [string]$FilePlan + [MspDailySnapshotAddon[]]$Addons +} + +function Get-MspBillingReport { + <# + .Synopsis + Runs MSP Billing Report + .Parameter Month + Report Month 1-12 + .Parameter Year + Report Year 20xx + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $false)][int] $Month, + [Parameter(Mandatory = $false)][int] $Year + ) + + $dt = Get-Date + if (0 -eq $Year) { + $Year = $dt.Year + } + if (0 -eq $Month) { + $Month = $dt.Month - 1 + if ($Month -le 0) { + $Year -= 1 + $Month = 12 + } + } + + $auth = [KeeperSecurity.Authentication.IAuthentication] $auth = $Script:Context.Auth + + $url = [KeeperSecurity.Authentication.AuthExtensions]::GetBiUrl($auth, 'mapping/addons') + $rq = New-Object BI.MappingAddonsRequest + $rs = $auth.ExecuteAuthRest($url, $rq, [BI.MappingAddonsResponse]).GetAwaiter().GetResult() + $filePlans = @{ + 4 = '100GB' + 7 = '1TB' + 8 = '10TB' + } + foreach ($fp in $rs.FilePlans) { + $filePlans[$fp.Id] = $fp.Name + } + $addons = @{} + foreach ($aon in $rs.Addons) { + $addons[$aon.Id] = $aon.Name + } + + $url = [KeeperSecurity.Authentication.AuthExtensions]::GetBiUrl($auth, 'reporting/daily_snapshot') + $rq = New-Object BI.ReportingDailySnapshotRequest + $rq.Month = $Month + $rq.Year = $Year + + $rs = $auth.ExecuteAuthRest($url, $rq, [BI.ReportingDailySnapshotResponse]).GetAwaiter().GetResult() + foreach ($rec in $rs.Records) { + $r = New-Object MspDailySnapshotRecord + $r.Date = [KeeperSecurity.Utils.DateTimeOffsetExtensions]::FromUnixTimeMilliseconds($rec.date).Date + $r.McEnterpriseId = $rec.mcEnterpriseId + $r.LicenseCount = $rec.maxLicenseCount + switch ($rec.MaxBasePlanId) { + 1 { $r.ProductPlan = 'business' } + 2 { $r.ProductPlan = 'businessPlus' } + 10 { $r.ProductPlan = 'enterprise' } + 11 { $r.ProductPlan = 'enterprisePlus' } + default { $r.ProductPlan = "Plan #$($r.rec)" } + } + if ($rec.maxFilePlanTypeId) { + $r.FilePlan = $filePlans[$rec.maxFilePlanTypeId] + if (-not $r.FilePlan) { + $r.FilePlan = "Storage Plan #$($rec.maxFilePlanTypeId)" + } + } + + foreach ($addon in $rec.addons) { + if ($addon.maxAddonId) { + $a = New-Object MspDailySnapshotAddon + $a.Addon = $addons[$addon.maxAddonId] + if (-not $a.Addon) { + $a.Addon = "Addon # $($addon.maxAddonId)" + } + $a.Units = $addon.units + $r.Addons += $a + } + } + $r + } +} + +function findManagedCompany { + Param ( + [string]$mc + ) + $enterprise = getMspEnterprise + $enterprise.mspData.ManagedCompanies | Where-Object { ($_.EnterpriseId -eq $mc) -or ($_.EnterpriseName -eq $mc) } | Select-Object -First 1 +} + +function findEnterpriseNode { + Param ( + [string]$node + ) + $enterprise = getEnterprise + if ($node -eq $enterprise.loader.EnterpriseName) { + return $enterprise.enterpriseData.RootNode + } + $enterprise.enterpriseData.Nodes | Where-Object { ($_.Id -eq $node) -or ($_.DisplayName -eq $node) } | Select-Object -First 1 +} + +function getMspEnterprise { + [Enterprise] $enterprise = $Script:Context.Enterprise + if (-not $enterprise) { + $enterprise = getEnterprise + } + if ($enterprise.enterpriseData.EnterpriseLicense -and $enterprise.enterpriseData.EnterpriseLicense.LicenseStatus -like "msp*") { + return $enterprise + } + Write-Error -Message "Not a MSP (Managed Service Provider)" -ErrorAction Stop +} diff --git a/PowerCommander/PowerCommander.format.ps1xml b/PowerCommander/PowerCommander.format.ps1xml index 13815cc..4eb24c3 100644 --- a/PowerCommander/PowerCommander.format.ps1xml +++ b/PowerCommander/PowerCommander.format.ps1xml @@ -1,344 +1,344 @@ - - - KeeperEntries - - KeeperSecurity.Commander.FolderEntry - KeeperSecurity.Commander.RecordEntry - - - - FlatKeeperEntries - - KeeperSecurity.Commander.FolderEntryFlat - KeeperSecurity.Commander.RecordEntryFlat - - - + + + KeeperEntries + + KeeperSecurity.Commander.FolderEntry + KeeperSecurity.Commander.RecordEntry + + + + FlatKeeperEntries + + KeeperSecurity.Commander.FolderEntryFlat + KeeperSecurity.Commander.RecordEntryFlat + + + - - - KeeperEntries-GroupingFormat - - - - - - 4 - - Vault Folder: - - - $_.OwnerFolder - - - - - - - - - - - + + + KeeperEntries-GroupingFormat + + + + + + 4 + + Vault Folder: + + + $_.OwnerFolder + + + + + + + + + + + - - - KeeperSecurity.Commander.FolderInfo.Table - - KeeperSecurity.Commander.FolderInfo - - - - - - - - Path - - - - - - - - KeeperSecurity.Commander.FolderInfo.List - - KeeperSecurity.Commander.FolderInfo - - - - - - - Path - - - FolderType - - - Name - - - FolderUid - - - ParentUid - - - - - - - - - KeeperSecurity.Commander.Entries - - KeeperEntries - - - OwnerFolder - KeeperEntries-GroupingFormat - - - - - - 7 - - - - 24 - - - - - - - - Mode - - - Uid - - - Name - - - - - - - - - KeeperSecurity.Commander.Entries - - KeeperEntries - - - OwnerFolder - KeeperEntries-GroupingFormat - - - - - - KeeperSecurity.Commander.FolderEntry - - - - - FolderType - - - Name - - - Mode - - - - Uid - - - - - - KeeperSecurity.Commander.RecordEntry - - - - - 'Record' - - - - Name - - - Mode - - - Login - - - - Link - - - - Uid - - - - - - - + + + KeeperSecurity.Commander.FolderInfo.Table + + KeeperSecurity.Commander.FolderInfo + + + + + + + + Path + + + + + + + + KeeperSecurity.Commander.FolderInfo.List + + KeeperSecurity.Commander.FolderInfo + + + + + + + Path + + + FolderType + + + Name + + + FolderUid + + + ParentUid + + + + + + - - KeeperSecurity.Commander.FlatEntries - - FlatKeeperEntries - - - - - - 7 - - - - 24 - - - - - - - - Mode - - - Uid - - - Name - - - - - - + + KeeperSecurity.Commander.Entries + + KeeperEntries + + + OwnerFolder + KeeperEntries-GroupingFormat + + + + + + 7 + + + + 24 + + + + + + + + Mode + + + Uid + + + Name + + + + + + - - KeeperSecurity.Commander.FlatEntries - - FlatKeeperEntries - - - - - - KeeperSecurity.Commander.FolderEntryFlat - - - - - FolderType - - - Name - - - Mode - - - + + KeeperSecurity.Commander.Entries + + KeeperEntries + + OwnerFolder - - - - Uid - - - - - - KeeperSecurity.Commander.RecordEntryFlat - - - - - 'Record' - - - - Name - - - Mode - - - Login - - - - Link - - - - $_.OwnerFolder -join ', ' - - - - Uid - - - - - - - + KeeperEntries-GroupingFormat + + + + + + KeeperSecurity.Commander.FolderEntry + + + + + FolderType + + + Name + + + Mode + + + + Uid + + + + + + KeeperSecurity.Commander.RecordEntry + + + + + 'Record' + + + + Name + + + Mode + + + Type + + + + PublicInformation + + + + Uid + + + + + + + + + + KeeperSecurity.Commander.FlatEntries + + FlatKeeperEntries + + + + + + 7 + + + + 24 + + + + + + + + Mode + + + Uid + + + Name + + + + + + + + + KeeperSecurity.Commander.FlatEntries + + FlatKeeperEntries + + + + + + KeeperSecurity.Commander.FolderEntryFlat + + + + + FolderType + + + Name + + + Mode + + + + OwnerFolder + + + + Uid + + + + + + KeeperSecurity.Commander.RecordEntryFlat + + + + + 'Record' + + + + Name + + + Mode + + + Login + + + + Link + + + + $_.OwnerFolder -join ', ' + + + + Uid + + + + + + + - - TOTP.Codes - - TOTP.Codes - - - - - - - - - - - - - - - - - RecordTitle - - - TOTPCode - - - Elapsed - - - Left - - - - - - + + TOTP.Codes + + TOTP.Codes + + + + + + + + + + + + + + + + + RecordTitle + + + TOTPCode + + + Elapsed + + + Left + + + + + + - - + + \ No newline at end of file diff --git a/PowerCommander/PowerCommander.psd1 b/PowerCommander/PowerCommander.psd1 index 9dd4b11..f22aed8 100644 Binary files a/PowerCommander/PowerCommander.psd1 and b/PowerCommander/PowerCommander.psd1 differ diff --git a/PowerCommander/PowerCommander.psm1 b/PowerCommander/PowerCommander.psm1 index a392f70..b6776e9 100644 --- a/PowerCommander/PowerCommander.psm1 +++ b/PowerCommander/PowerCommander.psm1 @@ -1,11 +1,82 @@ -#requires -Version 5.0 - -using namespace KeeperSecurity -using namespace System.Threading -using namespace System.Threading.Tasks +#requires -Version 5.1 +Class Enterprise { + [KeeperSecurity.Enterprise.EnterpriseLoader] $loader + [KeeperSecurity.Enterprise.EnterpriseData] $enterpriseData + [KeeperSecurity.Enterprise.RoleData] $roleData + [KeeperSecurity.Enterprise.ManagedCompanyData] $mspData + [hashtable] $ManagedCompanies = $null +} -function initialize { - $Script:Auth = $null +class KeeperContext { + [KeeperSecurity.Authentication.IAuth] $Auth = $null + [KeeperSecurity.Vault.VaultOnline] $Vault = $null + [string] $CurrentFolder = '' + [Enterprise] $Enterprise = $null + [Int32] $ManagedCompanyId = 0 + $AvailableTeams = $null + $AvailableUsers = $null } -initialize + +New-Variable -Name Context -Option Constant -Scope 'Script' -Value (New-Object KeeperContext) + +Export-ModuleMember -Function Connect-Keeper, Sync-Keeper, Disconnect-Keeper, Get-KeeperInformation, +Get-KeeperDeviceSettings, Set-KeeperDeviceSettings +Export-ModuleMember -Alias kc, ks, kq, kwhoami, this-device + +Export-ModuleMember -Function Get-KeeperLocation, Set-KeeperLocation, Get-KeeperChildItem, +Get-KeeperObject +Export-ModuleMember -Alias kpwd, kcd, kdir, ko + +Export-ModuleMember -Function Get-KeeperRecord, Copy-KeeperToClipboard, Show-TwoFactorCode, +Add-KeeperRecord, Remove-KeeperRecord, Move-RecordToFolder, +Get-KeeperPasswordVisible, Set-KeeperPasswordVisible, Get-KeeperRecordType +Export-ModuleMember -Alias kr, kcc, 2fa, kadd, kdel, kmv, krti + +Export-ModuleMember -Function Get-KeeperSharedFolder +Export-ModuleMember -Alias ksf + +Export-ModuleMember -Function Add-KeeperFolder, Remove-KeeperFolder +Export-ModuleMember -Alias kmkdir, krmdir + +Export-ModuleMember -Function Get-KeeperNodeName, Get-KeeperRoleName + +Export-ModuleMember -Function Sync-KeeperEnterprise, Get-KeeperEnterpriseUser, Get-KeeperEnterpriseTeam, +Get-KeeperEnterpriseNode, Add-KeeperEnterpriseUser, Lock-KeeperEnterpriseUser, +Unlock-KeeperEnterpriseUser, Move-KeeperEnterpriseUser, Remove-KeeperEnterpriseUser, Get-KeeperEnterpriseRoleTeams, +Get-KeeperEnterpriseTeamUser, New-KeeperEnterpriseNode, Get-KeeperEnterpriseRole, Get-KeeperEnterpriseRoleUsers, +Get-KeeperEnterpriseAdminRole +Export-ModuleMember -Alias ked, keu, ket, ketu, ken, ker, keru, kert, kerap, kena, +invite-user, lock-user, unlock-user, transfer-user, delete-user + +Export-ModuleMember -Function Get-KeeperManagedCompany, New-KeeperManagedCompany, Remove-KeeperManagedCompany, +Edit-KeeperManagedCompany, Get-MspBillingReport, Switch-KeeperMC, Switch-KeeperMSP +Export-ModuleMember -Alias kmc, kamc, krmc, kemc, switch-to-mc, switch-to-msp + +Export-ModuleMember -Function Show-KeeperRecordShare, Grant-KeeperRecordAccess, Revoke-KeeperRecordAccess, +Grant-KeeperSharedFolderAccess, Revoke-KeeperSharedFolderAccess, Get-KeeperAvailableTeam, Move-KeeperRecordOwnership, +New-KeeperOneTimeShare, Get-KeeperOneTimeShare, Remove-KeeperOneTimeShare +Export-ModuleMember -Alias kshrsh, kshr, kushr, kshf, kushf, kat, ktr, kotsr, kotsn, kotsg + +Export-ModuleMember -Function Get-KeeperSecretManagerApp, Add-KeeperSecretManagerApp, Grant-KeeperSecretManagerFolderAccess, +Revoke-KeeperSecretManagerFolderAccess, Add-KeeperSecretManagerClient, Remove-KeeperSecretManagerClient +Export-ModuleMember -Alias ksm, ksm-create, ksm-share, ksm-unshare, ksm-addclient, ksm-rmclient + +Export-ModuleMember -Function Copy-KeeperFileAttachment, Copy-KeeperFileAttachmentToStream, Copy-FileToKeeperRecord +Export-ModuleMember -Alias kda + +# function Test-Keeper { +# [CmdletBinding()] +# Param ( +# [Parameter(Mandatory = $true)]$Path +# ) +# [KeeperSecurity.Vault.VaultOnline]$vault = getVault +# [KeeperSecurity.Vault.FolderNode]$folder = $null +# if (!$vault.TryGetFolder($Script:Context.CurrentFolder, [ref]$folder)) { +# $folder = $vault.RootFolder +# } + +# $comps = splitKeeperPath $Path +# parseKeeperPath $comps $vault $folder +# } +# Export-ModuleMember -Function Test-Keeper \ No newline at end of file diff --git a/PowerCommander/PowerCommander.pssproj b/PowerCommander/PowerCommander.pssproj index 2d541b4..c6b18b2 100644 --- a/PowerCommander/PowerCommander.pssproj +++ b/PowerCommander/PowerCommander.pssproj @@ -10,7 +10,7 @@ PowerCommander.tests.ps1 net462 Console - v4.6.1 + v4.7.2 Windows PowerShell diff --git a/PowerCommander/PowerCommander.tests.ps1 b/PowerCommander/PowerCommander.tests.ps1 index 322b28a..bc84f83 100644 --- a/PowerCommander/PowerCommander.tests.ps1 +++ b/PowerCommander/PowerCommander.tests.ps1 @@ -1,13 +1,13 @@ # # This is a PowerShell Unit Test file. -# You need a unit test framework such as Pester to run PowerShell Unit tests. +# You need a unit test framework such as Pester to run PowerShell Unit tests. # You can download Pester from https://go.microsoft.com/fwlink/?LinkID=534084 # Describe "Get-Function" { - Context "Function Exists" { - It "Should Return" { - - } - } + Context "Function Exists" { + It "Should Return" { + + } + } } \ No newline at end of file diff --git a/PowerCommander/PowerCommander.types.ps1xml b/PowerCommander/PowerCommander.types.ps1xml index 14551e1..967aaf7 100644 --- a/PowerCommander/PowerCommander.types.ps1xml +++ b/PowerCommander/PowerCommander.types.ps1xml @@ -1,48 +1,50 @@ - + - - KeeperSecurity.Commander.FolderEntry - - - Mode - - "f----$(if ($this.Shared) {'S'} else {'-'})" - - - - - - KeeperSecurity.Commander.RecordEntry - - - Mode - - "-r-$(if ($this.HasAttachments) {'A'} else {'-'})$(if ($this.Owner) {'O'} else {'-'})$(if ($this.Shared) {'S'} else {'-'})" - - - - + + KeeperSecurity.Commander.FolderEntry + + + Mode + + "f----$(if ($this.Shared) {'S'} else {'-'})" + + + + + + KeeperSecurity.Commander.RecordEntry + + + Mode + + "-r-$(if ($this.HasAttachments) {'A'} else {'-'})$(if ($this.Owner) {'O'} else + {'-'})$(if ($this.Shared) {'S'} else {'-'})" + + + + - - KeeperSecurity.Commander.FolderEntryFlat - - - Mode - - "f---$(if ($this.Shared) {'S'} else {'-'})-" - - - - - - KeeperSecurity.Commander.RecordEntryFlat - - - Mode - - "-r-$(if ($this.HasAttachments) {'A'} else {'-'})$(if ($this.Owner) {'O'} else {'-'})$(if ($this.Shared) {'S'} else {'-'})" - - - - + + KeeperSecurity.Commander.FolderEntryFlat + + + Mode + + "f---$(if ($this.Shared) {'S'} else {'-'})-" + + + + + + KeeperSecurity.Commander.RecordEntryFlat + + + Mode + + "-r-$(if ($this.HasAttachments) {'A'} else {'-'})$(if ($this.Owner) {'O'} else + {'-'})$(if ($this.Shared) {'S'} else {'-'})" + + + + \ No newline at end of file diff --git a/PowerCommander/README.md b/PowerCommander/README.md index 48cc141..94dc437 100644 --- a/PowerCommander/README.md +++ b/PowerCommander/README.md @@ -1,28 +1,91 @@ ### Reference Keeper Commander Powershell module +To install PowerCommander from PowerShell Gallery +``` +Install-Module -Name PowerCommander +``` -To install the PowerCommander module copy PowerCommander\ directory to +To run the PowerCommander module from the source copy PowerCommander\ directory to * `%USERPROFILE%\Documents\WindowsPowerShell\Modules` Per User * `C:\Program Files\WindowsPowerShell\Modules` All users ### Cmdlets +| Cmdlet name | Alias | Description +|----------------------------------------|-------------|---------------------------- +| Connect-Keeper | kc | Login to Keeper server +| Sync-Keeper | ks | Sync with Keeper server +| Disconnect-Keeper | | Logout and clear the data +| Get-KeeperLocation | kpwd | Print current Keeper folder +| Set-KeeperLocation | kcd | Change Keeper folder +| Get-KeeperChildItem | kdir | Display subfolder and record names in the current Keeper folder +| Get-KeeperObject | ko | Get Keeper object by Uid +| Get-KeeperRecord | kr | Enumerate all records +| Get-KeeperSharedFolder | ksf | Enumerate all shared folders +| Add-KeeperRecord | kadd | Add/Modify Keeper record +| Get-KeeperRecordType | krti | Get Record Type Information +| Remove-KeeperRecord | kdel | Delete Keeper record +| Move-RecordToFolder | kmv | Move records to Keeper folder +| Add-KeeperFolder | kmkdir | Create Keeper folder +| Remove-KeeperFolder | krmdir | Remove Keeper folder +| Copy-KeeperToClipboard | kcc | Copy record password to clipboard +| Show-TwoFactorCode | 2fa | Display Two Factor Code +| Copy-KeeperFileAttachment | kda | Download file attachments +| Copy-KeeperFileAttachmentToStream | | Download file attachement to stream +| Copy-FileToKeeperRecord | | Upload file attachment to a record +| Get-KeeperInformation | kwhoami | Print account license information (new) +| Get-KeeperDeviceSettings | | Print the current device settings (new) +| Set-KeeperDeviceSettings | this-device | Modifies the current device settings (new) -| Cmdlet name | Alias | Description -|---------------------------|--------|---------------------------- -| Connect-Keeper | kc | Login to Keeper server -| Sync-Keeper | ks | Sync with Keeper server -| Disconnect-Keeper | | Logout and clear the data -| Get-KeeperLocation | kpwd | Print current Keeper folder -| Set-KeeperLocation | kcd | Change Keeper folder -| Get-KeeperChildItems | kdir | Display subfolder and record names in the current Keeper folder -| Get-KeeperRecords | kr | Enumerate all records -| Get-KeeperSharedFolders | ksf | Enumerate all shared folders -| Add-KeeperRecord | kadd | Add/Modify Keeper record -| Remove-KeeperRecord | kdel | Delete Keeper record -| Add-KeeperFolder | kmkdir | Create Keeper Folder -| Remove-KeeperFolder | krmdir | Remove Keeper Folder -| Move-RecordToFolder | kmv | Move owned record to Keeper folder -| Copy-KeeperToClipboard | kcc | Copy record password to clipboard -| Show-TwoFactorCode | 2fa | Display Two Factor Code + +### Sharing Cmdlets +| Cmdlet name | Alias | Description +|----------------------------------------|-------------|---------------------------- +| Show-KeeperRecordShare | kshrsh | Show a record sharing information +| Grant-KeeperRecordAccess | kshr | Share a record with user +| Revoke-KeeperRecordAccess | kushr | Remove record share from user +| Move-KeeperRecordOwnership | ktr | Transfer record ownership to user +| Grant-KeeperSharedFolderAccess | kshf | Add a user or team to a shared folder +| Revoke-KeeperSharedFolderAccess | kushf | Remove a user or team from a shared folder +| Get-KeeperAvailableTeam | kat | Get available teams +| Get-KeeperOneTimeShare | kotsg | Get One-Time Shares for a record +| New-KeeperOneTimeShare | kotsn | Create One-Time Share +| Remove-KeeperOneTimeShare | kotsr | Remove One-Time Share + +### Enterprise Cmdlets +| Cmdlet name | Alias | Description +|----------------------------------------|-------------|---------------------------- +| Sync-KeeperEnterprise | ked | Sync Keeper enterprise information +| Get-KeeperEnterpriseNode | ken | Enumerate all enterprise nodes +| Get-KeeperEnterpriseUser | keu | Enumerate all enterprise users +| Get-KeeperEnterpriseTeam | ket | Enumerate all enterprise teams +| Get-KeeperEnterpriseTeamUser | ketu | Get a list of enterprise users for team +| New-KeeperEnterpriseNode | kena | Create Node (new) +| Add-KeeperEnterpriseUser | invite-user | Invite User to Enterprise (new) +| Lock-KeeperEnterpriseUser | lock-user | Lock Enterprise User +| Unlock-KeeperEnterpriseUser | unlock-user | Unlock Enterprise User +| Move-KeeperEnterpriseUser |transfer-user| Transfer user account to another user +| Remove-KeeperEnterpriseUser | delete-user | Delete Enterprise User +| Get-KeeperEnterpriseRole | ker | Enumerate all enterprise roles (new) +| Get-KeeperEnterpriseRoleUsers | keru | Get a list of enterprise users for role (new) +| Get-KeeperEnterpriseRoleTeams | kert | Get a list of enterprise teams for role (new) +| Get-KeeperEnterpriseAdminRole | kerap | Enumerate all enterprise role admin permissions (new) +| Get-KeeperMspLicenses | msp-license | Return MSP licenses +| Switch-KeeperMC |switch-to-mc | Switch to Managed Company (new) +| Switch-KeeperMSP |switch-to-msp| Switch back to MSP (new) +| Get-KeeperManagedCompany | kmc | Enumerate all enterprise managed companies +| New-KeeperManagedCompany | kamc | Create Managed Company +| Remove-KeeperManagedCompany | krmc | Remove Managed Company +| Edit-KeeperManagedCompany | kemc | Edit Managed Company +| Get-MspBillingReport | | Run MSP Billing Report + +### Secret Manager Cmdlets +| Cmdlet name | Alias | Description +|----------------------------------------|-------------|---------------------------- +| Get-KeeperSecretManagerApp | ksm | Enumerate all Keeper Secret Manager Applications +| Add-KeeperSecretManagerApp | ksm-create | Add a Keeper Secret Manager Application +| Grant-KeeperSecretManagerFolderAccess | ksm-share | Add a shared folder to KSM Application +| Revoke-KeeperSecretManagerFolderAccess | ksm-unshare | Remove a Shared Folder from KSM Application +| Add-KeeperSecretManagerClient |ksm-addclient| Add a client/device to KSM Application +| Remove-KeeperSecretManagerClient | ksm-rmclient| Remove a client/device from KSM Application #### Examples @@ -63,7 +126,7 @@ To install the PowerCommander module copy PowerCommander\ directory to PS > kr|2fa ``` where - * `kr` is alias for `Get-KeeperRecords` + * `kr` is alias for `Get-KeeperRecord` * `2fa` is alias for `Show-TwoFactorCode` 5. Copy record password to clipboard @@ -82,17 +145,44 @@ To install the PowerCommander module copy PowerCommander\ directory to 6. Add/Modify Keeper record ``` - PS > kadd -Login email@company.com -GeneratePassword -URL https://company.com -Custom 'Name:John Doe' 'Record for John Doe' + PS > kadd -Title 'Record for John Doe' -GeneratePassword login=email@company.com url=https://company.com 'User Name=John Doe' ``` - creates a record in Keeper - + creates a legacy record in Keeper + ``` + PS > kadd -RecordType login -Title 'Record for John Doe' -GeneratePassword login=email@company.com url=https://company.com 'User Name=John Doe' ``` - PS > kadd -GeneratePassword -UpdateOnly 'Record for John Doe' + creates a record of `login` type in Keeper ``` - generates a new password + PS > $address = @{"street1" = "123 Main St."; "city" = "Neitherville"; "state" = "CA"; "zip" = "12345"} + PS > kadd -RecordType address -Title 'Home Address' -address $address phone.Home='(555)123-4567' name="Doe, John" + ``` + ``` + PS > kadd -Uid -GeneratePassword + ``` + generates a new password for existing record + + Pre-defined fields supported by both legacy and typed records + * `login` Login + * `password` Password + * `url` Website Address 7. Copy owned record to folder ``` PS > Get-KeeperChildItem -ObjectType Record | Move-RecordToFolder 'Shared Folder' ``` copies all records in the current Keeper folder to the folder with name 'Shared Folder' + +8. List all enterprise users + ``` + PS > Get-KeeperEnterpriseUser + ``` + +9. Create a new Managed Company + ``` + PS> New-KeeperManagedCompany -Name "Company Name" -PlanId enterprisePlus -Allocated 5 + ``` + +10. Switch to a new Managed Company + ``` + PS> switch-to-mc "Company Name" + ``` \ No newline at end of file diff --git a/PowerCommander/Record.format.ps1xml b/PowerCommander/Record.format.ps1xml new file mode 100644 index 0000000..587ace1 --- /dev/null +++ b/PowerCommander/Record.format.ps1xml @@ -0,0 +1,226 @@ + + + + + KeeperSecurity.Vault.RecordField_TableView + + KeeperSecurity.Vault.RecordField + + + + + + + + + + + + + Name + + + TypeName + + + Multiple + + + DefaultValue + + + + + + + + + KeeperSecurity.Vault.RecordTypeField_TableView + + KeeperSecurity.Vault.RecordTypeField + + + + + + + + + + + + FieldName + + + FieldLabel + + + TypeName + + + + + + + + + KeeperSecurity.Vault.RecordType_TableView + + KeeperSecurity.Vault.RecordType + + + + + + + + + + + + + Name + + + Description + + + Scope + + + Fields + + + + + + + + + KeeperSecurity.Vault.RecordField_ListView + + KeeperSecurity.Vault.RecordField + + + + + + + Name + + + + $_.Type.Name + + + + $_.Type.Description + + + Multiple + + + + + + + + + KeeperSecurity.Vault.ExternalRecordShare_TableView + + KeeperSecurity.Vault.ExternalRecordShare + + + + + + + + + + + + + + + + + + + + + + + RecordUid + + + Name + + + g + $_.CreatedOn.LocalDateTime + + + g + $_.AccessExpiresOn.LocalDateTime + + + g + $_.FirstAccessed.LocalDateTime + + + g + $_.LastAccessed.LocalDateTime + + + + + + + + + KeeperSecurity.Vault.ExternalRecordShare_ListView + + KeeperSecurity.Vault.ExternalRecordShare + + + + + + + + RecordUid + + + + Name + + + + f + $_.CreatedOn.LocalDateTime + + + + f + $_.AccessExpiresOn.LocalDateTime + + + + f + $_.FirstAccessed.LocalDateTime + + + + f + $_.LastAccessed.LocalDateTime + + + + + + + + + + \ No newline at end of file diff --git a/PowerCommander/Record.types.ps1xml b/PowerCommander/Record.types.ps1xml new file mode 100644 index 0000000..70beab1 --- /dev/null +++ b/PowerCommander/Record.types.ps1xml @@ -0,0 +1,31 @@ + + + + KeeperSecurity.Vault.RecordField + + + TypeName + + $this.Type.Name + + + + DefaultValue + + $this.Type.DefaultValue + + + + + + KeeperSecurity.Vault.RecordTypeField + + + TypeName + + $this.RecordField.TypeName + + + + + \ No newline at end of file diff --git a/PowerCommander/RecordCommands.ps1 b/PowerCommander/RecordCommands.ps1 index 938087e..3dabde5 100644 --- a/PowerCommander/RecordCommands.ps1 +++ b/PowerCommander/RecordCommands.ps1 @@ -1,9 +1,7 @@ -#requires -Version 5.0 +#requires -Version 5.1 -using namespace KeeperSecurity - -function Get-KeeperRecords { -<# +function Get-KeeperRecord { + <# .Synopsis Get Keeper Records @@ -12,328 +10,520 @@ function Get-KeeperRecords { .Parameter Filter Return matching records only - - .Parameter ShowPassword - Display record password #> - [CmdletBinding()] - [OutputType([Vault.PasswordRecord[]])] - Param ( - [string] $Uid, - [string] $Filter, - [switch] $ShowPassword - ) - Begin { - if ($ShowPassword.IsPresent) { - Set-KeeperPasswordVisible -Visible - } else { - Set-KeeperPasswordVisible - } - } - - Process { - [Vault.VaultOnline]$vault = $Script:Vault - if ($vault) { - if ($Uid) { - [Vault.PasswordRecord] $record = $null - if ($vault.TryGetRecord($uid, [ref]$record)) { - $record - } - } else { - foreach ($record in $vault.Records) { - if ($Filter) { - $match = $($record.Title, $record.Login, $record.Link, $record.Notes) | Select-String $Filter | Select-Object -First 1 - if (-not $match) { - continue - } - } - $record - } - } - } else { - Write-Error -Message "Not connected" - } - } - - End { - Set-KeeperPasswordVisible - } + [CmdletBinding()] + [OutputType([KeeperSecurity.Vault.KeeperRecord[]])] + Param ( + [string] $Uid, + [string] $Filter + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + if ($Uid) { + [KeeperSecurity.Vault.KeeperRecord] $record = $null + if ($vault.TryGetKeeperRecord($uid, [ref]$record)) { + $record + } + } + else { + foreach ($record in $vault.KeeperRecords) { + if ($Filter) { + $match = $($record.Uid, $record.TypeName, $record.Title, $record.Notes) | Select-String $Filter | Select-Object -First 1 + if (-not $match) { + continue + } + } + $record + } + } } -New-Alias -Name kr -Value Get-KeeperRecords +New-Alias -Name kr -Value Get-KeeperRecord function Copy-KeeperToClipboard { -<# + <# .Synopsis - Copy record password to clipboard + Copy record password to clipboard or output .Parameter Record - Record UID or any object containg record UID + Record UID or any object containing property Uid .Parameter Field Record field to copy to clipboard. Record password is default. + + .Parameter Output + Password output destination. Clipboard is default. Use "Stdout" for scripting #> - [CmdletBinding()] - Param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $Record, - [string] [ValidateSet('Login' ,'Password', 'WebAddress')] $Field = 'Password' - ) - Process { - if ($Record -is [Array]) { - if ($Record.Count -ne 1) { - Write-Error -Message 'Only one record is expected' - return - } - $Record = $Record[0] - } - - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - - $uid = $null - if ($Record -is [String]) { - $uid = $Record - } - elseif ($null -ne $Record.Uid) { - $uid = $Record.Uid - } - - $found = $false - if ($uid) { - [Vault.PasswordRecord] $rec = $null - if (-not $vault.TryGetRecord($uid, [ref]$rec)) { - $entries = Get-KeeperChildItems -Filter $uid -ObjectType Record - if ($entries.Uid) { - $_ = $vault.TryGetRecord($entries[0].Uid, [ref]$rec) - } - } - if ($rec) { - $found = $true - $value = '' - switch($Field) { - 'Login' {$value = $rec.Login} - 'Password' {$value = $rec.Password} - 'WebAddress' {$value = $rec.Link} - } - if ($value) { - Set-Clipboard -Value $value - Write-Host "Copied to clipboard: $Field for $($rec.Title)" - } else { - Write-Host "Record $($rec.Title) has no $Field" - } - } - } - if (-not $found) { - Write-Error -Message "Cannot find a Keeper record: $Record" - } - } + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $Record, + [string] [ValidateSet('Login' , 'Password', 'URL')] $Field = 'Password', + [string] [ValidateSet('Clipboard' , 'Stdout')] $Output = 'Clipboard' + ) + Process { + if ($Record -is [Array]) { + if ($Record.Count -ne 1) { + Write-Error -Message 'Only one record is expected' + return + } + $Record = $Record[0] + } + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $uid = $null + if ($Record -is [String]) { + $uid = $Record + } + elseif ($null -ne $Record.Uid) { + $uid = $Record.Uid + } + + $found = $false + if ($uid) { + [KeeperSecurity.Vault.KeeperRecord] $rec = $null + if (-not $vault.TryGetKeeperRecord($uid, [ref]$rec)) { + $entries = Get-KeeperChildItem -Filter $uid -ObjectType Record + if ($entries.Uid) { + $vault.TryGetRecord($entries[0].Uid, [ref]$rec) | Out-Null + } + } + if ($rec) { + $found = $true + $value = '' + + if ($rec -is [KeeperSecurity.Vault.PasswordRecord]) { + switch ($Field) { + 'Login' { $value = $rec.Login } + 'Password' { $value = $rec.Password } + 'URL' { $value = $rec.Link } + } + } + elseif ($rec -is [KeeperSecurity.Vault.TypedRecord]) { + $fieldType = '' + switch ($Field) { + 'Login' { $fieldType = 'login' } + 'Password' { $fieldType = 'password' } + 'URL' { $fieldType = 'url' } + } + if ($fieldType) { + $recordField = $rec.Fields | Where-Object FieldName -eq $fieldType | Select-Object -First 1 + if (-not $recordField) { + $recordField = $rec.Custom | Where-Object FieldName -eq $fieldType | Select-Object -First 1 + } + if ($recordField) { + $value = $recordField.ObjectValue + } + } + } + + if ($value) { + if ($Output -eq 'Stdout') { + $value + } + else { + if ([System.Threading.Thread]::CurrentThread.GetApartmentState() -eq [System.Threading.ApartmentState]::MTA) { + powershell -sta "Set-Clipboard -Value '$value'" + } + else { + Set-Clipboard -Value $value + } + Write-Output "Copied to clipboard: $Field for $($rec.Title)" + } + if ($Field -eq 'Password') { + $vault.AuditLogRecordCopyPassword($rec.Uid) + } + } + else { + Write-Output "Record $($rec.Title) has no $Field" + } + } + } + if (-not $found) { + Write-Error -Message "Cannot find a Keeper record: $Record" + } + } } New-Alias -Name kcc -Value Copy-KeeperToClipboard function Get-KeeperPasswordVisible { - if ($Script:PasswordVisible) { - $true - } else { - $false - } + <# + .Synopsis + Show/hide secret fields +#> + if ($Script:PasswordVisible) { + $true + } + else { + $false + } } function Set-KeeperPasswordVisible { - [CmdletBinding()] - Param ([switch] $Visible) - $Script:PasswordVisible = $Visible.IsPresent + [CmdletBinding()] + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] + Param ([switch] $Visible) + $Script:PasswordVisible = $Visible.IsPresent } function Show-TwoFactorCode { - [CmdletBinding()] - Param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $Records - ) - - Begin { - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - $totps = @() - } - - Process { - foreach ($r in $Records) { - $uid = $null - - if ($r -is [String]) { - $uid = $r - } - elseif ($null -ne $r.Uid) { - $uid = $r.Uid - } - if ($uid) { - [Vault.PasswordRecord] $rec = $null - if ($vault.TryGetRecord($uid, [ref]$rec)) { - if ($rec.ExtraFields) { - foreach ($ef in $rec.ExtraFields) { - if ($ef.FieldType -eq 'totp') { - $totps += [PSCustomObject]@{ - RecordUid = $rec.Uid - Title = $rec.Title - TotpType = $ef.Custom['type'] - TotpData = $ef.Custom['data'] - } - } - } - } - } - } - } - } - End { - $output = @() - foreach ($totp in $totps) { - [Tuple[string, int, int]]$code = [Utils.CryptoUtils]::GetTotpCode($totps.TotpData) - if ($code) { - $output += [PSCustomObject]@{ - PSTypeName = 'TOTP.Codes' - RecordTitle = $totp.Title - TOTPCode = $code.Item1 - Elapsed = $code.Item2 - Left = $code.Item3 - $code.Item2 - } - } - } - $output | Format-Table - } -} + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $Records + ) + + Begin { + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $totps = @() + } + Process { + foreach ($r in $Records) { + $uid = $null + + if ($r -is [String]) { + $uid = $r + } + elseif ($null -ne $r.Uid) { + $uid = $r.Uid + } + if ($uid) { + [KeeperSecurity.Vault.KeeperRecord] $rec = $null + if ($vault.TryGetKeeperRecord($uid, [ref]$rec)) { + if ($rec -is [KeeperSecurity.Vault.PasswordRecord]) { + if ($rec.ExtraFields) { + foreach ($ef in $rec.ExtraFields) { + if ($ef.FieldType -eq 'totp') { + $totps += [PSCustomObject]@{ + RecordUid = $rec.Uid + Title = $rec.Title + TotpData = $ef.Custom['data'] + } + } + } + } + } + elseif ($rec -is [KeeperSecurity.Vault.TypedRecord]) { + $recordTypeField = New-Object KeeperSecurity.Vault.RecordTypeField 'oneTimeCode', $null + [KeeperSecurity.Vault.ITypedField]$recordField = $null + if ([KeeperSecurity.Vault.VaultDataExtensions]::FindTypedField($rec, $recordTypeField, [ref]$recordField)) { + $data = $recordField.Value + if ($data) { + $totps += [PSCustomObject]@{ + RecordUid = $rec.Uid + Title = $rec.Title + TotpData = $data + } + } + } + } + } + } + } + } + End { + $output = @() + foreach ($totp in $totps) { + [Tuple[string, int, int]]$code = [KeeperSecurity.Utils.CryptoUtils]::GetTotpCode($totp.TotpData) + if ($code) { + $output += [PSCustomObject]@{ + PSTypeName = 'TOTP.Codes' + RecordTitle = $totp.Title + TOTPCode = $code.Item1 + Elapsed = $code.Item2 + Left = $code.Item3 - $code.Item2 + } + } + } + $output | Format-Table + } +} New-Alias -Name 2fa -Value Show-TwoFactorCode +$Keeper_RecordTypeNameCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + $result = @() + [KeeperSecurity.Vault.VaultOnline]$vault = $Script:Context.Vault + if ($vault) { + $toComplete = $wordToComplete + '*' + foreach ($rt in $vault.RecordTypes) { + if ($rt.Name -like $toComplete) { + $result += $rt.Name + } + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } + +} + function Add-KeeperRecord { -<# + <# .Synopsis Creates or Modifies a Keeper record in the current folder. - .Parameter Title - Title field - - .Parameter UpdateOnly - Do not create a new record - - .Parameter Login - Login field - - .Parameter Password - Password field - - .Parameter GeneratePassword - Generate random password + .Parameter Uid + Record UID. If provided the existing record to be updated. Otherwise record is added. - .Parameter URL - Website Address field + .Parameter RecordType + Record Type (if account supports record types). - .Parameter Custom - Comma-separated list of key:value pairs. - Example: -Custom name1:value1,name2:value2 + .Parameter Title + Record Title. Mandatory field for added record. .Parameter Notes - Notes field + Record Notes. + .Parameter GeneratePassword + Generate random password. + + .Parameter Fields + A list of record Fields. See DESCRIPTION + + .DESCRIPTION + Record field format [NAME=VALUE] or [-name $value] + if field starts with `-` then the following parameter contains field value + otherwise NAME=VALUE pattern is assumed + + Predefined fields are + login Login Name + password Password + url Web Address + + Any other name is added to Custom Fields + + Typed records only: + + A field has [TYPE.LABEL] format. A TYPE or LABEL can be omitted. + Field Type Description Value Type Examples + =========== ================== ========== ===================================== + date Unix epoch time. integer 1668639533000 | 03/23/2022 + host host name / port object @{hostName=''; port=''} + 192.168.1.2:4321 + address Address object @{street1=""; street2=""; city=""; + state=""; zip=""; country=""} + 123 Main St, SmallTown, CA 12345, USA + phone Phone object @{region=""; number=""; ext=""; type=""} + Mobile: US (555)555-1234 + name Person name object @{first=""; middle=""; last=""} + Doe, John Jr. | Jane Doe + paymentCard Payment Card object @{cardNumber=""; cardExpirationDate=""; + cardSecurityCode=""} + 4111111111111111 04/2026 123 + bankAccount Bank Account object @{accountType=""; routingNumber=""; + accountNumber=""} + Checking: 123456789 987654321 + keyPair Key Pair object @{publicKey=""; privateKey=""} + + oneTimeCode TOTP URL string otpauth://totp/Example?secret=JBSWY3DPEHPK3PXP + note Masked multiline text string + multiline Multiline text string + secret Masked text string + login Login string + email Email string 'name@company.com' + password Password string + url URL string https://google.com/ + text Free form text string This field type generally has a label + + .EXAMPLE + PS> $password = Read-Host -AsSecureString -Prompt "Enter Password" + PS> Add-KeeperRecord -Title "New Record" login=username -password $password + + .EXAMPLE + PS> $h = @{hostName='google.com'; port='123'} + PS> Add-KeeperRecord -Uid ... -"host.Google Host" $h + + .EXAMPLE + PS> Add-KeeperRecord -Uid ... "host.Google Host=google.com:123" + + .EXAMPLE + PS> $rsa = [System.Security.Cryptography.RSA]::Create(2048) + PS> $privateKey = [Convert]::ToBase64String($rsa.ExportPkcs8PrivateKey()) + PS> $publicKey = [Convert]::ToBase64String($rsa.ExportRSAPublicKey()) + PS> $keyPair = @{privateKey=$privateKey; publicKey=$publicKey} + PS> Add-KeeperRecord -Uid ... -keyPair $keyPair #> - [CmdletBinding(DefaultParameterSetName = 'Default')] - Param ( - [Parameter(Position = 0, Mandatory = $true)][string] $Title, - [Parameter()][switch] $UpdateOnly, - [Parameter()][string] $Login, - [Parameter()][switch] $GeneratePassword, - [Parameter()][string] $Password, - [Parameter()][string] $URL, - [Parameter()][string[]] $Custom, - [Parameter()][string] $Notes - ) - - Begin { - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - [Vault.PasswordRecord]$record = $null - } - - Process { - $objs = Get-KeeperChildItems -ObjectType Record | Where-Object Name -eq $Title - if ($objs.Length -eq 0 -and $UpdateOnly.IsPresent) { - Write-Error -Message "Record `"$Title`" not found" - return - } - if ($objs.Length -eq 0) { - $record = New-Object Vault.PasswordRecord - } - else { - $record = Get-KeeperRecords -Uid $objs[0].UID - if (-not $record) { - Write-Error -Message "Record `"$Title`" not found" - return + [CmdletBinding(DefaultParameterSetName = 'add')] + Param ( + [Parameter()] [switch] $GeneratePassword, + [Parameter(ParameterSetName = 'add')] [string] $RecordType, + [Parameter(ParameterSetName = 'add')] [string] $Folder, + [Parameter(ParameterSetName = 'edit', Mandatory = $True)] [string] $Uid, + [Parameter()] [string] $Title, + [Parameter()] [string] $Notes, + [Parameter(ValueFromRemainingArguments = $true)] $Extra + ) + + Begin { + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + [KeeperSecurity.Vault.KeeperRecord]$record = $null + + $fields = @{} + $fieldName = $null + foreach ($var in $Extra) { + if ($var -match '^-') { + $fieldName = $var.Substring(1) + if ($var -match ':$') { + $fieldName = $fieldName.Substring(0, $fieldName.Length - 1) + } } - } - - if ($Notes) { - if ($record.Notes) { - $record.Notes += "`n" + elseif ($null -ne $fieldName) { + $fields[$fieldName] = $var + $fieldName = $null + } + else { + if ($var -match '^([^=]+)=(.*)?') { + $n = $Matches[1].Trim() + $v = $Matches[2].Trim() + if ($n -and $v) { + $fields[$n] = $v + } + } } - $record.Notes += $Notes } + } - if ($GeneratePassword.IsPresent) { - if ($record.Password) { - if ($record.Notes) { - $record.Notes += "`n" + Process { + if ($Uid) { + if (-not $vault.TryGetKeeperRecord($Uid, [ref]$record)) { + $objs = Get-KeeperChildItem -ObjectType Record | Where-Object Name -eq $Uid + if ($objs.Length -gt 1) { + $vault.TryGetKeeperRecord($objs[0].Uid, [ref]$record) } - $record.Notes += "Password generated on $(Get-Date)`nOld password: $($record.Password)`n" } - $Password = [Utils.CryptoUtils]::GenerateUid() + if (-not $record) { + Write-Error -Message "Record `"$Uid`" not found" -ErrorAction Stop + return + } } - - if (-not $record.Uid) { - $record.Title = $Title + else { + if (!$Title) { + Write-Error -Message "-Title parameter is required" -ErrorAction Stop + } + if (-not $RecordType -or $RecordType -eq 'legacy') { + $record = New-Object KeeperSecurity.Vault.PasswordRecord + } + else { + $record = New-Object KeeperSecurity.Vault.TypedRecord $RecordType + [KeeperSecurity.Utils.RecordTypesUtils]::AdjustTypedRecord($vault, $record) + } } - if ($Login) { - $record.Login = $Login + if ($Title) { + $record.Title = $Title } - if ($Password) { - $record.Password = $Password + + if ($Notes -is [string]) { + if ($Notes.Length -gt 0 -and $Notes[0] -eq '+') { + $Notes = $record.Notes + "`n" + $Notes.Substring(1) + } + elseif ($Notes -eq '-') { + $Notes = '' + } + $record.Notes = $Notes } - if ($URL) { - $record.Link = $URL + + if ($GeneratePassword.IsPresent) { + $fields['password'] = [Keepersecurity.Utils.CryptoUtils]::GenerateUid() } - if ($Custom) { - foreach($customField in $Custom) { - $pos = $customField.IndexOf(':') - if ($pos -gt 0 -and $pos -lt $customField.Length) { - $_ = $record.SetCustomField($customField.Substring(0, $pos), $customField.Substring($pos + 1)) + + foreach ($fieldName in $fields.Keys) { + $fieldValue = $fields[$fieldName] + $fieldLabel = '' + if ($fieldName -match '^([^.]+)(\..+)?$') { + if ($Matches[1] -and $Matches[2]) { + $fieldName = $Matches[1].Trim() + $fieldLabel = $Matches[2].Trim().Substring(1) + } + } + if ($fieldName -match '^\$') { + $fieldName = $fieldName.Substring(1).Trim() + } + if ($fieldValue -is [securestring]) { + $fieldValue = (New-Object PSCredential 'a', $fieldValue).GetNetworkCredential().Password + } + if ($record -is [KeeperSecurity.Vault.PasswordRecord]) { + switch ($fieldName) { + 'login' { $record.Login = $fieldValue } + 'password' { $record.Password = $fieldValue } + 'url' { $record.Link = $fieldValue } + Default { + if ($fieldLabel) { + if ($fieldName -eq 'text') { + $fieldName = $fieldLabel + } + else { + $fieldName = "${fieldName}:${fieldLabel}" + } + } + if ($fieldValue) { + $record.SetCustomField($fieldName, $fieldValue) | Out-Null + } + else { + $record.DeleteCustomField($fieldName) | Out-Null + } + } + } + } + elseif ($record -is [KeeperSecurity.Vault.TypedRecord]) { + if (-not $fieldLabel) { + [KeeperSecurity.Vault.RecordField]$recordField = $null + if (-not [KeeperSecurity.Vault.RecordTypesConstants]::TryGetRecordField($fieldName, [ref]$recordField)) { + $fieldLabel = $fieldName + $fieldName = 'text' + } + } + $recordTypeField = New-Object KeeperSecurity.Vault.RecordTypeField $fieldName, $fieldLabel + [KeeperSecurity.Vault.ITypedField]$typedField = $null + if ([KeeperSecurity.Vault.VaultDataExtensions]::FindTypedField($record, $recordTypeField, [ref]$typedField)) { + } + else { + if ($fieldValue) { + $typedField = [KeeperSecurity.Vault.VaultDataExtensions]::CreateTypedField($fieldName, $fieldLabel) + if ($typedField) { + $record.Custom.Add($typedField) + } + } + } + if ($typedField) { + if ($fieldValue) { + $typedField.ObjectValue = $fieldValue + } + else { + $typedField.DeleteValueAt(0) + } } } } - } + } End { - if ($record.Uid) { - $task = $vault.UpdateRecord($record) - } else { - $task = $vault.CreateRecord($record, $Script:CurrentFolder) - } - $task.GetAwaiter().GetResult() + if ($record.Uid) { + $task = $vault.UpdateRecord($record) + } + else { + $folderUid = $Script:Context.CurrentFolder + if ($Folder) { + $folderNode = resolveFolderNode $vault $Folder + $folderUid = $folderNode.FolderUid + } + + $task = $vault.CreateRecord($record, $folderUid) + } + $task.GetAwaiter().GetResult() } } New-Alias -Name kadd -Value Add-KeeperRecord +Register-ArgumentCompleter -CommandName Add-KeeperRecord -ParameterName Folder -ScriptBlock $Keeper_FolderPathRecordCompleter +Register-ArgumentCompleter -CommandName Add-KeeperRecord -ParameterName RecordType -ScriptBlock $Keeper_RecordTypeNameCompleter function Remove-KeeperRecord { -<# + <# .Synopsis Removes Keeper record. @@ -341,183 +531,193 @@ function Remove-KeeperRecord { Folder name or Folder UID #> - [CmdletBinding(DefaultParameterSetName = 'Default')] - Param ( - [Parameter(Position = 0, Mandatory = $true)][string] $Name - ) - - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - $folderUid = $null - $recordUid = $null - [Vault.PasswordRecord] $record = $null - if ($vault.TryGetRecord($Name, [ref]$record)) { - $recordUid = $record.Uid - if (-not $vault.RootFolder.Records.Contains($recordUid)) { - foreach ($f in $vault.Folders) { - if ($f.Records.Contains($recordUid)) { - $folderUid = $f.FolderUid - break - } - } - } - } - if (-not $recordUid) { - $objs = Get-KeeperChildItems -ObjectType Record | Where-Object Name -eq $Name - if (-not $objs) { - Write-Error -Message "Record `"$Name`" does not exist" - return - } - if ($objs.Length -gt 1) { - Write-Error -Message "There are more than one records with name `"$Name`". Use Record UID do delete the correct one." - return - } - $recordUid = $objs[0].Uid - $folderUid = $Script:CurrentFolder - } - - $recordPath = New-Object KeeperSecurity.Vault.RecordPath - $recordPath.RecordUid = $recordUid - $recordPath.FolderUid = $folderUid - $task = $vault.DeleteRecords(@($recordPath)) - $_ = $task.GetAwaiter().GetResult() + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] + [CmdletBinding(DefaultParameterSetName = 'Default')] + Param ( + [Parameter(Position = 0, Mandatory = $true)][string] $Name + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $folderUid = $null + $recordUid = $null + [KeeperSecurity.Vault.KeeperRecord] $record = $null + if ($vault.TryGetKeeperRecord($Name, [ref]$record)) { + $recordUid = $record.Uid + if (-not $vault.RootFolder.Records.Contains($recordUid)) { + foreach ($f in $vault.Folders) { + if ($f.Records.Contains($recordUid)) { + $folderUid = $f.FolderUid + break + } + } + } + } + if (-not $recordUid) { + $objs = Get-KeeperChildItem -ObjectType Record | Where-Object Name -eq $Name + if (-not $objs) { + Write-Error -Message "Record `"$Name`" does not exist" + return + } + if ($objs.Length -gt 1) { + Write-Error -Message "There are more than one records with name `"$Name`". Use Record UID do delete the correct one." + return + } + $recordUid = $objs[0].Uid + $folderUid = $Script:Context.CurrentFolder + } + + $recordPath = New-Object KeeperSecurity.Vault.RecordPath + $recordPath.RecordUid = $recordUid + $recordPath.FolderUid = $folderUid + $task = $vault.DeleteRecords(@($recordPath)) + $task.GetAwaiter().GetResult() | Out-Null } New-Alias -Name kdel -Value Remove-KeeperRecord function Move-RecordToFolder { -<# + <# .Synopsis - Moves owned records to Folder. + Moves records to Folder. .Parameter Record - Record UID, Title or any object containg property UID. + Record UID, Path or any object containing property Uid. - .Parameter Folder + .Parameter Folder Folder Name, Path, or UID #> - [CmdletBinding()] - Param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true)] $Records, - [Parameter(Position = 0, Mandatory = $true)][string] $Folder, - [Parameter()][switch] $Link - ) - - Begin { - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - - $folderUid = resolveFolderUid $vault $Folder - [Vault.FolderNode]$folderNode = $null - $_ = $vault.TryGetFolder($folderUid, [ref]$folderNode) - - $sourceRecords = @() - } - - Process { - $recordUids = @{} - foreach ($r in $Records) { - $uid = $null - - if ($r -is [String]) { - $uid = $r - } - elseif ($null -ne $r.Uid) { - $uid = $r.Uid - } - if ($uid) { - [Vault.PasswordRecord] $rec = $null - if ($vault.TryGetRecord($uid, [ref]$rec)) { - if ($rec.Owner) { - $recordUids[$rec.Uid] = $true - } - } else { - $recs = Get-KeeperRecords -Filter $uid | Where-Object Title -eq $uid - foreach ($rec in $recs) { - if ($rec.Owner) { - $recordUids[$rec.Uid] = $true - } - } - } - } - } - if ($recordUids.Count -gt 0) { - foreach ($recordUid in $recordUids.Keys) { - if ($folderNode.Records.Contains($recordUid)) { - continue - } - $rp = New-Object Vault.RecordPath - $rp.RecordUid = $recordUid - if ($vault.RootFolder.Records.Contains($recordUid)) { - $sourceRecords += $rp - } else { - foreach ($fol in $vault.Folders) { - if ($fol.FolderUid -eq $folderUid) { - continue - } - if ($fol.Records.Contains($recordUid)) { - $rp.FolderUid = $fol.FolderUid - $sourceRecords += $rp - break - } - } - } - } - } - } - End { - $_ = $vault.MoveRecords($sourceRecords, $folderUid, $Link.IsPresent).GetAwaiter().GetResult() - } -} -New-Alias -Name kmv -Value Move-RecordToFolder -<# -$Keeper_SharedFolderNameCompleter = { - param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) - - Get-KeeperSharedFolders -Filter $wordToComplete ` - | ForEach-Object -MemberName Name ` - | Sort-Object ` - | ForEach-Object { - if ($_.Contains(' ')) { - "'$($_)'" - } else { - $_ + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true)]$Records, + [Parameter(Position = 0, Mandatory = $true)][string]$Folder, + [Parameter()][switch]$Link + ) + + Begin { + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $folderNode = resolveFolderNode $vault $Folder + $sourceRecords = @() + } + + Process { + foreach ($r in $Records) { + if ($null -ne $r.Uid) { + $r = $r.Uid + } + [KeeperSecurity.Vault.FolderNode]$folder = $null + [KeeperSecurity.Vault.KeeperRecord]$record = $null + if ($vault.TryGetKeeperRecord($r, [ref]$record)) { + if ($record -is [KeeperSecurity.Vault.PasswordRecord] -or $record -is [KeeperSecurity.Vault.TypedRecord]) { + if ($folderNode.FolderUid -and $vault.RootFolder.Records.Contains($record.Uid)) { + $folder = $vault.RootFolder + } + else { + foreach ($fol in $vault.Folders) { + if ($fol.FolderUid -eq $folderNode.FolderUid) { + continue + } + if ($fol.Records.Contains($record.Uid)) { + $folder = $fol + break + } + } + } + } + else { + Write-Error "`$r`" record type is not supported." -ErrorAction Stop + } } + else { + [KeeperSecurity.Vault.FolderNode]$fol = $null + if (-not $vault.TryGetFolder($Script:Context.CurrentFolder, [ref]$fol)) { + $fol = $vault.RootFolder + } + + $comps = splitKeeperPath $r + $folder, $rest = parseKeeperPath $comps $vault $fol + if (-not $rest) { + Write-Error "`"$r`" should be a record" -ErrorAction Stop + } + [KeeperSecurity.Vault.KeeperRecord]$rec = $null + foreach ($recordUid in $folder.Records) { + if ($vault.TryGetKeeperRecord($recordUid, [ref]$rec)) { + if ($rec.Title -eq $rest) { + if ($rec -is [KeeperSecurity.Vault.PasswordRecord] -or $rec -is [KeeperSecurity.Vault.TypedRecord]) { + $record = $rec + break + } + } + } + } + } + + if (-not $record -or -not $folder) { + Write-Error "Record `"$r`" cannot be found" -ErrorAction Stop + } + + $rp = New-Object KeeperSecurity.Vault.RecordPath + $rp.RecordUid = $record.Uid + $rp.FolderUid = $folder.FolderUid + $sourceRecords += $rp } + } + End { + if (-not $sourceRecords) { + Write-Error "There are no records to move" -ErrorAction Stop + } + $vault.MoveRecords($sourceRecords, $folderNode.FolderUid, $Link.IsPresent).GetAwaiter().GetResult() | Out-Null + $vault.ScheduleSyncDown([System.TimeSpan]::FromSeconds(0)).GetAwaiter().GetResult() | Out-Null + } } -# TODO -Register-ArgumentCompleter -Command Move-RecordToFolder -ParameterName Folder -ScriptBlock $Keeper_SharedFolderNameCompleter -Register-ArgumentCompleter -Command Copy-RecordToFolder -ParameterName Folder -ScriptBlock $Keeper_SharedFolderNameCompleter +New-Alias -Name kmv -Value Move-RecordToFolder +Register-ArgumentCompleter -CommandName Move-RecordToFolder -ParameterName Folder -ScriptBlock $Keeper_FolderPathRecordCompleter + + +function Get-KeeperRecordType { + <# + .Synopsis + Get Record/Field Type Information + + .Parameter ShowFields + Show Field Types + + .Parameter Name + Record Type Name #> -function resolveFolderUid { - Param ([Vault.VaultOnline]$vault, $folder) - - [Vault.FolderNode]$targetFolder = $null - if ($vault.TryGetFolder($folder, [ref]$targetFolder)) { - return $targetFolder.FolderUid - } - - $fols = Get-KeeperChildItems -ObjectType Folder -Filter $folder - if ($fols.Length -gt 0) { - return $fols[0].Uid - } - - $fols = @() - foreach ($fol in $vault.Folders) { - if ($fol.Name -eq $folder) { - $fols += $fol.FolderUid - } - } - if ($fols.Length -eq 1) { - return $fols[0] - } - # TODO resolve folder full path - Write-Error "Folder $($folder) not found" + [CmdletBinding()] + Param ( + [switch] $ShowFields, + [Parameter(Position = 0, Mandatory = $false)][string] $Name + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + if ($ShowFields.IsPresent) { + [KeeperSecurity.Vault.RecordTypesConstants]::RecordFields | Where-Object { -not $Name -or $_.Name -eq $Name } | Sort-Object Name + } + else { + $vault.RecordTypes | Where-Object { -not $Name -or $_.Name -eq $Name } | Sort-Object Name + } +} +New-Alias -Name krti -Value Get-KeeperRecordType + +function resolveFolderNode { + Param ([KeeperSecurity.Vault.VaultOnline]$vault, $path) + + [KeeperSecurity.Vault.FolderNode]$folder = $null + if (-not $vault.TryGetFolder($path, [ref]$folder)) { + if (-not $vault.TryGetFolder($Script:Context.CurrentFolder, [ref]$folder)) { + $folder = $vault.RootFolder + } + + $comps = splitKeeperPath $path + $folder, $rest = parseKeeperPath $comps $vault $folder + if ($rest) { + Write-Error "Folder $path not found" -ErrorAction Stop + } + } + + $folder } diff --git a/PowerCommander/SecretsManager.format.ps1xml b/PowerCommander/SecretsManager.format.ps1xml new file mode 100644 index 0000000..5740baf --- /dev/null +++ b/PowerCommander/SecretsManager.format.ps1xml @@ -0,0 +1,196 @@ + + + + + KeeperSecurity.Vault.ApplicationRecord_TableView + + KeeperSecurity.Vault.ApplicationRecord + + + + + + + + + + + Uid + + + Title + + + + + + + + + KeeperSecurity.Vault.ApplicationRecord_ListView + + KeeperSecurity.Vault.ApplicationRecord + + + + + + + Uid + + + Title + + + + + + + + + KeeperSecurity.Vault.SecretsManagerApplication_TableView + + KeeperSecurity.Vault.SecretsManagerApplication + + + + + + + + + + + + + + Uid + + + Title + + + IsExternalShare + + + DeviceCount + + + ShareCount + + + + + + + + + KeeperSecurity.Vault.SecretsManagerApplication_ListView + + KeeperSecurity.Vault.SecretsManagerApplication + + + + + + + Uid + + + Title + + + IsExternalShare + + + Devices + + + Shares + + + + + + + + + KeeperSecurity.Vault.SecretsManagerDevice_TableView + + KeeperSecurity.Vault.SecretsManagerDevice + + + + + + + + + + + + + + + + Name + + + ShortDeviceId + + + UnlockIp + + + CreatedOn + + + LastAccess + + + AccessExpireOn + + + IpAddress + + + + + + + + + KeeperSecurity.Vault.SecretManagerShare_TableView + + KeeperSecurity.Vault.SecretManagerShare + + + + + + + + + + + + + SecretUid + + + SecretType + + + Editable + + + CreatedOn + + + + + + + + + \ No newline at end of file diff --git a/PowerCommander/SecretsManager.ps1 b/PowerCommander/SecretsManager.ps1 new file mode 100644 index 0000000..9312cdb --- /dev/null +++ b/PowerCommander/SecretsManager.ps1 @@ -0,0 +1,292 @@ +#requires -Version 5.1 + +$Keeper_KSMAppCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [KeeperSecurity.Vault.VaultOnline]$private:vault = getVault + if (-not $vault) { + return $null + } + + $toComplete = $wordToComplete + if ($toComplete.Length -ge 1) { + if ($toComplete[0] -eq '''') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '''''', '''' + } + if ($toComplete[0] -eq '"') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '""', '"' + $toComplete = $toComplete -replace '`"', '"' + } + } + + $toComplete += '*' + foreach ($app in $vault.KeeperApplications) { + if ($app.Title -like $toComplete) { + $name = $app.Title + if ($name -match ' ') { + $name = $name -replace '''', '''''' + $name = '''' + $name + '''' + } + $result += $name + } + } + + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } +} + +function Get-KeeperSecretManagerApp { + <# + .Synopsis + Get Keeper Secret Manager Applications + + .Parameter Uid + Record UID + + .Parameter Filter + Return matching applications only + + .Parameter Detail + Application details + #> + [CmdletBinding()] + Param ( + [string] $Uid, + [string] $Filter, + [Switch] $Detail + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + if ($Uid) { + [KeeperSecurity.Vault.ApplicationRecord] $application = $null + if ($vault.TryGetKeeperApplication($uid, [ref]$application)) { + if ($Detail.IsPresent) { + $vault.GetSecretManagerApplication($application.Uid, $false).GetAwaiter().GetResult() + } + else { + $application + } + } + } + else { + foreach ($application in $vault.KeeperApplications) { + if ($Filter) { + $match = $($application.Uid, $application.Title) | Select-String $Filter | Select-Object -First 1 + if (-not $match) { + continue + } + } + if ($Detail.IsPresent) { + $vault.GetSecretManagerApplication($application.Uid, $false).GetAwaiter().GetResult() + } + else { + $application + } + } + } +} +New-Alias -Name ksm -Value Get-KeeperSecretManagerApp + +function Add-KeeperSecretManagerApp { + <# + .Synopsis + Creates Keeper Secret Manager Application + + .Parameter Name + Secret Manager Application + #> + [CmdletBinding()] + Param ( + [Parameter(Position = 0, Mandatory = $true)][string]$AppName + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $vault.CreateSecretManagerApplication($AppName).GetAwaiter().GetResult() +} +New-Alias -Name ksm-create -Value Add-KeeperSecretManagerApp + +function Grant-KeeperSecretManagerFolderAccess { + <# + .Synopsis + Adds shared folder to KSM Application + + .Parameter App + KSM Application UID or Title + + .Parameter Secret + Shared Folder UID or Name + + .Parameter CanEdit + Enable write access to shared secrets + + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)][string]$App, + [Parameter(Mandatory = $true)][string]$Secret, + [Parameter()][switch]$CanEdit + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $apps = Get-KeeperSecretManagerApp -Filter $App + if (-not $apps) { + Write-Error -Message "Cannot find Secret Manager Application: $App" -ErrorAction Stop + } + [KeeperSecurity.Vault.ApplicationRecord]$application = $apps[0] + + [string]$uid = $null + $sfs = Get-KeeperSharedFolder -Filter $Secret + if ($sfs) { + $uid = $sfs[0].Uid + } + else { + $recs = Get-KeeperRecord -Filter $Secret + if ($recs) { + $uid = $recs[0].Uid + } + } + if (-not $uid) { + Write-Error -Message "Cannot find Shared Folder: $Secret" -ErrorAction Stop + } + $vault.ShareToSecretManagerApplication($application.Uid, $uid, $CanEdit.IsPresent).GetAwaiter().GetResult() +} +Register-ArgumentCompleter -CommandName Grant-KeeperSecretManagerFolderAccess -ParameterName Secret -ScriptBlock $Keeper_SharedFolderCompleter +Register-ArgumentCompleter -CommandName Grant-KeeperSecretManagerFolderAccess -ParameterName App -ScriptBlock $Keeper_KSMAppCompleter +New-Alias -Name ksm-share -Value Grant-KeeperSecretManagerFolderAccess + +function Revoke-KeeperSecretManagerFolderAccess { + <# + .Synopsis + Removes Shared Folder from KSM Application + + .Parameter App + Secret Manager Application + + .Parameter Secret + Shared Folder UID or Name + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)][string]$App, + [Parameter(Mandatory = $true)][string]$Secret + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $apps = Get-KeeperSecretManagerApp -Filter $App + if (-not $apps) { + Write-Error -Message "Cannot find Secret Manager Application: $App" -ErrorAction Stop + } + [KeeperSecurity.Vault.ApplicationRecord]$application = $apps[0] + + [string]$uid = $null + $sfs = Get-KeeperSharedFolder -Filter $Secret + if ($sfs) { + $uid = $sfs[0].Uid + } + else { + $recs = Get-KeeperRecord -Filter $Secret + if ($recs) { + $uid = $recs[0].Uid + } + } + if (-not $uid) { + Write-Error -Message "Cannot find Shared Folder: $Secret" -ErrorAction Stop + } + $vault.UnshareFromSecretManagerApplication($application.Uid, $uid).GetAwaiter().GetResult() +} +Register-ArgumentCompleter -CommandName Revoke-KeeperSecretManagerFolderAccess -ParameterName Secret -ScriptBlock $Keeper_SharedFolderCompleter +Register-ArgumentCompleter -CommandName Revoke-KeeperSecretManagerFolderAccess -ParameterName App -ScriptBlock $Keeper_KSMAppCompleter +New-Alias -Name ksm-unshare -Value Revoke-KeeperSecretManagerFolderAccess + +function Add-KeeperSecretManagerClient { + <# + .Synopsis + Adds client/device to KSM Application + + .Parameter App + KSM Application UID or Title + + .Parameter Name + Client or Device Name + + .Parameter UnlockIP + Enable write access to shared secrets + #> + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)][string]$App, + [Parameter()][string]$Name, + [Parameter()][switch]$UnlockIP, + [Parameter()][switch]$B64 + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $apps = Get-KeeperSecretManagerApp -Filter $App + if (-not $apps) { + Write-Error -Message "Cannot find Secret Manager Application: $App" -ErrorAction Stop + } + [KeeperSecurity.Vault.ApplicationRecord]$application = $apps[0] + + $rs = $vault.AddSecretManagerClient($application.Uid, $UnlockIP.IsPresent, $null, $null, $name).GetAwaiter().GetResult() + if ($rs) { + if ($B64.IsPresent) { + $configuration = $vault.GetConfiguration($rs.Item2).GetAwaiter().GetResult() + if ($configuration) { + $configData = [KeeperSecurity.Utils.JsonUtils]::DumpJson($configuration, $true) + [System.Convert]::ToBase64String($configData) + + } + } else { + $rs.Item2 + } + + } +} +Register-ArgumentCompleter -CommandName Add-KeeperSecretManagerClient -ParameterName App -ScriptBlock $Keeper_KSMAppCompleter +New-Alias -Name ksm-addclient -Value Add-KeeperSecretManagerClient + +function Remove-KeeperSecretManagerClient { + <# + .Synopsis + Removes client/device from KSM Application + + .Parameter App + KSM Application UID or Title + + .Parameter Name + Client Id or Device Name + + #> + [CmdletBinding(SupportsShouldProcess=$true)] + Param ( + [Parameter(Mandatory = $true)][string]$App, + [Parameter(Mandatory = $true)][string]$Name + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $apps = Get-KeeperSecretManagerApp -Filter $App -Detail + if (-not $apps) { + Write-Error -Message "Cannot find Secret Manager Application: $App" -ErrorAction Stop + } + [KeeperSecurity.Vault.ApplicationRecord]$application = $apps[0] + + $device = $application.Devices | Where-Object { $_.Name -ceq $Name -or $_.ShortDeviceId -ceq $Name } + if (-not $device) { + Write-Error -Message "Cannot find Device: $Name" -ErrorAction Stop + } + + if ($PSCmdlet.ShouldProcess($application.Title, "Removing KSM Device '$($device.Name)'")) { + $vault.DeleteSecretManagerClient($application.Uid, $device.DeviceId).GetAwaiter().GetResult() | Out-Null + Write-Information -MessageData "Device $($device.Name) has been deleted from KSM application `"$($application.Title)`"." + } +} + +Register-ArgumentCompleter -CommandName Remove-KeeperSecretManagerClient -ParameterName App -ScriptBlock $Keeper_KSMAppCompleter +New-Alias -Name ksm-rmclient -Value Remove-KeeperSecretManagerClient diff --git a/PowerCommander/SecretsManager.types.ps1xml b/PowerCommander/SecretsManager.types.ps1xml new file mode 100644 index 0000000..6f51fcd --- /dev/null +++ b/PowerCommander/SecretsManager.types.ps1xml @@ -0,0 +1,31 @@ + + + + KeeperSecurity.Vault.SecretsManagerApplication + + + DeviceCount + $this.Devices.Count + + + ShareCount + $this.Shares.Count + + + + + + KeeperSecurity.Vault.SecretsManagerDevice + + + ShortDeviceId + $this.DeviceId.Substring(0, 6) + + + UnlockIp + !$this.LockIp + + + + + \ No newline at end of file diff --git a/PowerCommander/SharedFolderCommands.ps1 b/PowerCommander/SharedFolderCommands.ps1 index 6ab9221..eefd431 100644 --- a/PowerCommander/SharedFolderCommands.ps1 +++ b/PowerCommander/SharedFolderCommands.ps1 @@ -1,9 +1,7 @@ -#requires -Version 5.0 +#requires -Version 5.1 -using namespace KeeperSecurity.Sdk - -function Get-KeeperSharedFolders { -<# +function Get-KeeperSharedFolder { + <# .Synopsis Get Keeper Shared Folders @@ -13,40 +11,75 @@ function Get-KeeperSharedFolders { .Parameter Filter Return matching shared folders only #> - [CmdletBinding()] - [OutputType([Vault.SharedFolder[]])] - Param ( - [string] $Uid, - [string] $Filter - ) - Begin { - } - - Process { - [Vault.VaultOnline]$vault = $Script:Vault - if ($vault) { - [Vault.SharedFolder] $sharedFolder = $null - if ($Uid) { - if ($vault.TryGetSharedFolder($uid, [ref]$sharedFolder)) { - $sharedFolder - } - } else { - foreach ($sharedFolder in $vault.SharedFolders) { - if ($Filter) { - $match = $($record.Uid, $sharedFolder.Name) | Select-String $Filter | Select-Object -First 1 - if (-not $match) { - continue - } - } - $sharedFolder - } - } - } else { - Write-Error -Message "Not connected" - } - } - - End { - } + [CmdletBinding()] + [OutputType([KeeperSecurity.Vault.SharedFolder[]])] + Param ( + [string] $Uid, + [string] $Filter + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + [KeeperSecurity.Vault.SharedFolder] $sharedFolder = $null + if ($Uid) { + if ($vault.TryGetSharedFolder($uid, [ref]$sharedFolder)) { + $sharedFolder + } + } + else { + foreach ($sharedFolder in $vault.SharedFolders) { + if ($Filter) { + $match = $($sharedFolder.Uid, $sharedFolder.Name) | Select-String $Filter | Select-Object -First 1 + if (-not $match) { + continue + } + } + $sharedFolder + } + } +} +New-Alias -Name ksf -Value Get-KeeperSharedFolder + +<# +$Keeper_SharedFolderCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [KeeperSecurity.Vault.VaultOnline]$private:vault = getVault + if (-not $vault) { + return $null + } + + $toComplete = $wordToComplete + if ($toComplete.Length -ge 1) { + if ($toComplete[0] -eq '''') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '''''', '''' + } + if ($toComplete[0] -eq '"') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '""', '"' + $toComplete = $toComplete -replace '`"', '"' + } + } + + $toComplete += '*' + foreach ($sf in $vault.SharedFolders) { + if ($sf.Name -like $toComplete) { + $name = $sf.Name + if ($name -match ' ') { + $name = $name -replace '''', '''''' + $name = '''' + $name + '''' + } + $result += $name + } + } + + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } } -New-Alias -Name ksf -Value Get-KeeperSharedFolders +#> \ No newline at end of file diff --git a/PowerCommander/Sharing.ps1 b/PowerCommander/Sharing.ps1 new file mode 100644 index 0000000..ba14b3f --- /dev/null +++ b/PowerCommander/Sharing.ps1 @@ -0,0 +1,679 @@ +#requires -Version 5.1 + + +function Show-KeeperRecordShare { + <# + .Synopsis + Shows a record sharing information + + .Parameter Record + Record UID or any object containing property Uid + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory=$true, ValueFromPipeline=$true)]$Records + ) + Begin { + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + [string[]]$recordUids = @() + + } + Process { + foreach ($r in $Records) { + $uid = $null + if ($r -is [String]) { + $uid = $r + } + elseif ($null -ne $r.Uid) { + $uid = $r.Uid + } + if ($uid) { + [KeeperSecurity.Vault.KeeperRecord] $rec = $null + if (-not $vault.TryGetKeeperRecord($uid, [ref]$rec)) { + $entries = Get-KeeperChildItem -Filter $uid -ObjectType Record + if ($entries.Uid) { + $vault.TryGetRecord($entries[0].Uid, [ref]$rec) | Out-Null + } + } + if ($rec) { + $recordUids += $rec.Uid + } else { + Write-Error -Message "Cannot find a Keeper record: $r" -ErrorAction SilentlyContinue + } + } + } + } + + End { + $vault.GetSharesForRecords($recordUids).GetAwaiter().GetResult() + } +} +New-Alias -Name kshrsh -Value Show-KeeperRecordShare + +function Move-KeeperRecordOwnership { + <# + .Synopsis + Transfers record ownership to a user + + .Parameter Record + Record UID or any object containing property Uid + + .Parameter User + User email + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)]$Record, + [Parameter(Mandatory = $true)]$User + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + if ($Record -is [Array]) { + if ($Record.Count -ne 1) { + Write-Error -Message 'Only one record is expected' -ErrorAction Stop + } + $Record = $Record[0] + } + $uid = $null + if ($Record -is [String]) { + $uid = $Record + } + elseif ($null -ne $Record.Uid) { + $uid = $Record.Uid + } + + if ($uid) { + [KeeperSecurity.Vault.KeeperRecord] $rec = $null + if (-not $vault.TryGetKeeperRecord($uid, [ref]$rec)) { + $entries = Get-KeeperChildItem -Filter $uid -ObjectType Record + if ($entries.Uid) { + $vault.TryGetRecord($entries[0].Uid, [ref]$rec) | Out-Null + } + } + if ($rec) { + try { + $vault.TransferRecordToUser($rec.Uid, $User).GetAwaiter().GetResult() | Out-Null + Write-Output "Record `"$($rec.Title)`" was transfered to $($User)`nThe new record owner can edit or remove your access to this record." + } + catch [KeeperSecurity.Vault.NoActiveShareWithUserException] { + Write-Output $_ + $prompt = "Do you want to send share invitation request to `"$($User)`"? (Yes/No)" + $answer = Read-Host -Prompt $prompt + if ($answer -in 'yes', 'y') { + $vault.SendShareInvitationRequest($User).GetAwaiter().GetResult() | Out-Null + Write-Output("Invitation has been sent to $($User)`nPlease repeat this command when your invitation is accepted."); + } + } + } else { + Write-Error -Message "Cannot find a Keeper record: $Record" + } + } +} +New-Alias -Name ktr -Value Move-KeeperRecordOwnership + +function Grant-KeeperRecordAccess { + <# + .Synopsis + Shares a record with user + + .Parameter Record + Record UID or any object containing property Uid + + .Parameter User + User email + + .Parameter CanEdit + Grant edit permission + + .Parameter CanShare + Grant re-share permission + + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)]$Record, + [Parameter(Mandatory = $true)]$User, + [Parameter()][switch]$CanEdit, + [Parameter()][switch]$CanShare + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + if ($Record -is [Array]) { + if ($Record.Count -ne 1) { + Write-Error -Message 'Only one record is expected' -ErrorAction Stop + } + $Record = $Record[0] + } + $uid = $null + if ($Record -is [String]) { + $uid = $Record + } + elseif ($null -ne $Record.Uid) { + $uid = $Record.Uid + } + + if ($uid) { + [KeeperSecurity.Vault.KeeperRecord] $rec = $null + if (-not $vault.TryGetKeeperRecord($uid, [ref]$rec)) { + $entries = Get-KeeperChildItem -Filter $uid -ObjectType Record + if ($entries.Uid) { + $vault.TryGetRecord($entries[0].Uid, [ref]$rec) | Out-Null + } + } + if ($rec) { + try { + $vault.ShareRecordWithUser($rec.Uid, $User, $CanShare.IsPresent, $CanEdit.IsPresent).GetAwaiter().GetResult() | Out-Null + Write-Output "Record `"$($rec.Title)`" was shared with $($User)" + } + catch [KeeperSecurity.Vault.NoActiveShareWithUserException] { + Write-Output $_ + $prompt = "Do you want to send share invitation request to `"$($User)`"? (Yes/No)" + $answer = Read-Host -Prompt $prompt + if ($answer -in 'yes', 'y') { + $vault.SendShareInvitationRequest($User).GetAwaiter().GetResult() | Out-Null + Write-Output("Invitation has been sent to $($User)`nPlease repeat this command when your invitation is accepted."); + } + } + } else { + Write-Error -Message "Cannot find a Keeper record: $Record" + } + } +} +New-Alias -Name kshr -Value Grant-KeeperRecordAccess + +function Revoke-KeeperRecordAccess { + <# + .Synopsis + Shares a record with user + + .Parameter Record + Record UID or any object containg record UID + + .Parameter User + User email + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true)]$Record, + [Parameter(Mandatory = $true)]$User + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + if ($Record -is [Array]) { + if ($Record.Count -ne 1) { + Write-Error -Message 'Only one record is expected' + return + } + $Record = $Record[0] + } + $uid = $null + if ($Record -is [String]) { + $uid = $Record + } + elseif ($null -ne $Record.Uid) { + $uid = $Record.Uid + } + + $found = $false + if ($uid) { + [KeeperSecurity.Vault.KeeperRecord] $rec = $null + if (-not $vault.TryGetKeeperRecord($uid, [ref]$rec)) { + $entries = Get-KeeperChildItem -Filter $uid -ObjectType Record + if ($entries.Uid) { + $vault.TryGetRecord($entries[0].Uid, [ref]$rec) | Out-Null + } + } + if ($rec) { + $found = $true + $vault.RevokeShareFromUser($rec.Uid, $User).GetAwaiter().GetResult() | Out-Null + Write-Output "Record `"$($rec.Title)`" share has been removed from $($username)" + } + } + if (-not $found) { + Write-Error -Message "Cannot find a Keeper record: $Record" + } + +} +New-Alias -Name kushr -Value Revoke-KeeperRecordAccess + +function Grant-KeeperSharedFolderAccess { + <# + .Synopsis + Adds a user or team to a shared foler + + .Parameter SharedFolder + Shared Folder UID, name or any object containing property Uid + + .Parameter User + User email + + .Parameter Team + Team Name or UID + + .Parameter ManageRecords + Grant Manage Records permission + + .Parameter ManageUsers + Grant Manage Users permission + + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, Position = 0)]$SharedFolder, + [Parameter(Mandatory = $true, ParameterSetName='user')]$User, + [Parameter(Mandatory = $true, ParameterSetName='team')]$Team, + [Parameter()][switch]$ManageRecords, + [Parameter()][switch]$ManageUsers + ) + + [KeeperSecurity.Vault.VaultOnline]$private:vault = getVault + + if ($SharedFolder -is [Array]) { + if ($SharedFolder.Count -ne 1) { + Write-Error -Message 'Only one shared folder is expected' + return + } + $SharedFolder = $SharedFolder[0] + } + $uid = $null + if ($SharedFolder -is [String]) { + $uid = $SharedFolder + } + elseif ($null -ne $Record.Uid) { + $uid = $SharedFolder.Uid + } + + if (-not $uid) { + Write-Error -Message "Cannot find Shared Folder: $SharedFolder" -ErrorAction Stop + } + + [KeeperSecurity.Vault.SharedFolder] $sf = $null + if (-not $vault.TryGetSharedFolder($uid, [ref]$sf)) { + $sf = $vault.SharedFolders | Where-Object { $_.Name -eq $uid } | Select-Object -First 1 + } + if (-not $sf) { + Write-Error -Message "Cannot find Shared Folder: $SharedFolder" -ErrorAction Stop + } + + if ($User) { + $userType = [KeeperSecurity.Vault.UserType]::User + $userId = ([MailAddress]$User).Address + $userName = $userId + if (-not $userId) { + return + } + } + elseif ($Team) { + $userType = [KeeperSecurity.Vault.UserType]::Team + [KeeperSecurity.Vault.TeamInfo]$teamInfo = $null + if ($vault.TryGetTeam($Team, [ref]$teamInfo)) { + $userId = $teamInfo.TeamUid + $userName = $teamInfo.Name + } else { + $teamInfo = $vault.Teams | Where-Object { $_.Name -eq $Team } | Select-Object -First 1 + if ($teamInfo) { + $userId = $teamInfo.TeamUid + $userName = $teamInfo.Name + } + } + if (-not $userId) { + ensureAvalableLoaded + $teamInfo = $Script:Context.AvailableTeams | Where-Object { $_.TeamUid -ceq $Team -or $_.Name -eq $Team } | Select-Object -First 1 + if ($teamInfo) { + $userId = $teamInfo.TeamUid + $userName = $teamInfo.Name + } + } + + if (-not $userId) { + Write-Error -Message "Cannot find team: $Team" -ErrorAction Stop + } + } + + try { + $options = New-Object KeeperSecurity.Vault.SharedFolderUserOptions + $options.ManageRecords = $ManageRecords.IsPresent + $options.ManageUsers = $ManageUsers.IsPresent + $vault.PutUserToSharedFolder($sf.Uid, $userId, $userType, $options).GetAwaiter().GetResult() | Out-Null + Write-Output "${userType} `"$($userName)`" has been added to shared folder `"$($sf.Name)`"" + } + catch [KeeperSecurity.Vault.NoActiveShareWithUserException] { + Write-Output $_ + $prompt = "Do you want to send share invitation request to `"$($User)`"? (Yes/No)" + $answer = Read-Host -Prompt $prompt + if ($answer -in 'yes', 'y') { + $vault.SendShareInvitationRequest($User).GetAwaiter().GetResult() | Out-Null + Write-Output("Invitation has been sent to `"$($User)`"`nPlease repeat this command when your invitation is accepted."); + } + } + +} + +function Revoke-KeeperSharedFolderAccess { + <# + .Synopsis + Removes record share from user + + .Parameter SharedFolder + Shared Folder UID, name or any object containing property Uid + + .Parameter User + User email + + .Parameter Team + Team Name or UID + + #> + + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, Position = 0)]$SharedFolder, + [Parameter(Mandatory = $true, ParameterSetName='user')]$User, + [Parameter(Mandatory = $true, ParameterSetName='team')]$Team + ) + + [KeeperSecurity.Vault.VaultOnline]$private:vault = getVault + + if ($SharedFolder -is [Array]) { + if ($SharedFolder.Count -ne 1) { + Write-Error -Message 'Only one shared folder is expected' + return + } + $SharedFolder = $SharedFolder[0] + } + $uid = $null + if ($SharedFolder -is [String]) { + $uid = $SharedFolder + } + elseif ($null -ne $Record.Uid) { + $uid = $SharedFolder.Uid + } + + if (-not $uid) { + Write-Error -Message "Cannot find Shared Folder: $SharedFolder" -ErrorAction Stop + } + + [KeeperSecurity.Vault.SharedFolder] $sf = $null + if (-not $vault.TryGetSharedFolder($uid, [ref]$sf)) { + $sf = $vault.SharedFolders | Where-Object { $_.Name -eq $uid } | Select-Object -First 1 + } + if (-not $sf) { + Write-Error -Message "Cannot find Shared Folder: $SharedFolder" -ErrorAction Stop + } + + if ($User) { + $userType = [KeeperSecurity.Vault.UserType]::User + $userId = ([MailAddress]$User).Address + $userName = $userId + if (-not $userId) { + return + } + } + elseif ($Team) { + $userType = [KeeperSecurity.Vault.UserType]::Team + [KeeperSecurity.Vault.TeamInfo]$teamInfo = $null + if ($vault.TryGetTeam($Team, [ref]$teamInfo)) { + $userId = $teamInfo.TeamUid + $userName = $teamInfo.Name + } else { + $teamInfo = $vault.Teams | Where-Object { $_.Name -eq $Team } | Select-Object -First 1 + if ($teamInfo) { + $userId = $teamInfo.TeamUid + $userName = $teamInfo.Name + } + } + if (-not $userId) { + ensureAvalableLoaded + $teamInfo = $Script:Context.AvailableTeams | Where-Object { $_.TeamUid -ceq $Team -or $_.Name -eq $Team } | Select-Object -First 1 + if ($teamInfo) { + $userId = $teamInfo.TeamUid + $userName = $teamInfo.Name + } + } + + if (-not $userId) { + Write-Error -Message "Cannot find team: $Team" -ErrorAction Stop + } + } + + $vault.RemoveUserFromSharedFolder($sf.Uid, $userId, $userType).GetAwaiter().GetResult() | Out-Null + Write-Output "${userType} `"$($userName)`" has been removed from shared folder `"$($sf.Name)`"" +} + +function ensureAvalableLoaded { + $vault = $Script:Context.Vault + if (-not $vault) { + return + } + + if ($null -ne $Script:Context.AvailableTeams) { + return + } + + $Script:Context.AvailableTeams = @() + $Script:Context.AvailableUsers = @() + + $teamTask = $vault.GetTeamsForShare() + $userTask = $vault.GetUsersForShare() + [System.Threading.Tasks.Task[]]$tasks = $teamTask, $userTask + [System.Threading.Tasks.Task]::WaitAll($tasks) | Out-Null + $Script:Context.AvailableTeams += $teamTask.GetAwaiter().GetResult() + $userInfo = $userTask.GetAwaiter().GetResult() + $users = @() + $users += $userInfo.SharesWith + $users += $userInfo.SharesFrom + $users += $userInfo.GroupUsers + + $Script:Context.AvailableUsers += ($users | Sort-Object | Get-Unique) +} + +$Keeper_TeamCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + ensureAvalableLoaded + if (-not $Script:Context.AvailableTeams) { + return $null + } + + $result = @() + $toComplete = $wordToComplete + if ($toComplete.Length -ge 1) { + if ($toComplete[0] -eq '''') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '''''', '''' + } + if ($toComplete[0] -eq '"') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '""', '"' + $toComplete = $toComplete -replace '`"', '"' + } + } + + $toComplete += '*' + foreach ($team in $Script:Context.AvailableTeams) { + if ($team.Name -like $toComplete) { + $name = $team.Name + if ($name -match ' ') { + $name = $name -replace '''', '''''' + $name = '''' + $name + '''' + } + $result += $name + } + } + if ($result.Count -gt 0) { + return $result + } else { + return $null + } +} + +$Keeper_UserCompleter = { + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + ensureAvalableLoaded + if (-not $Script:Context.AvailableUsers) { + return $null + } + + $result = @() + $toComplete = $wordToComplete + if ($toComplete.Length -ge 1) { + if ($toComplete[0] -eq '''') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '''''', '''' + } + if ($toComplete[0] -eq '"') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 1) + $toComplete = $toComplete -replace '""', '"' + $toComplete = $toComplete -replace '`"', '"' + } + } + + $toComplete += '*' + foreach ($user in $Script:Context.AvailableUsers) { + if ($user -like $toComplete) { + $result += $user + } + } + if ($result.Count -gt 0) { + return $result + } else { + return $null + } +} + +Register-ArgumentCompleter -CommandName Grant-KeeperSharedFolderAccess -ParameterName Team -ScriptBlock $Keeper_TeamCompleter +Register-ArgumentCompleter -CommandName Grant-KeeperSharedFolderAccess -ParameterName User -ScriptBlock $Keeper_UserCompleter +Register-ArgumentCompleter -CommandName Grant-KeeperSharedFolderAccess -ParameterName SharedFolder -ScriptBlock $Keeper_SharedFolderCompleter + +New-Alias -Name kshf -Value Grant-KeeperSharedFolderAccess + +Register-ArgumentCompleter -CommandName Revoke-KeeperSharedFolderAccess -ParameterName Team -ScriptBlock $Keeper_TeamCompleter +Register-ArgumentCompleter -CommandName Revoke-KeeperSharedFolderAccess -ParameterName User -ScriptBlock $Keeper_UserCompleter +Register-ArgumentCompleter -CommandName Revoke-KeeperSharedFolderAccess -ParameterName SharedFolder -ScriptBlock $Keeper_SharedFolderCompleter + +New-Alias -Name kushf -Value Revoke-KeeperSharedFolderAccess + +function Get-KeeperAvailableTeam { + <# + .Synopsis + Get Keeper Available Teams + + .Parameter Uid + Team UID + + .Parameter Filter + Return matching teams only + #> + [CmdletBinding()] + [OutputType([KeeperSecurity.Vault.TeamInfo[]])] + Param ( + [string] $Uid, + [string] $Filter + ) + + ensureAvalableLoaded + $teams = $Script:Context.AvailableTeams + if ($Uid) { + $teams | Where-Object { $_.TeamUid -ceq $Uid } | Select-Object -First 1 + } else { + foreach ($team in $teams) { + if ($Filter) { + $match = $($team.Uid, $team.Name) | Select-String $Filter | Select-Object -First 1 + if (-not $match) { + continue + } + } + $team + } + } + } + New-Alias -Name kat -Value Get-KeeperAvailableTeam + + function New-KeeperOneTimeShare { + <# + .Synopsis + New Keeper One-Time Share + + .Parameter Uid + Shared Record UID + + .Parameter Expiration + Expiration TimeSpan + + .Parameter ShareName + One-Time Share Name + #> + [CmdletBinding()] + [OutputType([string])] + Param ( + [Parameter(Mandatory = $true)][string] $Uid, + [Parameter(Mandatory=$true)][TimeSpan] $ExpireIn, + [Parameter(Mandatory=$false)][string] $ShareName + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + $oneTimeShare = [KeeperSecurity.Vault.ExternalRecordShareExtensions]::CreateExternalRecordShare($vault, $Uid, $ExpireIn, $ShareName).GetAwaiter().GetResult() + return $oneTimeShare + } + + New-Alias -Name kotsn -Value New-KeeperOneTimeShare + + function Get-KeeperOneTimeShare { + <# + .Synopsis + Get Keeper One-Time Shares + + .Parameter Uid + Shared Record UID + + #> + [CmdletBinding()] + [OutputType([string])] + Param ( + [Parameter(Mandatory = $true, Position=0)][string] $Uid + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + [KeeperSecurity.Vault.ExternalRecordShareExtensions]::GetExernalRecordShares($vault, $Uid).GetAwaiter().GetResult() + } + New-Alias -Name kotsg -Value Get-KeeperOneTimeShare + + function Remove-KeeperOneTimeShare { + <# + .Synopsis + Deletes Keeper One-Time Share(s) + + .Parameter Uid + Shared Record UID + + .Parameter ShareName + One-Time Share Name + #> + [CmdletBinding()] + [OutputType([string])] + Param ( + [Parameter(Mandatory = $true)][string] $Uid, + [string[]] $ShareName + ) + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $shares = Get-KeeperOneTimeShare $Uid + [String[]]$clientUids = @() + foreach ($n in $ShareName) { + $share = $shares | Where-Object { $_.Name -eq $n } | Select-Object -First 1 + if ($share) { + $clientUids += $share.ClientId + } else { + Write-Information -MessageData "One-Time Share not found: $n" + } + } + [KeeperSecurity.Vault.ExternalRecordShareExtensions]::DeleteExernalRecordShares($vault, $Uid, $clientUids).GetAwaiter().GetResult() | Out-Null + } + New-Alias -Name kotsr -Value Remove-KeeperOneTimeShare diff --git a/PowerCommander/VaultCommands.ps1 b/PowerCommander/VaultCommands.ps1 index 18edb48..61b2877 100644 --- a/PowerCommander/VaultCommands.ps1 +++ b/PowerCommander/VaultCommands.ps1 @@ -1,32 +1,38 @@ -#requires -Version 5.0 - -using namespace KeeperSecurity.Sdk +#requires -Version 5.1 $Script:PathDelimiter = [System.IO.Path]::DirectorySeparatorChar +function getVault { + if (-not $Script:Context.Auth) { + Write-Error -Message "Not Connected" -ErrorAction Stop + } + if (-not $Script:Context.Vault) { + Write-Error -Message "Not Connected" -ErrorAction Stop + } + $Script:Context.Vault +} + function Get-KeeperLocation { -<# + <# .Synopsis Get current Keeper folder #> - [CmdletBinding()] - - [Vault.VaultOnline]$vault = $Script:Vault - if ($vault) { - [string]$currentFolder = $Script:CurrentFolder - [Vault.FolderNode]$folder = $vault.RootFolder - if ($currentFolder) { - $_ = $vault.TryGetFolder($currentFolder, [ref]$folder) - } - exportKeeperNode $folder - } else { - Write-Error -Message "Not connected" - } + [CmdletBinding()] + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + [string]$currentFolder = $Script:Context.CurrentFolder + [KeeperSecurity.Vault.FolderNode]$folder = $vault.RootFolder + if ($currentFolder) { + $vault.TryGetFolder($currentFolder, [ref]$folder) | Out-Null + } + exportKeeperNode $folder } New-Alias -Name kpwd -Value Get-KeeperLocation + function Set-KeeperLocation { -<# + <# .Synopsis Change current Keeper folder @@ -34,120 +40,123 @@ function Set-KeeperLocation { New location #> - [CmdletBinding()] - Param ( - [Parameter(Position = 0)][string] $Path - ) - [Vault.VaultOnline]$vault = $Script:Vault - if ($vault) { - if ($Path) { - [Vault.FolderNode]$folder = $null - if (!$vault.TryGetFolder($Script:CurrentFolder, [ref]$folder)) { - $folder = $vault.RootFolder - } - - $components = splitKeeperPath $Path - $rs = parseKeeperPath $components $vault $folder - if ($rs -and !$rs[1]) { - $folder = $rs[0] - $uid = $folder.FolderUid - if ($vault.TryGetFolder($uid, [ref]$folder)) { - $Script:CurrentFolder = $uid - } else { - $Script:CurrentFolder = '' - } - } - } - getVaultFolderPath $vault $Script:CurrentFolder - } else { - Write-Error -Message "Not connected" - } + [Diagnostics.CodeAnalysis.SuppressMessageAttribute("PSUseShouldProcessForStateChangingFunctions", "")] + [CmdletBinding()] + Param ( + [Parameter(Position = 0)][string] $Path + ) + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + if ($Path) { + [KeeperSecurity.Vault.FolderNode]$folder = $null + if (!$vault.TryGetFolder($Script:Context.CurrentFolder, [ref]$folder)) { + $folder = $vault.RootFolder + } + + $components = splitKeeperPath $Path + $rs = parseKeeperPath $components $vault $folder + if ($rs -and !$rs[1]) { + $folder = $rs[0] + $uid = $folder.FolderUid + if ($vault.TryGetFolder($uid, [ref]$folder)) { + $Script:Context.CurrentFolder = $uid + } + else { + $Script:Context.CurrentFolder = '' + } + } + } + getVaultFolderPath $vault $Script:Context.CurrentFolder } $Keeper_FolderPathRecordCompleter = { - param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) - - $result = @() - [Vault.VaultOnline]$vault = $Script:Vault - if ($vault) { - [Vault.FolderNode] $folder = $null - if (!$vault.TryGetFolder($Script:CurrentFolder, [ref]$folder)) { - $folder = $vault.RootFolder - } - - $pattern = '' - $toComplete = $wordToComplete - if ($toComplete.Length -ge 2) { - if ($toComplete[0] -eq '''' -and $toComplete[-1] -eq '''') { - $toComplete = $toComplete.Substring(1, $toComplete.Length - 2) - $toComplete = $toComplete -replace '''', '''' - } - } - if ($toComplete) { - $components = splitKeeperPath $toComplete - if ($components.Count -gt 1) { - if ($components[-1]) { - $pattern = $components[-1] - $components[-1] = '' - } - $rs = parseKeeperPath $components $vault $folder - if ($rs -and $rs.Count -eq 2) { - if (!$rs[1]) { - $folder = $rs[0] - } else { - $folder = $null - } - } - } else { - if ($components) { - $pattern = $components - $components = @('') - } else { - $folder = $vault.RootFolder - $pattern = '' - $components = @('') - } - } - } else { - $components = @('') - $pattern = $wordToComplete - } - - if ($folder) { - $pattern += '*' - foreach ($uid in $folder.Subfolders) { - $subfolder = $null - if ($vault.TryGetFolder($uid, [ref]$subfolder)) { - if ($subfolder.Name -like $pattern) { - $path = @() - $components | ForEach-Object { $path += $_ } - $path[-1] = $subfolder.Name - $path += '' - $expansion = ($path | ForEach-Object {$_ -replace '\\', '\\'}) -join $Script:PathDelimiter - if ($expansion -match '[\s'']') { - $expansion = $expansion -replace '''', '''''' - $expansion = "'${expansion}'" - } - $result += $expansion - } - } - } - } - } - if ($result.Count -gt 0) { - return $result - } else { - return $null - } + param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameters) + + $result = @() + [KeeperSecurity.Vault.VaultOnline]$vault = $Script:Context.Vault + if ($vault) { + [KeeperSecurity.Vault.FolderNode] $folder = $null + if (!$vault.TryGetFolder($Script:Context.CurrentFolder, [ref]$folder)) { + $folder = $vault.RootFolder + } + + $pattern = '' + $toComplete = $wordToComplete + if ($toComplete.Length -ge 2) { + if ($toComplete[0] -eq '''' -and $toComplete[-1] -eq '''') { + $toComplete = $toComplete.Substring(1, $toComplete.Length - 2) + $toComplete = $toComplete -replace '''', '''' + } + } + if ($toComplete) { + $components = splitKeeperPath $toComplete + if ($components.Count -gt 1) { + if ($components[-1]) { + $pattern = $components[-1] + $components[-1] = '' + } + $rs = parseKeeperPath $components $vault $folder + if ($rs -and $rs.Count -eq 2) { + if (!$rs[1]) { + $folder = $rs[0] + } + else { + $folder = $null + } + } + } + else { + if ($components) { + $pattern = $components + $components = @('') + } + else { + $folder = $vault.RootFolder + $pattern = '' + $components = @('') + } + } + } + else { + $components = @('') + $pattern = $wordToComplete + } + + if ($folder) { + $pattern += '*' + foreach ($uid in $folder.Subfolders) { + $subfolder = $null + if ($vault.TryGetFolder($uid, [ref]$subfolder)) { + if ($subfolder.Name -like $pattern) { + $path = @() + $components | ForEach-Object { $path += $_ } + $path[-1] = $subfolder.Name + $expansion = ($path | ForEach-Object { $_ -replace '\\', '\\' }) -join $Script:PathDelimiter + if ($expansion -match '[\s'']') { + $expansion = $expansion -replace '''', '''''' + $expansion = "'${expansion}'" + } + $result += $expansion + } + } + } + } + } + if ($result.Count -gt 0) { + return $result + } + else { + return $null + } } Register-ArgumentCompleter -CommandName Set-KeeperLocation -ParameterName Path -ScriptBlock $Keeper_FolderPathRecordCompleter New-Alias -Name kcd -Value Set-KeeperLocation -function Get-KeeperChildItems { -<# +function Get-KeeperChildItem { + <# .Synopsis - Get the content of Keeper folder. Output and parameters are similar to Get-ChildItems cmdlet + Get the content of Keeper folder. Output and parameters are similar to Get-ChildItem cmdlet .Parameter Path Keeper folder @@ -163,147 +172,166 @@ function Get-KeeperChildItems { .Parameter SkipGrouping Do not group result set by folder - + .Parameter ObjectType Limit result set to Folders or Records only #> - [CmdletBinding()] - Param ( - [Parameter(Position = 0)][string] $Path, - [string] $Filter, - [Switch] $Recursive, - [int] $Depth, - [Switch] $SkipGrouping, - [ValidateSet('Folder' ,'Record')][string] $ObjectType - ) - - $showFolder = $true - $showRecord = $true - if ($ObjectType) { - $showFolder = $ObjectType -eq 'Folder' - $showRecord = !$showFolder - } - - [Vault.VaultOnline]$vault = $Script:Vault - if ($vault) { - [Vault.FolderNode] $baseDir = $null - if (!$vault.TryGetFolder($Script:CurrentFolder, [ref]$baseDir)) { - $baseDir = $vault.RootFolder - } - if ($Path) { - $components = splitKeeperPath $Path - $rs = parseKeeperPath $components $vault $baseDir - $baseDir = $rs[0] - } - [Vault.FolderNode[]]$folders = @($baseDir) - if ($Recursive.IsPresent) { - $pos = 0 - $dep = 0 - while ($pos -lt $folders.Count) { - if ($Depth -gt 0) { - if ($dep -ge $Depth) { - break - } - } - $lastPos = $folders.Count - for ($i = $pos; $i -lt $lastPos; $i++) { - foreach($uid in $folders[$i].Subfolders) { - [Vault.FolderNode] $sf = $null; - if ($vault.TryGetFolder($uid, [ref]$sf)) { - $folders += $sf - } - } - } - $pos = $lastPos - $dep++ - } - } - $entries = @() - $recordEntries = @{} - for ($i = 0; $i -lt $folders.Count; $i++) { - [Vault.FolderNode]$f = $folders[$i] - $path = getVaultFolderPath $vault $f.FolderUid - if ($showFolder) { - foreach ($uid in $f.Subfolders) { - [Vault.FolderNode]$sf = $null - if ($vault.TryGetFolder($uid, [ref]$sf)) { - $match = $true - if ($Filter) { - $match = @($sf.Name, $sf.FolderUid) | Select-String $Filter | Select-Object -First 1 - } - if ($match) { - $entry = [PSCustomObject]@{ - PSTypeName = "KeeperSecurity.Commander.FolderEntry$(if ($SkipGrouping.IsPresent) {'Flat'} else {''})" - Uid = $sf.FolderUid - Name = $sf.Name - OwnerFolder = $path - FolderType = $sf.FolderType - Shared = $sf.FolderType -ne [Vault.FolderType]::UserFolder - SortGroup = 0 - } - $entries += $entry - } - } - } - } - if ($showRecord) { - foreach ($uid in $f.Records) { - [Vault.PasswordRecord] $r = $null - if ($vault.TryGetRecord($uid, [ref]$r)) { - $match = $true - if ($Filter) { - $match = @($r.Title, $r.Uid, $r.Login, $r.Link) | Select-String $Filter | Select-Object -First 1 - } - if ($match) { - if ($Flat.IsPresent -and $recordEntries.ContainsKey($uid)) { - $entry = $recordEntries[$uid] - $entry.OwnerFolder += $path - } else { - $entry = [PSCustomObject]@{ - PSTypeName = "KeeperSecurity.Commander.RecordEntry$(if ($SkipGrouping.IsPresent) {'Flat'} else {''})" - Uid = $r.Uid - Name = $r.Title - Shared = $r.Shared - Owner = $r.Owner - HasAttachments = ($r.Attachments.Count -gt 0) - Link = $r.Link - Login = $r.Login - SortGroup = 1 - } - if ($SkipGrouping.IsPresent) { - Add-Member -InputObject $entry -NotePropertyName OwnerFolder -NotePropertyValue @($path) - } else { - Add-Member -InputObject $entry -NotePropertyName OwnerFolder -NotePropertyValue $path - } - - $recordEntries[$uid] = $entry - } - } - } - } - } - } - if ($recordEntries) { - $entries += $recordEntries.Values - } - if ($entries) { - if ($SkipGrouping.IsPresent) { - $entries | Sort-Object SortGroup, Name - } else { - $entries | Sort-Object OwnerFolder, SortGroup, Name - } - } - } else { - Write-Error -Message "Not connected" - } + [CmdletBinding()] + Param ( + [Parameter(Position = 0)][string] $Path, + [string] $Filter, + [Switch] $Recursive, + [int] $Depth, + [Switch] $SkipGrouping, + [ValidateSet('Folder' , 'Record')][string] $ObjectType + ) + + $showFolder = $true + $showRecord = $true + if ($ObjectType) { + $showFolder = $ObjectType -eq 'Folder' + $showRecord = !$showFolder + } + + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + [KeeperSecurity.Vault.FolderNode] $currentDir = $null + if (!$vault.TryGetFolder($Script:Context.CurrentFolder, [ref]$currentDir)) { + $currentDir = $vault.RootFolder + } + + [KeeperSecurity.Vault.FolderNode] $baseDir = $null + if ($Path) { + if (-not $vault.TryGetFolder($Path, [ref]$baseDir)) { + $components = splitKeeperPath $Path + $rs = parseKeeperPath $components $vault $currentDir + if ($rs -is [array]) { + if (-not $rs[1]) { + $baseDir = $rs[0] + } + } + } + } else { + $baseDir = $currentDir + } + if (-not $baseDir) { + Write-Error -Message "Cannot find path '$Path'" -ErrorAction Stop + } + + [KeeperSecurity.Vault.FolderNode[]]$folders = @($baseDir) + if ($Recursive.IsPresent) { + $pos = 0 + $dep = 0 + while ($pos -lt $folders.Count) { + if ($Depth -gt 0) { + if ($dep -ge $Depth) { + break + } + } + $lastPos = $folders.Count + for ($i = $pos; $i -lt $lastPos; $i++) { + foreach ($uid in $folders[$i].Subfolders) { + [KeeperSecurity.Vault.FolderNode] $sf = $null; + if ($vault.TryGetFolder($uid, [ref]$sf)) { + $folders += $sf + } + } + } + $pos = $lastPos + $dep++ + } + } + $entries = @() + $recordEntries = @{} + for ($i = 0; $i -lt $folders.Count; $i++) { + [KeeperSecurity.Vault.FolderNode]$f = $folders[$i] + $path = getVaultFolderPath $vault $f.FolderUid + if ($showFolder) { + foreach ($uid in $f.Subfolders) { + [KeeperSecurity.Vault.FolderNode]$sf = $null + if ($vault.TryGetFolder($uid, [ref]$sf)) { + $match = $true + if ($Filter) { + $match = @($sf.Name, $sf.FolderUid) | Select-String $Filter | Select-Object -First 1 + } + if ($match) { + $entry = [PSCustomObject]@{ + PSTypeName = "KeeperSecurity.Commander.FolderEntry$(if ($SkipGrouping.IsPresent) {'Flat'} else {''})" + Uid = $sf.FolderUid + Name = $sf.Name + OwnerFolder = $path + FolderType = $sf.FolderType + Shared = $sf.FolderType -ne [KeeperSecurity.Vault.FolderType]::UserFolder + SortGroup = 0 + } + $entries += $entry + } + } + } + } + if ($showRecord) { + foreach ($uid in $f.Records) { + [KeeperSecurity.Vault.KeeperRecord] $r = $null + if ($vault.TryGetKeeperRecord($uid, [ref]$r)) { + if ($r.Version -ne 2 -and $r.Version -ne 3) { + continue + } + $match = $true + if ($Filter) { + $match = @($r.Title, $r.Uid) | Select-String $Filter | Select-Object -First 1 + } + if ($match) { + if ($Flat.IsPresent -and $recordEntries.ContainsKey($uid)) { + $entry = $recordEntries[$uid] + $entry.OwnerFolder += $path + } + else { + $type = [KeeperSecurity.Utils.RecordTypesUtils]::KeeperRecordType($r) + $publicInfo = [KeeperSecurity.Utils.RecordTypesUtils]::KeeperRecordPublicInformation($r) + $entry = [PSCustomObject]@{ + PSTypeName = "KeeperSecurity.Commander.RecordEntry$(if ($SkipGrouping.IsPresent) {'Flat'} else {''})" + Uid = $r.Uid + Name = $r.Title + Shared = $r.Shared + Owner = $r.Owner + Type = $type + PublicInformation = $publicInfo + HasAttachments = ($vault.RecordAttachments($r).Count -gt 0) + SortGroup = 1 + } + if ($SkipGrouping.IsPresent) { + Add-Member -InputObject $entry -NotePropertyName OwnerFolder -NotePropertyValue @($path) + } + else { + Add-Member -InputObject $entry -NotePropertyName OwnerFolder -NotePropertyValue $path + } + + $recordEntries[$uid] = $entry + $entry = $null + } + } + } + } + } + } + if ($recordEntries) { + $entries += $recordEntries.Values + } + if ($entries) { + if ($SkipGrouping.IsPresent) { + $entries | Sort-Object SortGroup, Name + } + else { + $entries | Sort-Object OwnerFolder, SortGroup, Name + } + } } -Register-ArgumentCompleter -CommandName Get-KeeperChildItems -ParameterName Path -ScriptBlock $Keeper_FolderPathRecordCompleter -New-Alias -Name kdir -Value Get-KeeperChildItems +Register-ArgumentCompleter -CommandName Get-KeeperChildItem -ParameterName Path -ScriptBlock $Keeper_FolderPathRecordCompleter +New-Alias -Name kdir -Value Get-KeeperChildItem function Get-KeeperObject { -<# + <# .Synopsis Get Keeper object by Uid @@ -312,221 +340,240 @@ function Get-KeeperObject { .Parameter ObjectType One of the following Record, SharedFolder, Folder, Team - + .Parameter PropertyName Return object property not the entire object #> - [CmdletBinding()] - Param ( - [Parameter(Mandatory = $true, ValueFromPipeline = $true)][string[]] $Uid, - [string] [ValidateSet('Record' ,'SharedFolder', 'Folder', 'Team')] $ObjectType, - [string] $PropertyName - ) - - Begin { - [Vault.VaultOnline]$vault = $Script:Vault - if (-not $vault) { - Write-Error -Message 'Not connected' - return - } - - $testRecord = if ($ObjectType) {$ObjectType -eq 'Record'} else {$true} - $testSharedFolder = if ($ObjectType) {$ObjectType -eq 'SharedFolder'} else {$true} - $testFolder = if ($ObjectType) {$ObjectType -eq 'Folder'} else {$true} - $testTeam = if ($ObjectType) {$ObjectType -eq 'Team'} else {$true} - } - Process { - ForEach($oid in $Uid) { - if ($testRecord) { - [Vault.PasswordRecord] $record = $null - if ($vault.TryGetRecord($oid, [ref]$record)) { - if ($PropertyName) { - $mp = $record | Get-Member -MemberType Properties -Name $PropertyName - if ($mp) { - $record | Select-Object -ExpandProperty $PropertyName - } - } else { - $record - } - continue - } - } - if ($testSharedFolder) { - [Vault.SharedFolder] $sf = $null - if ($vault.TryGetSharedFolder($oid, [ref]$sf)) { - if ($PropertyName) { - $mp = $sf | Get-Member -MemberType Properties -Name $PropertyName - if ($mp) { - $sf | Select-Object -ExpandProperty $PropertyName - } - } else { - $sf - } - continue - } - } - if ($testFolder) { - [Vault.FolderNode] $f = $null - if ($vault.TryGetFolder($oid, [ref]$f)) { - if ($PropertyName) { - $mp = $f | Get-Member -MemberType Properties -Name $PropertyName - if ($mp) { - $f | Select-Object -ExpandProperty $PropertyName - } - } else { - $f - } - continue - } - } - if ($testTeam) { - [Vault.EnterpriseTeam] $t = $null - if ($vault.TryGetTeam($oid, [ref]$t)) { - if ($PropertyName) { - $mp = $t | Get-Member -MemberType Properties -Name $PropertyName - if ($mp) { - $t | Select-Object -ExpandProperty $PropertyName - } - } else { - $t - } - continue - } - } - - } - } + [CmdletBinding()] + Param ( + [Parameter(Mandatory = $true, ValueFromPipeline = $true)][string[]] $Uid, + [string] [ValidateSet('Record' , 'SharedFolder', 'Folder', 'Team')] $ObjectType, + [string] $PropertyName + ) + + Begin { + [KeeperSecurity.Vault.VaultOnline]$vault = getVault + + $testRecord = if ($ObjectType) { $ObjectType -eq 'Record' } else { $true } + $testSharedFolder = if ($ObjectType) { $ObjectType -eq 'SharedFolder' } else { $true } + $testFolder = if ($ObjectType) { $ObjectType -eq 'Folder' } else { $true } + $testTeam = if ($ObjectType) { $ObjectType -eq 'Team' } else { $true } + } + Process { + ForEach ($oid in $Uid) { + if ($testRecord) { + [KeeperSecurity.Vault.KeeperRecord] $record = $null + if ($vault.TryGetKeeperRecord($oid, [ref]$record)) { + if ($PropertyName) { + $mp = $record | Get-Member -MemberType Properties -Name $PropertyName + if ($mp) { + $record | Select-Object -ExpandProperty $PropertyName + } + } + else { + $record + } + continue + } + } + if ($testSharedFolder) { + [KeeperSecurity.Vault.SharedFolder] $sf = $null + if ($vault.TryGetSharedFolder($oid, [ref]$sf)) { + if ($PropertyName) { + $mp = $sf | Get-Member -MemberType Properties -Name $PropertyName + if ($mp) { + $sf | Select-Object -ExpandProperty $PropertyName + } + } + else { + $sf + } + continue + } + } + if ($testFolder) { + [KeeperSecurity.Vault.FolderNode] $f = $null + if ($vault.TryGetFolder($oid, [ref]$f)) { + if ($PropertyName) { + $mp = $f | Get-Member -MemberType Properties -Name $PropertyName + if ($mp) { + $f | Select-Object -ExpandProperty $PropertyName + } + } + else { + $f + } + continue + } + } + if ($testTeam) { + [KeeperSecurity.Vault.Team] $t = $null + if ($vault.TryGetTeam($oid, [ref]$t)) { + if ($PropertyName) { + $mp = $t | Get-Member -MemberType Properties -Name $PropertyName + if ($mp) { + $t | Select-Object -ExpandProperty $PropertyName + } + } + else { + $t + } + continue + } + ensureAvalableLoaded + [KeeperSecurity.Vault.TeamInfo] $teamInfo = $null + $teamInfo = $Script:Context.AvailableTeams | Where-Object { $_.TeamUid -ceq $oid } | Select-Object -First 1 + if ($teamInfo) { + if ($PropertyName) { + $mp = $teamInfo | Get-Member -MemberType Properties -Name $PropertyName + if ($mp) { + $teamInfo | Select-Object -ExpandProperty $PropertyName + } + } + else { + $teamInfo + } + continue + } + } + } + } } New-Alias -Name ko -Value Get-KeeperObject - function parseKeeperPath { - Param ( - [string[]]$components, - [Vault.VaultOnline]$vault, - [Vault.FolderNode]$folder - ) - if ($components) { - if (!$components[0]) { - $folder = $vault.RootFolder - $_, $components = $components - } - while ($components) { - $resume = $false - $component, $rest = $components - if ($component -eq '..') { - if ($folder.ParentUid) { - $resume = $vault.TryGetFolder($folder.ParentUid, [ref]$folder) - } else { - $folder = $vault.RootFolder - $resume = $true - } - } - elseif (!$component -or $component -eq '.') { - $resume = $true - } - else { - foreach ($x in $folder.Subfolders) { - [Vault.FolderNode] $subfolder = $null - if ($vault.TryGetFolder($x, [ref]$subfolder)) { - if ($subfolder.Name -eq $component) { - $resume = $true - $folder = $subfolder - break - } - } - } - } - - if ($resume) { - $components = $rest - } else { - break - } - } - $folder - ($components | ForEach-Object {escapePathComponent $_}) -join $Script:PathDelimiter - } else { - $folder - $path - } + Param ( + [string[]]$components, + [KeeperSecurity.Vault.VaultOnline]$vault, + [KeeperSecurity.Vault.FolderNode]$folder + ) + if ($components) { + if (!$components[0]) { + $folder = $vault.RootFolder + $_, $components = $components + } + while ($components) { + $resume = $false + $component, $rest = $components + if ($component -eq '..') { + if ($folder.ParentUid) { + $resume = $vault.TryGetFolder($folder.ParentUid, [ref]$folder) + } + else { + $folder = $vault.RootFolder + $resume = $true + } + } + elseif (!$component -or $component -eq '.') { + $resume = $true + } + else { + foreach ($x in $folder.Subfolders) { + [KeeperSecurity.Vault.FolderNode] $subfolder = $null + if ($vault.TryGetFolder($x, [ref]$subfolder)) { + if ($subfolder.Name -eq $component) { + $resume = $true + $folder = $subfolder + break + } + } + } + } + + if ($resume) { + $components = $rest + } + else { + break + } + } + $folder + $components -join $Script:PathDelimiter + } + else { + $folder + $path + } } function splitKeeperPath { - Param ([string] $path) - - [bool]$isDelimiter = $false - [string]$component = '' - foreach ($x in $path.ToCharArray()) { - if ($x -eq $Script:PathDelimiter) { - if ($isDelimiter) { - $component += $x - $isDelimiter = $false - } else { - $isDelimiter = $true - } - } else { - if ($isDelimiter) { - $component - $component = '' - $isDelimiter = $false - } - $component += $x - } - } - $component - if ($isDelimiter) { - '' - } + Param ([string] $path) + + [bool]$isDelimiter = $false + [string]$component = '' + foreach ($x in $path.ToCharArray()) { + if ($x -eq $Script:PathDelimiter) { + if ($isDelimiter) { + $component += $x + $isDelimiter = $false + } + else { + $isDelimiter = $true + } + } + else { + if ($isDelimiter) { + $component + $component = '' + $isDelimiter = $false + } + $component += $x + } + } + $component + if ($isDelimiter) { + '' + } } function exportKeeperNode { - Param ([Vault.FolderNode] $folder) - [PSCustomObject]@{ - PSTypeName = 'KeeperSecurity.Commander.FolderInfo' - FolderUid = $folder.FolderUid - Path = getVaultFolderPath $vault $folder.FolderUid - Name = $folder.Name - ParentUid = $folder.ParentUid - FolderType = $folder.FolderType - } + Param ([KeeperSecurity.Vault.FolderNode] $folder) + [PSCustomObject]@{ + PSTypeName = 'KeeperSecurity.Commander.FolderInfo' + FolderUid = $folder.FolderUid + Path = getVaultFolderPath $vault $folder.FolderUid + Name = $folder.Name + ParentUid = $folder.ParentUid + FolderType = $folder.FolderType + } } function escapePathComponent { - Param ([string] $component) - - $component = $component -replace '\\', '\\' - $component = $component -replace '''', '''''' - if ($component -match '[\s'']') { - "'${component}'" - } else { - $component - } + Param ([string] $component) + + $component = $component -replace '\\', '\\' + $component = $component -replace '''', '''''' + if ($component -match '[\s'']') { + "'${component}'" + } + else { + $component + } } function getVaultFolderPath { - Param ( - [Vault.VaultOnline]$vault, - [string] $folderUid - ) - - $comps = @() - traverseFolderToRoot $vault $folderUid ([ref]$comps) - $path = '' - if ($comps) { - [Array]::Reverse($comps) - $comps += '' - $path = ($comps | ForEach-Object {$_ -replace [Regex]::Escape($Script:PathDelimiter), "${Script:PathDelimiter}${Script:PathDelimiter}" }) -join $Script:PathDelimiter - } - "${Script:PathDelimiter}${path}" + Param ( + [KeeperSecurity.Vault.VaultOnline]$vault, + [string] $folderUid + ) + + $comps = @() + traverseFolderToRoot $vault $folderUid ([ref]$comps) + $path = '' + if ($comps) { + [Array]::Reverse($comps) + $comps += '' + $path = ($comps | ForEach-Object { $_ -replace [Regex]::Escape($Script:PathDelimiter), "${Script:PathDelimiter}${Script:PathDelimiter}" }) -join $Script:PathDelimiter + } + "${Script:PathDelimiter}${path}" } -function traverseFolderToRoot ([Vault.VaultOnline]$vault, [string] $folderUid, [ref][string[]] $components) { - if ($folderUid) { - [Vault.FolderNode]$folder = $null - if ($vault.TryGetFolder($folderUid, [ref]$folder)) { - $components.Value += $folder.Name - traverseFolderToRoot $vault $folder.ParentUid $components - } - } +function traverseFolderToRoot ([KeeperSecurity.Vault.VaultOnline]$vault, [string] $folderUid, [ref] $components) { + if ($folderUid) { + [KeeperSecurity.Vault.FolderNode]$folder = $null + if ($vault.TryGetFolder($folderUid, [ref]$folder)) { + $components.Value += $folder.Name + traverseFolderToRoot $vault $folder.ParentUid $components + } + } } diff --git a/PowerCommander/script-examples.md b/PowerCommander/script-examples.md index 49f9cda..cc594c0 100644 --- a/PowerCommander/script-examples.md +++ b/PowerCommander/script-examples.md @@ -11,6 +11,10 @@ $records = kr # Print values of the records $records +UID Type Title Info +--- ---- ----- ---- +h9xFFgfCU_BAi3A5V_ZOnA databaseCredentials MSSQL READ ONLY USER sa (at) 192.168.1.10:1433 +VMOfbXOxKFMEwO4GUzOigA address Home # create variable of a record title to search for $titleToSearch = "MSSQL READ ONLY USER" @@ -18,10 +22,14 @@ $titleToSearch = "MSSQL READ ONLY USER" # Find a record by it's title and store it to the variable $foundRecord = $records | where Title -EQ $titleToSearch +# make sure record is found +$foundRecord +UID Type Title Info +--- ---- ----- ---- +h9xFFgfCU_BAi3A5V_ZOnA databaseCredentials MSSQL READ ONLY USER sa (at) 192.168.1.10:1433 # Modify password of the record -Add-KeeperRecord -UpdateOnly -Title foundRecord.Title -Password "NEW PASSWORD" - +Add-KeeperRecord -Uid 'h9xFFgfCU_BAi3A5V_ZOnA' password="NEW PASSWORD" ``` Configure Peristent Login (to run script silently and don't ask for credentials on each run) @@ -73,4 +81,4 @@ Once above steps executed, Commander will create `C:\Users\[USER]\Documents\.kee ```PowerShell dir -Path "C:\Users\[USER]\Source\keeper-sdk-dotnet\PowerCommander" -Recurse | Unblock-File - ``` \ No newline at end of file + ``` diff --git a/README.md b/README.md index 9fe76e2..b7dce7d 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +Keeper Commander + ### .Net and PowerShell SDK for Keeper Password Manager The Keeper .Net and PowerShell module ("PowerCommander") provides vault and administrative level automation. The current features of the .Net and PowerShell library include the following: @@ -9,16 +11,18 @@ The Keeper .Net and PowerShell module ("PowerCommander") provides vault and admi * Customize integration into your backend systems * Update/Rotate passwords in the vault -The Keeper .Net SDK is compatible with the new [Keeper Login V3 API](https://docs.keeper.io/enterprise-guide/login-api) which was released in October 2020. +Additional development tools in Python and other languages is available at our [Secrets Manager](https://docs.keeper.io/secrets-manager/) portal. ### .Net SDK For source integration into your .Net code, please utilize the [KeeperSDK Library source code](https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/KeeperSdk). -[API documentation] (https://keeper-security.github.io/gitbook-keeper-sdk/CSharp/html/R_Project_Documentation.htm) +[User Guide](https://docs.keeper.io/en/v/secrets-manager/commander-cli/commander-installation-setup/net-developer-sdk) + +[API documentation](https://keeper-security.github.io/gitbook-keeper-sdk/CSharp/html/R_Project_Documentation.htm) ### Sample App For help with implementation of SDK features, please see the -* [Sample App] (https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/Sample). Sample application. +* [Sample App](https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/Sample). Sample application. * [Commander CLI App](https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/Commander). This application contains several basic operations such as logging in, authentication with two-factor, loading and decrypting the vault and updating passwords. ### Developer Requirements for KeeperSDK Library @@ -30,26 +34,12 @@ For help with implementation of SDK features, please see the ### PowerShell Module To use the PowerShell modules, see the [PowerCommander library](https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/PowerCommander). -### Contact Us -If you need any assistance or require specific functionality not supported in Commander yet, please contact us at commander@keepersecurity.com. - ### About Keeper Security -Keeper Security develops the world's most downloaded password manager and encrypted digital vault with millions of individual customers and thousands of enterprise customers worldwide. Keeper is a zero-knowledge, native and cloud-based solution available on every mobile and desktop device platform. Learn more about Keeper by visiting the [Keeper Security](https://keepersecurity.com) website. +Keeper is the leading cybersecurity platform for preventing password-related data breaches and cyberthreats. -### Security -Keeper is a Zero Knowledge security provider. Zero Knowledge is a system architecture that guarantees the highest levels of security and privacy by adhering to the following principles: +Learn More at: +[https://keepersecurity.com](https://keepersecurity.com) -- Data is encrypted and decrypted at the device level (not on the server) -- The application never stores plain text (human readable) data -- The server never receives data in plain text -- No Keeper employee or 3rd party can view the unencrypted data -- The keys to decrypt and encrypt data are derived from the user’s master password -- Multi-Layer encryption provides access control at the user, group and admin level -- Sharing of data uses Public Key Cryptography for secure key distribution - -Data is encrypted locally on the user’s device before it is transmitted and stored in Keeper’s Cloud Security Vault. When data is synchronized to another device, the data remains encrypted until it is decrypted on the other device. - -Keeper is the most secure, certified, tested and audited password security platform in the world. We are the only SOC 2 and ISO 27001 certified password management solution in the industry and Privacy Shield Compliant with the U.S. Department of Commerce's EU-U.S. Privacy Shield program, meeting the European Commission's Directive on Data Protection. Not only do we implement the most secure levels of encryption, we also adhere to very strict internal practices that are continually audited by third parties to help ensure that we continue to develop secure software and provide the world’s most secure cybersecurity platform. - -If you have any questions, please email commander@keepersecurity.com. +### Contact Us +If you need any assistance or require specific functionality not supported in Commander yet, please contact us at commander@keepersecurity.com. diff --git a/Sample/Program.cs b/Sample/Program.cs index 5d7916e..0c5d57a 100644 --- a/Sample/Program.cs +++ b/Sample/Program.cs @@ -10,12 +10,12 @@ // using System; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Text; using System.Threading.Tasks; +using Cli; using KeeperSecurity.Authentication; using KeeperSecurity.Authentication.Sync; using KeeperSecurity.Commands; @@ -25,292 +25,8 @@ namespace Sample { - public class AuthSyncCallback : IAuthSyncCallback - { - private readonly Action _onNextStep; - public AuthSyncCallback(Action onNextStep, Action onMessage) - { - _onNextStep = onNextStep; - } - - public void OnNextStep() - { - _onNextStep?.Invoke(); - } - } - internal static class Program { - private static string ChannelText(this DeviceApprovalChannel channel) - { - switch (channel) - { - case DeviceApprovalChannel.Email: return "email"; - case DeviceApprovalChannel.KeeperPush: return "keeper"; - case DeviceApprovalChannel.TwoFactorAuth: return "2fa"; - default: return channel.ToString(); - } - } - - private static string ChannelText(this TwoFactorChannel channel) - { - switch (channel) - { - case TwoFactorChannel.Authenticator: return "authenticator"; - case TwoFactorChannel.TextMessage: return "sms"; - case TwoFactorChannel.DuoSecurity: return "duo"; - case TwoFactorChannel.RSASecurID: return "rsa"; - case TwoFactorChannel.KeeperDNA: return "dna"; - case TwoFactorChannel.SecurityKey: return "key"; - default: return channel.ToString().ToLowerInvariant(); - } - } - - private static string ExpireText(this TwoFactorDuration duration) - { - switch (duration) - { - case TwoFactorDuration.EveryLogin: return "now"; - case TwoFactorDuration.Forever: return "never"; - default: return $"{(int) duration}_days"; - } - } - - private const string PushCommand = "push"; - private const string ChannelCommand = "channel"; - private const string ExpireCommand = "expire"; - private static readonly TwoFactorDuration[] Expires = {TwoFactorDuration.EveryLogin, TwoFactorDuration.Every30Days, TwoFactorDuration.Forever}; - - private static void PrintStepPrompt(AuthStep step) - { - var prompt = ""; - if (step is DeviceApprovalStep das) - { - prompt = $"Device Approval ({das.DefaultChannel.ChannelText()})"; - } - else if (step is TwoFactorStep tfs) - { - prompt = $"2FA ({tfs.DefaultChannel.ChannelText()}) [{tfs.Duration.ExpireText()}]"; - } - else if (step is PasswordStep) - { - prompt = "Master Password"; - } - else if (step is SsoTokenStep) - { - prompt = "SSO Token"; - } - else if (step is SsoDataKeyStep) - { - prompt = "SSO Login Approval"; - } - - Console.Write($"\n{prompt} > "); - } - - private static void PrintStepHelp(AuthStep step) - { - var commands = new List(); - if (step is DeviceApprovalStep das) - { - commands.Add($"\"{ChannelCommand}=<{string.Join(" | ", das.Channels.Select(x => x.ChannelText()))}>\" to select default channel"); - commands.Add($"\"{PushCommand}\" to send a push to the channel"); - commands.Add(" to send a code to the channel"); - } - else if (step is TwoFactorStep tfs) - { - var pushes = tfs.Channels - .SelectMany(x => tfs.GetChannelPushActions(x) ?? Enumerable.Empty()) - .Select(x => x.GetPushActionText()) - .ToArray(); - if (pushes.Length > 0) - { - commands.Add($"\"{string.Join(" | ", pushes)}\" to send a push"); - } - - commands.Add($"\"{ExpireCommand}=<{string.Join(" | ", Expires.Select(x => x.ExpireText()))}>\" to set 2fa expiration"); - if (tfs.Channels.Length > 1) - { - commands.Add($"\"{ChannelCommand}=<{string.Join(" | ", tfs.Channels.Select(x => x.ChannelText()))}>\" to select default channel."); - } - - commands.Add(""); - } - else if (step is PasswordStep) - { - commands.Add(""); - } - else if (step is SsoTokenStep sts) - { - commands.Add("SSO Login URL"); - commands.Add(sts.SsoLoginUrl); - commands.Add(""); - - commands.Add("\"password\" to login using master password"); - commands.Add(" paste sso token"); - } - else if (step is SsoDataKeyStep sdks) - { - foreach (var channel in sdks.Channels) - { - commands.Add($"\"{channel.SsoDataKeyShareChannelText()}\""); - } - } - else if (step is HttpProxyStep) - { - Console.WriteLine("Http Proxy login is not supported yet."); - } - - Console.WriteLine(); - if (commands.Count > 0) - { - Console.WriteLine("\nAvailable commands:"); - Console.WriteLine($"{string.Join("\n", commands)}"); - Console.WriteLine(" to resume"); - } - - Console.WriteLine(" to quit"); - - _hideInput = step is PasswordStep; - } - - private static async Task ProcessCommand(AuthSync auth, string command) - { - if (command == "?") - { - PrintStepHelp(auth.Step); - return; - } - - if (auth.Step is DeviceApprovalStep das) - { - if (command.StartsWith($"{ChannelCommand}=", StringComparison.InvariantCultureIgnoreCase)) - { - var channelText = command.Substring(ChannelCommand.Length + 1).ToLowerInvariant(); - var channel = das.Channels.FirstOrDefault(x => x.ChannelText() == channelText); - if (channel != default) - { - das.DefaultChannel = channel; - } - else - { - Console.WriteLine($"Device Approval push channel {channelText} not found."); - } - } - else if (string.Compare(command, PushCommand, StringComparison.InvariantCultureIgnoreCase) == 0) - { - await das.SendPush(das.DefaultChannel); - } - else - { - await das.SendCode(das.DefaultChannel, command); - } - } - - else if (auth.Step is TwoFactorStep tfs) - { - if (command.StartsWith($"{ChannelCommand}=", StringComparison.InvariantCultureIgnoreCase)) - { - var channelText = command.Substring(ChannelCommand.Length + 1).ToLowerInvariant(); - var channel = tfs.Channels.FirstOrDefault(x => x.ChannelText() == channelText); - if (channel != default) - { - tfs.DefaultChannel = channel; - } - else - { - Console.WriteLine($"2FA channel {channelText} not found."); - } - } - else if (command.StartsWith($"{ExpireCommand}=", StringComparison.InvariantCultureIgnoreCase)) - { - var expireText = command.Substring(ExpireCommand.Length + 1).ToLowerInvariant(); - var duration = Expires.FirstOrDefault(x => x.ExpireText() == expireText); - if (duration != default) - { - tfs.Duration = duration; - } - } - else - { - var push = tfs.Channels - .SelectMany(x => tfs.GetChannelPushActions(x) ?? Enumerable.Empty()) - .FirstOrDefault(x => x.GetPushActionText() == command); - if (push != default) - { - await tfs.SendPush(push); - } - else - { - await tfs.SendCode(tfs.DefaultChannel, command); - } - } - } - else if (auth.Step is PasswordStep ps) - { - await ps.VerifyPassword(command); - } - else if (auth.Step is SsoTokenStep sts) - { - if (string.Compare(command, "password", StringComparison.InvariantCultureIgnoreCase) == 0) - { - await sts.LoginWithPassword(); - } - else - { - await sts.SetSsoToken(command); - } - } - else if (auth.Step is SsoDataKeyStep sdks) - { - if (AuthUIExtensions.TryParseDataKeyShareChannel(command, out var channel)) - { - await sdks.RequestDataKey(channel); - } - else - { - Console.WriteLine($"Invalid data key share channel: {command}"); - } - } - else - { - Console.WriteLine($"Invalid command. Type \"?\" to list available commands."); - } - } - - private static bool _hideInput; - - private static string ReadInput() - { - var input = ""; - while (true) - { - var key = Console.ReadKey(true); - - if (key.Key == ConsoleKey.Enter) - { - Console.WriteLine(); - break; - } - - if (char.IsControl(key.KeyChar)) - { - if (input.Length > 0) - { - input = input.Remove(input.Length - 1); - Console.Write("\b \b"); - } - } - else - { - input += key.KeyChar; - Console.Write(_hideInput ? "*" : key.KeyChar.ToString()); - } - } - - return input; - } - private static async Task Main() { Console.CancelKeyPress += (s, e) => { Environment.Exit(-1); }; @@ -318,8 +34,6 @@ private static async Task Main() // Keeper SDK needs a storage to save configuration // such as: last login name, device token, etc var configuration = new JsonConfigurationStorage("config.json"); - - var prompt = "Enter Email Address: "; if (!string.IsNullOrEmpty(configuration.LastLogin)) { @@ -339,85 +53,47 @@ private static async Task Main() username = configuration.LastLogin; } - var inReadLine = false; - - var authFlow = new AuthSync(configuration); - authFlow.UiCallback = new AuthSyncCallback(() => - { - if (!inReadLine) return; - if (authFlow.Step.State == AuthState.Connected || authFlow.Step.State == AuthState.Error) - { - Console.WriteLine("Press "); - } - else - { - PrintStepHelp(authFlow.Step); - PrintStepPrompt(authFlow.Step); - } - }, - Console.WriteLine); + var inputManager = new SimpleInputManager(); // Login to Keeper Console.WriteLine("Logging in..."); - - var lastState = authFlow.Step.State; - await authFlow.Login(username); - while (!authFlow.IsCompleted) - { - if (authFlow.Step.State != lastState) - { - PrintStepHelp(authFlow.Step); - } - - lastState = authFlow.Step.State; - PrintStepPrompt(authFlow.Step); - inReadLine = true; - var cmd = ReadInput(); - inReadLine = false; - if (string.IsNullOrEmpty(cmd)) continue; - - try - { - await ProcessCommand(authFlow, cmd); - } - catch (KeeperAuthFailed) - { - Console.WriteLine("Invalid username or password"); - } - catch (Exception e) - { - Console.WriteLine(e.Message); - } - } + var authFlow = new AuthSync(configuration); + await Utils.LoginToKeeper(authFlow, inputManager, username); if (authFlow.Step is ErrorStep es) { Console.WriteLine(es.Message); + return; } if (!authFlow.IsAuthenticated()) return; var auth = authFlow; var vault = new VaultOnline(auth); - Console.WriteLine("\nRetrieving records..."); + Console.WriteLine("Retrieving records..."); await vault.SyncDown(); Console.WriteLine($"Hello {username}!"); Console.WriteLine($"Vault has {vault.RecordCount} records."); // Find record with title "Google" - var search = vault.Records.FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); + var search = vault + .KeeperRecords + .Where(x => x.Version == 2 || x.Version == 3) + .FirstOrDefault(x => string.Compare(x.Title, "Google", StringComparison.InvariantCultureIgnoreCase) == 0); // Create a record if it does not exist. if (search == null) { - search = new PasswordRecord - { - Title = "Google", - Login = "", - Password = "", - Link = "https://google.com", - Notes = "Stores google credentials" - }; + var loginRecord = new TypedRecordFacade(); + loginRecord.Fields.Login = ""; + loginRecord.Fields.Password = ""; + loginRecord.Fields.Url = "https://google.com"; + + var typed = loginRecord.TypedRecord; + typed.Title = "Google"; + typed.Notes = "Stores google credentials"; + + search = typed; search = await vault.CreateRecord(search); } @@ -430,12 +106,28 @@ private static async Task Main() nsd2.Data2 = "2"; await vault.StoreNonSharedData(search.Uid, nsd2); - // Update record. - search.SetCustomField("Security Token", "11111111"); + // Update record + if (search is PasswordRecord password) + { + var cf = password.GetCustomField("Security Token"); + var tokenValue = cf?.Value ?? "1"; + password.SetCustomField("Security Token", tokenValue + "1"); + } + else if (search is TypedRecord typed) + { + var recordField = new RecordTypeField("text", "Security Token"); + if (!typed.FindTypedField(recordField, out var rf)) { + + rf = recordField.CreateTypedField(); + typed.Custom.Add(rf); + } + var tokenValue = rf.ObjectValue == null ? "1" : rf.ObjectValue.ToString(); + rf.ObjectValue = tokenValue + 1; + } search = await vault.UpdateRecord(search); - // find file attachment. - var attachment = search.Attachments + + var attachment = vault.RecordAttachments(search) .FirstOrDefault(x => string.Compare(x.Title, "google", StringComparison.InvariantCultureIgnoreCase) == 0); if (attachment == null) @@ -452,7 +144,6 @@ private static async Task Main() MimeType = "text/plain" }; await vault.UploadAttachment(search, uploadTask); - await vault.UpdateRecord(search, false); } } else @@ -465,9 +156,7 @@ private static async Task Main() await vault.DownloadAttachment(search, attachment.Id, stream); } - // Delete attachment. Remove it from the record - search.Attachments.Remove(attachment); - await vault.UpdateRecord(search, false); + await vault.DeleteAttachment(search, attachment.Id); } // Find shared folder with name "Google". diff --git a/Sample/Sample.csproj b/Sample/Sample.csproj index 7c3d8b8..34b281a 100644 --- a/Sample/Sample.csproj +++ b/Sample/Sample.csproj @@ -1,12 +1,13 @@ - + Exe - netcoreapp2.1 - 7.3 + net6.0 + 8.0 + diff --git a/SecurityKey/IDevice.cs b/SecurityKey/IDevice.cs deleted file mode 100644 index bbb6089..0000000 --- a/SecurityKey/IDevice.cs +++ /dev/null @@ -1,9 +0,0 @@ -using System.IO; - -namespace SecurityKey -{ - public interface IDevice - { - Stream OpenConnection(); - } -} diff --git a/SecurityKey/SecurityKey.csproj b/SecurityKey/SecurityKey.csproj deleted file mode 100644 index 984a26c..0000000 --- a/SecurityKey/SecurityKey.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - netstandard2.0;net45 - 7.1 - - - - - - - diff --git a/SecurityKey/U2F.cs b/SecurityKey/U2F.cs deleted file mode 100644 index 6266f2e..0000000 --- a/SecurityKey/U2F.cs +++ /dev/null @@ -1,277 +0,0 @@ -using System; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Security.Cryptography; -using System.Text; -using System.Threading; -using System.Threading.Tasks; -using KeeperSecurity.Authentication; -using KeeperSecurity.Utils; - -namespace SecurityKey -{ - public class AuthenticateRequest - { - public string Version { get; set; } - public string AppId { get; set; } - public string Challenge { get; set; } - public string KeyHandle { get; set; } - }; - - public class AuthenticateResponse - { - public string ClientData { get; internal set; } - public string Signature { get; internal set; } - public string KeyHandle { get; internal set; } - }; - - [DataContract] - class U2F_ClientData - { - [DataMember(Name = "typ")] - public string Type { get; set; } - - [DataMember(Name = "challenge")] - public string Challenge { get; set; } - - [DataMember(Name = "origin")] - public string Origin { get; set; } - } - - public class U2F : IDisposable - { - public enum CTAP1_INS : byte - { - Register = 1, - Authenticate = 2, - Version = 3, - } - - - private Stream _connection; - public U2F(Stream connection) - { - _connection = connection; - } - - public static async Task GetVersion(Stream connection) - { - var rs = await Apdu.SendAdpu(connection, new ApduRequest - { - Cla = 0, - Ins = (byte) CTAP1_INS.Version, - maxResponseSize = 0xf0 - }); - if (rs.SW1 == 0x90 && rs.SW2 == 0x00) - { - return Encoding.ASCII.GetString(rs.data); - } - - throw new ApduException(rs.SW1, rs.SW2); - } - - public Task Authenticate(AuthenticateRequest request, Action onTestUserPresenceRequired = null) { - - return Authenticate(request, onTestUserPresenceRequired, CancellationToken.None); - } - - public async Task Authenticate(AuthenticateRequest request, Action onTestUserPresenceRequired, CancellationToken token) - { - var appIdHash = SHA256.Create().ComputeHash(Encoding.ASCII.GetBytes(request.AppId)); - var u2fClientData = new U2F_ClientData - { - Type = U2F_Sign, - Challenge = request.Challenge, - Origin = request.AppId - }; - var clientDataBytes = JsonUtils.DumpJson(u2fClientData); - var clientDataHash = SHA256.Create().ComputeHash(clientDataBytes); - - bool userNotified = false; - while (true) - { - if (token.IsCancellationRequested) - { - break; - } - var response = await U2F_Authenticate(clientDataHash, appIdHash, request.KeyHandle.Base64UrlDecode(), false); - if (response.SW1 == 0x90 && response.SW2 == 0x00) - { - return new AuthenticateResponse - { - ClientData = clientDataBytes.Base64UrlEncode(), - Signature = response.data.Base64UrlEncode(), - KeyHandle = request.KeyHandle - }; - } - - if (response.SW1 == 0x69 && response.SW2 == 0x85) - { - if (!userNotified) - { - userNotified = true; - onTestUserPresenceRequired?.Invoke(); - } - - try - { - await Task.Delay(200, token); - } - catch (TaskCanceledException) - { - break; - } - } - else - { - throw new ApduException(response.SW1, response.SW2); - } - - } - throw new KeeperCanceled(); - } - - public async Task CheckOnly(AuthenticateRequest request) - { - var clientDataHash = SHA256.Create().ComputeHash(new byte[0]); - var appIdHash = SHA256.Create().ComputeHash(Encoding.ASCII.GetBytes(request.AppId)); - var response = await U2F_Authenticate(clientDataHash, appIdHash, request.KeyHandle.Base64UrlDecode(), true); - return response.SW1 == 0x90 && response.SW2 == 0x00 || response.SW1 == 0x69 && response.SW2 == 0x85; - } - - private async Task U2F_Authenticate(byte[] clientDataHash, byte[] appIdHash, byte[] keyHandle, bool checkOnly) - { - var request = new ApduRequest - { - Ins = (byte)CTAP1_INS.Authenticate, - P1 = checkOnly ? (byte)0x07 : (byte)0x03, - data = clientDataHash.Concat(appIdHash).Concat(Enumerable.Repeat((byte) keyHandle.Length, 1)).Concat(keyHandle).ToArray() - }; - - return await Apdu.SendAdpu(_connection, request); - } - - public const string U2F_Register = "navigator.id.finishEnrollment"; - public const string U2F_Sign = "navigator.id.getAssertion"; - - public void Dispose() - { - _connection?.Dispose(); - _connection = null; - } - } - - public class ApduException: Exception - { - public readonly byte SW1; - public readonly byte SW2; - - public ApduException(byte sw1, byte sw2, string message = null): base(message) - { - SW1 = sw1; - SW2 = sw2; - } - } - - public struct ApduRequest - { - public byte Cla; - public byte Ins; - public byte P1; - public byte P2; - public byte[] data; - public ushort? maxResponseSize; - } - - public struct ApduResponse - { - public byte[] data; - public byte SW1; - public byte SW2; - } - // https://www.eftlab.com/knowledge-base/complete-list-of-apdu-responses/ - - public static class Apdu - { - public static async Task SendAdpu(Stream connection, ApduRequest request) - { - var dataLen = (ushort) (request.data?.Length ?? 0); - var maxRsBytes = 2; - if (request.maxResponseSize.HasValue) - { - var rss = request.maxResponseSize.Value; - if (rss == 0) - { - maxRsBytes = 0; - } - else if (rss <= 0xff) - { - maxRsBytes = 1; - } - else - { - maxRsBytes = 2; - } - } - - var packetLength = 1 + 1 + 2 + (dataLen == 0 ? 0 : (dataLen <= 0xff ? 1 : 3)) + dataLen + maxRsBytes; - var packet = new byte[packetLength]; - packet[0] = request.Cla; - packet[1] = request.Ins; - packet[2] = request.P1; - packet[3] = request.P2; - if (dataLen > 0) - { - byte dataOffset = 4; - if (dataOffset <= 0xff) - { - packet[4] = (byte) (dataOffset & 0xff); - dataOffset += 1; - } - else - { - packet[4] = 0; - packet[5] = (byte) ((dataLen >> 8) & 0xff); - packet[6] = (byte) (dataLen & 0xff); - dataOffset += 3; - } - Array.Copy(request.data, 0, packet, dataOffset, request.data?.Length ?? 0); - } - - if (request.maxResponseSize.HasValue) - { - if (maxRsBytes == 1) - { - packet[packet.Length - 1] = (byte)(request.maxResponseSize.Value & 0xff); - } - else if (maxRsBytes == 2) - { - packet[packet.Length - 1] = (byte) (request.maxResponseSize.Value & 0xff); - packet[packet.Length - 2] = (byte) ((request.maxResponseSize.Value >> 8) & 0xff); - } - } - - await connection.WriteAsync(packet, 0, packet.Length); - await connection.FlushAsync(); - var readBuffer = new byte[maxRsBytes >= 2 ? ushort.MaxValue : byte.MaxValue]; - var bytesRead = await connection.ReadAsync(readBuffer, 0, readBuffer.Length); - var rs = new ApduResponse - { - SW1 = 6 - }; - if (bytesRead >= 2) - { - rs.SW1 = readBuffer[bytesRead - 2]; - rs.SW2 = readBuffer[bytesRead - 1]; - if (bytesRead > 2) - { - rs.data = new byte[bytesRead - 2]; - Array.Copy(readBuffer, 0, rs.data, 0, rs.data.Length); - } - } - - return rs; - } - } -} diff --git a/Tests/AuthAsyncTest.cs b/Tests/AuthAsyncTest.cs index 0d2b58f..e73ba78 100644 --- a/Tests/AuthAsyncTest.cs +++ b/Tests/AuthAsyncTest.cs @@ -1,6 +1,4 @@ -using System; -using System.Linq; -using System.Net; +using System.Linq; using System.Threading; using System.Threading.Tasks; using Authentication; @@ -8,7 +6,6 @@ using KeeperSecurity.Authentication.Async; using KeeperSecurity.Utils; using Moq; -using Push; using Xunit; namespace Tests @@ -34,7 +31,7 @@ public async Task TestRegionRedirect() var auth = GetAuthAsync(); auth.Endpoint.Server = "region.keepersecurity.com"; await auth.Login(DataVault.UserName); - Assert.Equal(auth.Endpoint.Server, DataVault.DefaultEnvironment); + Assert.Equal(DataVault.DefaultEnvironment, auth.Endpoint.Server); Assert.True(auth.IsAuthenticated()); } @@ -171,7 +168,7 @@ public async Task TestTwoFactorCode() } [Fact] - public void TestLoginSuccessV3TwoFactorCancel() + public async Task TestLoginSuccessV3TwoFactorCancel() { ResetStops(); StopAtTwoFactor = true; @@ -181,7 +178,7 @@ public void TestLoginSuccessV3TwoFactorCancel() authMock.Setup(x => x.WaitForTwoFactorCode(It.IsAny(), It.IsAny())) .Returns(Task.FromResult(false)); - Assert.ThrowsAsync(() => auth.Login(DataVault.UserName)); + await Assert.ThrowsAsync(() => auth.Login(DataVault.UserName)); } [Fact] @@ -205,7 +202,7 @@ public async Task TestSuccessWithPassword() } [Fact] - public void TestFailedWithPassword() + public async Task TestFailedWithPassword() { ResetStops(); StopAtPassword = true; @@ -233,7 +230,7 @@ await Assert.ThrowsAsync(async () => }); return src.Task; }); - Assert.ThrowsAsync(() => auth.Login(DataVault.UserPassword)); + await Assert.ThrowsAsync(() => auth.Login(DataVault.UserPassword)); } internal Auth GetAuthAsync() @@ -247,17 +244,15 @@ internal Auth GetAuthAsync() mEndpoint.SetupProperty(e => e.Server); mEndpoint.Object.Server = DataVault.DefaultEnvironment; - var webSocket = new TestWebSocket(); - mEndpoint.Setup(x => x.ConnectToPushServer(It.IsAny(), It.IsAny())) - .Returns(Task.FromResult>(webSocket)); - var mUi = new Mock(); var mAuth = new Mock(mUi.Object, storage, mEndpoint.Object) {CallBase = true}; - mAuth.Setup(m => m.PingKeeperServer(It.IsAny(), It.IsAny())) - .Returns(Task.FromResult(true)); - var auth = mAuth.Object; + var pushes = new FanOut(); + LoginV3Extensions.EnsurePushNotification = (auth, lc) => + { + auth.SetPushNotifications(pushes); + }; mEndpoint.Setup(e => e.ExecuteRest( It.IsAny(), diff --git a/Tests/AuthSyncTest.cs b/Tests/AuthSyncTest.cs index a5ba238..ae6fa9a 100644 --- a/Tests/AuthSyncTest.cs +++ b/Tests/AuthSyncTest.cs @@ -1,17 +1,11 @@ using System; -using System.Diagnostics; -using System.Linq; -using System.Net; using System.Threading; using System.Threading.Tasks; -using AccountSummary; using Authentication; -using Google.Protobuf; using KeeperSecurity.Authentication; using KeeperSecurity.Authentication.Sync; using KeeperSecurity.Utils; using Moq; -using Push; using Xunit; namespace Tests @@ -46,14 +40,13 @@ private AuthSync GetAuthSync() mEndpoint.SetupProperty(e => e.Server); mEndpoint.Object.Server = DataVault.DefaultEnvironment; - var webSocket = new TestWebSocket(); - mEndpoint.Setup(x => x.ConnectToPushServer(It.IsAny(), It.IsAny())) - .Returns(Task.FromResult>(webSocket)); - - var mFlow = new Mock(storage, mEndpoint.Object) {CallBase = true}; - mFlow.Setup(m => m.PingKeeperServer(It.IsAny(), It.IsAny())) - .Returns(Task.FromResult(true)); + var mFlow = new Mock(storage, mEndpoint.Object) { CallBase = true }; var flow = mFlow.Object; + var pushes = new FanOut(); + LoginV3Extensions.EnsurePushNotification = (auth, lc) => + { + auth.SetPushNotifications(pushes); + }; mEndpoint.Setup(e => e.ExecuteRest( It.IsAny(), @@ -88,7 +81,7 @@ public async Task TestRegionRedirect() var auth = GetAuthSync(); auth.Endpoint.Server = "region.keepersecurity.com"; await auth.Login(DataVault.UserName); - Assert.Equal(auth.Endpoint.Server, DataVault.DefaultEnvironment); + Assert.Equal(DataVault.DefaultEnvironment, auth.Endpoint.Server); Assert.True(auth.IsAuthenticated()); } @@ -129,7 +122,7 @@ await Assert.ThrowsAsync(async () => }); Assert.Equal(typeof(DeviceApprovalStep), flow.Step.GetType()); - await das.SendCode(DeviceApprovalChannel.Email, DataVault.DeviceVerificationEmailCode); + await das.SendCode(DeviceApprovalChannel.Email, DataVault.DeviceVerificationEmailCode); Assert.Equal(typeof(ConnectedStep), flow.Step.GetType()); } @@ -141,6 +134,7 @@ public async Task TestDeviceApproveEmailPush() var flow = GetAuthSync(); flow.Cancel(); + flow.SetPushNotifications(new FanOut()); Assert.Equal(typeof(ReadyToLoginStep), flow.Step.GetType()); await flow.Login(DataVault.UserName); @@ -192,12 +186,12 @@ public async Task TestDeviceApproveKeeperPush() } }); await das.SendPush(DeviceApprovalChannel.KeeperPush); - StopAtDeviceApproval = false; - flow.PushNotifications.Push(new NotificationEvent - { - Message = "device_approved", - Approved = true, - }); + StopAtDeviceApproval = false; + flow.PushNotifications.Push(new NotificationEvent + { + Message = "device_approved", + Approved = true, + }); Assert.True(evt.Wait(TimeSpan.FromMilliseconds(100))); diff --git a/Tests/CryptoTest.cs b/Tests/CryptoTest.cs index ad2f2c4..0439552 100644 --- a/Tests/CryptoTest.cs +++ b/Tests/CryptoTest.cs @@ -1,7 +1,9 @@ using System.Collections.Generic; +using System.IO; using System.Linq; using System.Runtime.Serialization; using System.Security.Cryptography; +using System.Threading.Tasks; using KeeperSecurity.Utils; using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; @@ -18,6 +20,156 @@ public class JsonList public class CryptoTest { + private PasswordGenerationOptions RestoreRules(string password) + { + var options = new PasswordGenerationOptions(); + if (!string.IsNullOrEmpty(password)) + { + options.Length = password.Length; + foreach (var ch in password) + { + if (char.IsDigit(ch)) + { + options.Digit += 1; + } + else if (char.IsLetter(ch)) + { + if (char.IsLower(ch)) + { + options.Lower += 1; + } + else + { + options.Upper += 1; + } + } + else + { + options.Special += 1; + } + } + } + return options; + } + + [Fact] + public void TestInvalidRsaKey() + { + var encryptedText = "NePhr5g-Ee8oyYrPZUlsYanKmVKC1GTCFk-t0JoHm_ceQlZjBMd-_qZb-73_n-hSyJtkzQUa6jmoPLNlkVkukiiKMOFD93V4N4_1yxjyLMHp2RMHZJjszJwiqZ0JAjySpFOSJ5owYUrSVyhIgl6d3a_l_dbTxRNqy2UYMkMeSSJv2LjufxUyf5eYpPloWWWx8WSqizXuCo3hDfe0RtIRNshKAx1I1Xc6pixib58lIRtD0NzO6jsGyyGbdlqI6W0olkSvZpBVU5edqmAhclXLoeNF5xK7jYuGxqBFxrhKCwRcbaSOI-1DdyTYdj5LC_MmB5QXi-Lc_RoGs0g5sTIP"; + var privateKeyText = "MIIEogIBAAKCAQBc7ja0E2D3FqTgrCMl-W_wjyH8FfFOlfiIbUC5U2iW_8zeo6KyHI-O47XF7uniILOQmj7q02qR8jPdWwYzGRfQyASDbk41nWUrEGr-RQ6bht_jRJNOYiwIza5kr06mcgoXjsRBzNhhMsTl-aTZaBRUGVBx0mLdic70E_0W9dKyHJvbBfSPxJto7hCuu93yViIN2w_QSNrOzagFFZGhdz-BzrOybuUhoBE18cARTdPUZ_UlU_vIymORTHbBvneqXZ2Ua6ohsc7_AM38FYlftkJBNDGnH_UruLGd6kLzGszzdchxexjjE488rahibXDvMbl3-hR1OyL2-6q_uPi5whhpAgMBAAECggEAORHVqFrqRnOyh4NPBogbtXjBHyV-jotNGMM3Z1iQt4KaFvQY-xbNFqxCui5RlZwNijUfhGiXXs-GCF9Y_FJhrMbY9rnr78McGQk5G7PfF6YJonE_oXhqoHFnss9yFoecKQF1Bw-8plxeTPk1wonHSipNm8jfDDwQSxZnbA1E-joW4Gy9MchmE96pS2OxrN8y2MpEhKMz_fkCbUjUj5-ipP8hYJr-WbpcnyeWDgFS3j7xuB31312yroWEgaQ_a8hbVM6gyqn2DuLjcYImCR38ZK39vBtqc9j9E_7Cl_BSfGR7FFmoIVndW60XQFEJJgxAZhbusYjAb59H6UfDRz4tjQKBgQCsdEvXrUP3Rx_7juvVEt6k8MbdDBuERvDlz-1KMEXa_3e5TZStgU1-MNcF98Kx9lHqHd7TZuCmsFf4wnvVZLhO9AH6uR7VvOCXtnqfbiZG54YpQzYty4o_EqM-TosPaRaF6-z6YnBtSUS74qUDzKa3RKbpO66zstM3CfsPsJzLFwKBgQCJ82p4_1g4Oh-ro0HNWH42u3XNN83YynPmSkeYCTaEhMVfVx4EOh7LuPV4itt7U9SkcWkFhGw1abwZC4m9cEHzsVOFR5Hk5Gnke7MGHRHTjat_olYcb5wYE1p3KcZOa6Zoa4J52UliehbE6e3HpcF8P3PiJ_16QvUn3hIl7UhofwKBgQCJTHnJd6_h4mWLMSl_VWufI_cfq_EIajaGsPk5lJ85ESVviV2ymXxp2FaI8M24Q-TJoQhzhLec3k7bxXMz3OGEMm6U_-eVwa-J-gU8g0TENLYyiclLwn4JYzxGcd_y3_bHnqLoYZEi4S9w6qv4D2o4BNdiX1rixJ-2dSLGRhU-9wKBgFENbh-Nl93heL41-_GU7wNlfT-IbC_WM-a4-fvAXgHaqMTtwLsnEvULxV5_55k8lhHQeK4_MfzoFRZ6CwH9NSLjq3kBphzgf785VuRerByqfntNfF7UzNfwdxTQvK1S3sE3eb_yBQYRSdOExqqpH1fLSGE2sd3l_XjhJ7SVCBgtAoGAGhV87Flduuxm29U28EWIBAZGJnABgZocEdc6xTj_3fdEW1CSZXLL5fR27OPeO_esDhZKgFsNrHw8bdNFXtiWLNECwPleLhEYnmQHbd40hZ6mAQu899i_OVIyzgXtkqS1-nD3uLTl8VRxxOmi3NhnaQrr6Kl2Ou6kVYyvfO8AoVg"; + var pk = CryptoUtils.LoadPrivateKey(privateKeyText.Base64UrlDecode()); + var encryptedData = encryptedText.Base64UrlDecode(); + var decryptedData = CryptoUtils.DecryptRsa(encryptedData, pk); + Assert.True(decryptedData.Length > 0); + } + + [Fact] + public void TestGeneratePassword() + { + var password = CryptoUtils.GeneratePassword(); + var rules = RestoreRules(password); + Assert.Equal(20, rules.Length); + Assert.True(rules.Upper >= 4); + Assert.True(rules.Lower >= 4); + Assert.True(rules.Digit >= 2); + Assert.True(rules.Special == 0); + var options = new PasswordGenerationOptions(); + options.Length = 32; + options.Upper = 10; + options.Lower = 10; + options.Digit = 10; + options.Special = 2; + password = CryptoUtils.GeneratePassword(options); + rules = RestoreRules(password); + Assert.Equal(options.Length, rules.Length); + Assert.True(rules.Upper >= options.Upper); + Assert.True(rules.Lower >= options.Lower); + Assert.True(rules.Digit >= options.Digit); + Assert.True(rules.Special >= options.Special); + + options.Length = 120; + options.Upper = 99; + options.Lower = 99; + options.Digit = 99; + options.Special = 99; + password = CryptoUtils.GeneratePassword(options); + rules = RestoreRules(password); + Assert.Equal(options.Length, rules.Length); + var counts = (new int[] { rules.Lower, rules.Upper, rules.Digit, rules.Special }).OrderBy(x => x).ToArray(); + Assert.True(counts.Last() - counts.First() < 4); + + options.Length = 1; + options.Upper = 0; + options.Lower = 99; + options.Digit = 99; + options.Special = 0; + password = CryptoUtils.GeneratePassword(options); + rules = RestoreRules(password); + Assert.Equal(options.Length, rules.Length); + Assert.True(rules.Lower + rules.Digit == 1); + + options.Length = 10; + options.Upper = 5; + options.Lower = 5; + options.Digit = -1; + options.Special = -1; + password = CryptoUtils.GeneratePassword(options); + rules = RestoreRules(password); + Assert.Equal(options.Length, rules.Length); + Assert.True(rules.Lower == 5); + Assert.True(rules.Upper == 5); + + options.Length = 5000; + options.Upper = 0; + options.Lower = 20; + options.Digit = -1; + options.Special = -1; + password = CryptoUtils.GeneratePassword(options); + rules = RestoreRules(password); + Assert.Equal(options.Length, rules.Length); + Assert.True(rules.Lower >= 20); + } + + [Fact] + public async Task TestEncryptTransform() + { + var key = CryptoUtils.GenerateEncryptionKey(); + var encryptTransformV2 = new EncryptAesV2Transform(key); + var decryptTransformV2 = new DecryptAesV2Transform(key); + var data = new byte[999]; + for (var i = 0; i < data.Length; i++) + { + data[i] = (byte) (i & 0xff); + } + + byte[] outputData; + using (var output = new MemoryStream()) + { + using (var cryptoStream = new CryptoStream(new MemoryStream(data), encryptTransformV2, CryptoStreamMode.Read)) + { + await cryptoStream.CopyToAsync(output); + } + + outputData = output.ToArray(); + } + Assert.Equal(outputData.Length, data.Length + 12 + 16); + + byte[] dataBack; + using (var back = new MemoryStream()) + { + using (var cryptoStream = new CryptoStream(new MemoryStream(outputData), decryptTransformV2, CryptoStreamMode.Read)) + { + await cryptoStream.CopyToAsync(back); + } + + dataBack = back.ToArray(); + } + Assert.Equal(dataBack.Length, data.Length); + for (int i = 0; i < data.Length; i++) { + Assert.Equal(data[i], dataBack[i]); + } + } + [Fact] public void TestECDHAgreement() { diff --git a/Tests/DataVault.cs b/Tests/DataVault.cs index a170aa6..55e472c 100644 --- a/Tests/DataVault.cs +++ b/Tests/DataVault.cs @@ -198,13 +198,13 @@ protected Task MockExecuteRest(string endpoint, ApiRequestPayload payloa return Task.FromResult(response); } - return Task.FromException(new KeeperCanceled()); + return Task.FromException(new KeeperCanceled("not_implemented", $"\"{endpoint}\" is not implemented")); } } public static class DataVault { - internal const string TestClientVersion = "c15.0.0"; + internal const string TestClientVersion = "c16.0.0"; public const string DefaultEnvironment = "env.company.com"; @@ -331,10 +331,7 @@ public static IConfigurationStorage GetConfigurationStorage() }; storage.Servers.Put(serverConf); - var userConf = new UserConfiguration(UserName) - { - Password = UserPassword - }; + var userConf = new UserConfiguration(UserName); storage.Users.Put(userConf); storage.LastServer = DefaultEnvironment; storage.LastLogin = UserName; @@ -403,7 +400,7 @@ public class VaultEnvironment public string OneTimeToken { get; } = DataVault.TwoFactorOneTimeToken; public string DeviceToken { get; } = DataVault.TwoFactorDeviceToken; public byte[] PrivateKeyData { get; } = DataVault.DerPrivateKey; - public RsaPrivateCrtKeyParameters PrivateKey { get; } = DataVault.ImportedPrivateKey; + public RsaPrivateCrtKeyParameters PrivateRsaKey { get; } = DataVault.ImportedPrivateKey; public string EncryptedPrivateKey { get; } = DataVault.EncryptedPrivateKey.Base64UrlEncode(); public string EncryptedDataKey { get; } = DataVault.EncryptedDataKey; public byte[] EncryptionParams { get; } = DataVault.EncryptionParams; @@ -411,47 +408,42 @@ public class VaultEnvironment public long Revision { get; } = DataVault.Revision; public string TwoFactorOneTimeToken { get; } = DataVault.TwoFactorOneTimeToken; - private readonly DataContractJsonSerializer _dataSerializer; - private readonly DataContractJsonSerializer _extraSerializer; - public VaultEnvironment() { var settings = new DataContractJsonSerializerSettings { UseSimpleDictionaryFormat = true }; - _dataSerializer = new DataContractJsonSerializer(typeof(RecordData), settings); - _extraSerializer = new DataContractJsonSerializer(typeof(RecordExtra), settings); } - private Tuple GenerateRecord(PasswordRecord record, + private Tuple GenerateRecord(KeeperRecord record, KeyType keyType, long revision) { var sdr = new SyncDownRecord { RecordUid = record.Uid, - Version = 2, Revision = revision, ClientModifiedTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), Shared = keyType == KeyType.DataKey }; - var data = record.ExtractRecordData(); - using (var ms = new MemoryStream()) + if (record is PasswordRecord password) { - _dataSerializer.WriteObject(ms, data); - sdr.Data = CryptoUtils.EncryptAesV1(ms.ToArray(), record.RecordKey).Base64UrlEncode(); - } - - if (record.Attachments.Count > 0) - { - var extra = record.ExtractRecordExtra(); - using (var ms = new MemoryStream()) + sdr.Version = 2; + var data = password.ExtractRecordData(); + sdr.Data = CryptoUtils.EncryptAesV1(JsonUtils.DumpJson(data), record.RecordKey).Base64UrlEncode(); + if (password.Attachments.Count > 0) { - _extraSerializer.WriteObject(ms, extra); - sdr.Extra = CryptoUtils.EncryptAesV1(ms.ToArray(), record.RecordKey).Base64UrlEncode(); + var extra = password.ExtractRecordExtra(); + sdr.Extra = CryptoUtils.EncryptAesV1(JsonUtils.DumpJson(extra), password.RecordKey).Base64UrlEncode(); } } + else if (record is TypedRecord typed) + { + sdr.Version = 3; + var data = typed.ExtractRecordV3Data(); + sdr.Data = CryptoUtils.EncryptAesV2(JsonUtils.DumpJson(data), record.RecordKey).Base64UrlEncode(); + } SyncDownRecordMetaData sdrmd = null; if (keyType == KeyType.DataKey || keyType == KeyType.PrivateKey) @@ -638,6 +630,16 @@ public SyncDownResponse GetSyncDownResponse() Link = "https://google.com", }; + var loginType = new TypedRecordFacade(); + loginType.Fields.Login = "some_fake_user4@company.com"; + loginType.Fields.Password = "password4"; + loginType.Fields.Url = "https://google.com"; + var record4 = loginType.TypedRecord; + record4.Uid = CryptoUtils.GenerateUid(); + record4.RecordKey = CryptoUtils.GenerateEncryptionKey(); + record4.Title = "Record 4"; + record4.Notes = "Note 4"; + var sharedFolder1 = new SharedFolder { Uid = SharedFolder1Uid, @@ -680,6 +682,7 @@ public SyncDownResponse GetSyncDownResponse() var (r1, md1) = GenerateRecord(record1, KeyType.DataKey, 10); var (r2, md2) = GenerateRecord(record2, KeyType.PrivateKey, 11); var (r3, _) = GenerateRecord(record3, KeyType.NoKey, 12); + var (r4, md4) = GenerateRecord(record4, KeyType.DataKey, 12); var sf1 = GenerateSharedFolder(sharedFolder1, 12, new[] {record1}, new[] {team1}, true); var sf2 = GenerateSharedFolder(sharedFolder2, 12, new[] {record3}, new[] {team1}, false); var t1 = GenerateTeam(team1, KeyType.DataKey, new[] {sharedFolder1, sharedFolder2}); @@ -690,8 +693,8 @@ public SyncDownResponse GetSyncDownResponse() result = "success", fullSync = true, revision = Revision, - records = new[] {r1, r2, r3}, - recordMetaData = new[] {md1, md2}, + records = new[] {r1, r2, r3, r4}, + recordMetaData = new[] {md1, md2, md4}, sharedFolders = new[] {sf1, sf2}, teams = new[] {t1}, userFolders = new[] {uf1}, @@ -705,6 +708,7 @@ public SyncDownResponse GetSyncDownResponse() new SyncDownFolderRecord {RecordUid = r2.RecordUid, FolderUid = userFolder1.FolderUid}, new SyncDownFolderRecord {RecordUid = r1.RecordUid, FolderUid = sharedFolder1.Uid}, new SyncDownFolderRecord {RecordUid = r3.RecordUid, FolderUid = sharedFolder1.Uid}, + new SyncDownFolderRecord {RecordUid = r4.RecordUid}, } }; diff --git a/Tests/SyncDownTest.cs b/Tests/SyncDownTest.cs index 6125cdd..d7e4eda 100644 --- a/Tests/SyncDownTest.cs +++ b/Tests/SyncDownTest.cs @@ -22,7 +22,7 @@ public async Task TestFullSync() { var vault = await GetVault(); Assert.NotNull(vault); - Assert.Equal(3, vault.RecordCount); + Assert.Equal(4, vault.RecordCount); Assert.Equal(2, vault.SharedFolderCount); Assert.Equal(1, vault.TeamCount); } @@ -33,7 +33,7 @@ public async Task TestRemoveOwnerRecords() var vault = await GetVault(); var recordsBefore = vault.RecordCount; - var recordUids = vault.Records.Where(x => x.Owner && !x.Shared).Select(x => x.Uid).ToArray(); + var recordUids = vault.KeeperRecords.Where(x => x.Owner && !x.Shared).Select(x => x.Uid).ToArray(); var authMock = Mock.Get(vault.Auth); authMock @@ -68,7 +68,7 @@ public async Task TestRemoveTeam() })); await vault.SyncDown(); - Assert.Equal(2, vault.RecordCount); + Assert.Equal(3, vault.RecordCount); Assert.Equal(1, vault.SharedFolderCount); Assert.Equal(0, vault.TeamCount); } @@ -91,7 +91,7 @@ public async Task TestRemoveSharedFolderThenTeam() { })); await vault.SyncDown(); - Assert.Equal(3, vault.RecordCount); + Assert.Equal(4, vault.RecordCount); Assert.Equal(2, vault.SharedFolderCount); Assert.Equal(1, vault.TeamCount); @@ -107,7 +107,7 @@ public async Task TestRemoveSharedFolderThenTeam() { removedTeams = teamUids })); await vault.SyncDown(); - Assert.Equal(2, vault.RecordCount); + Assert.Equal(3, vault.RecordCount); Assert.Equal(0, vault.SharedFolderCount); Assert.Equal(0, vault.TeamCount); } @@ -132,7 +132,7 @@ public async Task TestRemoveTeamAndSharedFolder() { })); await vault.SyncDown(); - Assert.Equal(2, vault.RecordCount); + Assert.Equal(3, vault.RecordCount); Assert.Equal(0, vault.SharedFolderCount); Assert.Equal(0, vault.TeamCount); } @@ -143,11 +143,15 @@ public IAuthentication GetConnectedAuthContext() context.Setup(x => x.SessionToken).Returns(_vaultEnv.SessionToken); context.Setup(x => x.ClientKey).Returns(_vaultEnv.ClientKey); context.Setup(x => x.DataKey).Returns(_vaultEnv.DataKey); - context.Setup(x => x.PrivateKey).Returns(_vaultEnv.PrivateKey); + context.Setup(x => x.PrivateRsaKey).Returns(_vaultEnv.PrivateRsaKey); + context.Setup(x => x.Settings).Returns(new AccountSettings + { + RecordTypesEnabled = true, + }); var endpoint = new Mock(); endpoint.Setup(x => x.DeviceName).Returns("C# Unit Tests"); - endpoint.Setup(x => x.ClientVersion).Returns("c15.0.0"); + endpoint.Setup(x => x.ClientVersion).Returns("c16.0.0"); endpoint.Setup(x => x.Server).Returns(DataVault.DefaultEnvironment); var auth = new Mock(); @@ -168,12 +172,51 @@ public IAuthentication GetConnectedAuthContext() return auth.Object; } - private async Task GetVault() { + private async Task GetVault() + { var auth = GetConnectedAuthContext(); var authMock = Mock.Get(auth); authMock .Setup(x => x.ExecuteAuthCommand(It.IsAny(), It.IsAny(), It.IsAny())) - .Returns((c, t, b) => Task.FromResult((KeeperApiResponse)_vaultEnv.GetSyncDownResponse())); + .Returns((c, t, b) => Task.FromResult((KeeperApiResponse) _vaultEnv.GetSyncDownResponse())); + authMock + .Setup(x => x.ExecuteAuthRest("vault/get_record_types", It.IsAny(), typeof(Records.RecordTypesResponse), It.IsAny())) + .Returns((e, rq, rst, apiVersion) => + { + var rs = new Records.RecordTypesResponse() + { + StandardCounter = 1, + }; + rs.RecordTypes.Add(new Records.RecordType + { + Scope = Records.RecordTypeScope.RtStandard, + RecordTypeId = 1, + Content = + @"{ + ""$id"": ""login"", + ""categories"": [""login""], + ""description"": ""Login template"", + ""fields"": [ + { + ""$ref"": ""login"" + }, + { + ""$ref"": ""password"" + }, + { + ""$ref"": ""url"" + }, + { + ""$ref"": ""fileRef"" + }, + { + ""$ref"": ""oneTimeCode"" + } + ] +}", + }); + return Task.FromResult((Google.Protobuf.IMessage) rs); + }); var vault = new VaultOnline(auth); await vault.SyncDown(); diff --git a/Tests/Tests.csproj b/Tests/Tests.csproj index 3c54003..677f514 100644 --- a/Tests/Tests.csproj +++ b/Tests/Tests.csproj @@ -1,18 +1,18 @@ - + - netcoreapp2.1 + net6.0 false - - - runtime; build; native; contentfiles; analyzers; buildtransitive + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/Tests/VaultTest.cs b/Tests/VaultTest.cs new file mode 100644 index 0000000..3f1e510 --- /dev/null +++ b/Tests/VaultTest.cs @@ -0,0 +1,153 @@ +using KeeperSecurity.Vault; +using System.Linq; +using Xunit; + +namespace Tests +{ + public class VaultTest + { + [Fact] + public void TestHostRecordFieldSerialization() + { + IFieldTypeSerialize serializer; + var hostField = new FieldTypeHost(); + serializer = hostField; + + string value = "keepersecurity.com:555"; + serializer.SetValueAsString(value); + Assert.Equal("keepersecurity.com", hostField.HostName); + Assert.Equal("555", hostField.Port); + Assert.Equal(value, serializer.GetValueAsString()); + + value = "keepersecurity.com"; + serializer.SetValueAsString(value); + Assert.Equal("keepersecurity.com", hostField.HostName); + Assert.Equal("", hostField.Port); + Assert.Equal(value, serializer.GetValueAsString()); + + value = ":555"; + serializer.SetValueAsString(value); + Assert.Equal("", hostField.HostName); + Assert.Equal("555", hostField.Port); + Assert.Equal(value, serializer.GetValueAsString()); + + value = ""; + serializer.SetValueAsString(value); + Assert.Equal("", hostField.HostName); + Assert.Equal("", hostField.Port); + Assert.Equal(value, serializer.GetValueAsString()); + } + + [Fact] + public void TestAddressRecordFieldSerialization() + { + IFieldTypeSerialize serializer; + var addressField = new FieldTypeAddress(); + serializer = addressField; + + var value = "123 Main St., Middle Nowhere Town, CA 12345"; + serializer.SetValueAsString(value); + Assert.Equal("123 Main St.", addressField.Street1); + Assert.Equal("", addressField.Street2); + Assert.Equal("Middle Nowhere Town", addressField.City); + Assert.Equal("CA", addressField.State); + Assert.Equal("12345", addressField.Zip); + Assert.Equal(value.Replace(" ", ""), serializer.GetValueAsString().Replace(" ", "")); + } + + [Fact] + public void TestPhoneRecordFieldSerialization() + { + IFieldTypeSerialize serializer; + var phoneField = new FieldTypePhone(); + serializer = phoneField; + + var value = "Mobile: +1 (916)555-1234"; + serializer.SetValueAsString(value); + Assert.Equal("Mobile", phoneField.Type); + Assert.Equal("+1", phoneField.Region); + Assert.Equal("(916)555-1234", phoneField.Number); + Assert.Equal("", phoneField.Ext); + Assert.Equal(value.Replace(" ", ""), serializer.GetValueAsString().Replace(" ", "")); + } + + [Fact] + public void TestNameRecordFieldSerialization() + { + IFieldTypeSerialize serializer; + var phoneField = new FieldTypeName(); + serializer = phoneField; + + var value = "Lastname, Firstname"; + serializer.SetValueAsString(value); + Assert.Equal("Lastname", phoneField.Last); + Assert.Equal("Firstname", phoneField.First); + + value = "Firstname Lastname"; + serializer.SetValueAsString(value); + Assert.Equal("Lastname", phoneField.Last); + Assert.Equal("Firstname", phoneField.First); + + value = serializer.GetValueAsString(); + var phoneField1 = new FieldTypeName(); + serializer = phoneField1; + serializer.SetValueAsString(value); + Assert.Equal(phoneField.Last, phoneField1.Last); + Assert.Equal(phoneField.First, phoneField1.First); + } + + + [Fact] + public void TestParseFolderPath() + { + var path = BatchVaultOperations.ParseFolderPath("Folder 1").ToArray(); + Assert.Single(path); + Assert.Equal("Folder 1", path[0]); + + path = BatchVaultOperations.ParseFolderPath("\\Folder 1\\").ToArray(); + Assert.Single(path); + Assert.Equal("Folder 1", path[0]); + + path = BatchVaultOperations.ParseFolderPath("\\Folder 1\\2").ToArray(); + Assert.Equal(2, path.Length); + Assert.Equal("Folder 1", path[0]); + Assert.Equal("2", path[1]); + + path = BatchVaultOperations.ParseFolderPath("1\\Folder 1\\2").ToArray(); + Assert.Equal(3, path.Length); + Assert.Equal("1", path[0]); + Assert.Equal("Folder 1", path[1]); + Assert.Equal("2", path[2]); + + path = BatchVaultOperations.ParseFolderPath("1\\\\Folder 1\\\\2").ToArray(); + Assert.Single(path); + Assert.Equal("1\\Folder 1\\2", path[0]); + + path = BatchVaultOperations.ParseFolderPath("1\\\\Fol\\der 1\\\\2").ToArray(); + Assert.Equal(2, path.Length); + Assert.Equal("1\\Fol", path[0]); + Assert.Equal("der 1\\2", path[1]); + + path = BatchVaultOperations.ParseFolderPath("Folder 1\\\\").ToArray(); + Assert.Single(path); + Assert.Equal("Folder 1\\", path[0]); + + path = BatchVaultOperations.ParseFolderPath("\\\\Folder 1\\\\").ToArray(); + Assert.Single(path); + Assert.Equal("\\Folder 1\\", path[0]); + + path = BatchVaultOperations.ParseFolderPath("Folder 1\\Folder 2").ToArray(); + Assert.Equal(2, path.Length); + Assert.Equal("Folder 1", path[0]); + Assert.Equal("Folder 2", path[1]); + + path = BatchVaultOperations.ParseFolderPath("Folder 1\\Folder 2\\Folder 3\\Folder 4").ToArray(); + Assert.Equal(4, path.Length); + Assert.Equal("Folder 1", path[0]); + Assert.Equal("Folder 2", path[1]); + Assert.Equal("Folder 3", path[2]); + Assert.Equal("Folder 4", path[3]); + + } + } +} diff --git a/WPFSample/App.config b/WPFSample/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/WPFSample/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/WPFSample/App.xaml b/WPFSample/App.xaml new file mode 100644 index 0000000..c641ef8 --- /dev/null +++ b/WPFSample/App.xaml @@ -0,0 +1,14 @@ + + + + + + + + + + diff --git a/WPFSample/App.xaml.cs b/WPFSample/App.xaml.cs new file mode 100644 index 0000000..b3f8395 --- /dev/null +++ b/WPFSample/App.xaml.cs @@ -0,0 +1,27 @@ +using KeeperSecurity.Authentication.Sync; +using KeeperSecurity.Configuration; +using System; +using System.Runtime.CompilerServices; +using System.Windows; +using System.Windows.Navigation; + +namespace WPFSample +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + private LoginViewModel mainWindowVm; + protected override void OnStartup(StartupEventArgs e) + { + base.OnStartup(e); + MainWindow = new MainWindow(); + mainWindowVm = new LoginViewModel(new AuthSync(new JsonConfigurationStorage())); + MainWindow.DataContext = mainWindowVm; + MainWindow.WindowStartupLocation = WindowStartupLocation.CenterScreen; + MainWindow.Show(); + } + + } +} diff --git a/WPFSample/LoginViewModel.cs b/WPFSample/LoginViewModel.cs new file mode 100644 index 0000000..d05979d --- /dev/null +++ b/WPFSample/LoginViewModel.cs @@ -0,0 +1,454 @@ +using System; +using System.ComponentModel; +using System.Linq; +using System.Windows.Input; +using KeeperSecurity.Authentication; +using KeeperSecurity.Authentication.Sync; + +namespace WPFSample +{ + public interface IPassword + { + string Password { get; set; } + } + + public class CommandHandler : ICommand + { + private Action _action; + private Func _canExecute; + + public CommandHandler(Action action, Func canExecute = null) + { + _action = action; + _canExecute = canExecute; + } + + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + public bool CanExecute(object parameter) + { + return _canExecute?.Invoke() ?? true; + } + + public void Execute(object parameter) + { + _action?.Invoke(); + } + } + + public class CommandParameterHandler : ICommand + { + private Action _action; + private Func _canExecute; + + public CommandParameterHandler(Action action, Func canExecute = null) + { + _action = action; + _canExecute = canExecute; + } + + public event EventHandler CanExecuteChanged + { + add { CommandManager.RequerySuggested += value; } + remove { CommandManager.RequerySuggested -= value; } + } + + public bool CanExecute(object parameter) + { + return _canExecute?.Invoke() ?? true; + } + + public void Execute(object parameter) + { + _action?.Invoke(parameter); + } + } + + public class BaseViewModel : INotifyPropertyChanged, IDisposable + { + public virtual void Dispose() + { + } + + public void OnPropertyChanged(string propertyName) + { + PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); + } + public event PropertyChangedEventHandler PropertyChanged; + } + + public interface ILoginStep + { + bool CanGoNext(); + } + + public class UsernameLoginStep : ILoginStep + { + private string dataCenter; + + public string Username { get; set; } + public string DataCenter + { + get + { + return dataCenter; + } + set + { + dataCenter = value; + } + } + public bool CanGoNext() + { + return !string.IsNullOrEmpty(Username); + } + } + + public class DeviceApproveActionButton + { + public DeviceApproveActionButton(DeviceApprovalChannel channel) + { + Channel = channel; + } + + public DeviceApprovalChannel Channel { get; } + + public string Title + { + get + { + switch (Channel) + { + case DeviceApprovalChannel.Email: + return "Send Email"; + case DeviceApprovalChannel.KeeperPush: + return "Send Keeper Push"; + case DeviceApprovalChannel.TwoFactorAuth: + return "Use Two-Factor Method"; + default: + return Channel.ToString(); + } + } + } + } + + public class ApproveDeviceMethods : ILoginStep + { + public ApproveDeviceMethods(DeviceApprovalChannel[] channels) + { + DeviceApprovalChannels = channels; + DeviceApproveActionButtons = DeviceApprovalChannels + .Select(x => new DeviceApproveActionButton(x)).ToArray(); + } + + + public ICommand DeviceApproveCommand { get; internal set; } + public DeviceApproveActionButton[] DeviceApproveActionButtons { get; } + internal DeviceApprovalChannel[] DeviceApprovalChannels { get; } + public bool CanGoNext() + { + return false; + } + } + + public class VerificationCodeStep : ILoginStep + { + public VerificationCodeStep(DeviceApprovalChannel channel) + { + DeviceApproval = channel; + } + + public VerificationCodeStep(TwoFactorChannel channel) + { + TwoFactor = channel; + } + + internal DeviceApprovalChannel? DeviceApproval = null; + internal TwoFactorChannel? TwoFactor = null; + + public string Username { get; set; } + public string Title + { + get + { + if (DeviceApproval.HasValue) + { + return "Device Approval"; + } + else if (TwoFactor.HasValue) + { + return "Two Factor Authentication"; + } + else + { + return null; + } + } + } + + public string Description + { + get + { + if (DeviceApproval.HasValue) + { + switch (DeviceApproval.Value) + { + case DeviceApprovalChannel.Email: + return $"Enter verification code sent to {Username}"; + case DeviceApprovalChannel.TwoFactorAuth: + return "Enter the code in your TFA application"; + } + } + else if (TwoFactor.HasValue) + { + return "Enter the code in your TFA application"; + } + return null; + } + } + + + public string Code { get; set; } + + public bool CanGoNext() + { + return !string.IsNullOrEmpty(Code); + } + } + + public class EnterMasterPasswordStep : ILoginStep, IPassword + { + public EnterMasterPasswordStep(string username) + { + Username = username; + Password = ""; + } + + public string Username { get; set; } + public string Password { get; set; } + + public bool CanGoNext() + { + return !string.IsNullOrEmpty(Password); + } + } + + public class LoginFinishedStep : ILoginStep + { + private bool _isSuccess; + public LoginFinishedStep(bool isSuccess) { + _isSuccess = isSuccess; + } + + public string Status => _isSuccess ? "Logged In" : "Login failure"; + public bool CanGoNext() + { + return false; + } + } + + public class LoginViewModel : BaseViewModel, IAuthSyncCallback + { + private AuthSync _auth; + private ILoginStep stepData; + private string errorText; + + public LoginViewModel(AuthSync auth) + { + + _auth = auth; + _auth.UiCallback = this; + OnNextStep(); + + NextCommand = new CommandHandler(NextClicked, CanClickNext); + CancelCommand = new CommandHandler(Cancel); + + } + + public ICommand NextCommand { get; } + public ICommand CancelCommand { get; } + + + public ILoginStep StepData + { + get + { + return stepData; + } + + internal set + { + stepData = value; + OnPropertyChanged("StepData"); + } + } + + public string ErrorText + { + get => errorText; internal set + { + errorText = value; + OnPropertyChanged("ErrorText"); + } + } + + public void OnNextStep() + { + if (_auth.Step is ReadyToLoginStep rtls) + { + if (!(StepData is UsernameLoginStep)) + { + var uls = new UsernameLoginStep + { + Username = _auth.Storage.LastLogin + }; + if (!string.IsNullOrEmpty(_auth.Storage.LastServer)) + { + if (_auth.Storage.LastServer.EndsWith("keepersecurity.com")) + { + uls.DataCenter = "US"; + } + else if (_auth.Storage.LastServer.EndsWith("keepersecurity.eu")) + { + uls.DataCenter = "EU"; + } + else if (_auth.Storage.LastServer.EndsWith("keepersecurity.ca")) + { + uls.DataCenter = "CA"; + } + else if (_auth.Storage.LastServer.EndsWith("keepersecurity.com.au")) + { + uls.DataCenter = "AU"; + } + } + StepData = uls; + } + } + else if (_auth.Step is DeviceApprovalStep das) + { + if (!(StepData is ApproveDeviceMethods) && !(StepData is VerificationCodeStep)) + { + StepData = new ApproveDeviceMethods(das.Channels) + { + DeviceApproveCommand = new CommandParameterHandler((parameter) => + { + if (!(parameter is DeviceApprovalChannel channel)) return; + das.SendPush(channel); + if (channel == DeviceApprovalChannel.KeeperPush) return; + + var step = new VerificationCodeStep(channel) + { + Username = _auth.Username + }; + StepData = step; + }) + }; + } + } + else if (_auth.Step is TwoFactorStep tfs) + { + if (!(StepData is VerificationCodeStep)) + { + var channel = TwoFactorChannel.Other; + foreach (var ch in tfs.Channels) + { + if (ch != TwoFactorChannel.SecurityKey) + { + channel = ch; + break; + } + } + if (channel == TwoFactorChannel.TextMessage) + { + tfs.SendPush(TwoFactorPushAction.TextMessage); + } + StepData = new VerificationCodeStep(channel); + } + } + else if (_auth.Step is PasswordStep ps) + { + if (!(StepData is EnterMasterPasswordStep)) + { + StepData = new EnterMasterPasswordStep(_auth.Username); + } + } + else if (_auth.Step is ConnectedStep) { + StepData = new LoginFinishedStep(true); + } + else if (_auth.Step is ErrorStep es) + { + StepData = new LoginFinishedStep(false); + ErrorText = es.Message; + } + } + + private async void NextClicked() + { + ErrorText = null; + + try + { + if (StepData is UsernameLoginStep uls) + { + if (_auth.Step.State != AuthState.NotConnected) + { + _auth.Cancel(); + } + + await _auth.Login(uls.Username); + } + else if (StepData is VerificationCodeStep ads && _auth.Step is DeviceApprovalStep das) + { + await das.SendCode(ads.DeviceApproval.Value, ads.Code); + } + else if (StepData is VerificationCodeStep tfas && _auth.Step is TwoFactorStep tfs) + { + tfs.Duration = TwoFactorDuration.EveryLogin; + await tfs.SendCode(tfas.TwoFactor.Value, tfas.Code); + } + else if (StepData is EnterMasterPasswordStep emps && _auth.Step is PasswordStep ps) + { + try + { + await ps.VerifyPassword(emps.Password); + } + catch (KeeperAuthFailed) + { + ErrorText = "Invalid email or password combination, please re-enter."; + } + } + else + { + OnNextStep(); + } + } + catch (Exception e) + { + ErrorText = e.Message; + } + + OnPropertyChanged("ErrorText"); + } + + + public bool CanClickNext() + { + return StepData?.CanGoNext() ?? false; + } + private void Cancel() + { + _auth.Cancel(); + } + + public override void Dispose() + { + _auth.UiCallback = null; + base.Dispose(); + } + } +} diff --git a/WPFSample/MainWindow.xaml b/WPFSample/MainWindow.xaml new file mode 100644 index 0000000..7514fa0 --- /dev/null +++ b/WPFSample/MainWindow.xaml @@ -0,0 +1,104 @@ + + + + + US + EU + CA + AU + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/WPFSample/MainWindow.xaml.cs b/WPFSample/MainWindow.xaml.cs new file mode 100644 index 0000000..1d7f207 --- /dev/null +++ b/WPFSample/MainWindow.xaml.cs @@ -0,0 +1,29 @@ +using System.Windows; +using System.Windows.Controls; + +namespace WPFSample +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + + private void PasswordBox_PasswordChanged(object sender, RoutedEventArgs e) + { + if (DataContext is LoginViewModel lvm && lvm.StepData is IPassword ip && sender is PasswordBox pbox) + { + ip.Password = pbox.Password; + } + } + + private void CloseButton_Click(object sender, RoutedEventArgs e) + { + this.Close(); + } + } +} diff --git a/WPFSample/Mock.cs b/WPFSample/Mock.cs new file mode 100644 index 0000000..9168d6b --- /dev/null +++ b/WPFSample/Mock.cs @@ -0,0 +1,18 @@ +namespace WPFSample +{ + public class MockLoginModel + { + public MockLoginModel() + { + StepData = new UsernameLoginStep { Username = "username@company.com" }; + //StepData = new ApproveDeviceMethods(new[] {DeviceApprovalChannel.Email, DeviceApprovalChannel.KeeperPush, DeviceApprovalChannel.TwoFactorAuth}); + //StepData = new VerificationCodeStep("Email", "Enter verification code recieved by email"); + //StepData = new EnterMasterPasswordStep("username@company.com"); + //ErrorText = "The code you entered is incorrect."; + } + + public ILoginStep StepData { get; } + + public string ErrorText { get; } + } +} diff --git a/WPFSample/Properties/AssemblyInfo.cs b/WPFSample/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..3612989 --- /dev/null +++ b/WPFSample/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WPFSample")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WPFSample")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WPFSample/Properties/Resources.Designer.cs b/WPFSample/Properties/Resources.Designer.cs new file mode 100644 index 0000000..ea9be74 --- /dev/null +++ b/WPFSample/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPFSample.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPFSample.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/WPFSample/Properties/Resources.resx b/WPFSample/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/WPFSample/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/WPFSample/Properties/Settings.Designer.cs b/WPFSample/Properties/Settings.Designer.cs new file mode 100644 index 0000000..e649cce --- /dev/null +++ b/WPFSample/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPFSample.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/WPFSample/Properties/Settings.settings b/WPFSample/Properties/Settings.settings new file mode 100644 index 0000000..033d7a5 --- /dev/null +++ b/WPFSample/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/WPFSample/Styles.xaml b/WPFSample/Styles.xaml new file mode 100644 index 0000000..c2738a3 --- /dev/null +++ b/WPFSample/Styles.xaml @@ -0,0 +1,174 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WPFSample/WPFSample.csproj b/WPFSample/WPFSample.csproj new file mode 100644 index 0000000..8b4d12e --- /dev/null +++ b/WPFSample/WPFSample.csproj @@ -0,0 +1,110 @@ + + + + + Debug + AnyCPU + {189F9A70-0767-4A48-AF0A-80B643455DBC} + WinExe + WPFSample + WPFSample + v4.7.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + 4.0 + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + + MainWindow.xaml + Code + + + Designer + MSBuild:Compile + + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + + {29b50177-f7b4-46f6-b3da-b9fef269eef2} + KeeperSdk + + + + \ No newline at end of file diff --git a/WinWebAuthn/Authenticate.cs b/WinWebAuthn/Authenticate.cs deleted file mode 100644 index 066afdc..0000000 --- a/WinWebAuthn/Authenticate.cs +++ /dev/null @@ -1,185 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Runtime.InteropServices; -using System.Threading; -using System.Threading.Tasks; -using KeeperSecurity.Authentication; -using KeeperSecurity.Utils; - -namespace WinWebAuthn -{ - public static class Authenticate - { - [DllImport("kernel32.dll")] - public static extern IntPtr GetConsoleWindow(); - - [StructLayout(LayoutKind.Sequential)] - public class GuidClass - { - public Guid TheGuid; - } - - public static Task GetAssertion(IntPtr hWnd, SecurityKeyClientData clientData, IList keyHandles) - { - return GetAssertion(hWnd, clientData, keyHandles, CancellationToken.None); - } - - public static Task GetAssertion(IntPtr hWnd, SecurityKeyClientData clientData, IList keyHandles, CancellationToken token) - { - var taskSource = new TaskCompletionSource(); - Task.Run(() => - { - var ptrList = new List(); - try - { - var clientDataBytes = JsonUtils.DumpJson(clientData); - var clientDataPtr = Marshal.AllocHGlobal(clientDataBytes.Length); - ptrList.Add(clientDataPtr); - Marshal.Copy(clientDataBytes, 0, clientDataPtr, clientDataBytes.Length); - - var data = new NativeWebAuthn.WEBAUTHN_CLIENT_DATA - { - dwVersion = NativeWebAuthn.WEBAUTHN_API_VERSION_2, - cbClientDataJSON = clientDataBytes.Length, - pbClientDataJSON = clientDataPtr, - pwszHashAlgId = NativeWebAuthn.WEBAUTHN_HASH_ALGORITHM_SHA_256, - }; - - var credentialSize = Marshal.SizeOf(typeof(NativeWebAuthn.WEBAUTHN_CREDENTIAL)); - var credentialsPtr = Marshal.AllocHGlobal(keyHandles.Count * credentialSize); - ptrList.Add(credentialsPtr); - var pubKeyPtr = Marshal.StringToHGlobalUni(NativeWebAuthn.WEBAUTHN_CREDENTIAL_TYPE_PUBLIC_KEY); - ptrList.Add(pubKeyPtr); - for (var i = 0; i < keyHandles.Count; i++) - { - var credLength = keyHandles[i].Length; - var credPtr = Marshal.AllocHGlobal(credLength); - ptrList.Add(credPtr); - Marshal.Copy(keyHandles[i], 0, credPtr, credLength); - var cred = new NativeWebAuthn.WEBAUTHN_CREDENTIAL - { - dwVersion = NativeWebAuthn.WEBAUTHN_CREDENTIAL_CURRENT_VERSION, - cbId = credLength, - pbId = credPtr, - pwszCredentialType = pubKeyPtr - }; - Marshal.StructureToPtr(cred, credentialsPtr, false); - } - - var opts = new NativeWebAuthn.WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS - { - dwVersion = 4, - dwTimeoutMilliseconds = (uint) TimeSpan.FromMinutes(2).TotalMilliseconds, - CredentialList = new NativeWebAuthn.WEBAUTHN_CREDENTIALS - { - cCredentials = keyHandles.Count, - pCredentials = credentialsPtr - }, - Extensions = new NativeWebAuthn.WEBAUTHN_EXTENSIONS - { - cExtensions = 0, - pExtensions = IntPtr.Zero - }, - dwAuthenticatorAttachment = NativeWebAuthn.WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM_U2F_V2, - dwUserVerificationRequirement = 0, - dwFlags = 0, - pwszU2fAppId = IntPtr.Zero, - pbU2fAppId = IntPtr.Zero, - pCancellationId = IntPtr.Zero, - pAllowCredentialList = IntPtr.Zero, - }; - - IDisposable cancelToken = null; - if (token != CancellationToken.None) - { - var guidPtr = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(GuidClass))); - ptrList.Add(guidPtr); - if (NativeWebAuthn.WebAuthNGetCancellationId(guidPtr) == NativeWebAuthn.HRESULT.S_OK) - { - opts.pCancellationId = guidPtr; - cancelToken = token.Register(() => { NativeWebAuthn.WebAuthNCancelCurrentOperation(guidPtr); }); - } - } - - var hr = NativeWebAuthn.WebAuthNAuthenticatorGetAssertion(hWnd, clientData.origin, ref data, ref opts, out var assertionPtr); - cancelToken?.Dispose(); - - if (hr == NativeWebAuthn.HRESULT.S_OK) - { - var assertion = (NativeWebAuthn.WEBAUTHN_ASSERTION) Marshal.PtrToStructure(assertionPtr, typeof(NativeWebAuthn.WEBAUTHN_ASSERTION)); - - byte[] keyHandleBytes; - if (assertion.Credential.cbId > 0) - { - keyHandleBytes = new byte[assertion.Credential.cbId]; - if (assertion.Credential.pbId != IntPtr.Zero) - { - Marshal.Copy(assertion.Credential.pbId, keyHandleBytes, 0, assertion.Credential.cbId); - } - } - else - { - keyHandleBytes = new byte[0]; - } - - byte[] authenticatorData; - if (assertion.cbAuthenticatorData > 0) - { - authenticatorData = new byte[assertion.cbAuthenticatorData]; - if (assertion.pbAuthenticatorData != IntPtr.Zero) - { - Marshal.Copy(assertion.pbAuthenticatorData, authenticatorData, 0, assertion.cbAuthenticatorData); - } - } - else - { - authenticatorData = new byte[0]; - } - - byte[] signatureBytes; - if (assertion.cbSignature > 0) - { - signatureBytes = new byte[assertion.cbSignature]; - if (assertion.pbSignature != IntPtr.Zero) - { - Marshal.Copy(assertion.pbSignature, signatureBytes, 0, assertion.cbSignature); - } - } - else - { - signatureBytes = new byte[0]; - } - - NativeWebAuthn.WebAuthNFreeAssertion(assertionPtr); - taskSource.TrySetResult(new U2FSignature - { - clientData = clientDataBytes, - signatureData = authenticatorData.Skip(32).Take(5).Concat(signatureBytes).ToArray(), - keyHandle = keyHandleBytes - }); - } - else - { - var ptr = NativeWebAuthn.WebAuthNGetErrorName(hr); - var error = Marshal.PtrToStringUni(ptr); - taskSource.SetException(new Exception($"WebauthN GetAssertion error: {error}")); - } - } - finally - { - foreach (var ptr in ptrList) - { - Marshal.FreeHGlobal(ptr); - } - - ptrList.Clear(); - - } - }, - token); - - return taskSource.Task; - } - } -} diff --git a/WinWebAuthn/NativeWebAuthn.cs b/WinWebAuthn/NativeWebAuthn.cs deleted file mode 100644 index bc401d6..0000000 --- a/WinWebAuthn/NativeWebAuthn.cs +++ /dev/null @@ -1,213 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace WinWebAuthn -{ - internal static class NativeWebAuthn - { - internal const int WEBAUTHN_API_VERSION_1 = 1; - internal const int WEBAUTHN_API_VERSION_2 = 2; - internal enum HRESULT : uint - { - S_FALSE = 0x0001, - S_OK = 0x0000, - E_INVALIDARG = 0x80070057, - E_OUTOFMEMORY = 0x8007000E - } - - [DllImport("webauthn.dll", EntryPoint = "WebAuthNGetApiVersionNumber", CharSet = CharSet.Unicode)] - internal static extern int WebAuthNGetApiVersionNumber(); - - - [DllImport("webauthn.dll", EntryPoint = "WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable", CharSet = CharSet.Unicode)] - internal static extern HRESULT WebAuthNIsUserVerifyingPlatformAuthenticatorAvailable(out bool pbIsUserVerifyingPlatformAuthenticatorAvailable); - - internal const uint WEBAUTHN_CREDENTIAL_CURRENT_VERSION = 1; - internal const string WEBAUTHN_CREDENTIAL_TYPE_PUBLIC_KEY = "public-key"; - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_CREDENTIAL - { - // Version of this structure, to allow for modifications in the future. - public uint dwVersion; - - // Size of pbID. - public int cbId; - // Unique ID for this particular credential. - public IntPtr pbId; - - // Well-known credential type specifying what this particular credential is. - public IntPtr pwszCredentialType; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_CREDENTIALS - { - public int cCredentials; - public IntPtr pCredentials; // PWEBAUTHN_CREDENTIALS - } - - [StructLayout(LayoutKind.Sequential)] - internal struct _WEBAUTHN_EXTENSION - { - [MarshalAs(UnmanagedType.LPWStr)] - public string pwszExtensionIdentifier; - public uint cbExtension; - public IntPtr pvExtension; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_EXTENSIONS - { - public uint cExtensions; - public IntPtr pExtensions; // PWEBAUTHN_EXTENSION - } - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_CREDENTIAL_EX - { - // Version of this structure, to allow for modifications in the future. - public uint dwVersion; - - // Size of pbID. - public uint cbId; - // Unique ID for this particular credential. - public byte[] pbId; - - // Well-known credential type specifying what this particular credential is. - [MarshalAs(UnmanagedType.LPWStr)] - public string pwszCredentialType; - - // Transports. 0 implies no transport restrictions. - public uint dwTransports; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_CREDENTIAL_LIST - { - public uint cCredentials; - public IntPtr ppCredentials; //PWEBAUTHN_CREDENTIAL_EX* - } - - public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_ANY = 0; - public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_PLATFORM = 1; - public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM = 2; - public const uint WEBAUTHN_AUTHENTICATOR_ATTACHMENT_CROSS_PLATFORM_U2F_V2 = 3; - - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS - { - // Version of this structure, to allow for modifications in the future. - public uint dwVersion; - - // Time that the operation is expected to complete within. - // This is used as guidance, and can be overridden by the platform. - public uint dwTimeoutMilliseconds; - - // Allowed Credentials List. - public WEBAUTHN_CREDENTIALS CredentialList; - - // Optional extensions to parse when performing the operation. - public WEBAUTHN_EXTENSIONS Extensions; - - // Optional. Platform vs Cross-Platform Authenticators. - public uint dwAuthenticatorAttachment; - - // User Verification Requirement. - public uint dwUserVerificationRequirement; - - // Reserved for future Use - public uint dwFlags; - - // - // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_2 - // - - // Optional identifier for the U2F AppId. Converted to UTF8 before being hashed. Not lower cased. - public IntPtr pwszU2fAppId; - - // If the following is non-NULL, then, set to TRUE if the above pwszU2fAppid was used instead of - // PCWSTR pwszRpId; - public IntPtr pbU2fAppId; // BOOL* pbU2fAppId; - - // - // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_3 - // - - // Cancellation Id - Optional - See WebAuthNGetCancellationId - public IntPtr pCancellationId; //GUID *pCancellationId; - - // - // The following fields have been added in WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS_VERSION_4 - // - - // Allow Credential List. If present, "CredentialList" will be ignored. - public IntPtr pAllowCredentialList; // PWEBAUTHN_CREDENTIAL_LIST - - } - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_CLIENT_DATA - { - // Version of this structure, to allow for modifications in the future. - // This field is required and should be set to CURRENT_VERSION above. - public uint dwVersion; - - // Size of the pbClientDataJSON field. - public int cbClientDataJSON; - - // UTF-8 encoded JSON serialization of the client data. - public IntPtr pbClientDataJSON; - - // Hash algorithm ID used to hash the pbClientDataJSON field. - [MarshalAs(UnmanagedType.LPWStr)] - public string pwszHashAlgId; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct WEBAUTHN_ASSERTION - { - // Version of this structure, to allow for modifications in the future. - public uint dwVersion; - - // Size of cbAuthenticatorData. - public int cbAuthenticatorData; - // Authenticator data that was created for this assertion. - public IntPtr pbAuthenticatorData; - - // Size of pbSignature. - public int cbSignature; - // Signature that was generated for this assertion. - public IntPtr pbSignature; - - // Credential that was used for this assertion. - public WEBAUTHN_CREDENTIAL Credential; - - // Size of User Id - public int cbUserId; - // UserId - public IntPtr pbUserId; - } - internal const string WEBAUTHN_HASH_ALGORITHM_SHA_256 = "SHA-256"; - [DllImport("webauthn.dll", EntryPoint = "WebAuthNAuthenticatorGetAssertion", CharSet = CharSet.Unicode)] - internal static extern HRESULT WebAuthNAuthenticatorGetAssertion( - [In] IntPtr hWnd, - [MarshalAs(UnmanagedType.LPWStr)] - [In] string pwszRpId, - [In] ref WEBAUTHN_CLIENT_DATA pWebAuthNClientData, - [In] ref WEBAUTHN_AUTHENTICATOR_GET_ASSERTION_OPTIONS pWebAuthNGetAssertionOptions, - [Out] out IntPtr ppWebAuthNAssertion); - - [DllImport("webauthn.dll", EntryPoint = "WebAuthNFreeAssertion", CharSet = CharSet.Unicode)] - internal static extern void WebAuthNFreeAssertion([In] IntPtr pWebAuthNAssertion); - - [DllImport("webauthn.dll", EntryPoint = "WebAuthNGetCancellationId", CharSet = CharSet.Unicode)] - internal static extern HRESULT WebAuthNGetCancellationId([Out] IntPtr pCancellationId); - - [DllImport("webauthn.dll", EntryPoint = "WebAuthNCancelCurrentOperation", CharSet = CharSet.Unicode)] - internal static extern HRESULT WebAuthNCancelCurrentOperation([In] IntPtr pCancellationId); - - [DllImport("webauthn.dll", EntryPoint = "WebAuthNGetErrorName", CharSet = CharSet.Unicode)] - internal static extern IntPtr WebAuthNGetErrorName([In] HRESULT hr); - } -} diff --git a/WinWebAuthn/Properties/AssemblyInfo.cs b/WinWebAuthn/Properties/AssemblyInfo.cs deleted file mode 100644 index 56ad877..0000000 --- a/WinWebAuthn/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("WinWebAuthn")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("WinWebAuthn")] -[assembly: AssemblyCopyright("Copyright © 2021")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("912a6a55-c062-42ff-aafb-13b56f74b7e5")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/WinWebAuthn/WinWebAuthn.csproj b/WinWebAuthn/WinWebAuthn.csproj deleted file mode 100644 index fe69714..0000000 --- a/WinWebAuthn/WinWebAuthn.csproj +++ /dev/null @@ -1,49 +0,0 @@ - - - - - Debug - AnyCPU - {912A6A55-C062-42FF-AAFB-13B56F74B7E5} - Library - Properties - WinWebAuthn - WinWebAuthn - v4.5 - 512 - true - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - {29b50177-f7b4-46f6-b3da-b9fef269eef2} - KeeperSdk - - - - \ No newline at end of file diff --git a/documentation.shfbproj b/documentation.shfbproj index 061ec71..1705d3f 100644 --- a/documentation.shfbproj +++ b/documentation.shfbproj @@ -24,7 +24,7 @@ C# VS2013 True - True + False False False OnlyWarningsAndErrors @@ -36,22 +36,26 @@ ProtectedInternalAsProtected - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -64,7 +68,7 @@ Keeper SDK Class Library - 1.0.0.0 + 1.0.3.0 MemberName AboveNamespaces True