diff --git a/.env.example b/.env.example deleted file mode 100644 index 7d6736d..0000000 --- a/.env.example +++ /dev/null @@ -1,2 +0,0 @@ -TRIBUFU_API_KEY="" -TRIBUFU_API_URL="https://api.tribufu.com" diff --git a/.gitignore b/.gitignore index 114d915..cd402ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,7 @@ -.agents/ -.codex/ .vs/ bin/ -Binaries -Intermediate/ obj/ -.DS_Store -.env *.filters *.user -*.lscache -desktop.ini +.DS_Store diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore deleted file mode 100644 index 1dc3f29..0000000 --- a/.openapi-generator-ignore +++ /dev/null @@ -1,9 +0,0 @@ -docs/ - -.gitignore -*.sln -**.csproj -api/openapi.yaml -appveyor.yml -git_push.sh -README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES deleted file mode 100644 index 7cb3a8d..0000000 --- a/.openapi-generator/FILES +++ /dev/null @@ -1,67 +0,0 @@ -src/Tribufu/Api/TribufuGeneratedApi.cs -src/Tribufu/Client/ApiClient.cs -src/Tribufu/Client/ApiException.cs -src/Tribufu/Client/ApiResponse.cs -src/Tribufu/Client/ClientUtils.cs -src/Tribufu/Client/Configuration.cs -src/Tribufu/Client/ExceptionFactory.cs -src/Tribufu/Client/GlobalConfiguration.cs -src/Tribufu/Client/HttpMethod.cs -src/Tribufu/Client/IApiAccessor.cs -src/Tribufu/Client/IAsynchronousClient.cs -src/Tribufu/Client/IReadableConfiguration.cs -src/Tribufu/Client/ISynchronousClient.cs -src/Tribufu/Client/Multimap.cs -src/Tribufu/Client/OpenAPIDateConverter.cs -src/Tribufu/Client/RequestOptions.cs -src/Tribufu/Client/RetryConfiguration.cs -src/Tribufu/Model/AbstractOpenAPISchema.cs -src/Tribufu/Model/Application.cs -src/Tribufu/Model/ApplicationType.cs -src/Tribufu/Model/AuthorizeRequest.cs -src/Tribufu/Model/ClientInfo.cs -src/Tribufu/Model/ClientType.cs -src/Tribufu/Model/CodeChallengeMethod.cs -src/Tribufu/Model/CodeResponse.cs -src/Tribufu/Model/CreateUser.cs -src/Tribufu/Model/CryptoViewModel.cs -src/Tribufu/Model/ExternalAccount.cs -src/Tribufu/Model/Game.cs -src/Tribufu/Model/GameServer.cs -src/Tribufu/Model/GameServerCluster.cs -src/Tribufu/Model/GameServerQuery.cs -src/Tribufu/Model/GameServerStatus.cs -src/Tribufu/Model/GrantType.cs -src/Tribufu/Model/Group.cs -src/Tribufu/Model/GroupApplication.cs -src/Tribufu/Model/GroupMember.cs -src/Tribufu/Model/GroupRank.cs -src/Tribufu/Model/HashViewModel.cs -src/Tribufu/Model/IdentityProviderType.cs -src/Tribufu/Model/IntrospectRequest.cs -src/Tribufu/Model/IntrospectResponse.cs -src/Tribufu/Model/IpAddress.cs -src/Tribufu/Model/LeaderboardItem.cs -src/Tribufu/Model/LeaderboardOrder.cs -src/Tribufu/Model/ModelClient.cs -src/Tribufu/Model/Package.cs -src/Tribufu/Model/PackageRelease.cs -src/Tribufu/Model/Product.cs -src/Tribufu/Model/ProductPrice.cs -src/Tribufu/Model/ProductType.cs -src/Tribufu/Model/Profile.cs -src/Tribufu/Model/ProfileGame.cs -src/Tribufu/Model/ProfileGroup.cs -src/Tribufu/Model/ResponseType.cs -src/Tribufu/Model/RevokeRequest.cs -src/Tribufu/Model/Search.cs -src/Tribufu/Model/SearchType.cs -src/Tribufu/Model/ServerMetrics.cs -src/Tribufu/Model/StorageFile.cs -src/Tribufu/Model/TokenHintType.cs -src/Tribufu/Model/TokenRequest.cs -src/Tribufu/Model/TokenResponse.cs -src/Tribufu/Model/TokenType.cs -src/Tribufu/Model/UpdateProfile.cs -src/Tribufu/Model/UserInfo.cs -src/Tribufu/Model/UserType.cs diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION deleted file mode 100644 index 5f84a81..0000000 --- a/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.12.0 diff --git a/Directory.Build.props b/Directory.Build.props index 5e893d6..62f2166 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,21 +1,13 @@ + 1.0.0.0 Tribufu Tribufu Copyright (c) Tribufu. All Rights Reserved. + 1.0.0.0 MIT git - https://github.com/Tribufu/TribufuDotNet - 1.3.0 - $(Version).0 - $(NoWarn);0618;1591;1998;2002;8767 - - - $(SolutionDir)Intermediate\DotNet\$(MSBuildProjectName)\ - $(BaseIntermediateOutputPath)$(Configuration)\ - $(BaseIntermediateOutputPath) - $(IntermediateOutputPath) - $(SolutionDir)Binaries\$(Configuration)\DotNet\ - $(SolutionDir)Intermediate\ + https://github.com/Tribufu/TribufuNet + 1.0.0 diff --git a/Directory.Packages.props b/Directory.Packages.props index 0640a39..cd87747 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -3,22 +3,8 @@ true - - - - - - - - - - - - - - - + diff --git a/README.md b/README.md index a5bf230..2d26ce1 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,11 @@ .NET SDK to access Tribufu APIs and services. -[![nuget][nuget-badge]][nuget-url] [![MIT License][mit-badge]][mit-url] [![Discord Chat][discord-badge]][discord-url] -[nuget-badge]: https://img.shields.io/nuget/v/Tribufu.svg -[nuget-url]: https://www.nuget.org/packages/Tribufu [mit-badge]: https://img.shields.io/badge/license-MIT-blue.svg -[mit-url]: https://github.com/Tribufu/TribufuDotNet/blob/main/LICENSE.txt +[mit-url]: https://github.com/tribufu/sdk-dotnet/blob/main/LICENSE.txt [discord-badge]: https://img.shields.io/discord/276504514616623104.svg?logo=discord&style=flat-square [discord-url]: https://www.tribufu.com/discord @@ -20,4 +17,4 @@ This project is licensed under the [MIT License]. -[MIT License]: https://github.com/Tribufu/TribufuDotNet/blob/main/LICENSE.txt +[MIT License]: https://github.com/tribufu/sdk-dotnet/blob/main/LICENSE.txt diff --git a/Scripts/Generate.ps1 b/Scripts/Generate.ps1 deleted file mode 100644 index abb11fc..0000000 --- a/Scripts/Generate.ps1 +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env pwsh - -$ErrorActionPreference = "Stop" - -$env:CSHARP_POST_PROCESS_FILE = "" - -java -jar ./vendor/openapi-generator/openapi-generator-cli.jar generate ` - -i https://api.tribufu.com/openapi.json ` - -g csharp ` - -o . ` - --global-property apis,models,supportingFiles,apiDocs=false,modelDocs=false,apiTests=false,modelTests=false ` - --additional-properties=packageName=Tribufu,library=restsharp,targetFramework=net47,zeroBasedEnums=true ` - --openapi-normalizer SET_TAGS_FOR_ALL_OPERATIONS=TribufuGenerated ` - --skip-validate-spec - -$srcDir = "./src" -$sourceDir = "./Source" - -if (Test-Path $srcDir) { - New-Item -ItemType Directory -Force -Path $sourceDir | Out-Null - Copy-Item -Path (Join-Path $srcDir "*") -Destination $sourceDir -Recurse -Force - Remove-Item $srcDir -Recurse -Force -} diff --git a/Scripts/Package.ps1 b/Scripts/Package.ps1 deleted file mode 100644 index 658179e..0000000 --- a/Scripts/Package.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env pwsh - -Get-ChildItem ./Intermediate -Filter *.nupkg -Recurse -Force | Remove-Item -Force - -dotnet clean -dotnet build -c Release -dotnet pack -c Release -o ./Intermediate diff --git a/Source/Tribufu.AspNetCore/Extensions/HttpContextExtensions.cs b/Source/Tribufu.AspNetCore/Extensions/HttpContextExtensions.cs deleted file mode 100644 index b65a12b..0000000 --- a/Source/Tribufu.AspNetCore/Extensions/HttpContextExtensions.cs +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: UNLICENSED - -using Microsoft.AspNetCore.Http; -using System; -using System.Linq; - -namespace Tribufu.AspNetCore.Extensions -{ - public static class HttpContextExtensions - { - public static string GetIpAddress(this HttpContext context) - { - var headers = context.Request.Headers; - if (headers.TryGetValue("CF-Connecting-IP", out var cfConnectingIp)) - { - return cfConnectingIp.FirstOrDefault() ?? "127.0.0.1"; - } - - if (headers.TryGetValue("X-Forwarded-For", out var xForwardedFor)) - { - var forwardedIps = xForwardedFor.ToString().Split(',', StringSplitOptions.RemoveEmptyEntries); - - if (forwardedIps.Length > 0) - { - return forwardedIps[0].Trim(); - } - } - - return context.Connection.RemoteIpAddress?.ToString() ?? "127.0.0.1"; - } - } -} diff --git a/Source/Tribufu.AspNetCore/README.md b/Source/Tribufu.AspNetCore/README.md deleted file mode 100644 index 54d4fec..0000000 --- a/Source/Tribufu.AspNetCore/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu AspNetCore diff --git a/Source/Tribufu.AspNetCore/Tribufu.AspNetCore.csproj b/Source/Tribufu.AspNetCore/Tribufu.AspNetCore.csproj deleted file mode 100644 index a739e7f..0000000 --- a/Source/Tribufu.AspNetCore/Tribufu.AspNetCore.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - Tribufu.AspNetCore - Tribufu AspNetCore - README.md - - - Properties - true - false - enable - Library - net8.0 - - - - - - - - - - - - - - - diff --git a/Source/Tribufu.ComponentModel/README.md b/Source/Tribufu.ComponentModel/README.md deleted file mode 100644 index f41a146..0000000 --- a/Source/Tribufu.ComponentModel/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu ComponentModel diff --git a/Source/Tribufu.Configuration/ConfigurationLoader.cs b/Source/Tribufu.Configuration/ConfigurationLoader.cs deleted file mode 100644 index d23c03e..0000000 --- a/Source/Tribufu.Configuration/ConfigurationLoader.cs +++ /dev/null @@ -1,50 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Microsoft.Extensions.Configuration; -using System.IO; -using Tomlyn.Extensions.Configuration; -using Tribufu.Logging; -using Tribufu.Platform; - -namespace Tribufu.Configuration -{ - public static class ConfigurationLoader - { - public static IConfiguration Load(string[] fileNames) - { - var configDirectory = Paths.GetApplicationConfigDirectory(); - var configurationBuilder = new ConfigurationBuilder(); - configurationBuilder.AddEnvironmentVariables(); - - foreach (var fileName in fileNames) - { - var fullPath = Path.Combine(configDirectory, fileName); - if (!File.Exists(fullPath)) - { - Logger.Debug($"Config file '{fullPath}' not found, skipping."); - continue; - } - - var extension = Path.GetExtension(fullPath).ToLowerInvariant(); - switch (extension) - { - case ".ini": - configurationBuilder.AddIniFile(fullPath, true, false); - break; - case ".json": - configurationBuilder.AddJsonFile(fullPath, true, false); - break; - case ".toml": - configurationBuilder.AddTomlFile(fullPath, true, false); - break; - default: - Logger.Warn($"Unsupported config file extension: {extension}"); - break; - } - } - - return configurationBuilder.Build(); - } - } -} diff --git a/Source/Tribufu.Configuration/Extensions/IConfigurationExtensions.cs b/Source/Tribufu.Configuration/Extensions/IConfigurationExtensions.cs deleted file mode 100644 index 6c11899..0000000 --- a/Source/Tribufu.Configuration/Extensions/IConfigurationExtensions.cs +++ /dev/null @@ -1,16 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Microsoft.Extensions.Configuration; - -namespace Tribufu.Configuration.Extensions -{ - public static class IConfigurationExtensions - { - public static string? Get(this IConfiguration configuration, string prefix, string key) - { - var section = configuration.GetSection(prefix); - return !section.Exists() ? configuration[$"{prefix}_{key}"] : section[key]; - } - } -} diff --git a/Source/Tribufu.Configuration/README.md b/Source/Tribufu.Configuration/README.md deleted file mode 100644 index 8726fdd..0000000 --- a/Source/Tribufu.Configuration/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu Configuration diff --git a/Source/Tribufu.Configuration/Tribufu.Configuration.csproj b/Source/Tribufu.Configuration/Tribufu.Configuration.csproj deleted file mode 100644 index 3dc2aa8..0000000 --- a/Source/Tribufu.Configuration/Tribufu.Configuration.csproj +++ /dev/null @@ -1,32 +0,0 @@ - - - Tribufu.Configuration - Tribufu Configuration - README.md - - - Properties - true - false - enable - Library - net6.0 - - - - - - - - - - - - - - - - - - - diff --git a/Source/Tribufu.EntityFrameworkCore/IRepository.cs b/Source/Tribufu.EntityFrameworkCore/IRepository.cs deleted file mode 100644 index 0e00b08..0000000 --- a/Source/Tribufu.EntityFrameworkCore/IRepository.cs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using System.Collections.Generic; -using System.Threading.Tasks; - -namespace Tribufu.EntityFrameworkCore -{ - public interface IRepository where T : class - { - void Seed(); - - Task SeedAsync(); - - IList List(); - - Task> ListAsync(); - - IList List(uint page, uint limit); - - Task> ListAsync(uint page, uint limit); - - T? Find(K key); - - Task FindAsync(K key); - - T? Create(T entity); - - Task CreateAsync(T entity); - - T? Update(T entity); - - Task UpdateAsync(T entity); - - void Delete(K key); - - Task DeleteAsync(K key); - - void Delete(T entity); - - Task DeleteAsync(T entity); - } -} diff --git a/Source/Tribufu.EntityFrameworkCore/README.md b/Source/Tribufu.EntityFrameworkCore/README.md deleted file mode 100644 index 19c48b4..0000000 --- a/Source/Tribufu.EntityFrameworkCore/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu EntityFrameworkCore diff --git a/Source/Tribufu.EntityFrameworkCore/Repository.cs b/Source/Tribufu.EntityFrameworkCore/Repository.cs deleted file mode 100644 index 6851858..0000000 --- a/Source/Tribufu.EntityFrameworkCore/Repository.cs +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Microsoft.EntityFrameworkCore; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Threading.Tasks; - -namespace Tribufu.EntityFrameworkCore -{ - public class Repository : IRepository where C : DbContext where T : class - { - protected readonly C _dbContext; - - protected readonly DbSet _dbSet; - - public Repository(C dbContext) - { - _dbContext = dbContext ?? throw new ArgumentNullException(nameof(dbContext)); - _dbSet = dbContext.Set(); - } - - public virtual void Seed() - { - } - - public virtual async Task SeedAsync() - { - } - - public virtual IList List() - { - return [.. _dbSet]; - } - - public virtual async Task> ListAsync() - { - return await _dbSet.ToListAsync(); - } - - public virtual IList List(uint page, uint limit) - { - return _dbSet.Skip((int)((page < 1 ? 0 : page - 1) * limit)).Take((int)limit).ToList(); - } - - public virtual async Task> ListAsync(uint page, uint limit) - { - return await _dbSet.Skip((int)((page < 1 ? 0 : page - 1) * limit)).Take((int)limit).ToListAsync(); - } - - public virtual T? Find(K key) - { - return _dbSet.Find(key); - } - - public virtual async Task FindAsync(K key) - { - return await _dbSet.FindAsync(key); - } - - public virtual T? Create(T entity) - { - _dbSet.Add(entity); - var result = _dbContext.SaveChanges(); - return result > 0 ? entity : null; - } - - public virtual async Task CreateAsync(T entity) - { - await _dbSet.AddAsync(entity); - var result = await _dbContext.SaveChangesAsync(); - return result > 0 ? entity : null; - } - - public virtual T? Update(T entity) - { - _dbSet.Update(entity); - var result = _dbContext.SaveChanges(); - return result > 0 ? entity : null; - } - - public virtual async Task UpdateAsync(T entity) - { - _dbSet.Update(entity); - var result = await _dbContext.SaveChangesAsync(); - return result > 0 ? entity : null; - } - - public virtual void Delete(K key) - { - var entity = _dbSet.Find(key); - if (entity != null) - { - Delete(entity); - } - } - - public virtual async Task DeleteAsync(K key) - { - var entity = await _dbSet.FindAsync(key); - if (entity != null) - { - await DeleteAsync(entity); - } - } - - public virtual void Delete(T entity) - { - _dbSet.Remove(entity); - _dbContext.SaveChanges(); - } - - public virtual async Task DeleteAsync(T entity) - { - _dbSet.Remove(entity); - await _dbContext.SaveChangesAsync(); - } - } -} diff --git a/Source/Tribufu.EntityFrameworkCore/Tribufu.EntityFrameworkCore.csproj b/Source/Tribufu.EntityFrameworkCore/Tribufu.EntityFrameworkCore.csproj deleted file mode 100644 index f591fd3..0000000 --- a/Source/Tribufu.EntityFrameworkCore/Tribufu.EntityFrameworkCore.csproj +++ /dev/null @@ -1,26 +0,0 @@ - - - Tribufu.EntityFrameworkCore - Tribufu EntityFrameworkCore - README.md - - - Properties - true - false - enable - Library - net8.0 - - - - - - - - - - - - - diff --git a/Source/Tribufu.Example/Program.cs b/Source/Tribufu.Example/Program.cs deleted file mode 100644 index 1dce3d9..0000000 --- a/Source/Tribufu.Example/Program.cs +++ /dev/null @@ -1,36 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using dotenv.net; -using System; -using System.Threading.Tasks; -using Tribufu.Client; -using Tribufu.Logging; - -namespace Tribufu.Test -{ - public static class Program - { - public static async Task Main(string[] args) - { - Logger.Initialize(LogLevel.Trace); - - DotEnv.Load(new DotEnvOptions(ignoreExceptions: true, envFilePaths: [".env", "../../.env"])); - - var apiKey = Environment.GetEnvironmentVariable("TRIBUFU_API_KEY"); - var tribufu = new TribufuApi(apiKey ?? ""); - - Logger.Debug(TribufuApi.GetUserAgent()); - - try - { - var result = await tribufu.GetUserInfoAsync(); - Logger.Debug(result.ToString()); - } - catch (ApiException e) - { - Logger.Debug(e.Message); - } - } - } -} diff --git a/Source/Tribufu.Example/Tribufu.Example.csproj b/Source/Tribufu.Example/Tribufu.Example.csproj deleted file mode 100644 index 3bde082..0000000 --- a/Source/Tribufu.Example/Tribufu.Example.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - false - false - enable - Exe - net8.0 - - - - - - - - - diff --git a/Source/Tribufu.Logging/LogLevel.cs b/Source/Tribufu.Logging/LogLevel.cs deleted file mode 100644 index f8cea00..0000000 --- a/Source/Tribufu.Logging/LogLevel.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -namespace Tribufu.Logging -{ - public enum LogLevel : byte - { - Off = 0, - - Error = 1, - - Warn = 2, - - Info = 3, - - Debug = 4, - - Trace = 5, - } -} diff --git a/Source/Tribufu.Logging/Logger.cs b/Source/Tribufu.Logging/Logger.cs deleted file mode 100644 index 2da1ba9..0000000 --- a/Source/Tribufu.Logging/Logger.cs +++ /dev/null @@ -1,79 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using System; - -namespace Tribufu.Logging -{ - public static class Logger - { - private static LogLevel _level = LogLevel.Off; - - public static void Initialize(LogLevel level = LogLevel.Off) - { - _level = level; - } - - public static void Info(object context, string message) - { - Info($"({context.GetType().Name}) {message}"); - } - - public static void Warn(object context, string message) - { - Warn($"({context.GetType().Name}) {message}"); - } - - public static void Error(object context, string message) - { - Error($"({context.GetType().Name}) {message}"); - } - - public static void Debug(object context, string message) - { - Debug($"({context.GetType().Name}) {message}"); - } - - public static void Trace(object context, string message) - { - Trace($"({context.GetType().Name}) {message}"); - } - - public static void Info(string message) - { - Log(LogLevel.Info, message, ConsoleColor.Green); - } - - public static void Warn(string message) - { - Log(LogLevel.Warn, message, ConsoleColor.Yellow); - } - - public static void Error(string message) - { - Log(LogLevel.Error, message, ConsoleColor.Red); - } - - public static void Debug(string message) - { - Log(LogLevel.Debug, message, ConsoleColor.White); - } - - public static void Trace(string message) - { - Log(LogLevel.Trace, message, ConsoleColor.DarkGray); - } - - private static void Log(LogLevel level, string message, ConsoleColor color) - { - if (level <= _level) - { - var defaultColor = Console.ForegroundColor; - Console.ForegroundColor = color; - var timestamp = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss"); - Console.WriteLine($"[{timestamp}] [{level.ToString().ToUpper()}]: {message}"); - Console.ForegroundColor = defaultColor; - } - } - } -} diff --git a/Source/Tribufu.Logging/README.md b/Source/Tribufu.Logging/README.md deleted file mode 100644 index 9845f6c..0000000 --- a/Source/Tribufu.Logging/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu Logging diff --git a/Source/Tribufu.Platform/FlakeGenerator.cs b/Source/Tribufu.Platform/FlakeGenerator.cs deleted file mode 100644 index ca89efd..0000000 --- a/Source/Tribufu.Platform/FlakeGenerator.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: UNLICENSED - -using IdGen; -using System; - -namespace Tribufu.Platform -{ - public static class FlakeGenerator - { - public static readonly DateTime EPOCH = new(2016, 1, 1, 0, 0, 0, DateTimeKind.Utc); - - private static readonly IdStructure _structure = new(41, 10, 12); - - private static readonly IdGeneratorOptions _options = new(_structure, new DefaultTimeSource(EPOCH)); - - private static readonly IdGenerator _generator = new(0, _options); - - public static ulong New() - { - //Console.WriteLine("Max. generators : {0}", _structure.MaxGenerators); - //Console.WriteLine("Id's/ms per generator : {0}", _structure.MaxSequenceIds); - //Console.WriteLine("Id's/ms total : {0}", _structure.MaxGenerators * _structure.MaxSequenceIds); - //Console.WriteLine("Wraparound interval : {0}", _structure.WraparoundInterval(_generator.Options.TimeSource)); - //Console.WriteLine("Wraparound date : {0}", _structure.WraparoundDate(_generator.Options.TimeSource.Epoch, _generator.Options.TimeSource).ToString("O")); - - return (ulong)_generator.CreateId(); - } - - public static ulong FromTimestamp(DateTime timestamp, ushort sequence = 0) - { - var diff = (long)(timestamp - EPOCH).TotalMilliseconds; - if (diff < 0 || diff > (1L << 41) - 1) - { - throw new ArgumentOutOfRangeException(nameof(timestamp), "Timestamp out of range for flake."); - } - - ulong timestampPart = (ulong)diff << 22; // 41 bits << (10+12) - ulong generatorPart = 0ul << 12; // Always 0 - ulong sequencePart = (ulong)(sequence & 0xFFF); // 12 bits - - return timestampPart | generatorPart | sequencePart; - } - } -} diff --git a/Source/Tribufu.Platform/Paths.cs b/Source/Tribufu.Platform/Paths.cs deleted file mode 100644 index 0d67e7b..0000000 --- a/Source/Tribufu.Platform/Paths.cs +++ /dev/null @@ -1,122 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using System; -using System.IO; -using System.Runtime.InteropServices; -using Tribufu.Logging; - -namespace Tribufu.Platform -{ - /// - /// Provides standardized access to important directories, such as config, saved data, logs, and platform-specific binaries. - /// This is especially useful for abstracting file path logic across environments (development, production, etc). - /// - public static class Paths - { - /// - /// Gets the root base directory of the application. - /// - /// - /// - In development, this resolves to the root of the repository (five levels above bin/Debug or bin/Release). - /// - In production, it resolves to two levels above the binary location. - /// - It uses case-insensitive checks and runtime heuristics to improve accuracy. - /// - /// The absolute path to the base directory. - public static string GetApplicationDirectory() - { - try - { - string baseDirectory; - string defaultBaseDirectory = AppContext.BaseDirectory; - - bool isDevelopment = defaultBaseDirectory.ToLowerInvariant().Contains("debug"); - - if (isDevelopment) - { - // Go 5 levels up to simulate project root - baseDirectory = Path.Combine(defaultBaseDirectory, "..", "..", "..", "..", ".."); - } - else - { - baseDirectory = Path.Combine(defaultBaseDirectory, "..", ".."); - } - - return Path.GetFullPath(baseDirectory); - } - catch (Exception ex) - { - Logger.Warn($"(Paths) Failed to resolve base directory: {ex.Message}"); - return AppContext.BaseDirectory; - } - } - - /// - /// Gets the path to the platform-specific binary directory. - /// - /// - /// The absolute path to bin/<runtime-identifier> if available, - /// otherwise falls back to bin/dotnet. - /// - public static string GetApplicationBinDirectory() - { - var binDirectory = Path.Combine(GetApplicationDirectory(), "bin"); - - if (!string.IsNullOrEmpty(RuntimeInformation.RuntimeIdentifier)) - { - binDirectory = Path.Combine(binDirectory, RuntimeInformation.RuntimeIdentifier); - } - else - { - binDirectory = Path.Combine(binDirectory, "dotnet"); - } - - return binDirectory; - } - - /// - /// Gets the path to the configuration directory. - /// - /// The absolute path to the config directory. - public static string GetApplicationConfigDirectory() - { - return Path.Combine(GetApplicationDirectory(), "config"); - } - - /// - /// Gets the path to the assets directory. - /// - /// The absolute path to the assets directory. - public static string GetApplicationAssetsDirectory() - { - return Path.Combine(GetApplicationDirectory(), "assets"); - } - - /// - /// Gets the path to the saved data directory. - /// - /// The absolute path to the saved directory. - public static string GetApplicationSavedDirectory() - { - return Path.Combine(GetApplicationDirectory(), "saved"); - } - - /// - /// Gets the path to the cache directory inside saved. - /// - /// The absolute path to the saved/cache directory. - public static string GetApplicationCacheDirectory() - { - return Path.Combine(GetApplicationSavedDirectory(), "cache"); - } - - /// - /// Gets the path to the logs directory inside saved. - /// - /// The absolute path to the saved/logs directory. - public static string GetApplicationLogsDirectory() - { - return Path.Combine(GetApplicationSavedDirectory(), "logs"); - } - } -} diff --git a/Source/Tribufu.Platform/README.md b/Source/Tribufu.Platform/README.md deleted file mode 100644 index 6925ac2..0000000 --- a/Source/Tribufu.Platform/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu Runtime diff --git a/Source/Tribufu.Serialization/BaseClassFirstContractResolver.cs b/Source/Tribufu.Serialization/BaseClassFirstContractResolver.cs deleted file mode 100644 index 0aa320c..0000000 --- a/Source/Tribufu.Serialization/BaseClassFirstContractResolver.cs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: UNLICENSED - -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace Tribufu.Serialization -{ - public class BaseClassFirstContractResolver : DefaultContractResolver - { - protected override IList CreateProperties(Type type, MemberSerialization memberSerialization) - { - var props = base.CreateProperties(type, memberSerialization); - return props.OrderBy(p => { return p.DeclaringType == type ? 1 : 0; }).ToList(); - } - } -} diff --git a/Source/Tribufu.Serialization/CustomSerializerSettings.cs b/Source/Tribufu.Serialization/CustomSerializerSettings.cs deleted file mode 100644 index b487345..0000000 --- a/Source/Tribufu.Serialization/CustomSerializerSettings.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Serialization; - -namespace Tribufu.Serialization -{ - public static class CustomSerializerSettings - { - public static JsonSerializerSettings GetNewtonsoftJson() - { - var settings = new JsonSerializerSettings(); - SetNewtonsoftJson(settings); - return settings; - } - - public static void SetNewtonsoftJson(JsonSerializerSettings settings) - { - settings.ContractResolver = new BaseClassFirstContractResolver - { - NamingStrategy = new SnakeCaseNamingStrategy() - }; - - settings.Converters.Add(new DecimalNullableStringConverter()); - settings.Converters.Add(new DecimalStringConverter()); - settings.Converters.Add(new ULongNullableStringConverter()); - settings.Converters.Add(new ULongStringConverter()); - settings.Converters.Add(new StringEnumConverter(new SnakeCaseNamingStrategy(), false)); - - settings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; - } - } -} diff --git a/Source/Tribufu.Serialization/DecimalNullableStringConverter.cs b/Source/Tribufu.Serialization/DecimalNullableStringConverter.cs deleted file mode 100644 index fee4870..0000000 --- a/Source/Tribufu.Serialization/DecimalNullableStringConverter.cs +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Newtonsoft.Json; -using System; -using System.Globalization; - -namespace Tribufu.Serialization -{ - public class DecimalNullableStringConverter : JsonConverter - { - public override decimal? ReadJson(JsonReader reader, Type objectType, decimal? existingValue, bool hasExistingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.Null) - { - return null; - } - - if (reader.TokenType == JsonToken.String || reader.TokenType == JsonToken.Integer) - { - string value = reader.Value?.ToString(); - - if (string.IsNullOrWhiteSpace(value)) - { - return null; - } - - return decimal.Parse(value); - } - - throw new JsonSerializationException($"Unexpected token {reader.TokenType} when parsing decimal?."); - } - - public override void WriteJson(JsonWriter writer, decimal? value, JsonSerializer serializer) - { - if (value.HasValue) - { - writer.WriteValue(value.Value.ToString(CultureInfo.InvariantCulture)); - } - else - { - writer.WriteNull(); - } - } - } -} diff --git a/Source/Tribufu.Serialization/DecimalStringConverter.cs b/Source/Tribufu.Serialization/DecimalStringConverter.cs deleted file mode 100644 index 2794fa3..0000000 --- a/Source/Tribufu.Serialization/DecimalStringConverter.cs +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Newtonsoft.Json; -using System; -using System.Globalization; - -namespace Tribufu.Serialization -{ - public class DecimalStringConverter : JsonConverter - { - public override decimal ReadJson(JsonReader reader, Type objectType, decimal existingValue, bool hasExistingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.String && decimal.TryParse(reader.Value?.ToString(), out var result)) - { - return result; - } - - if (reader.TokenType == JsonToken.Integer) - { - return Convert.ToUInt64(reader.Value); - } - - throw new JsonSerializationException($"Unexpected token {reader.TokenType} when parsing decimal."); - } - - public override void WriteJson(JsonWriter writer, decimal value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString(CultureInfo.InvariantCulture)); - } - } -} diff --git a/Source/Tribufu.Serialization/NetworkAwareSnakeCaseNamingStrategy.cs b/Source/Tribufu.Serialization/NetworkAwareSnakeCaseNamingStrategy.cs deleted file mode 100644 index 4710a14..0000000 --- a/Source/Tribufu.Serialization/NetworkAwareSnakeCaseNamingStrategy.cs +++ /dev/null @@ -1,35 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Newtonsoft.Json.Serialization; -using System.Text.RegularExpressions; - -namespace Tribufu.Serialization -{ - public class NetworkAwareSnakeCaseNamingStrategy : SnakeCaseNamingStrategy - { - private static readonly string[] KnownAcronyms = new string[] { "IPv4", "IPv6" }; - - protected override string ResolvePropertyName(string name) - { - if (string.IsNullOrEmpty(name)) - { - return name; - } - - foreach (var acr in KnownAcronyms) - { - name = Regex.Replace(name, acr, acr.ToLower()); - } - - var snake = base.ResolvePropertyName(name); - foreach (var acr in KnownAcronyms) - { - var lower = acr.ToLower(); - snake = snake.Replace(lower.Replace("_", ""), lower); - } - - return snake; - } - } -} diff --git a/Source/Tribufu.Serialization/README.md b/Source/Tribufu.Serialization/README.md deleted file mode 100644 index 03ac61c..0000000 --- a/Source/Tribufu.Serialization/README.md +++ /dev/null @@ -1 +0,0 @@ -# Tribufu Serialization diff --git a/Source/Tribufu.Serialization/ULongNullableStringConverter.cs b/Source/Tribufu.Serialization/ULongNullableStringConverter.cs deleted file mode 100644 index 0beb8e4..0000000 --- a/Source/Tribufu.Serialization/ULongNullableStringConverter.cs +++ /dev/null @@ -1,45 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Newtonsoft.Json; -using System; - -namespace Tribufu.Serialization -{ - public class ULongNullableStringConverter : JsonConverter - { - public override ulong? ReadJson(JsonReader reader, Type objectType, ulong? existingValue, bool hasExistingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.Null) - { - return null; - } - - if (reader.TokenType == JsonToken.String || reader.TokenType == JsonToken.Integer) - { - string value = reader.Value?.ToString(); - - if (string.IsNullOrWhiteSpace(value)) - { - return null; - } - - return ulong.Parse(value); - } - - throw new JsonSerializationException($"Unexpected token {reader.TokenType} when parsing ulong?."); - } - - public override void WriteJson(JsonWriter writer, ulong? value, JsonSerializer serializer) - { - if (value.HasValue) - { - writer.WriteValue(value.Value.ToString()); - } - else - { - writer.WriteNull(); - } - } - } -} diff --git a/Source/Tribufu.Serialization/ULongStringConverter.cs b/Source/Tribufu.Serialization/ULongStringConverter.cs deleted file mode 100644 index 5cb6f33..0000000 --- a/Source/Tribufu.Serialization/ULongStringConverter.cs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using Newtonsoft.Json; -using System; - -namespace Tribufu.Serialization -{ - public class ULongStringConverter : JsonConverter - { - public override ulong ReadJson(JsonReader reader, Type objectType, ulong existingValue, bool hasExistingValue, JsonSerializer serializer) - { - if (reader.TokenType == JsonToken.String && ulong.TryParse(reader.Value?.ToString(), out var result)) - { - return result; - } - - if (reader.TokenType == JsonToken.Integer) - { - return Convert.ToUInt64(reader.Value); - } - - throw new JsonSerializationException($"Unexpected token {reader.TokenType} when parsing ulong."); - } - - public override void WriteJson(JsonWriter writer, ulong value, JsonSerializer serializer) - { - writer.WriteValue(value.ToString()); - } - } -} diff --git a/Source/Tribufu/Api/TribufuGeneratedApi.cs b/Source/Tribufu/Api/TribufuGeneratedApi.cs deleted file mode 100644 index 096ce48..0000000 --- a/Source/Tribufu/Api/TribufuGeneratedApi.cs +++ /dev/null @@ -1,20140 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Net; -using System.Net.Mime; -using Tribufu.Client; -using Tribufu.Model; - -namespace Tribufu.Api -{ - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITribufuGeneratedApiSync : IApiAccessor - { - #region Synchronous Operations - /// - /// Authorize the client to access the user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// CodeResponse - CodeResponse Authorize(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0); - - /// - /// Authorize the client to access the user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of CodeResponse - ApiResponse AuthorizeWithHttpInfo(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0); - /// - /// Change the email of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void ChangeEmail(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Change the email of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse ChangeEmailWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Change the password of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void ChangePassword(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Change the password of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse ChangePasswordWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void ClaimGameServer(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse ClaimGameServerWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - void ClaimGameServerV1(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse ClaimGameServerV1WithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Convert a string to base64 or vice versa. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// CryptoViewModel - CryptoViewModel ConvertBase64(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0); - - /// - /// Convert a string to base64 or vice versa. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of CryptoViewModel - ApiResponse ConvertBase64WithHttpInfo(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0); - /// - /// Create an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - void CreateClient(Object body = default(Object), int operationIndex = 0); - - /// - /// Create an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse CreateClientWithHttpInfo(Object body = default(Object), int operationIndex = 0); - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - void CreateGameServer(Object body = default(Object), int operationIndex = 0); - - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse CreateGameServerWithHttpInfo(Object body = default(Object), int operationIndex = 0); - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - void CreateGameServerCluster(Object body = default(Object), int operationIndex = 0); - - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse CreateGameServerClusterWithHttpInfo(Object body = default(Object), int operationIndex = 0); - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - void CreateGameServerClusterV1(Object body = default(Object), int operationIndex = 0); - - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse CreateGameServerClusterV1WithHttpInfo(Object body = default(Object), int operationIndex = 0); - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - void CreateGameServerV1(Object body = default(Object), int operationIndex = 0); - - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse CreateGameServerV1WithHttpInfo(Object body = default(Object), int operationIndex = 0); - /// - /// Create a new group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - void CreateGroup(Object body = default(Object), int operationIndex = 0); - - /// - /// Create a new group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse CreateGroupWithHttpInfo(Object body = default(Object), int operationIndex = 0); - /// - /// Create a new token with grant type. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// TokenResponse - TokenResponse CreateToken(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0); - - /// - /// Create a new token with grant type. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of TokenResponse - ApiResponse CreateTokenWithHttpInfo(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0); - /// - /// Create an user. - /// - /// - /// This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - void CreateUser(CreateUser createUser = default(CreateUser), int operationIndex = 0); - - /// - /// Create an user. - /// - /// - /// This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo(CreateUser createUser = default(CreateUser), int operationIndex = 0); - /// - /// Delete an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - void DeleteClient(string id, int operationIndex = 0); - - /// - /// Delete an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse DeleteClientWithHttpInfo(string id, int operationIndex = 0); - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - void DeleteGameServer(string id, int operationIndex = 0); - - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse DeleteGameServerWithHttpInfo(string id, int operationIndex = 0); - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - void DeleteGameServerCluster(string id, int operationIndex = 0); - - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse DeleteGameServerClusterWithHttpInfo(string id, int operationIndex = 0); - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - [Obsolete] - void DeleteGameServerClusterV1(string id, int operationIndex = 0); - - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse DeleteGameServerClusterV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - [Obsolete] - void DeleteGameServerV1(string id, int operationIndex = 0); - - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse DeleteGameServerV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Delete a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - void DeleteGroup(string id, int operationIndex = 0); - - /// - /// Delete a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse DeleteGroupWithHttpInfo(string id, int operationIndex = 0); - /// - /// Delete an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - void DeletePackage(string id, int operationIndex = 0); - - /// - /// Delete an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse DeletePackageWithHttpInfo(string id, int operationIndex = 0); - /// - /// Generate one or more flake ids. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// List<long> - List GenerateFlakeId(int? amount = default(int?), int operationIndex = 0); - - /// - /// Generate one or more flake ids. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<long> - ApiResponse> GenerateFlakeIdWithHttpInfo(int? amount = default(int?), int operationIndex = 0); - /// - /// Generate one or more flake ids from a timestamp. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// List<long> - List GenerateFlakeIdFromTimestamp(long timestamp, int? amount = default(int?), int operationIndex = 0); - - /// - /// Generate one or more flake ids from a timestamp. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<long> - ApiResponse> GenerateFlakeIdFromTimestampWithHttpInfo(long timestamp, int? amount = default(int?), int operationIndex = 0); - /// - /// Generate a random password. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// HashViewModel - HashViewModel GeneratePassword(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0); - - /// - /// Generate a random password. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - ApiResponse GeneratePasswordWithHttpInfo(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0); - /// - /// Generate one or more uuids with a specific version. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// List<string> - List GenerateUuid(int? version = default(int?), int? amount = default(int?), int operationIndex = 0); - - /// - /// Generate one or more uuids with a specific version. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<string> - ApiResponse> GenerateUuidWithHttpInfo(int? version = default(int?), int? amount = default(int?), int operationIndex = 0); - /// - /// Get a oauth2 client by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ModelClient - ModelClient GetClientById(string id, int operationIndex = 0); - - /// - /// Get a oauth2 client by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of ModelClient - ApiResponse GetClientByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get current client information. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ClientInfo - ClientInfo GetClientInfo(int operationIndex = 0); - - /// - /// Get current client information. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ClientInfo - ApiResponse GetClientInfoWithHttpInfo(int operationIndex = 0); - /// - /// Get a list of oauth2 clients. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<ModelClient> - List GetClients(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of oauth2 clients. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<ModelClient> - ApiResponse> GetClientsWithHttpInfo(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get current ip address location. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// List<IpAddress> - List GetCurrentIpAddress(int operationIndex = 0); - - /// - /// Get current ip address location. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of List<IpAddress> - ApiResponse> GetCurrentIpAddressWithHttpInfo(int operationIndex = 0); - /// - /// Get a game by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Game - Game GetGameById(string id, int operationIndex = 0); - - /// - /// Get a game by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Game - ApiResponse GetGameByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// GameServer - GameServer GetGameServerByAddressAndQueryPort(string address, int port, int operationIndex = 0); - - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - ApiResponse GetGameServerByAddressAndQueryPortWithHttpInfo(string address, int port, int operationIndex = 0); - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// GameServer - [Obsolete] - GameServer GetGameServerByAddressAndQueryPortV1(string address, int port, int operationIndex = 0); - - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - [Obsolete] - ApiResponse GetGameServerByAddressAndQueryPortV1WithHttpInfo(string address, int port, int operationIndex = 0); - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServer - GameServer GetGameServerById(string id, int operationIndex = 0); - - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - ApiResponse GetGameServerByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServer - [Obsolete] - GameServer GetGameServerByIdV1(string id, int operationIndex = 0); - - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - [Obsolete] - ApiResponse GetGameServerByIdV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServerCluster - GameServerCluster GetGameServerClusterById(string id, int operationIndex = 0); - - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServerCluster - ApiResponse GetGameServerClusterByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServerCluster - [Obsolete] - GameServerCluster GetGameServerClusterByIdV1(string id, int operationIndex = 0); - - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServerCluster - [Obsolete] - ApiResponse GetGameServerClusterByIdV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Object> - List GetGameServerClusterServers(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Object> - ApiResponse> GetGameServerClusterServersWithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Object> - [Obsolete] - List GetGameServerClusterServersV1(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Object> - [Obsolete] - ApiResponse> GetGameServerClusterServersV1WithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerCluster> - List GetGameServerClusters(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerCluster> - ApiResponse> GetGameServerClustersWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerCluster> - [Obsolete] - List GetGameServerClustersV1(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerCluster> - [Obsolete] - ApiResponse> GetGameServerClustersV1WithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerQuery> - List GetGameServerQueries(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerQuery> - ApiResponse> GetGameServerQueriesWithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerQuery> - [Obsolete] - List GetGameServerQueriesV1(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerQuery> - [Obsolete] - ApiResponse> GetGameServerQueriesV1WithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - List GetGameServers(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - ApiResponse> GetGameServersWithHttpInfo(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - List GetGameServersByCountry(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - ApiResponse> GetGameServersByCountryWithHttpInfo(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - [Obsolete] - List GetGameServersByCountryV1(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - [Obsolete] - ApiResponse> GetGameServersByCountryV1WithHttpInfo(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Dictionary<string, int> - Dictionary GetGameServersCountries(int operationIndex = 0); - - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Dictionary<string, int> - ApiResponse> GetGameServersCountriesWithHttpInfo(int operationIndex = 0); - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Dictionary<string, int> - [Obsolete] - Dictionary GetGameServersCountriesV1(int operationIndex = 0); - - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Dictionary<string, int> - [Obsolete] - ApiResponse> GetGameServersCountriesV1WithHttpInfo(int operationIndex = 0); - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ServerMetrics - ServerMetrics GetGameServersMetrics(int operationIndex = 0); - - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ServerMetrics - ApiResponse GetGameServersMetricsWithHttpInfo(int operationIndex = 0); - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ServerMetrics - [Obsolete] - ServerMetrics GetGameServersMetricsV1(int operationIndex = 0); - - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ServerMetrics - [Obsolete] - ApiResponse GetGameServersMetricsV1WithHttpInfo(int operationIndex = 0); - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - [Obsolete] - List GetGameServersV1(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - [Obsolete] - ApiResponse> GetGameServersV1WithHttpInfo(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of games. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Game> - List GetGames(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of games. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Game> - ApiResponse> GetGamesWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a group by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Group - Group GetGroupById(string id, int operationIndex = 0); - - /// - /// Get a group by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Group - ApiResponse GetGroupByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a group by tag. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Group - Group GetGroupByTag(string tag, int operationIndex = 0); - - /// - /// Get a group by tag. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Group - ApiResponse GetGroupByTagWithHttpInfo(string tag, int operationIndex = 0); - /// - /// Get a group by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Group - Group GetGroupByUuid(string uuid, int operationIndex = 0); - - /// - /// Get a group by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Group - ApiResponse GetGroupByUuidWithHttpInfo(string uuid, int operationIndex = 0); - /// - /// Get a list of games of a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<GroupApplication> - List GetGroupGames(string id, int operationIndex = 0); - - /// - /// Get a list of games of a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<GroupApplication> - ApiResponse> GetGroupGamesWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of members in a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<GroupMember> - List GetGroupMembers(string id, int operationIndex = 0); - - /// - /// Get a list of members in a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<GroupMember> - ApiResponse> GetGroupMembersWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of groups. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Group> - List GetGroups(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of groups. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Group> - ApiResponse> GetGroupsWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a ip address location. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// IpAddress - IpAddress GetIpAddress(string address, int operationIndex = 0); - - /// - /// Get a ip address location. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of IpAddress - ApiResponse GetIpAddressWithHttpInfo(string address, int operationIndex = 0); - /// - /// Get a list of ip addresses. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<IpAddress> - List GetIpAddresses(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of ip addresses. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<IpAddress> - ApiResponse> GetIpAddressesWithHttpInfo(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get the top 20 leaderboard users. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// List<LeaderboardItem> - List GetLeaderboard(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0); - - /// - /// Get the top 20 leaderboard users. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<LeaderboardItem> - ApiResponse> GetLeaderboardWithHttpInfo(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0); - /// - /// Get a package by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Package - Package GetPackageById(string id, int operationIndex = 0); - - /// - /// Get a package by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Package - ApiResponse GetPackageByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of packages. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Package> - List GetPackages(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of packages. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Package> - ApiResponse> GetPackagesWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a product by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Product - Product GetProductById(string id, int operationIndex = 0); - - /// - /// Get a product by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Product - ApiResponse GetProductByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of products. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Product> - List GetProducts(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of products. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Product> - ApiResponse> GetProductsWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get the public keys for the client. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// - void GetPublicKeys(int operationIndex = 0); - - /// - /// Get the public keys for the client. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse GetPublicKeysWithHttpInfo(int operationIndex = 0); - /// - /// Get a list of connected accounts of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ExternalAccount> - List GetUserAccounts(string id, int operationIndex = 0); - - /// - /// Get a list of connected accounts of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ExternalAccount> - ApiResponse> GetUserAccountsWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - List GetUserFriends(string id, int operationIndex = 0); - - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - ApiResponse> GetUserFriendsWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - [Obsolete] - List GetUserFriendsV1(string id, int operationIndex = 0); - - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - [Obsolete] - ApiResponse> GetUserFriendsV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGame> - List GetUserGames(string id, int operationIndex = 0); - - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGame> - ApiResponse> GetUserGamesWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGame> - [Obsolete] - List GetUserGamesV1(string id, int operationIndex = 0); - - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGame> - [Obsolete] - ApiResponse> GetUserGamesV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGroup> - List GetUserGroups(string id, int operationIndex = 0); - - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGroup> - ApiResponse> GetUserGroupsWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGroup> - [Obsolete] - List GetUserGroupsV1(string id, int operationIndex = 0); - - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGroup> - [Obsolete] - ApiResponse> GetUserGroupsV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get current user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// UserInfo - UserInfo GetUserInfo(int operationIndex = 0); - - /// - /// Get current user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of UserInfo - ApiResponse GetUserInfoWithHttpInfo(int operationIndex = 0); - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - Profile GetUserProfileById(string id, int operationIndex = 0); - - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - ApiResponse GetUserProfileByIdWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - [Obsolete] - Profile GetUserProfileByIdV1(string id, int operationIndex = 0); - - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - ApiResponse GetUserProfileByIdV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - Profile GetUserProfileByName(string name, int operationIndex = 0); - - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - ApiResponse GetUserProfileByNameWithHttpInfo(string name, int operationIndex = 0); - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - [Obsolete] - Profile GetUserProfileByNameV1(string name, int operationIndex = 0); - - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - ApiResponse GetUserProfileByNameV1WithHttpInfo(string name, int operationIndex = 0); - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - Profile GetUserProfileByUuid(string uuid, int operationIndex = 0); - - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - ApiResponse GetUserProfileByUuidWithHttpInfo(string uuid, int operationIndex = 0); - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - [Obsolete] - Profile GetUserProfileByUuidV1(string uuid, int operationIndex = 0); - - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - ApiResponse GetUserProfileByUuidV1WithHttpInfo(string uuid, int operationIndex = 0); - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Profile> - List GetUserProfiles(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Profile> - ApiResponse> GetUserProfilesWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Profile> - [Obsolete] - List GetUserProfilesV1(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Profile> - [Obsolete] - ApiResponse> GetUserProfilesV1WithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - List GetUserSanctions(string id, int operationIndex = 0); - - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - ApiResponse> GetUserSanctionsWithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - [Obsolete] - List GetUserSanctionsV1(string id, int operationIndex = 0); - - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - [Obsolete] - ApiResponse> GetUserSanctionsV1WithHttpInfo(string id, int operationIndex = 0); - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - List GetUserServers(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - ApiResponse> GetUserServersWithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - [Obsolete] - List GetUserServersV1(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - [Obsolete] - ApiResponse> GetUserServersV1WithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0); - /// - /// Hash a string using argon2. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - HashViewModel HashArgon2(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - - /// - /// Hash a string using argon2. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - ApiResponse HashArgon2WithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - /// - /// Hash a string using bcrypt. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - HashViewModel HashBcrypt(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - - /// - /// Hash a string using bcrypt. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - ApiResponse HashBcryptWithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - /// - /// Hash a string using md5. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - HashViewModel HashMd5(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - - /// - /// Hash a string using md5. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - ApiResponse HashMd5WithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - /// - /// Hash a string using sha256. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - HashViewModel HashSha256(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - - /// - /// Hash a string using sha256. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - ApiResponse HashSha256WithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0); - /// - /// Introspect a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// IntrospectResponse - IntrospectResponse IntrospectToken(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0); - - /// - /// Introspect a token. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of IntrospectResponse - ApiResponse IntrospectTokenWithHttpInfo(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0); - /// - /// Revoke a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - void RevokeToken(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0); - - /// - /// Revoke a token. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse RevokeTokenWithHttpInfo(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0); - /// - /// Advanced search. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// List<Object> - List Search(Search search = default(Search), int operationIndex = 0); - - /// - /// Advanced search. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<Object> - ApiResponse> SearchWithHttpInfo(Search search = default(Search), int operationIndex = 0); - /// - /// Update an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void UpdateClient(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Update an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse UpdateClientWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void UpdateGameServer(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse UpdateGameServerWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void UpdateGameServerCluster(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse UpdateGameServerClusterWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - void UpdateGameServerClusterV1(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse UpdateGameServerClusterV1WithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - void UpdateGameServerV1(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - ApiResponse UpdateGameServerV1WithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Update a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void UpdateGroup(string id, Object body = default(Object), int operationIndex = 0); - - /// - /// Update a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse UpdateGroupWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0); - /// - /// Update an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - void UpdatePackage(string id, Package package = default(Package), int operationIndex = 0); - - /// - /// Update an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - ApiResponse UpdatePackageWithHttpInfo(string id, Package package = default(Package), int operationIndex = 0); - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Profile - Profile UpdateUserProfile(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0); - - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Profile - ApiResponse UpdateUserProfileWithHttpInfo(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0); - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Profile - [Obsolete] - Profile UpdateUserProfileV1(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0); - - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - ApiResponse UpdateUserProfileV1WithHttpInfo(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITribufuGeneratedApiAsync : IApiAccessor - { - #region Asynchronous Operations - /// - /// Authorize the client to access the user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of CodeResponse - System.Threading.Tasks.Task AuthorizeAsync(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Authorize the client to access the user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CodeResponse) - System.Threading.Tasks.Task> AuthorizeWithHttpInfoAsync(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Change the email of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task ChangeEmailAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Change the email of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> ChangeEmailWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Change the password of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task ChangePasswordAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Change the password of a user. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> ChangePasswordWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task ClaimGameServerAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> ClaimGameServerWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task ClaimGameServerV1Async(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Claim a game server. - /// - /// - /// This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> ClaimGameServerV1WithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Convert a string to base64 or vice versa. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of CryptoViewModel - System.Threading.Tasks.Task ConvertBase64Async(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Convert a string to base64 or vice versa. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CryptoViewModel) - System.Threading.Tasks.Task> ConvertBase64WithHttpInfoAsync(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task CreateClientAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateClientWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task CreateGameServerAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateGameServerWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task CreateGameServerClusterAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateGameServerClusterWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task CreateGameServerClusterV1Async(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create a new game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> CreateGameServerClusterV1WithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task CreateGameServerV1Async(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create a new game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> CreateGameServerV1WithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create a new group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task CreateGroupAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create a new group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateGroupWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create a new token with grant type. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of TokenResponse - System.Threading.Tasks.Task CreateTokenAsync(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create a new token with grant type. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (TokenResponse) - System.Threading.Tasks.Task> CreateTokenWithHttpInfoAsync(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Create an user. - /// - /// - /// This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task CreateUserAsync(CreateUser createUser = default(CreateUser), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Create an user. - /// - /// - /// This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(CreateUser createUser = default(CreateUser), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteGameServerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteGameServerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteGameServerClusterAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteGameServerClusterWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task DeleteGameServerClusterV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> DeleteGameServerClusterV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task DeleteGameServerV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> DeleteGameServerV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeleteGroupAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteGroupWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Delete an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task DeletePackageAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Delete an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePackageWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Generate one or more flake ids. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<long> - System.Threading.Tasks.Task> GenerateFlakeIdAsync(int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Generate one or more flake ids. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<long>) - System.Threading.Tasks.Task>> GenerateFlakeIdWithHttpInfoAsync(int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Generate one or more flake ids from a timestamp. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<long> - System.Threading.Tasks.Task> GenerateFlakeIdFromTimestampAsync(long timestamp, int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Generate one or more flake ids from a timestamp. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<long>) - System.Threading.Tasks.Task>> GenerateFlakeIdFromTimestampWithHttpInfoAsync(long timestamp, int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Generate a random password. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - System.Threading.Tasks.Task GeneratePasswordAsync(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Generate a random password. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - System.Threading.Tasks.Task> GeneratePasswordWithHttpInfoAsync(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Generate one or more uuids with a specific version. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<string> - System.Threading.Tasks.Task> GenerateUuidAsync(int? version = default(int?), int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Generate one or more uuids with a specific version. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<string>) - System.Threading.Tasks.Task>> GenerateUuidWithHttpInfoAsync(int? version = default(int?), int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a oauth2 client by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ModelClient - System.Threading.Tasks.Task GetClientByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a oauth2 client by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> GetClientByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get current client information. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ClientInfo - System.Threading.Tasks.Task GetClientInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get current client information. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ClientInfo) - System.Threading.Tasks.Task> GetClientInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of oauth2 clients. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ModelClient> - System.Threading.Tasks.Task> GetClientsAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of oauth2 clients. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ModelClient>) - System.Threading.Tasks.Task>> GetClientsWithHttpInfoAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get current ip address location. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<IpAddress> - System.Threading.Tasks.Task> GetCurrentIpAddressAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get current ip address location. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<IpAddress>) - System.Threading.Tasks.Task>> GetCurrentIpAddressWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Game - System.Threading.Tasks.Task GetGameByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Game) - System.Threading.Tasks.Task> GetGameByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - System.Threading.Tasks.Task GetGameServerByAddressAndQueryPortAsync(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - System.Threading.Tasks.Task> GetGameServerByAddressAndQueryPortWithHttpInfoAsync(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - [Obsolete] - System.Threading.Tasks.Task GetGameServerByAddressAndQueryPortV1Async(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server by address and query port. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - [Obsolete] - System.Threading.Tasks.Task> GetGameServerByAddressAndQueryPortV1WithHttpInfoAsync(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - System.Threading.Tasks.Task GetGameServerByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - System.Threading.Tasks.Task> GetGameServerByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - [Obsolete] - System.Threading.Tasks.Task GetGameServerByIdV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - [Obsolete] - System.Threading.Tasks.Task> GetGameServerByIdV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServerCluster - System.Threading.Tasks.Task GetGameServerClusterByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServerCluster) - System.Threading.Tasks.Task> GetGameServerClusterByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServerCluster - [Obsolete] - System.Threading.Tasks.Task GetGameServerClusterByIdV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server cluster by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServerCluster) - [Obsolete] - System.Threading.Tasks.Task> GetGameServerClusterByIdV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - System.Threading.Tasks.Task> GetGameServerClusterServersAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - System.Threading.Tasks.Task>> GetGameServerClusterServersWithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - [Obsolete] - System.Threading.Tasks.Task> GetGameServerClusterServersV1Async(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game server cluster servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - [Obsolete] - System.Threading.Tasks.Task>> GetGameServerClusterServersV1WithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerCluster> - System.Threading.Tasks.Task> GetGameServerClustersAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerCluster>) - System.Threading.Tasks.Task>> GetGameServerClustersWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerCluster> - [Obsolete] - System.Threading.Tasks.Task> GetGameServerClustersV1Async(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game server clusters. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerCluster>) - [Obsolete] - System.Threading.Tasks.Task>> GetGameServerClustersV1WithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerQuery> - System.Threading.Tasks.Task> GetGameServerQueriesAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerQuery>) - System.Threading.Tasks.Task>> GetGameServerQueriesWithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerQuery> - [Obsolete] - System.Threading.Tasks.Task> GetGameServerQueriesV1Async(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a game server query history. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerQuery>) - [Obsolete] - System.Threading.Tasks.Task>> GetGameServerQueriesV1WithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - System.Threading.Tasks.Task> GetGameServersAsync(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - System.Threading.Tasks.Task>> GetGameServersWithHttpInfoAsync(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - System.Threading.Tasks.Task> GetGameServersByCountryAsync(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - System.Threading.Tasks.Task>> GetGameServersByCountryWithHttpInfoAsync(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - [Obsolete] - System.Threading.Tasks.Task> GetGameServersByCountryV1Async(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game servers from a country. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - [Obsolete] - System.Threading.Tasks.Task>> GetGameServersByCountryV1WithHttpInfoAsync(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetGameServersCountriesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetGameServersCountriesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Dictionary<string, int> - [Obsolete] - System.Threading.Tasks.Task> GetGameServersCountriesV1Async(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of countries with the number of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Dictionary<string, int>) - [Obsolete] - System.Threading.Tasks.Task>> GetGameServersCountriesV1WithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ServerMetrics - System.Threading.Tasks.Task GetGameServersMetricsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ServerMetrics) - System.Threading.Tasks.Task> GetGameServersMetricsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ServerMetrics - [Obsolete] - System.Threading.Tasks.Task GetGameServersMetricsV1Async(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get metrics about the tracked game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ServerMetrics) - [Obsolete] - System.Threading.Tasks.Task> GetGameServersMetricsV1WithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - [Obsolete] - System.Threading.Tasks.Task> GetGameServersV1Async(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of game servers. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - [Obsolete] - System.Threading.Tasks.Task>> GetGameServersV1WithHttpInfoAsync(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of games. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Game> - System.Threading.Tasks.Task> GetGamesAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of games. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Game>) - System.Threading.Tasks.Task>> GetGamesWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a group by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Group - System.Threading.Tasks.Task GetGroupByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a group by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Group) - System.Threading.Tasks.Task> GetGroupByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a group by tag. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Group - System.Threading.Tasks.Task GetGroupByTagAsync(string tag, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a group by tag. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Group) - System.Threading.Tasks.Task> GetGroupByTagWithHttpInfoAsync(string tag, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a group by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Group - System.Threading.Tasks.Task GetGroupByUuidAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a group by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Group) - System.Threading.Tasks.Task> GetGroupByUuidWithHttpInfoAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of games of a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GroupApplication> - System.Threading.Tasks.Task> GetGroupGamesAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of games of a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GroupApplication>) - System.Threading.Tasks.Task>> GetGroupGamesWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of members in a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GroupMember> - System.Threading.Tasks.Task> GetGroupMembersAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of members in a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GroupMember>) - System.Threading.Tasks.Task>> GetGroupMembersWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of groups. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Group> - System.Threading.Tasks.Task> GetGroupsAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of groups. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Group>) - System.Threading.Tasks.Task>> GetGroupsWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a ip address location. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of IpAddress - System.Threading.Tasks.Task GetIpAddressAsync(string address, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a ip address location. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IpAddress) - System.Threading.Tasks.Task> GetIpAddressWithHttpInfoAsync(string address, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of ip addresses. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<IpAddress> - System.Threading.Tasks.Task> GetIpAddressesAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of ip addresses. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<IpAddress>) - System.Threading.Tasks.Task>> GetIpAddressesWithHttpInfoAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get the top 20 leaderboard users. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<LeaderboardItem> - System.Threading.Tasks.Task> GetLeaderboardAsync(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get the top 20 leaderboard users. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<LeaderboardItem>) - System.Threading.Tasks.Task>> GetLeaderboardWithHttpInfoAsync(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a package by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Package - System.Threading.Tasks.Task GetPackageByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a package by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Package) - System.Threading.Tasks.Task> GetPackageByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of packages. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Package> - System.Threading.Tasks.Task> GetPackagesAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of packages. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Package>) - System.Threading.Tasks.Task>> GetPackagesWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a product by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Product - System.Threading.Tasks.Task GetProductByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a product by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Product) - System.Threading.Tasks.Task> GetProductByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of products. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Product> - System.Threading.Tasks.Task> GetProductsAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of products. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Product>) - System.Threading.Tasks.Task>> GetProductsWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get the public keys for the client. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task GetPublicKeysAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get the public keys for the client. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> GetPublicKeysWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of connected accounts of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ExternalAccount> - System.Threading.Tasks.Task> GetUserAccountsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of connected accounts of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ExternalAccount>) - System.Threading.Tasks.Task>> GetUserAccountsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - System.Threading.Tasks.Task> GetUserFriendsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - System.Threading.Tasks.Task>> GetUserFriendsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - [Obsolete] - System.Threading.Tasks.Task> GetUserFriendsV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of friends of the user. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - [Obsolete] - System.Threading.Tasks.Task>> GetUserFriendsV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGame> - System.Threading.Tasks.Task> GetUserGamesAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGame>) - System.Threading.Tasks.Task>> GetUserGamesWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGame> - [Obsolete] - System.Threading.Tasks.Task> GetUserGamesV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of games the user has played. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGame>) - [Obsolete] - System.Threading.Tasks.Task>> GetUserGamesV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGroup> - System.Threading.Tasks.Task> GetUserGroupsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGroup>) - System.Threading.Tasks.Task>> GetUserGroupsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGroup> - [Obsolete] - System.Threading.Tasks.Task> GetUserGroupsV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of groups the user is a member of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGroup>) - [Obsolete] - System.Threading.Tasks.Task>> GetUserGroupsV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get current user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of UserInfo - System.Threading.Tasks.Task GetUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get current user information. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserInfo) - System.Threading.Tasks.Task> GetUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - System.Threading.Tasks.Task GetUserProfileByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - System.Threading.Tasks.Task> GetUserProfileByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - System.Threading.Tasks.Task GetUserProfileByIdV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a user profile by id. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - System.Threading.Tasks.Task> GetUserProfileByIdV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - System.Threading.Tasks.Task GetUserProfileByNameAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - System.Threading.Tasks.Task> GetUserProfileByNameWithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - System.Threading.Tasks.Task GetUserProfileByNameV1Async(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a user profile by name. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - System.Threading.Tasks.Task> GetUserProfileByNameV1WithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - System.Threading.Tasks.Task GetUserProfileByUuidAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - System.Threading.Tasks.Task> GetUserProfileByUuidWithHttpInfoAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - System.Threading.Tasks.Task GetUserProfileByUuidV1Async(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a user profile by uuid. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - System.Threading.Tasks.Task> GetUserProfileByUuidV1WithHttpInfoAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Profile> - System.Threading.Tasks.Task> GetUserProfilesAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Profile>) - System.Threading.Tasks.Task>> GetUserProfilesWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Profile> - [Obsolete] - System.Threading.Tasks.Task> GetUserProfilesV1Async(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of user profiles. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Profile>) - [Obsolete] - System.Threading.Tasks.Task>> GetUserProfilesV1WithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - System.Threading.Tasks.Task> GetUserSanctionsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - System.Threading.Tasks.Task>> GetUserSanctionsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - [Obsolete] - System.Threading.Tasks.Task> GetUserSanctionsV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of sanctions the user has received. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - [Obsolete] - System.Threading.Tasks.Task>> GetUserSanctionsV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - System.Threading.Tasks.Task> GetUserServersAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - System.Threading.Tasks.Task>> GetUserServersWithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - [Obsolete] - System.Threading.Tasks.Task> GetUserServersV1Async(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Get a list of servers the user is owner of. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - [Obsolete] - System.Threading.Tasks.Task>> GetUserServersV1WithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Hash a string using argon2. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - System.Threading.Tasks.Task HashArgon2Async(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Hash a string using argon2. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - System.Threading.Tasks.Task> HashArgon2WithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Hash a string using bcrypt. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - System.Threading.Tasks.Task HashBcryptAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Hash a string using bcrypt. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - System.Threading.Tasks.Task> HashBcryptWithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Hash a string using md5. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - System.Threading.Tasks.Task HashMd5Async(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Hash a string using md5. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - System.Threading.Tasks.Task> HashMd5WithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Hash a string using sha256. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - System.Threading.Tasks.Task HashSha256Async(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Hash a string using sha256. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - System.Threading.Tasks.Task> HashSha256WithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Introspect a token. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of IntrospectResponse - System.Threading.Tasks.Task IntrospectTokenAsync(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Introspect a token. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IntrospectResponse) - System.Threading.Tasks.Task> IntrospectTokenWithHttpInfoAsync(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Revoke a token. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task RevokeTokenAsync(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Revoke a token. - /// - /// - /// - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> RevokeTokenWithHttpInfoAsync(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Advanced search. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - System.Threading.Tasks.Task> SearchAsync(Search search = default(Search), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Advanced search. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - System.Threading.Tasks.Task>> SearchWithHttpInfoAsync(Search search = default(Search), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateClientAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update an oauth2 client. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateClientWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateGameServerAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateGameServerWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateGameServerClusterAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateGameServerClusterWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task UpdateGameServerClusterV1Async(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a game server cluster. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> UpdateGameServerClusterV1WithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - System.Threading.Tasks.Task UpdateGameServerV1Async(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a game server. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - System.Threading.Tasks.Task> UpdateGameServerV1WithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdateGroupAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a group. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateGroupWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - System.Threading.Tasks.Task UpdatePackageAsync(string id, Package package = default(Package), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update an package. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePackageWithHttpInfoAsync(string id, Package package = default(Package), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - System.Threading.Tasks.Task UpdateUserProfileAsync(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - System.Threading.Tasks.Task> UpdateUserProfileWithHttpInfoAsync(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - System.Threading.Tasks.Task UpdateUserProfileV1Async(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Update a user profile. - /// - /// - /// <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - System.Threading.Tasks.Task> UpdateUserProfileV1WithHttpInfoAsync(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface ITribufuGeneratedApi : ITribufuGeneratedApiSync, ITribufuGeneratedApiAsync - { - - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class TribufuGeneratedApi : ITribufuGeneratedApi - { - private Tribufu.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public TribufuGeneratedApi() : this((string)null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// - public TribufuGeneratedApi(string basePath) - { - this.Configuration = Tribufu.Client.Configuration.MergeConfigurations( - Tribufu.Client.GlobalConfiguration.Instance, - new Tribufu.Client.Configuration { BasePath = basePath } - ); - this.Client = new Tribufu.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new Tribufu.Client.ApiClient(this.Configuration.BasePath); - this.ExceptionFactory = Tribufu.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public TribufuGeneratedApi(Tribufu.Client.Configuration configuration) - { - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Configuration = Tribufu.Client.Configuration.MergeConfigurations( - Tribufu.Client.GlobalConfiguration.Instance, - configuration - ); - this.Client = new Tribufu.Client.ApiClient(this.Configuration.BasePath); - this.AsynchronousClient = new Tribufu.Client.ApiClient(this.Configuration.BasePath); - ExceptionFactory = Tribufu.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using a Configuration object and client instance. - /// - /// The client interface for synchronous API access. - /// The client interface for asynchronous API access. - /// The configuration object. - public TribufuGeneratedApi(Tribufu.Client.ISynchronousClient client, Tribufu.Client.IAsynchronousClient asyncClient, Tribufu.Client.IReadableConfiguration configuration) - { - if (client == null) throw new ArgumentNullException("client"); - if (asyncClient == null) throw new ArgumentNullException("asyncClient"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - this.Client = client; - this.AsynchronousClient = asyncClient; - this.Configuration = configuration; - this.ExceptionFactory = Tribufu.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// The client for accessing this underlying API asynchronously. - /// - public Tribufu.Client.IAsynchronousClient AsynchronousClient { get; set; } - - /// - /// The client for accessing this underlying API synchronously. - /// - public Tribufu.Client.ISynchronousClient Client { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public string GetBasePath() - { - return this.Configuration.BasePath; - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Tribufu.Client.IReadableConfiguration Configuration { get; set; } - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public Tribufu.Client.ExceptionFactory ExceptionFactory - { - get - { - if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1) - { - throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported."); - } - return _exceptionFactory; - } - set { _exceptionFactory = value; } - } - - /// - /// Authorize the client to access the user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// CodeResponse - public CodeResponse Authorize(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = AuthorizeWithHttpInfo(authorizeRequest); - return localVarResponse.Data; - } - - /// - /// Authorize the client to access the user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of CodeResponse - public Tribufu.Client.ApiResponse AuthorizeWithHttpInfo(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = authorizeRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.Authorize"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/oauth2/authorize", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Authorize", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Authorize the client to access the user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of CodeResponse - public async System.Threading.Tasks.Task AuthorizeAsync(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await AuthorizeWithHttpInfoAsync(authorizeRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Authorize the client to access the user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.authorize</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CodeResponse) - public async System.Threading.Tasks.Task> AuthorizeWithHttpInfoAsync(AuthorizeRequest authorizeRequest = default(AuthorizeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = authorizeRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.Authorize"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/oauth2/authorize", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Authorize", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Change the email of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void ChangeEmail(string id, Object body = default(Object), int operationIndex = 0) - { - ChangeEmailWithHttpInfo(id, body); - } - - /// - /// Change the email of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse ChangeEmailWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ChangeEmail"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ChangeEmail"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/users/{id}/email", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ChangeEmail", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Change the email of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task ChangeEmailAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await ChangeEmailWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Change the email of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.email.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ChangeEmailWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ChangeEmail"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ChangeEmail"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/users/{id}/email", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ChangeEmail", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Change the password of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void ChangePassword(string id, Object body = default(Object), int operationIndex = 0) - { - ChangePasswordWithHttpInfo(id, body); - } - - /// - /// Change the password of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse ChangePasswordWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ChangePassword"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ChangePassword"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/users/{id}/password", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ChangePassword", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Change the password of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task ChangePasswordAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await ChangePasswordWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Change the password of a user. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.identity.user.password.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ChangePasswordWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ChangePassword"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json-patch+json", - "application/json", - "text/json", - "application/*+json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ChangePassword"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/users/{id}/password", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ChangePassword", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void ClaimGameServer(string id, Object body = default(Object), int operationIndex = 0) - { - ClaimGameServerWithHttpInfo(id, body); - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse ClaimGameServerWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ClaimGameServer"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ClaimGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/games/servers/{id}/claim", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ClaimGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task ClaimGameServerAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await ClaimGameServerWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> ClaimGameServerWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ClaimGameServer"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ClaimGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/games/servers/{id}/claim", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ClaimGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - public void ClaimGameServerV1(string id, Object body = default(Object), int operationIndex = 0) - { - ClaimGameServerV1WithHttpInfo(id, body); - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse ClaimGameServerV1WithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ClaimGameServerV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ClaimGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/servers/{id}/claim", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ClaimGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task ClaimGameServerV1Async(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await ClaimGameServerV1WithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Claim a game server. This endpoint is not available with an api key, only with a bearer token.<br/><br/><b>🔒 Required permissions:</b> <code>tribufu.game.server.claim</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> ClaimGameServerV1WithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->ClaimGameServerV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ClaimGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/servers/{id}/claim", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ClaimGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Convert a string to base64 or vice versa. <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// CryptoViewModel - public CryptoViewModel ConvertBase64(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = ConvertBase64WithHttpInfo(cryptoViewModel); - return localVarResponse.Data; - } - - /// - /// Convert a string to base64 or vice versa. <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of CryptoViewModel - public Tribufu.Client.ApiResponse ConvertBase64WithHttpInfo(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = cryptoViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ConvertBase64"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/utils/base64", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ConvertBase64", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Convert a string to base64 or vice versa. <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of CryptoViewModel - public async System.Threading.Tasks.Task ConvertBase64Async(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await ConvertBase64WithHttpInfoAsync(cryptoViewModel, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Convert a string to base64 or vice versa. <b>🔒 Required permissions:</b> <code>tribufu.utils.convert.base64</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (CryptoViewModel) - public async System.Threading.Tasks.Task> ConvertBase64WithHttpInfoAsync(CryptoViewModel cryptoViewModel = default(CryptoViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = cryptoViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.ConvertBase64"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/utils/base64", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("ConvertBase64", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - public void CreateClient(Object body = default(Object), int operationIndex = 0) - { - CreateClientWithHttpInfo(body); - } - - /// - /// Create an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse CreateClientWithHttpInfo(Object body = default(Object), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateClient"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/oauth2/clients", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateClient", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task CreateClientAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateClientWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateClientWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateClient"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/oauth2/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateClient", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - public void CreateGameServer(Object body = default(Object), int operationIndex = 0) - { - CreateGameServerWithHttpInfo(body); - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse CreateGameServerWithHttpInfo(Object body = default(Object), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/games/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task CreateGameServerAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateGameServerWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateGameServerWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/games/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - public void CreateGameServerCluster(Object body = default(Object), int operationIndex = 0) - { - CreateGameServerClusterWithHttpInfo(body); - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse CreateGameServerClusterWithHttpInfo(Object body = default(Object), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServerCluster"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/games/servers/clusters", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServerCluster", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task CreateGameServerClusterAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateGameServerClusterWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateGameServerClusterWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServerCluster"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/games/servers/clusters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServerCluster", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - public void CreateGameServerClusterV1(Object body = default(Object), int operationIndex = 0) - { - CreateGameServerClusterV1WithHttpInfo(body); - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse CreateGameServerClusterV1WithHttpInfo(Object body = default(Object), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServerClusterV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/clusters", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServerClusterV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task CreateGameServerClusterV1Async(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateGameServerClusterV1WithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create a new game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> CreateGameServerClusterV1WithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServerClusterV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/clusters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServerClusterV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - public void CreateGameServerV1(Object body = default(Object), int operationIndex = 0) - { - CreateGameServerV1WithHttpInfo(body); - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse CreateGameServerV1WithHttpInfo(Object body = default(Object), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task CreateGameServerV1Async(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateGameServerV1WithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create a new game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> CreateGameServerV1WithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - public void CreateGroup(Object body = default(Object), int operationIndex = 0) - { - CreateGroupWithHttpInfo(body); - } - - /// - /// Create a new group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse CreateGroupWithHttpInfo(Object body = default(Object), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/groups", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task CreateGroupAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateGroupWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create a new group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.create</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateGroupWithHttpInfoAsync(Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new token with grant type. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// TokenResponse - public TokenResponse CreateToken(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = CreateTokenWithHttpInfo(tokenRequest); - return localVarResponse.Data; - } - - /// - /// Create a new token with grant type. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of TokenResponse - public Tribufu.Client.ApiResponse CreateTokenWithHttpInfo(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = tokenRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateToken"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/oauth2/token", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create a new token with grant type. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of TokenResponse - public async System.Threading.Tasks.Task CreateTokenAsync(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await CreateTokenWithHttpInfoAsync(tokenRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Create a new token with grant type. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (TokenResponse) - public async System.Threading.Tasks.Task> CreateTokenWithHttpInfoAsync(TokenRequest tokenRequest = default(TokenRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = tokenRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateToken"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/oauth2/token", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an user. This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - public void CreateUser(CreateUser createUser = default(CreateUser), int operationIndex = 0) - { - CreateUserWithHttpInfo(createUser); - } - - /// - /// Create an user. This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse CreateUserWithHttpInfo(CreateUser createUser = default(CreateUser), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = createUser; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/users", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Create an user. This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync(CreateUser createUser = default(CreateUser), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await CreateUserWithHttpInfoAsync(createUser, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Create an user. This endpoint is only available with client credentials. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync(CreateUser createUser = default(CreateUser), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = createUser; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.CreateUser"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/users", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("CreateUser", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - public void DeleteClient(string id, int operationIndex = 0) - { - DeleteClientWithHttpInfo(id); - } - - /// - /// Delete an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse DeleteClientWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteClient"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteClient"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/oauth2/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteClient", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteClientAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeleteClientWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteClientWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteClient"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteClient"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/oauth2/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteClient", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - public void DeleteGameServer(string id, int operationIndex = 0) - { - DeleteGameServerWithHttpInfo(id); - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse DeleteGameServerWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServer"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/games/servers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteGameServerAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeleteGameServerWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteGameServerWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServer"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/games/servers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - public void DeleteGameServerCluster(string id, int operationIndex = 0) - { - DeleteGameServerClusterWithHttpInfo(id); - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse DeleteGameServerClusterWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServerCluster"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServerCluster"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/games/servers/clusters/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServerCluster", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteGameServerClusterAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeleteGameServerClusterWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteGameServerClusterWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServerCluster"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServerCluster"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/games/servers/clusters/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServerCluster", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - [Obsolete] - public void DeleteGameServerClusterV1(string id, int operationIndex = 0) - { - DeleteGameServerClusterV1WithHttpInfo(id); - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse DeleteGameServerClusterV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServerClusterV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServerClusterV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/clusters/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServerClusterV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task DeleteGameServerClusterV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeleteGameServerClusterV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> DeleteGameServerClusterV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServerClusterV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServerClusterV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/clusters/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServerClusterV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - [Obsolete] - public void DeleteGameServerV1(string id, int operationIndex = 0) - { - DeleteGameServerV1WithHttpInfo(id); - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse DeleteGameServerV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServerV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/servers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task DeleteGameServerV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeleteGameServerV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> DeleteGameServerV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGameServerV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/servers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - public void DeleteGroup(string id, int operationIndex = 0) - { - DeleteGroupWithHttpInfo(id); - } - - /// - /// Delete a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse DeleteGroupWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGroup"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/groups/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeleteGroupAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeleteGroupWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteGroupWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeleteGroup"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeleteGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/groups/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeleteGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// - public void DeletePackage(string id, int operationIndex = 0) - { - DeletePackageWithHttpInfo(id); - } - - /// - /// Delete an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse DeletePackageWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeletePackage"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeletePackage"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Delete("/v1/packages/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeletePackage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Delete an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task DeletePackageAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await DeletePackageWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Delete an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.delete</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePackageWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->DeletePackage"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.DeletePackage"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.DeleteAsync("/v1/packages/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("DeletePackage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate one or more flake ids. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// List<long> - public List GenerateFlakeId(int? amount = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GenerateFlakeIdWithHttpInfo(amount); - return localVarResponse.Data; - } - - /// - /// Generate one or more flake ids. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<long> - public Tribufu.Client.ApiResponse> GenerateFlakeIdWithHttpInfo(int? amount = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (amount != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "amount", amount)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GenerateFlakeId"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/utils/flake", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GenerateFlakeId", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate one or more flake ids. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<long> - public async System.Threading.Tasks.Task> GenerateFlakeIdAsync(int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GenerateFlakeIdWithHttpInfoAsync(amount, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Generate one or more flake ids. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<long>) - public async System.Threading.Tasks.Task>> GenerateFlakeIdWithHttpInfoAsync(int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (amount != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "amount", amount)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GenerateFlakeId"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/utils/flake", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GenerateFlakeId", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate one or more flake ids from a timestamp. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// List<long> - public List GenerateFlakeIdFromTimestamp(long timestamp, int? amount = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GenerateFlakeIdFromTimestampWithHttpInfo(timestamp, amount); - return localVarResponse.Data; - } - - /// - /// Generate one or more flake ids from a timestamp. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<long> - public Tribufu.Client.ApiResponse> GenerateFlakeIdFromTimestampWithHttpInfo(long timestamp, int? amount = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("timestamp", Tribufu.Client.ClientUtils.ParameterToString(timestamp)); // path parameter - if (amount != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "amount", amount)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GenerateFlakeIdFromTimestamp"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/utils/flake/{timestamp}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GenerateFlakeIdFromTimestamp", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate one or more flake ids from a timestamp. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<long> - public async System.Threading.Tasks.Task> GenerateFlakeIdFromTimestampAsync(long timestamp, int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GenerateFlakeIdFromTimestampWithHttpInfoAsync(timestamp, amount, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Generate one or more flake ids from a timestamp. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.flake.timestamp</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<long>) - public async System.Threading.Tasks.Task>> GenerateFlakeIdFromTimestampWithHttpInfoAsync(long timestamp, int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("timestamp", Tribufu.Client.ClientUtils.ParameterToString(timestamp)); // path parameter - if (amount != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "amount", amount)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GenerateFlakeIdFromTimestamp"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/utils/flake/{timestamp}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GenerateFlakeIdFromTimestamp", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate a random password. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// HashViewModel - public HashViewModel GeneratePassword(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GeneratePasswordWithHttpInfo(length, symbols); - return localVarResponse.Data; - } - - /// - /// Generate a random password. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - public Tribufu.Client.ApiResponse GeneratePasswordWithHttpInfo(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (length != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "length", length)); - } - if (symbols != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "symbols", symbols)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GeneratePassword"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/utils/password", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GeneratePassword", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate a random password. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - public async System.Threading.Tasks.Task GeneratePasswordAsync(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GeneratePasswordWithHttpInfoAsync(length, symbols, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Generate a random password. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.password</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - public async System.Threading.Tasks.Task> GeneratePasswordWithHttpInfoAsync(int? length = default(int?), bool? symbols = default(bool?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (length != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "length", length)); - } - if (symbols != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "symbols", symbols)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GeneratePassword"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/utils/password", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GeneratePassword", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate one or more uuids with a specific version. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// List<string> - public List GenerateUuid(int? version = default(int?), int? amount = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GenerateUuidWithHttpInfo(version, amount); - return localVarResponse.Data; - } - - /// - /// Generate one or more uuids with a specific version. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<string> - public Tribufu.Client.ApiResponse> GenerateUuidWithHttpInfo(int? version = default(int?), int? amount = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (version != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "version", version)); - } - if (amount != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "amount", amount)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GenerateUuid"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/utils/uuid", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GenerateUuid", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Generate one or more uuids with a specific version. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<string> - public async System.Threading.Tasks.Task> GenerateUuidAsync(int? version = default(int?), int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GenerateUuidWithHttpInfoAsync(version, amount, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Generate one or more uuids with a specific version. <b>🔒 Required permissions:</b> <code>tribufu.utils.generate.uuid</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<string>) - public async System.Threading.Tasks.Task>> GenerateUuidWithHttpInfoAsync(int? version = default(int?), int? amount = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (version != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "version", version)); - } - if (amount != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "amount", amount)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GenerateUuid"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/utils/uuid", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GenerateUuid", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a oauth2 client by id. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ModelClient - public ModelClient GetClientById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetClientByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a oauth2 client by id. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of ModelClient - public Tribufu.Client.ApiResponse GetClientByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetClientById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetClientById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/oauth2/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetClientById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a oauth2 client by id. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ModelClient - public async System.Threading.Tasks.Task GetClientByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetClientByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a oauth2 client by id. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> GetClientByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetClientById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetClientById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/oauth2/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetClientById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get current client information. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ClientInfo - public ClientInfo GetClientInfo(int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetClientInfoWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get current client information. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ClientInfo - public Tribufu.Client.ApiResponse GetClientInfoWithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetClientInfo"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/oauth2/clientinfo", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetClientInfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get current client information. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ClientInfo - public async System.Threading.Tasks.Task GetClientInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetClientInfoWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get current client information. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ClientInfo) - public async System.Threading.Tasks.Task> GetClientInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetClientInfo"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/oauth2/clientinfo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetClientInfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of oauth2 clients. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<ModelClient> - public List GetClients(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetClientsWithHttpInfo(organizationId, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of oauth2 clients. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<ModelClient> - public Tribufu.Client.ApiResponse> GetClientsWithHttpInfo(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (organizationId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "organization_id", organizationId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetClients"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/oauth2/clients", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetClients", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of oauth2 clients. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ModelClient> - public async System.Threading.Tasks.Task> GetClientsAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetClientsWithHttpInfoAsync(organizationId, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of oauth2 clients. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ModelClient>) - public async System.Threading.Tasks.Task>> GetClientsWithHttpInfoAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (organizationId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "organization_id", organizationId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetClients"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/oauth2/clients", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetClients", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get current ip address location. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// List<IpAddress> - public List GetCurrentIpAddress(int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetCurrentIpAddressWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get current ip address location. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of List<IpAddress> - public Tribufu.Client.ApiResponse> GetCurrentIpAddressWithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetCurrentIpAddress"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/geoip", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetCurrentIpAddress", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get current ip address location. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<IpAddress> - public async System.Threading.Tasks.Task> GetCurrentIpAddressAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetCurrentIpAddressWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get current ip address location. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<IpAddress>) - public async System.Threading.Tasks.Task>> GetCurrentIpAddressWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetCurrentIpAddress"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/geoip", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetCurrentIpAddress", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game by id. <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Game - public Game GetGameById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a game by id. <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Game - public Tribufu.Client.ApiResponse GetGameByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/games/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game by id. <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Game - public async System.Threading.Tasks.Task GetGameByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game by id. <b>🔒 Required permissions:</b> <code>tribufu.game.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Game) - public async System.Threading.Tasks.Task> GetGameByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/games/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// GameServer - public GameServer GetGameServerByAddressAndQueryPort(string address, int port, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServerByAddressAndQueryPortWithHttpInfo(address, port); - return localVarResponse.Data; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - public Tribufu.Client.ApiResponse GetGameServerByAddressAndQueryPortWithHttpInfo(string address, int port, int operationIndex = 0) - { - // verify the required parameter 'address' is set - if (address == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'address' when calling TribufuGeneratedApi->GetGameServerByAddressAndQueryPort"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("address", Tribufu.Client.ClientUtils.ParameterToString(address)); // path parameter - localVarRequestOptions.PathParameters.Add("port", Tribufu.Client.ClientUtils.ParameterToString(port)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerByAddressAndQueryPort"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/games/servers/address/{address}:{port}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerByAddressAndQueryPort", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - public async System.Threading.Tasks.Task GetGameServerByAddressAndQueryPortAsync(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServerByAddressAndQueryPortWithHttpInfoAsync(address, port, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - public async System.Threading.Tasks.Task> GetGameServerByAddressAndQueryPortWithHttpInfoAsync(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'address' is set - if (address == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'address' when calling TribufuGeneratedApi->GetGameServerByAddressAndQueryPort"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("address", Tribufu.Client.ClientUtils.ParameterToString(address)); // path parameter - localVarRequestOptions.PathParameters.Add("port", Tribufu.Client.ClientUtils.ParameterToString(port)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerByAddressAndQueryPort"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/games/servers/address/{address}:{port}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerByAddressAndQueryPort", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// GameServer - [Obsolete] - public GameServer GetGameServerByAddressAndQueryPortV1(string address, int port, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServerByAddressAndQueryPortV1WithHttpInfo(address, port); - return localVarResponse.Data; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - [Obsolete] - public Tribufu.Client.ApiResponse GetGameServerByAddressAndQueryPortV1WithHttpInfo(string address, int port, int operationIndex = 0) - { - // verify the required parameter 'address' is set - if (address == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'address' when calling TribufuGeneratedApi->GetGameServerByAddressAndQueryPortV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("address", Tribufu.Client.ClientUtils.ParameterToString(address)); // path parameter - localVarRequestOptions.PathParameters.Add("port", Tribufu.Client.ClientUtils.ParameterToString(port)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerByAddressAndQueryPortV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/servers/address/{address}:{port}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerByAddressAndQueryPortV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - [Obsolete] - public async System.Threading.Tasks.Task GetGameServerByAddressAndQueryPortV1Async(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServerByAddressAndQueryPortV1WithHttpInfoAsync(address, port, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server by address and query port. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get.address</code> - /// - /// Thrown when fails to make API call - /// - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServerByAddressAndQueryPortV1WithHttpInfoAsync(string address, int port, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'address' is set - if (address == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'address' when calling TribufuGeneratedApi->GetGameServerByAddressAndQueryPortV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("address", Tribufu.Client.ClientUtils.ParameterToString(address)); // path parameter - localVarRequestOptions.PathParameters.Add("port", Tribufu.Client.ClientUtils.ParameterToString(port)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerByAddressAndQueryPortV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/servers/address/{address}:{port}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerByAddressAndQueryPortV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServer - public GameServer GetGameServerById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServerByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - public Tribufu.Client.ApiResponse GetGameServerByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/games/servers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - public async System.Threading.Tasks.Task GetGameServerByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServerByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - public async System.Threading.Tasks.Task> GetGameServerByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/games/servers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServer - [Obsolete] - public GameServer GetGameServerByIdV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServerByIdV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServer - [Obsolete] - public Tribufu.Client.ApiResponse GetGameServerByIdV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerByIdV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerByIdV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/servers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerByIdV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServer - [Obsolete] - public async System.Threading.Tasks.Task GetGameServerByIdV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServerByIdV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServer) - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServerByIdV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerByIdV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerByIdV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/servers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerByIdV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServerCluster - public GameServerCluster GetGameServerClusterById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServerClusterByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServerCluster - public Tribufu.Client.ApiResponse GetGameServerClusterByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/games/servers/clusters/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServerCluster - public async System.Threading.Tasks.Task GetGameServerClusterByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServerClusterByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServerCluster) - public async System.Threading.Tasks.Task> GetGameServerClusterByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/games/servers/clusters/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// GameServerCluster - [Obsolete] - public GameServerCluster GetGameServerClusterByIdV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServerClusterByIdV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of GameServerCluster - [Obsolete] - public Tribufu.Client.ApiResponse GetGameServerClusterByIdV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterByIdV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterByIdV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/clusters/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterByIdV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of GameServerCluster - [Obsolete] - public async System.Threading.Tasks.Task GetGameServerClusterByIdV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServerClusterByIdV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server cluster by id. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (GameServerCluster) - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServerClusterByIdV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterByIdV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterByIdV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/clusters/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterByIdV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Object> - public List GetGameServerClusterServers(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServerClusterServersWithHttpInfo(id, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Object> - public Tribufu.Client.ApiResponse> GetGameServerClusterServersWithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterServers"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterServers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games/servers/clusters/{id}/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterServers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - public async System.Threading.Tasks.Task> GetGameServerClusterServersAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServerClusterServersWithHttpInfoAsync(id, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - public async System.Threading.Tasks.Task>> GetGameServerClusterServersWithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterServers"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterServers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games/servers/clusters/{id}/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterServers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Object> - [Obsolete] - public List GetGameServerClusterServersV1(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServerClusterServersV1WithHttpInfo(id, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Object> - [Obsolete] - public Tribufu.Client.ApiResponse> GetGameServerClusterServersV1WithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterServersV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterServersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/clusters/{id}/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterServersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServerClusterServersV1Async(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServerClusterServersV1WithHttpInfoAsync(id, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game server cluster servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetGameServerClusterServersV1WithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerClusterServersV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusterServersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/clusters/{id}/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusterServersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerCluster> - public List GetGameServerClusters(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServerClustersWithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerCluster> - public Tribufu.Client.ApiResponse> GetGameServerClustersWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusters"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games/servers/clusters", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusters", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerCluster> - public async System.Threading.Tasks.Task> GetGameServerClustersAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServerClustersWithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerCluster>) - public async System.Threading.Tasks.Task>> GetGameServerClustersWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClusters"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games/servers/clusters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClusters", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerCluster> - [Obsolete] - public List GetGameServerClustersV1(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServerClustersV1WithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerCluster> - [Obsolete] - public Tribufu.Client.ApiResponse> GetGameServerClustersV1WithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClustersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/clusters", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClustersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerCluster> - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServerClustersV1Async(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServerClustersV1WithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game server clusters. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerCluster>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetGameServerClustersV1WithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerClustersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/clusters", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerClustersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerQuery> - public List GetGameServerQueries(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServerQueriesWithHttpInfo(id, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerQuery> - public Tribufu.Client.ApiResponse> GetGameServerQueriesWithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerQueries"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerQueries"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games/servers/{id}/queries", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerQueries", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerQuery> - public async System.Threading.Tasks.Task> GetGameServerQueriesAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServerQueriesWithHttpInfoAsync(id, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerQuery>) - public async System.Threading.Tasks.Task>> GetGameServerQueriesWithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerQueries"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerQueries"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games/servers/{id}/queries", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerQueries", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServerQuery> - [Obsolete] - public List GetGameServerQueriesV1(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServerQueriesV1WithHttpInfo(id, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServerQuery> - [Obsolete] - public Tribufu.Client.ApiResponse> GetGameServerQueriesV1WithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerQueriesV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerQueriesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/servers/{id}/queries", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerQueriesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServerQuery> - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServerQueriesV1Async(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServerQueriesV1WithHttpInfoAsync(id, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a game server query history. <b>🔒 Required permissions:</b> <code>tribufu.game.server.queries</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServerQuery>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetGameServerQueriesV1WithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGameServerQueriesV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServerQueriesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/servers/{id}/queries", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServerQueriesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - public List GetGameServers(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServersWithHttpInfo(address, queryPort, country, gameId, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - public Tribufu.Client.ApiResponse> GetGameServersWithHttpInfo(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (address != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "address", address)); - } - if (queryPort != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "query_port", queryPort)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (gameId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "game_id", gameId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - public async System.Threading.Tasks.Task> GetGameServersAsync(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServersWithHttpInfoAsync(address, queryPort, country, gameId, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - public async System.Threading.Tasks.Task>> GetGameServersWithHttpInfoAsync(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (address != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "address", address)); - } - if (queryPort != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "query_port", queryPort)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (gameId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "game_id", gameId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - public List GetGameServersByCountry(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServersByCountryWithHttpInfo(country, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - public Tribufu.Client.ApiResponse> GetGameServersByCountryWithHttpInfo(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'country' is set - if (country == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'country' when calling TribufuGeneratedApi->GetGameServersByCountry"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("country", Tribufu.Client.ClientUtils.ParameterToString(country)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersByCountry"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games/servers/country/{country}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersByCountry", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - public async System.Threading.Tasks.Task> GetGameServersByCountryAsync(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServersByCountryWithHttpInfoAsync(country, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - public async System.Threading.Tasks.Task>> GetGameServersByCountryWithHttpInfoAsync(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'country' is set - if (country == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'country' when calling TribufuGeneratedApi->GetGameServersByCountry"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("country", Tribufu.Client.ClientUtils.ParameterToString(country)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersByCountry"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games/servers/country/{country}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersByCountry", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - [Obsolete] - public List GetGameServersByCountryV1(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServersByCountryV1WithHttpInfo(country, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - [Obsolete] - public Tribufu.Client.ApiResponse> GetGameServersByCountryV1WithHttpInfo(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'country' is set - if (country == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'country' when calling TribufuGeneratedApi->GetGameServersByCountryV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("country", Tribufu.Client.ClientUtils.ParameterToString(country)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersByCountryV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/servers/country/{country}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersByCountryV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServersByCountryV1Async(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServersByCountryV1WithHttpInfoAsync(country, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers from a country. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list.country</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetGameServersByCountryV1WithHttpInfoAsync(string country, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'country' is set - if (country == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'country' when calling TribufuGeneratedApi->GetGameServersByCountryV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("country", Tribufu.Client.ClientUtils.ParameterToString(country)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersByCountryV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/servers/country/{country}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersByCountryV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Dictionary<string, int> - public Dictionary GetGameServersCountries(int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServersCountriesWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Dictionary<string, int> - public Tribufu.Client.ApiResponse> GetGameServersCountriesWithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersCountries"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games/servers/countries", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersCountries", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetGameServersCountriesAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServersCountriesWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetGameServersCountriesWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersCountries"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games/servers/countries", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersCountries", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Dictionary<string, int> - [Obsolete] - public Dictionary GetGameServersCountriesV1(int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServersCountriesV1WithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Dictionary<string, int> - [Obsolete] - public Tribufu.Client.ApiResponse> GetGameServersCountriesV1WithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersCountriesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/servers/countries", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersCountriesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Dictionary<string, int> - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServersCountriesV1Async(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServersCountriesV1WithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of countries with the number of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.country.list</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Dictionary<string, int>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetGameServersCountriesV1WithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersCountriesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/servers/countries", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersCountriesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ServerMetrics - public ServerMetrics GetGameServersMetrics(int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServersMetricsWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ServerMetrics - public Tribufu.Client.ApiResponse GetGameServersMetricsWithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersMetrics"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/games/servers/metrics", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersMetrics", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ServerMetrics - public async System.Threading.Tasks.Task GetGameServersMetricsAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServersMetricsWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ServerMetrics) - public async System.Threading.Tasks.Task> GetGameServersMetricsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersMetrics"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/games/servers/metrics", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersMetrics", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ServerMetrics - [Obsolete] - public ServerMetrics GetGameServersMetricsV1(int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGameServersMetricsV1WithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of ServerMetrics - [Obsolete] - public Tribufu.Client.ApiResponse GetGameServersMetricsV1WithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersMetricsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/servers/metrics", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersMetricsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ServerMetrics - [Obsolete] - public async System.Threading.Tasks.Task GetGameServersMetricsV1Async(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGameServersMetricsV1WithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get metrics about the tracked game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.metric.get</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (ServerMetrics) - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServersMetricsV1WithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersMetricsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/servers/metrics", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersMetricsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - [Obsolete] - public List GetGameServersV1(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGameServersV1WithHttpInfo(address, queryPort, country, gameId, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - [Obsolete] - public Tribufu.Client.ApiResponse> GetGameServersV1WithHttpInfo(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (address != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "address", address)); - } - if (queryPort != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "query_port", queryPort)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (gameId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "game_id", gameId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - [Obsolete] - public async System.Threading.Tasks.Task> GetGameServersV1Async(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGameServersV1WithHttpInfoAsync(address, queryPort, country, gameId, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of game servers. <b>🔒 Required permissions:</b> <code>tribufu.game.server.list</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// (optional) - /// (optional) - /// (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetGameServersV1WithHttpInfoAsync(string address = default(string), int? queryPort = default(int?), string country = default(string), string gameId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (address != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "address", address)); - } - if (queryPort != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "query_port", queryPort)); - } - if (country != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "country", country)); - } - if (gameId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "game_id", gameId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGameServersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGameServersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games. <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Game> - public List GetGames(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGamesWithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of games. <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Game> - public Tribufu.Client.ApiResponse> GetGamesWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGames"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/games", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGames", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games. <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Game> - public async System.Threading.Tasks.Task> GetGamesAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGamesWithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of games. <b>🔒 Required permissions:</b> <code>tribufu.game.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Game>) - public async System.Threading.Tasks.Task>> GetGamesWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGames"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/games", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGames", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a group by id. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Group - public Group GetGroupById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGroupByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a group by id. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Group - public Tribufu.Client.ApiResponse GetGroupByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGroupById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/groups/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a group by id. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Group - public async System.Threading.Tasks.Task GetGroupByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGroupByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a group by id. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Group) - public async System.Threading.Tasks.Task> GetGroupByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGroupById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/groups/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a group by tag. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Group - public Group GetGroupByTag(string tag, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGroupByTagWithHttpInfo(tag); - return localVarResponse.Data; - } - - /// - /// Get a group by tag. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Group - public Tribufu.Client.ApiResponse GetGroupByTagWithHttpInfo(string tag, int operationIndex = 0) - { - // verify the required parameter 'tag' is set - if (tag == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'tag' when calling TribufuGeneratedApi->GetGroupByTag"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("tag", Tribufu.Client.ClientUtils.ParameterToString(tag)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupByTag"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/groups/tag/{tag}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupByTag", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a group by tag. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Group - public async System.Threading.Tasks.Task GetGroupByTagAsync(string tag, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGroupByTagWithHttpInfoAsync(tag, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a group by tag. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.tag</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Group) - public async System.Threading.Tasks.Task> GetGroupByTagWithHttpInfoAsync(string tag, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'tag' is set - if (tag == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'tag' when calling TribufuGeneratedApi->GetGroupByTag"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("tag", Tribufu.Client.ClientUtils.ParameterToString(tag)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupByTag"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/groups/tag/{tag}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupByTag", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a group by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Group - public Group GetGroupByUuid(string uuid, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetGroupByUuidWithHttpInfo(uuid); - return localVarResponse.Data; - } - - /// - /// Get a group by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Group - public Tribufu.Client.ApiResponse GetGroupByUuidWithHttpInfo(string uuid, int operationIndex = 0) - { - // verify the required parameter 'uuid' is set - if (uuid == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'uuid' when calling TribufuGeneratedApi->GetGroupByUuid"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("uuid", Tribufu.Client.ClientUtils.ParameterToString(uuid)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupByUuid"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/groups/uuid/{uuid}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupByUuid", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a group by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Group - public async System.Threading.Tasks.Task GetGroupByUuidAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetGroupByUuidWithHttpInfoAsync(uuid, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a group by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.group.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Group) - public async System.Threading.Tasks.Task> GetGroupByUuidWithHttpInfoAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'uuid' is set - if (uuid == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'uuid' when calling TribufuGeneratedApi->GetGroupByUuid"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("uuid", Tribufu.Client.ClientUtils.ParameterToString(uuid)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupByUuid"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/groups/uuid/{uuid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupByUuid", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games of a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<GroupApplication> - public List GetGroupGames(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGroupGamesWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of games of a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<GroupApplication> - public Tribufu.Client.ApiResponse> GetGroupGamesWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGroupGames"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupGames"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/groups/{id}/games", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupGames", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games of a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GroupApplication> - public async System.Threading.Tasks.Task> GetGroupGamesAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGroupGamesWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of games of a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GroupApplication>) - public async System.Threading.Tasks.Task>> GetGroupGamesWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGroupGames"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupGames"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/groups/{id}/games", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupGames", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of members in a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<GroupMember> - public List GetGroupMembers(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGroupMembersWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of members in a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<GroupMember> - public Tribufu.Client.ApiResponse> GetGroupMembersWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGroupMembers"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "text/plain", - "application/json", - "text/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupMembers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/groups/{id}/members", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupMembers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of members in a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GroupMember> - public async System.Threading.Tasks.Task> GetGroupMembersAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGroupMembersWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of members in a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.member.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GroupMember>) - public async System.Threading.Tasks.Task>> GetGroupMembersWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetGroupMembers"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "text/plain", - "application/json", - "text/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroupMembers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/groups/{id}/members", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroupMembers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of groups. <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Group> - public List GetGroups(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetGroupsWithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of groups. <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Group> - public Tribufu.Client.ApiResponse> GetGroupsWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroups"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/groups", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroups", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of groups. <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Group> - public async System.Threading.Tasks.Task> GetGroupsAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetGroupsWithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of groups. <b>🔒 Required permissions:</b> <code>tribufu.community.group.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Group>) - public async System.Threading.Tasks.Task>> GetGroupsWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetGroups"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetGroups", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a ip address location. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// IpAddress - public IpAddress GetIpAddress(string address, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetIpAddressWithHttpInfo(address); - return localVarResponse.Data; - } - - /// - /// Get a ip address location. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of IpAddress - public Tribufu.Client.ApiResponse GetIpAddressWithHttpInfo(string address, int operationIndex = 0) - { - // verify the required parameter 'address' is set - if (address == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'address' when calling TribufuGeneratedApi->GetIpAddress"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("address", Tribufu.Client.ClientUtils.ParameterToString(address)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetIpAddress"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/geoip/addresses/{address}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetIpAddress", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a ip address location. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of IpAddress - public async System.Threading.Tasks.Task GetIpAddressAsync(string address, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetIpAddressWithHttpInfoAsync(address, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a ip address location. - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IpAddress) - public async System.Threading.Tasks.Task> GetIpAddressWithHttpInfoAsync(string address, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'address' is set - if (address == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'address' when calling TribufuGeneratedApi->GetIpAddress"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("address", Tribufu.Client.ClientUtils.ParameterToString(address)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetIpAddress"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/geoip/addresses/{address}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetIpAddress", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of ip addresses. <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<IpAddress> - public List GetIpAddresses(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetIpAddressesWithHttpInfo(organizationId, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of ip addresses. <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<IpAddress> - public Tribufu.Client.ApiResponse> GetIpAddressesWithHttpInfo(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (organizationId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "organization_id", organizationId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetIpAddresses"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/geoip/addresses", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetIpAddresses", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of ip addresses. <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<IpAddress> - public async System.Threading.Tasks.Task> GetIpAddressesAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetIpAddressesWithHttpInfoAsync(organizationId, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of ip addresses. <b>🔒 Required permissions:</b> <code>tribufu.geoip.address.list</code> - /// - /// Thrown when fails to make API call - /// Filters results by organization, defaults to all organizations the user belongs to. (optional) - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<IpAddress>) - public async System.Threading.Tasks.Task>> GetIpAddressesWithHttpInfoAsync(string organizationId = default(string), int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (organizationId != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "organization_id", organizationId)); - } - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetIpAddresses"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/geoip/addresses", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetIpAddresses", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get the top 20 leaderboard users. <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// List<LeaderboardItem> - public List GetLeaderboard(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetLeaderboardWithHttpInfo(order); - return localVarResponse.Data; - } - - /// - /// Get the top 20 leaderboard users. <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<LeaderboardItem> - public Tribufu.Client.ApiResponse> GetLeaderboardWithHttpInfo(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (order != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "Order", order)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetLeaderboard"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/leaderboard", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetLeaderboard", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get the top 20 leaderboard users. <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<LeaderboardItem> - public async System.Threading.Tasks.Task> GetLeaderboardAsync(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetLeaderboardWithHttpInfoAsync(order, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get the top 20 leaderboard users. <b>🔒 Required permissions:</b> <code>tribufu.community.leaderboard.get</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<LeaderboardItem>) - public async System.Threading.Tasks.Task>> GetLeaderboardWithHttpInfoAsync(LeaderboardOrder? order = default(LeaderboardOrder?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (order != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "Order", order)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetLeaderboard"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/leaderboard", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetLeaderboard", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a package by id. <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Package - public Package GetPackageById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetPackageByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a package by id. <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Package - public Tribufu.Client.ApiResponse GetPackageByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetPackageById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetPackageById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/packages/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetPackageById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a package by id. <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Package - public async System.Threading.Tasks.Task GetPackageByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetPackageByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a package by id. <b>🔒 Required permissions:</b> <code>tribufu.community.package.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Package) - public async System.Threading.Tasks.Task> GetPackageByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetPackageById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetPackageById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/packages/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetPackageById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of packages. <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Package> - public List GetPackages(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetPackagesWithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of packages. <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Package> - public Tribufu.Client.ApiResponse> GetPackagesWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetPackages"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/packages", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetPackages", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of packages. <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Package> - public async System.Threading.Tasks.Task> GetPackagesAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetPackagesWithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of packages. <b>🔒 Required permissions:</b> <code>tribufu.community.package.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Package>) - public async System.Threading.Tasks.Task>> GetPackagesWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetPackages"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/packages", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetPackages", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a product by id. <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Product - public Product GetProductById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetProductByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a product by id. <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Product - public Tribufu.Client.ApiResponse GetProductByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetProductById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetProductById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/products/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetProductById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a product by id. <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Product - public async System.Threading.Tasks.Task GetProductByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetProductByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a product by id. <b>🔒 Required permissions:</b> <code>tribufu.store.product.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Product) - public async System.Threading.Tasks.Task> GetProductByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetProductById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetProductById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/products/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetProductById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of products. <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Product> - public List GetProducts(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetProductsWithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of products. <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Product> - public Tribufu.Client.ApiResponse> GetProductsWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetProducts"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/products", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetProducts", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of products. <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Product> - public async System.Threading.Tasks.Task> GetProductsAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetProductsWithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of products. <b>🔒 Required permissions:</b> <code>tribufu.store.product.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Product>) - public async System.Threading.Tasks.Task>> GetProductsWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetProducts"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/products", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetProducts", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get the public keys for the client. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// - public void GetPublicKeys(int operationIndex = 0) - { - GetPublicKeysWithHttpInfo(); - } - - /// - /// Get the public keys for the client. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse GetPublicKeysWithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetPublicKeys"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/oauth2/jwks", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetPublicKeys", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get the public keys for the client. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task GetPublicKeysAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await GetPublicKeysWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Get the public keys for the client. - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> GetPublicKeysWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetPublicKeys"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/oauth2/jwks", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetPublicKeys", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of connected accounts of the user. <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ExternalAccount> - public List GetUserAccounts(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserAccountsWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of connected accounts of the user. <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ExternalAccount> - public Tribufu.Client.ApiResponse> GetUserAccountsWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserAccounts"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserAccounts"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users/{id}/accounts", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserAccounts", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of connected accounts of the user. <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ExternalAccount> - public async System.Threading.Tasks.Task> GetUserAccountsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserAccountsWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of connected accounts of the user. <b>🔒 Required permissions:</b> <code>tribufu.identity.user.account.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ExternalAccount>) - public async System.Threading.Tasks.Task>> GetUserAccountsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserAccounts"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserAccounts"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users/{id}/accounts", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserAccounts", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - public List GetUserFriends(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserFriendsWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - public Tribufu.Client.ApiResponse> GetUserFriendsWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserFriends"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserFriends"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/profiles/{id}/friends", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserFriends", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - public async System.Threading.Tasks.Task> GetUserFriendsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserFriendsWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - public async System.Threading.Tasks.Task>> GetUserFriendsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserFriends"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserFriends"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/profiles/{id}/friends", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserFriends", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - [Obsolete] - public List GetUserFriendsV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserFriendsV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - [Obsolete] - public Tribufu.Client.ApiResponse> GetUserFriendsV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserFriendsV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserFriendsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users/{id}/friends", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserFriendsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - [Obsolete] - public async System.Threading.Tasks.Task> GetUserFriendsV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserFriendsV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of friends of the user. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.friend.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetUserFriendsV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserFriendsV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserFriendsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users/{id}/friends", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserFriendsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGame> - public List GetUserGames(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserGamesWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGame> - public Tribufu.Client.ApiResponse> GetUserGamesWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGames"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGames"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/profiles/{id}/games", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGames", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGame> - public async System.Threading.Tasks.Task> GetUserGamesAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserGamesWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGame>) - public async System.Threading.Tasks.Task>> GetUserGamesWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGames"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGames"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/profiles/{id}/games", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGames", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGame> - [Obsolete] - public List GetUserGamesV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserGamesV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGame> - [Obsolete] - public Tribufu.Client.ApiResponse> GetUserGamesV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGamesV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGamesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users/{id}/games", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGamesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGame> - [Obsolete] - public async System.Threading.Tasks.Task> GetUserGamesV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserGamesV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of games the user has played. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGame>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetUserGamesV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGamesV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGamesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users/{id}/games", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGamesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGroup> - public List GetUserGroups(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserGroupsWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGroup> - public Tribufu.Client.ApiResponse> GetUserGroupsWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGroups"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGroups"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/profiles/{id}/groups", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGroups", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGroup> - public async System.Threading.Tasks.Task> GetUserGroupsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserGroupsWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGroup>) - public async System.Threading.Tasks.Task>> GetUserGroupsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGroups"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGroups"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/profiles/{id}/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGroups", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<ProfileGroup> - [Obsolete] - public List GetUserGroupsV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserGroupsV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<ProfileGroup> - [Obsolete] - public Tribufu.Client.ApiResponse> GetUserGroupsV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGroupsV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGroupsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users/{id}/groups", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGroupsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<ProfileGroup> - [Obsolete] - public async System.Threading.Tasks.Task> GetUserGroupsV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserGroupsV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of groups the user is a member of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.group.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<ProfileGroup>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetUserGroupsV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserGroupsV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserGroupsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users/{id}/groups", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserGroupsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get current user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// UserInfo - public UserInfo GetUserInfo(int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserInfoWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Get current user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// ApiResponse of UserInfo - public Tribufu.Client.ApiResponse GetUserInfoWithHttpInfo(int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserInfo"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/oauth2/userinfo", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserInfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get current user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of UserInfo - public async System.Threading.Tasks.Task GetUserInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserInfoWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get current user information. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.user.info</code> - /// - /// Thrown when fails to make API call - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (UserInfo) - public async System.Threading.Tasks.Task> GetUserInfoWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserInfo"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/oauth2/userinfo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserInfo", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - public Profile GetUserProfileById(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserProfileByIdWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - public Tribufu.Client.ApiResponse GetUserProfileByIdWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserProfileById"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/profiles/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - public async System.Threading.Tasks.Task GetUserProfileByIdAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserProfileByIdWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - public async System.Threading.Tasks.Task> GetUserProfileByIdWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserProfileById"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileById"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/profiles/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileById", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - [Obsolete] - public Profile GetUserProfileByIdV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserProfileByIdV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - public Tribufu.Client.ApiResponse GetUserProfileByIdV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserProfileByIdV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByIdV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/users/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByIdV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - public async System.Threading.Tasks.Task GetUserProfileByIdV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserProfileByIdV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a user profile by id. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - public async System.Threading.Tasks.Task> GetUserProfileByIdV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserProfileByIdV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByIdV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/users/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByIdV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - public Profile GetUserProfileByName(string name, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserProfileByNameWithHttpInfo(name); - return localVarResponse.Data; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - public Tribufu.Client.ApiResponse GetUserProfileByNameWithHttpInfo(string name, int operationIndex = 0) - { - // verify the required parameter 'name' is set - if (name == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'name' when calling TribufuGeneratedApi->GetUserProfileByName"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("name", Tribufu.Client.ClientUtils.ParameterToString(name)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByName"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/profiles/name/{name}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByName", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - public async System.Threading.Tasks.Task GetUserProfileByNameAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserProfileByNameWithHttpInfoAsync(name, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - public async System.Threading.Tasks.Task> GetUserProfileByNameWithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'name' is set - if (name == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'name' when calling TribufuGeneratedApi->GetUserProfileByName"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("name", Tribufu.Client.ClientUtils.ParameterToString(name)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByName"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/profiles/name/{name}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByName", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - [Obsolete] - public Profile GetUserProfileByNameV1(string name, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserProfileByNameV1WithHttpInfo(name); - return localVarResponse.Data; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - public Tribufu.Client.ApiResponse GetUserProfileByNameV1WithHttpInfo(string name, int operationIndex = 0) - { - // verify the required parameter 'name' is set - if (name == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'name' when calling TribufuGeneratedApi->GetUserProfileByNameV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("name", Tribufu.Client.ClientUtils.ParameterToString(name)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByNameV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/users/name/{name}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByNameV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - public async System.Threading.Tasks.Task GetUserProfileByNameV1Async(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserProfileByNameV1WithHttpInfoAsync(name, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a user profile by name. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.name</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - public async System.Threading.Tasks.Task> GetUserProfileByNameV1WithHttpInfoAsync(string name, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'name' is set - if (name == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'name' when calling TribufuGeneratedApi->GetUserProfileByNameV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("name", Tribufu.Client.ClientUtils.ParameterToString(name)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByNameV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/users/name/{name}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByNameV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - public Profile GetUserProfileByUuid(string uuid, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserProfileByUuidWithHttpInfo(uuid); - return localVarResponse.Data; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - public Tribufu.Client.ApiResponse GetUserProfileByUuidWithHttpInfo(string uuid, int operationIndex = 0) - { - // verify the required parameter 'uuid' is set - if (uuid == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'uuid' when calling TribufuGeneratedApi->GetUserProfileByUuid"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("uuid", Tribufu.Client.ClientUtils.ParameterToString(uuid)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByUuid"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/profiles/uuid/{uuid}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByUuid", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - public async System.Threading.Tasks.Task GetUserProfileByUuidAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserProfileByUuidWithHttpInfoAsync(uuid, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - public async System.Threading.Tasks.Task> GetUserProfileByUuidWithHttpInfoAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'uuid' is set - if (uuid == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'uuid' when calling TribufuGeneratedApi->GetUserProfileByUuid"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("uuid", Tribufu.Client.ClientUtils.ParameterToString(uuid)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByUuid"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/profiles/uuid/{uuid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByUuid", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Profile - [Obsolete] - public Profile GetUserProfileByUuidV1(string uuid, int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = GetUserProfileByUuidV1WithHttpInfo(uuid); - return localVarResponse.Data; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - public Tribufu.Client.ApiResponse GetUserProfileByUuidV1WithHttpInfo(string uuid, int operationIndex = 0) - { - // verify the required parameter 'uuid' is set - if (uuid == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'uuid' when calling TribufuGeneratedApi->GetUserProfileByUuidV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("uuid", Tribufu.Client.ClientUtils.ParameterToString(uuid)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByUuidV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get("/v1/users/uuid/{uuid}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByUuidV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - public async System.Threading.Tasks.Task GetUserProfileByUuidV1Async(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await GetUserProfileByUuidV1WithHttpInfoAsync(uuid, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a user profile by uuid. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.get.uuid</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - public async System.Threading.Tasks.Task> GetUserProfileByUuidV1WithHttpInfoAsync(string uuid, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'uuid' is set - if (uuid == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'uuid' when calling TribufuGeneratedApi->GetUserProfileByUuidV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("uuid", Tribufu.Client.ClientUtils.ParameterToString(uuid)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfileByUuidV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync("/v1/users/uuid/{uuid}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfileByUuidV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Profile> - public List GetUserProfiles(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserProfilesWithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Profile> - public Tribufu.Client.ApiResponse> GetUserProfilesWithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfiles"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/profiles", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfiles", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Profile> - public async System.Threading.Tasks.Task> GetUserProfilesAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserProfilesWithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Profile>) - public async System.Threading.Tasks.Task>> GetUserProfilesWithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfiles"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/profiles", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfiles", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<Profile> - [Obsolete] - public List GetUserProfilesV1(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserProfilesV1WithHttpInfo(page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<Profile> - [Obsolete] - public Tribufu.Client.ApiResponse> GetUserProfilesV1WithHttpInfo(int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfilesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfilesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Profile> - [Obsolete] - public async System.Threading.Tasks.Task> GetUserProfilesV1Async(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserProfilesV1WithHttpInfoAsync(page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of user profiles. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.list</code> - /// - /// Thrown when fails to make API call - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Profile>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetUserProfilesV1WithHttpInfoAsync(int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserProfilesV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserProfilesV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - public List GetUserSanctions(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserSanctionsWithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - public Tribufu.Client.ApiResponse> GetUserSanctionsWithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserSanctions"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserSanctions"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/profiles/{id}/sanctions", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserSanctions", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - public async System.Threading.Tasks.Task> GetUserSanctionsAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserSanctionsWithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - public async System.Threading.Tasks.Task>> GetUserSanctionsWithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserSanctions"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserSanctions"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/profiles/{id}/sanctions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserSanctions", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// List<Object> - [Obsolete] - public List GetUserSanctionsV1(string id, int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserSanctionsV1WithHttpInfo(id); - return localVarResponse.Data; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// ApiResponse of List<Object> - [Obsolete] - public Tribufu.Client.ApiResponse> GetUserSanctionsV1WithHttpInfo(string id, int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserSanctionsV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserSanctionsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users/{id}/sanctions", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserSanctionsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - [Obsolete] - public async System.Threading.Tasks.Task> GetUserSanctionsV1Async(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserSanctionsV1WithHttpInfoAsync(id, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of sanctions the user has received. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.sanction.list</code> - /// - /// Thrown when fails to make API call - /// - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetUserSanctionsV1WithHttpInfoAsync(string id, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserSanctionsV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserSanctionsV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users/{id}/sanctions", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserSanctionsV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - public List GetUserServers(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserServersWithHttpInfo(id, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - public Tribufu.Client.ApiResponse> GetUserServersWithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserServers"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserServers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/profiles/{id}/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserServers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - public async System.Threading.Tasks.Task> GetUserServersAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserServersWithHttpInfoAsync(id, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - public async System.Threading.Tasks.Task>> GetUserServersWithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserServers"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserServers"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/profiles/{id}/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserServers", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// List<GameServer> - [Obsolete] - public List GetUserServersV1(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = GetUserServersV1WithHttpInfo(id, page, limit); - return localVarResponse.Data; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// ApiResponse of List<GameServer> - [Obsolete] - public Tribufu.Client.ApiResponse> GetUserServersV1WithHttpInfo(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserServersV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserServersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Get>("/v1/users/{id}/servers", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserServersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<GameServer> - [Obsolete] - public async System.Threading.Tasks.Task> GetUserServersV1Async(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await GetUserServersV1WithHttpInfoAsync(id, page, limit, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Get a list of servers the user is owner of. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.game.server.list</code> - /// - /// Thrown when fails to make API call - /// - /// The page number of the results to retrieve. Defaults to 1. (optional) - /// The maximum number of items to return per page. Defaults to the defined pagination limit. (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<GameServer>) - [Obsolete] - public async System.Threading.Tasks.Task>> GetUserServersV1WithHttpInfoAsync(string id, int? page = default(int?), int? limit = default(int?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->GetUserServersV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - if (page != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "page", page)); - } - if (limit != null) - { - localVarRequestOptions.QueryParameters.Add(Tribufu.Client.ClientUtils.ParameterToMultiMap("", "limit", limit)); - } - - localVarRequestOptions.Operation = "TribufuGeneratedApi.GetUserServersV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.GetAsync>("/v1/users/{id}/servers", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("GetUserServersV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using argon2. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - public HashViewModel HashArgon2(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = HashArgon2WithHttpInfo(hashViewModel); - return localVarResponse.Data; - } - - /// - /// Hash a string using argon2. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - public Tribufu.Client.ApiResponse HashArgon2WithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashArgon2"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/utils/argon2", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashArgon2", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using argon2. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - public async System.Threading.Tasks.Task HashArgon2Async(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await HashArgon2WithHttpInfoAsync(hashViewModel, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Hash a string using argon2. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.argon2</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - public async System.Threading.Tasks.Task> HashArgon2WithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashArgon2"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/utils/argon2", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashArgon2", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using bcrypt. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - public HashViewModel HashBcrypt(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = HashBcryptWithHttpInfo(hashViewModel); - return localVarResponse.Data; - } - - /// - /// Hash a string using bcrypt. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - public Tribufu.Client.ApiResponse HashBcryptWithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashBcrypt"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/utils/bcrypt", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashBcrypt", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using bcrypt. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - public async System.Threading.Tasks.Task HashBcryptAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await HashBcryptWithHttpInfoAsync(hashViewModel, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Hash a string using bcrypt. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.bcrypt</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - public async System.Threading.Tasks.Task> HashBcryptWithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashBcrypt"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/utils/bcrypt", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashBcrypt", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using md5. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - public HashViewModel HashMd5(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = HashMd5WithHttpInfo(hashViewModel); - return localVarResponse.Data; - } - - /// - /// Hash a string using md5. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - public Tribufu.Client.ApiResponse HashMd5WithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashMd5"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/utils/md5", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashMd5", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using md5. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - public async System.Threading.Tasks.Task HashMd5Async(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await HashMd5WithHttpInfoAsync(hashViewModel, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Hash a string using md5. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.md5</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - public async System.Threading.Tasks.Task> HashMd5WithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashMd5"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/utils/md5", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashMd5", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using sha256. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// HashViewModel - public HashViewModel HashSha256(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = HashSha256WithHttpInfo(hashViewModel); - return localVarResponse.Data; - } - - /// - /// Hash a string using sha256. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of HashViewModel - public Tribufu.Client.ApiResponse HashSha256WithHttpInfo(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashSha256"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/utils/sha256", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashSha256", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Hash a string using sha256. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of HashViewModel - public async System.Threading.Tasks.Task HashSha256Async(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await HashSha256WithHttpInfoAsync(hashViewModel, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Hash a string using sha256. <b>🔒 Required permissions:</b> <code>tribufu.utils.hash.sha256</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (HashViewModel) - public async System.Threading.Tasks.Task> HashSha256WithHttpInfoAsync(HashViewModel hashViewModel = default(HashViewModel), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = hashViewModel; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.HashSha256"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/utils/sha256", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("HashSha256", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Introspect a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// IntrospectResponse - public IntrospectResponse IntrospectToken(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = IntrospectTokenWithHttpInfo(introspectRequest); - return localVarResponse.Data; - } - - /// - /// Introspect a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of IntrospectResponse - public Tribufu.Client.ApiResponse IntrospectTokenWithHttpInfo(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = introspectRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.IntrospectToken"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/oauth2/introspect", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IntrospectToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Introspect a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of IntrospectResponse - public async System.Threading.Tasks.Task IntrospectTokenAsync(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await IntrospectTokenWithHttpInfoAsync(introspectRequest, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Introspect a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (IntrospectResponse) - public async System.Threading.Tasks.Task> IntrospectTokenWithHttpInfoAsync(IntrospectRequest introspectRequest = default(IntrospectRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = introspectRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.IntrospectToken"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/oauth2/introspect", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("IntrospectToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Revoke a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// - public void RevokeToken(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0) - { - RevokeTokenWithHttpInfo(revokeRequest); - } - - /// - /// Revoke a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse RevokeTokenWithHttpInfo(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = revokeRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.RevokeToken"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post("/v1/oauth2/revoke", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Revoke a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task RevokeTokenAsync(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await RevokeTokenWithHttpInfoAsync(revokeRequest, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Revoke a token. - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> RevokeTokenWithHttpInfoAsync(RevokeRequest revokeRequest = default(RevokeRequest), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json", - "application/x-www-form-urlencoded" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = revokeRequest; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.RevokeToken"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync("/v1/oauth2/revoke", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("RevokeToken", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Advanced search. <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// List<Object> - public List Search(Search search = default(Search), int operationIndex = 0) - { - Tribufu.Client.ApiResponse> localVarResponse = SearchWithHttpInfo(search); - return localVarResponse.Data; - } - - /// - /// Advanced search. <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// ApiResponse of List<Object> - public Tribufu.Client.ApiResponse> SearchWithHttpInfo(Search search = default(Search), int operationIndex = 0) - { - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = search; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.Search"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Post>("/v1/search", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Search", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Advanced search. <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of List<Object> - public async System.Threading.Tasks.Task> SearchAsync(Search search = default(Search), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse> localVarResponse = await SearchWithHttpInfoAsync(search, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Advanced search. <b>🔒 Required permissions:</b> <code>tribufu.community.search</code> - /// - /// Thrown when fails to make API call - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (List<Object>) - public async System.Threading.Tasks.Task>> SearchWithHttpInfoAsync(Search search = default(Search), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.Data = search; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.Search"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PostAsync>("/v1/search", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("Search", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void UpdateClient(string id, Object body = default(Object), int operationIndex = 0) - { - UpdateClientWithHttpInfo(id, body); - } - - /// - /// Update an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse UpdateClientWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateClient"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateClient"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/oauth2/clients/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateClient", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateClientAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdateClientWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update an oauth2 client. <b>🔒 Required permissions:</b> <code>tribufu.identity.oauth2.client.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateClientWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateClient"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateClient"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/oauth2/clients/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateClient", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void UpdateGameServer(string id, Object body = default(Object), int operationIndex = 0) - { - UpdateGameServerWithHttpInfo(id, body); - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse UpdateGameServerWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServer"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/games/servers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateGameServerAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdateGameServerWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateGameServerWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServer"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServer"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/games/servers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServer", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void UpdateGameServerCluster(string id, Object body = default(Object), int operationIndex = 0) - { - UpdateGameServerClusterWithHttpInfo(id, body); - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse UpdateGameServerClusterWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServerCluster"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServerCluster"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/games/servers/clusters/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServerCluster", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateGameServerClusterAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdateGameServerClusterWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateGameServerClusterWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServerCluster"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServerCluster"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/games/servers/clusters/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServerCluster", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - public void UpdateGameServerClusterV1(string id, Object body = default(Object), int operationIndex = 0) - { - UpdateGameServerClusterV1WithHttpInfo(id, body); - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse UpdateGameServerClusterV1WithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServerClusterV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServerClusterV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/clusters/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServerClusterV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task UpdateGameServerClusterV1Async(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdateGameServerClusterV1WithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update a game server cluster. <b>🔒 Required permissions:</b> <code>tribufu.game.server.cluster.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> UpdateGameServerClusterV1WithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServerClusterV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServerClusterV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/clusters/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServerClusterV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - [Obsolete] - public void UpdateGameServerV1(string id, Object body = default(Object), int operationIndex = 0) - { - UpdateGameServerV1WithHttpInfo(id, body); - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - [Obsolete] - public Tribufu.Client.ApiResponse UpdateGameServerV1WithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServerV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/servers/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - [Obsolete] - public async System.Threading.Tasks.Task UpdateGameServerV1Async(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdateGameServerV1WithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update a game server. <b>🔒 Required permissions:</b> <code>tribufu.game.server.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - [Obsolete] - public async System.Threading.Tasks.Task> UpdateGameServerV1WithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGameServerV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGameServerV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/servers/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGameServerV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void UpdateGroup(string id, Object body = default(Object), int operationIndex = 0) - { - UpdateGroupWithHttpInfo(id, body); - } - - /// - /// Update a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse UpdateGroupWithHttpInfo(string id, Object body = default(Object), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGroup"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/groups/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdateGroupAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdateGroupWithHttpInfoAsync(id, body, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update a group. <b>🔒 Required permissions:</b> <code>tribufu.community.group.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateGroupWithHttpInfoAsync(string id, Object body = default(Object), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateGroup"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = body; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateGroup"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/groups/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateGroup", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// - public void UpdatePackage(string id, Package package = default(Package), int operationIndex = 0) - { - UpdatePackageWithHttpInfo(id, package); - } - - /// - /// Update an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Object(void) - public Tribufu.Client.ApiResponse UpdatePackageWithHttpInfo(string id, Package package = default(Package), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdatePackage"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = package; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdatePackage"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/packages/{id}", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdatePackage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of void - public async System.Threading.Tasks.Task UpdatePackageAsync(string id, Package package = default(Package), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - await UpdatePackageWithHttpInfoAsync(id, package, operationIndex, cancellationToken).ConfigureAwait(false); - } - - /// - /// Update an package. <b>🔒 Required permissions:</b> <code>tribufu.community.package.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePackageWithHttpInfoAsync(string id, Package package = default(Package), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdatePackage"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = package; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdatePackage"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/packages/{id}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdatePackage", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Profile - public Profile UpdateUserProfile(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = UpdateUserProfileWithHttpInfo(id, updateProfile); - return localVarResponse.Data; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Profile - public Tribufu.Client.ApiResponse UpdateUserProfileWithHttpInfo(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateUserProfile"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = updateProfile; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateUserProfile"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/profiles/{id}/profile", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateUserProfile", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - public async System.Threading.Tasks.Task UpdateUserProfileAsync(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await UpdateUserProfileWithHttpInfoAsync(id, updateProfile, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - public async System.Threading.Tasks.Task> UpdateUserProfileWithHttpInfoAsync(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateUserProfile"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = updateProfile; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateUserProfile"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/profiles/{id}/profile", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateUserProfile", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Profile - [Obsolete] - public Profile UpdateUserProfileV1(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0) - { - Tribufu.Client.ApiResponse localVarResponse = UpdateUserProfileV1WithHttpInfo(id, updateProfile); - return localVarResponse.Data; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// ApiResponse of Profile - [Obsolete] - public Tribufu.Client.ApiResponse UpdateUserProfileV1WithHttpInfo(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateUserProfileV1"); - } - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - var localVarMultipartFormData = localVarContentType == "multipart/form-data"; - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = updateProfile; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateUserProfileV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = this.Client.Put("/v1/users/{id}/profile", localVarRequestOptions, this.Configuration); - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateUserProfileV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of Profile - [Obsolete] - public async System.Threading.Tasks.Task UpdateUserProfileV1Async(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - Tribufu.Client.ApiResponse localVarResponse = await UpdateUserProfileV1WithHttpInfoAsync(id, updateProfile, operationIndex, cancellationToken).ConfigureAwait(false); - return localVarResponse.Data; - } - - /// - /// Update a user profile. <b>🔒 Required permissions:</b> <code>tribufu.community.profile.update</code> - /// - /// Thrown when fails to make API call - /// - /// (optional) - /// Index associated with the operation. - /// Cancellation Token to cancel the request. - /// Task of ApiResponse (Profile) - [Obsolete] - public async System.Threading.Tasks.Task> UpdateUserProfileV1WithHttpInfoAsync(string id, UpdateProfile updateProfile = default(UpdateProfile), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)) - { - // verify the required parameter 'id' is set - if (id == null) - { - throw new Tribufu.Client.ApiException(400, "Missing required parameter 'id' when calling TribufuGeneratedApi->UpdateUserProfileV1"); - } - - - Tribufu.Client.RequestOptions localVarRequestOptions = new Tribufu.Client.RequestOptions(); - - string[] _contentTypes = new string[] { - "application/json" - }; - - // to determine the Accept header - string[] _accepts = new string[] { - "application/json" - }; - - var localVarContentType = Tribufu.Client.ClientUtils.SelectHeaderContentType(_contentTypes); - if (localVarContentType != null) - { - localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType); - } - - var localVarAccept = Tribufu.Client.ClientUtils.SelectHeaderAccept(_accepts); - if (localVarAccept != null) - { - localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept); - } - - localVarRequestOptions.PathParameters.Add("id", Tribufu.Client.ClientUtils.ParameterToString(id)); // path parameter - localVarRequestOptions.Data = updateProfile; - - localVarRequestOptions.Operation = "TribufuGeneratedApi.UpdateUserProfileV1"; - localVarRequestOptions.OperationIndex = operationIndex; - - - // make the HTTP request - var localVarResponse = await this.AsynchronousClient.PutAsync("/v1/users/{id}/profile", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false); - - if (this.ExceptionFactory != null) - { - Exception _exception = this.ExceptionFactory("UpdateUserProfileV1", localVarResponse); - if (_exception != null) - { - throw _exception; - } - } - - return localVarResponse; - } - - } -} diff --git a/Source/Tribufu/Client/ApiClient.cs b/Source/Tribufu/Client/ApiClient.cs deleted file mode 100644 index 6e8b67c..0000000 --- a/Source/Tribufu/Client/ApiClient.cs +++ /dev/null @@ -1,824 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters; -using System.Text; -using System.Threading; -using System.Text.RegularExpressions; -using System.Threading.Tasks; -using System.Web; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; -using RestSharp; -using RestSharp.Serializers; -using RestSharpMethod = RestSharp.Method; -using FileIO = System.IO.File; -using Polly; -using Tribufu.Model; - -namespace Tribufu.Client -{ - /// - /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON. - /// - internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer - { - private readonly IReadableConfiguration _configuration; - private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - public CustomJsonCodec(IReadableConfiguration configuration) - { - _configuration = configuration; - } - - public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration) - { - _serializerSettings = serializerSettings; - _configuration = configuration; - } - - /// - /// Serialize the object into a JSON string. - /// - /// Object to be serialized. - /// A JSON string. - public string Serialize(object obj) - { - if (obj != null && obj is AbstractOpenAPISchema) - { - // the object to be serialized is an oneOf/anyOf schema - return ((AbstractOpenAPISchema)obj).ToJson(); - } - else - { - return JsonConvert.SerializeObject(obj, _serializerSettings); - } - } - - public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value); - - public T Deserialize(RestResponse response) - { - var result = (T)Deserialize(response, typeof(T)); - return result; - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - internal object Deserialize(RestResponse response, Type type) - { - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - var bytes = response.RawBytes; - if (response.Headers != null) - { - var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath) - ? global::System.IO.Path.GetTempPath() - : _configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in response.Headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - FileIO.WriteAllBytes(fileName, bytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(bytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, DateTimeStyles.RoundtripKind); - } - - if (type == typeof(string) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return Convert.ChangeType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, _serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - public ISerializer Serializer => this; - public IDeserializer Deserializer => this; - - public string[] AcceptedContentTypes => ContentType.JsonAccept; - - public SupportsContentType SupportsContentType => contentType => - contentType.Value.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) || - contentType.Value.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase); - - public ContentType ContentType { get; set; } = ContentType.Json; - - public DataFormat DataFormat => DataFormat.Json; - } - /// - /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations), - /// encapsulating general REST accessor use cases. - /// - public partial class ApiClient : ISynchronousClient, IAsynchronousClient - { - private readonly string _baseUrl; - - /// - /// Specifies the settings on a object. - /// These settings can be adjusted to accommodate custom serialization rules. - /// - public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(RestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(RestRequest request, RestResponse response); - - /// - /// Initializes a new instance of the , defaulting to the global configurations' base url. - /// - public ApiClient() - { - _baseUrl = GlobalConfiguration.Instance.BasePath; - } - - /// - /// Initializes a new instance of the - /// - /// The target service's base path in URL format. - /// - public ApiClient(string basePath) - { - if (string.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - _baseUrl = basePath; - } - - /// - /// Constructs the RestSharp version of an http method - /// - /// Swagger Client Custom HttpMethod - /// RestSharp's HttpMethod instance. - /// - private RestSharpMethod Method(HttpMethod method) - { - RestSharpMethod other; - switch (method) - { - case HttpMethod.Get: - other = RestSharpMethod.Get; - break; - case HttpMethod.Post: - other = RestSharpMethod.Post; - break; - case HttpMethod.Put: - other = RestSharpMethod.Put; - break; - case HttpMethod.Delete: - other = RestSharpMethod.Delete; - break; - case HttpMethod.Head: - other = RestSharpMethod.Head; - break; - case HttpMethod.Options: - other = RestSharpMethod.Options; - break; - case HttpMethod.Patch: - other = RestSharpMethod.Patch; - break; - default: - throw new ArgumentOutOfRangeException("method", method, null); - } - - return other; - } - - /// - /// Provides all logic for constructing a new RestSharp . - /// At this point, all information for querying the service is known. - /// Here, it is simply mapped into the RestSharp request. - /// - /// The http verb. - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. - /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. - /// [private] A new RestRequest instance. - /// - private RestRequest NewRequest( - HttpMethod method, - string path, - RequestOptions options, - IReadableConfiguration configuration) - { - if (path == null) throw new ArgumentNullException("path"); - if (options == null) throw new ArgumentNullException("options"); - if (configuration == null) throw new ArgumentNullException("configuration"); - - RestRequest request = new RestRequest(path, Method(method)); - - if (options.PathParameters != null) - { - foreach (var pathParam in options.PathParameters) - { - request.AddParameter(pathParam.Key, pathParam.Value, ParameterType.UrlSegment); - } - } - - if (options.QueryParameters != null) - { - foreach (var queryParam in options.QueryParameters) - { - foreach (var value in queryParam.Value) - { - request.AddQueryParameter(queryParam.Key, value); - } - } - } - - if (configuration.DefaultHeaders != null) - { - foreach (var headerParam in configuration.DefaultHeaders) - { - request.AddHeader(headerParam.Key, headerParam.Value); - } - } - - if (options.HeaderParameters != null) - { - foreach (var headerParam in options.HeaderParameters) - { - foreach (var value in headerParam.Value) - { - request.AddOrUpdateHeader(headerParam.Key, value); - } - } - } - - if (options.FormParameters != null) - { - foreach (var formParam in options.FormParameters) - { - request.AddParameter(formParam.Key, formParam.Value); - } - } - - if (options.Data != null) - { - if (options.Data is Stream stream) - { - var contentType = "application/octet-stream"; - if (options.HeaderParameters != null) - { - var contentTypes = options.HeaderParameters["Content-Type"]; - contentType = contentTypes[0]; - } - - var bytes = ClientUtils.ReadAsBytes(stream); - request.AddParameter(contentType, bytes, ParameterType.RequestBody); - } - else - { - if (options.HeaderParameters != null) - { - var contentTypes = options.HeaderParameters["Content-Type"]; - if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json"))) - { - request.RequestFormat = DataFormat.Json; - } - else - { - // TODO: Generated client user should add additional handlers. RestSharp only supports XML and JSON, with XML as default. - } - } - else - { - // Here, we'll assume JSON APIs are more common. XML can be forced by adding produces/consumes to openapi spec explicitly. - request.RequestFormat = DataFormat.Json; - } - - request.AddJsonBody(options.Data); - } - } - - if (options.FileParameters != null) - { - foreach (var fileParam in options.FileParameters) - { - foreach (var file in fileParam.Value) - { - var bytes = ClientUtils.ReadAsBytes(file); - var fileStream = file as FileStream; - if (fileStream != null) - request.AddFile(fileParam.Key, bytes, global::System.IO.Path.GetFileName(fileStream.Name)); - else - request.AddFile(fileParam.Key, bytes, "no_file_name_provided"); - } - } - } - - if (options.HeaderParameters != null) - { - if (options.HeaderParameters.TryGetValue("Content-Type", out var contentTypes) && contentTypes.Any(header => header.Contains("multipart/form-data"))) - { - request.AlwaysMultipartFormData = true; - } - } - - return request; - } - - /// - /// Transforms a RestResponse instance into a new ApiResponse instance. - /// At this point, we have a concrete http response from the service. - /// Here, it is simply mapped into the [public] ApiResponse object. - /// - /// The RestSharp response object - /// A new ApiResponse instance. - private ApiResponse ToApiResponse(RestResponse response) - { - T result = response.Data; - string rawContent = response.Content; - - var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent) - { - ErrorText = response.ErrorMessage, - Cookies = new List() - }; - - if (response.Headers != null) - { - foreach (var responseHeader in response.Headers) - { - transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - if (response.ContentHeaders != null) - { - foreach (var responseHeader in response.ContentHeaders) - { - transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value)); - } - } - - if (response.Cookies != null) - { - foreach (var responseCookies in response.Cookies.Cast()) - { - transformed.Cookies.Add( - new Cookie( - responseCookies.Name, - responseCookies.Value, - responseCookies.Path, - responseCookies.Domain) - ); - } - } - - return transformed; - } - - /// - /// Executes the HTTP request for the current service. - /// Based on functions received it can be async or sync. - /// - /// Local function that executes http request and returns http response. - /// Local function to specify options for the service. - /// The RestSharp request object - /// The RestSharp options object - /// A per-request configuration object. - /// It is assumed that any merge with GlobalConfiguration has been done before calling this method. - /// A new ApiResponse instance. - private async Task> ExecClientAsync(Func>> getResponse, Action setOptions, RestRequest request, RequestOptions options, IReadableConfiguration configuration) - { - var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl; - var clientOptions = new RestClientOptions(baseUrl) - { - ClientCertificates = configuration.ClientCertificates, - Timeout = configuration.Timeout, - Proxy = configuration.Proxy, - UserAgent = configuration.UserAgent, - UseDefaultCredentials = configuration.UseDefaultCredentials, - RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback - }; - setOptions(clientOptions); - - using (RestClient client = new RestClient(clientOptions, - configureSerialization: serializerConfig => serializerConfig.UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration)))) - { - InterceptRequest(request); - - RestResponse response = await getResponse(client); - - // if the response type is oneOf/anyOf, call FromJSON to deserialize the data - if (typeof(AbstractOpenAPISchema).IsAssignableFrom(typeof(T))) - { - try - { - response.Data = (T)typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content }); - } - catch (Exception ex) - { - throw ex.InnerException != null ? ex.InnerException : ex; - } - } - else if (typeof(T).Name == "Stream") // for binary response - { - response.Data = (T)(object)new MemoryStream(response.RawBytes); - } - else if (typeof(T).Name == "Byte[]") // for byte response - { - response.Data = (T)(object)response.RawBytes; - } - else if (typeof(T).Name == "String") // for string response - { - response.Data = (T)(object)response.Content; - } - - InterceptResponse(request, response); - - var result = ToApiResponse(response); - if (response.ErrorMessage != null) - { - result.ErrorText = response.ErrorMessage; - } - - if (response.Cookies != null && response.Cookies.Count > 0) - { - if (result.Cookies == null) result.Cookies = new List(); - foreach (var restResponseCookie in response.Cookies.Cast()) - { - var cookie = new Cookie( - restResponseCookie.Name, - restResponseCookie.Value, - restResponseCookie.Path, - restResponseCookie.Domain - ) - { - Comment = restResponseCookie.Comment, - CommentUri = restResponseCookie.CommentUri, - Discard = restResponseCookie.Discard, - Expired = restResponseCookie.Expired, - Expires = restResponseCookie.Expires, - HttpOnly = restResponseCookie.HttpOnly, - Port = restResponseCookie.Port, - Secure = restResponseCookie.Secure, - Version = restResponseCookie.Version - }; - - result.Cookies.Add(cookie); - } - } - return result; - } - } - - private async Task> DeserializeRestResponseFromPolicyAsync(RestClient client, RestRequest request, PolicyResult policyResult, CancellationToken cancellationToken = default) - { - if (policyResult.Outcome == OutcomeType.Successful) - { - return await client.Deserialize(policyResult.Result, cancellationToken); - } - else - { - return new RestResponse(request) - { - ErrorException = policyResult.FinalException - }; - } - } - - private ApiResponse Exec(RestRequest request, RequestOptions options, IReadableConfiguration configuration) - { - Action setOptions = (clientOptions) => - { - var cookies = new CookieContainer(); - - if (options.Cookies != null && options.Cookies.Count > 0) - { - foreach (var cookie in options.Cookies) - { - cookies.Add(new Cookie(cookie.Name, cookie.Value)); - } - } - clientOptions.CookieContainer = cookies; - }; - - Func>> getResponse = (client) => - { - if (RetryConfiguration.RetryPolicy != null) - { - var policy = RetryConfiguration.RetryPolicy; - var policyResult = policy.ExecuteAndCapture(() => client.Execute(request)); - return DeserializeRestResponseFromPolicyAsync(client, request, policyResult); - } - else - { - return Task.FromResult(client.Execute(request)); - } - }; - - return ExecClientAsync(getResponse, setOptions, request, options, configuration).GetAwaiter().GetResult(); - } - - private Task> ExecAsync(RestRequest request, RequestOptions options, IReadableConfiguration configuration, CancellationToken cancellationToken = default(CancellationToken)) - { - Action setOptions = (clientOptions) => - { - //no extra options - }; - - Func>> getResponse = async (client) => - { - if (RetryConfiguration.AsyncRetryPolicy != null) - { - var policy = RetryConfiguration.AsyncRetryPolicy; - var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(request, ct), cancellationToken).ConfigureAwait(false); - return await DeserializeRestResponseFromPolicyAsync(client, request, policyResult, cancellationToken); - } - else - { - return await client.ExecuteAsync(request, cancellationToken).ConfigureAwait(false); - } - }; - - return ExecClientAsync(getResponse, setOptions, request, options, configuration); - } - - #region IAsynchronousClient - /// - /// Make a HTTP GET request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP POST request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP PUT request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Put, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP DELETE request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Delete, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP HEAD request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Head, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP OPTION request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Options, path, options, config), options, config, cancellationToken); - } - - /// - /// Make a HTTP PATCH request (async). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// Token that enables callers to cancel the request. - /// A Task containing ApiResponse - public Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, CancellationToken cancellationToken = default) - { - var config = configuration ?? GlobalConfiguration.Instance; - return ExecAsync(NewRequest(HttpMethod.Patch, path, options, config), options, config, cancellationToken); - } - #endregion IAsynchronousClient - - #region ISynchronousClient - /// - /// Make a HTTP GET request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Get, path, options, config), options, config); - } - - /// - /// Make a HTTP POST request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Post, path, options, config), options, config); - } - - /// - /// Make a HTTP PUT request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Put, path, options, config), options, config); - } - - /// - /// Make a HTTP DELETE request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Delete, path, options, config), options, config); - } - - /// - /// Make a HTTP HEAD request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Head, path, options, config), options, config); - } - - /// - /// Make a HTTP OPTION request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Options, path, options, config), options, config); - } - - /// - /// Make a HTTP PATCH request (synchronous). - /// - /// The target path (or resource). - /// The additional request options. - /// A per-request configuration object. It is assumed that any merge with - /// GlobalConfiguration has been done before calling this method. - /// A Task containing ApiResponse - public ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null) - { - var config = configuration ?? GlobalConfiguration.Instance; - return Exec(NewRequest(HttpMethod.Patch, path, options, config), options, config); - } - #endregion ISynchronousClient - } -} diff --git a/Source/Tribufu/Client/ApiException.cs b/Source/Tribufu/Client/ApiException.cs deleted file mode 100644 index 496d053..0000000 --- a/Source/Tribufu/Client/ApiException.cs +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; - -namespace Tribufu.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public object ErrorContent { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public Multimap Headers { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() { } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - /// HTTP Headers. - public ApiException(int errorCode, string message, object errorContent = null, Multimap headers = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - this.Headers = headers; - } - } - -} diff --git a/Source/Tribufu/Client/ApiResponse.cs b/Source/Tribufu/Client/ApiResponse.cs deleted file mode 100644 index b335d0a..0000000 --- a/Source/Tribufu/Client/ApiResponse.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Net; - -namespace Tribufu.Client -{ - /// - /// Provides a non-generic contract for the ApiResponse wrapper. - /// - public interface IApiResponse - { - /// - /// The data type of - /// - Type ResponseType { get; } - - /// - /// The content of this response - /// - Object Content { get; } - - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - HttpStatusCode StatusCode { get; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - Multimap Headers { get; } - - /// - /// Gets or sets any error text defined by the calling client. - /// - string ErrorText { get; set; } - - /// - /// Gets or sets any cookies passed along on the response. - /// - List Cookies { get; set; } - - /// - /// The raw content of this response - /// - string RawContent { get; } - } - - /// - /// API Response - /// - public class ApiResponse : IApiResponse - { - #region Properties - - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public HttpStatusCode StatusCode { get; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public Multimap Headers { get; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; } - - /// - /// Gets or sets any error text defined by the calling client. - /// - public string ErrorText { get; set; } - - /// - /// Gets or sets any cookies passed along on the response. - /// - public List Cookies { get; set; } - - /// - /// The content of this response - /// - public Type ResponseType - { - get { return typeof(T); } - } - - /// - /// The data type of - /// - public object Content - { - get { return Data; } - } - - /// - /// The raw content - /// - public string RawContent { get; } - - #endregion Properties - - #region Constructors - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - /// Raw content. - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data, string rawContent) - { - StatusCode = statusCode; - Headers = headers; - Data = data; - RawContent = rawContent; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, Multimap headers, T data) : this(statusCode, headers, data, null) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Data (parsed HTTP body) - /// Raw content. - public ApiResponse(HttpStatusCode statusCode, T data, string rawContent) : this(statusCode, null, data, rawContent) - { - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Data (parsed HTTP body) - public ApiResponse(HttpStatusCode statusCode, T data) : this(statusCode, data, null) - { - } - - #endregion Constructors - } -} diff --git a/Source/Tribufu/Client/ClientUtils.cs b/Source/Tribufu/Client/ClientUtils.cs deleted file mode 100644 index a4a40ac..0000000 --- a/Source/Tribufu/Client/ClientUtils.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.IO; -using System.Linq; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; - -namespace Tribufu.Client -{ - /// - /// Utility functions providing some benefit to API client consumers. - /// - public static class ClientUtils - { - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - return match.Success ? match.Groups[1].Value : filename; - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// The swagger-supported collection format, one of: csv, tsv, ssv, pipes, multi - /// Key name. - /// Value object. - /// A multimap of keys with 1..n associated values. - public static Multimap ParameterToMultiMap(string collectionFormat, string name, object value) - { - var parameters = new Multimap(); - - if (value is ICollection collection && collectionFormat == "multi") - { - foreach (var item in collection) - { - parameters.Add(name, ParameterToString(item)); - } - } - else if (value is IDictionary dictionary) - { - if(collectionFormat == "deepObject") { - foreach (DictionaryEntry entry in dictionary) - { - parameters.Add(name + "[" + entry.Key + "]", ParameterToString(entry.Value)); - } - } - else { - foreach (DictionaryEntry entry in dictionary) - { - parameters.Add(entry.Key.ToString(), ParameterToString(entry.Value)); - } - } - } - else - { - parameters.Add(name, ParameterToString(value)); - } - - return parameters; - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// An optional configuration instance, providing formatting options used in processing. - /// Formatted string. - public static string ParameterToString(object obj, IReadableConfiguration configuration = null) - { - if (obj is DateTime dateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTime.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is DateTimeOffset dateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return dateTimeOffset.ToString((configuration ?? GlobalConfiguration.Instance).DateTimeFormat); - if (obj is bool boolean) - return boolean ? "true" : "false"; - if (obj is ICollection collection) { - List entries = new List(); - foreach (var entry in collection) - entries.Add(ParameterToString(entry, configuration)); - return string.Join(",", entries); - } - if (obj is Enum && HasEnumMemberAttrValue(obj)) - return GetEnumMemberAttrValue(obj); - - return Convert.ToString(obj, CultureInfo.InvariantCulture); - } - - /// - /// Serializes the given object when not null. Otherwise return null. - /// - /// The object to serialize. - /// Serialized string. - public static string Serialize(object obj) - { - return obj != null ? Newtonsoft.Json.JsonConvert.SerializeObject(obj) : null; - } - - /// - /// Encode string in base64 format. - /// - /// string to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return Convert.ToBase64String(global::System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - using (var ms = new MemoryStream()) - { - inputStream.CopyTo(ms); - return ms.ToArray(); - } - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public static string SelectHeaderContentType(string[] contentTypes) - { - if (contentTypes.Length == 0) - return null; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType)) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public static string SelectHeaderAccept(string[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return string.Join(",", accepts); - } - - /// - /// Provides a case-insensitive check that a provided content type is a known JSON-like content type. - /// - public static readonly Regex JsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - - /// - /// Check if the given MIME is a JSON MIME. - /// JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public static bool IsJsonMime(string mime) - { - if (string.IsNullOrWhiteSpace(mime)) return false; - - return JsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json"); - } - - /// - /// Is the Enum decorated with EnumMember Attribute - /// - /// - /// true if found - private static bool HasEnumMemberAttrValue(object enumVal) - { - if (enumVal == null) - throw new ArgumentNullException(nameof(enumVal)); - var enumType = enumVal.GetType(); - var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); - var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) return true; - return false; - } - - /// - /// Get the EnumMember value - /// - /// - /// EnumMember value as string otherwise null - private static string GetEnumMemberAttrValue(object enumVal) - { - if (enumVal == null) - throw new ArgumentNullException(nameof(enumVal)); - var enumType = enumVal.GetType(); - var memInfo = enumType.GetMember(enumVal.ToString() ?? throw new InvalidOperationException()); - var attr = memInfo.FirstOrDefault()?.GetCustomAttributes(false).OfType().FirstOrDefault(); - if (attr != null) - { - return attr.Value; - } - return null; - } - } -} diff --git a/Source/Tribufu/Client/Configuration.cs b/Source/Tribufu/Client/Configuration.cs deleted file mode 100644 index bea1d2d..0000000 --- a/Source/Tribufu/Client/Configuration.cs +++ /dev/null @@ -1,613 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Security.Cryptography.X509Certificates; -using System.Text; -using System.Net.Http; -using System.Net.Security; - -namespace Tribufu.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.RawContent), - response.RawContent, response.Headers); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorText), response.ErrorText); - } - return null; - }; - - #endregion Static Members - - #region Private Members - - /// - /// Defines the base path of the target API server. - /// Example: http://localhost:3000/v1/ - /// - private string _basePath; - - private bool _useDefaultCredentials = false; - - /// - /// Gets or sets the API key based on the authentication name. - /// This is the key and value comprising the "secret" for accessing an API. - /// - /// The API key. - private IDictionary _apiKey; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - /// - /// Gets or sets the servers defined in the OpenAPI spec. - /// - /// The servers - private IList> _servers; - - /// - /// Gets or sets the operation servers defined in the OpenAPI spec. - /// - /// The operation servers - private IReadOnlyDictionary>> _operationServers; - - #endregion Private Members - - #region Constructors - - /// - /// Initializes a new instance of the class - /// - [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] - public Configuration() - { - Proxy = null; - UserAgent = WebUtility.UrlEncode("OpenAPI-Generator/1.0.0/csharp"); - BasePath = "http://localhost"; - DefaultHeaders = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - Servers = new List>() - { - { - new Dictionary { - {"url", ""}, - {"description", "No description provided"}, - } - } - }; - OperationServers = new Dictionary>>() - { - }; - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = TimeSpan.FromSeconds(100); - } - - /// - /// Initializes a new instance of the class - /// - [global::System.Diagnostics.CodeAnalysis.SuppressMessage("ReSharper", "VirtualMemberCallInConstructor")] - public Configuration( - IDictionary defaultHeaders, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://localhost") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeaders == null) - throw new ArgumentNullException("defaultHeaders"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeaders) - { - DefaultHeaders.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - #endregion Constructors - - #region Properties - - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath - { - get { return _basePath; } - set { _basePath = value; } - } - - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - public virtual bool UseDefaultCredentials - { - get { return _useDefaultCredentials; } - set { _useDefaultCredentials = value; } - } - - /// - /// Gets or sets the default header. - /// - [Obsolete("Use DefaultHeaders instead.")] - public virtual IDictionary DefaultHeader - { - get - { - return DefaultHeaders; - } - set - { - DefaultHeaders = value; - } - } - - /// - /// Gets or sets the default headers. - /// - public virtual IDictionary DefaultHeaders { get; set; } - - /// - /// Gets or sets the HTTP timeout of ApiClient. Defaults to 100 seconds. - /// - public virtual TimeSpan Timeout { get; set; } - - /// - /// Gets or sets the proxy - /// - /// Proxy. - public virtual WebProxy Proxy { get; set; } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - string apiKeyValue; - ApiKey.TryGetValue(apiKeyIdentifier, out apiKeyValue); - string apiKeyPrefix; - if (ApiKeyPrefix.TryGetValue(apiKeyIdentifier, out apiKeyPrefix)) - { - return apiKeyPrefix + " " + apiKeyValue; - } - - return apiKeyValue; - } - - /// - /// Gets or sets certificate collection to be sent with requests. - /// - /// X509 Certificate collection. - public X509CertificateCollection ClientCertificates { get; set; } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// This helper property simplifies code generation. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// Whatever you set here will be prepended to the value defined in AddApiKey. - /// - /// An example invocation here might be: - /// - /// ApiKeyPrefix["Authorization"] = "Bearer"; - /// - /// … where ApiKey["Authorization"] would then be used to set the value of your bearer token. - /// - /// - /// OAuth2 workflows should set tokens via AccessToken. - /// - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - /// - /// Gets or sets the servers. - /// - /// The servers. - public virtual IList> Servers - { - get { return _servers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Servers may not be null."); - } - _servers = value; - } - } - - /// - /// Gets or sets the operation servers. - /// - /// The operation servers. - public virtual IReadOnlyDictionary>> OperationServers - { - get { return _operationServers; } - set - { - if (value == null) - { - throw new InvalidOperationException("Operation servers may not be null."); - } - _operationServers = value; - } - } - - /// - /// Returns URL based on server settings without providing values - /// for the variables - /// - /// Array index of the server settings. - /// The server URL. - public string GetServerUrl(int index) - { - return GetServerUrl(Servers, index, null); - } - - /// - /// Returns URL based on server settings. - /// - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - public string GetServerUrl(int index, Dictionary inputVariables) - { - return GetServerUrl(Servers, index, inputVariables); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index) - { - return GetOperationServerUrl(operation, index, null); - } - - /// - /// Returns URL based on operation server settings. - /// - /// Operation associated with the request path. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The operation server URL. - public string GetOperationServerUrl(string operation, int index, Dictionary inputVariables) - { - if (operation != null && OperationServers.TryGetValue(operation, out var operationServer)) - { - return GetServerUrl(operationServer, index, inputVariables); - } - - return null; - } - - /// - /// Returns URL based on server settings. - /// - /// Dictionary of server settings. - /// Array index of the server settings. - /// Dictionary of the variables and the corresponding values. - /// The server URL. - private string GetServerUrl(IList> servers, int index, Dictionary inputVariables) - { - if (index < 0 || index >= servers.Count) - { - throw new InvalidOperationException($"Invalid index {index} when selecting the server. Must be less than {servers.Count}."); - } - - if (inputVariables == null) - { - inputVariables = new Dictionary(); - } - - IReadOnlyDictionary server = servers[index]; - string url = (string)server["url"]; - - if (server.ContainsKey("variables")) - { - // go through each variable and assign a value - foreach (KeyValuePair variable in (IReadOnlyDictionary)server["variables"]) - { - - IReadOnlyDictionary serverVariables = (IReadOnlyDictionary)(variable.Value); - - if (inputVariables.ContainsKey(variable.Key)) - { - if (((List)serverVariables["enum_values"]).Contains(inputVariables[variable.Key])) - { - url = url.Replace("{" + variable.Key + "}", inputVariables[variable.Key]); - } - else - { - throw new InvalidOperationException($"The variable `{variable.Key}` in the server URL has invalid value #{inputVariables[variable.Key]}. Must be {(List)serverVariables["enum_values"]}"); - } - } - else - { - // use default value - url = url.Replace("{" + variable.Key + "}", (string)serverVariables["default_value"]); - } - } - } - - return url; - } - - /// - /// Gets and Sets the RemoteCertificateValidationCallback - /// - public RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; set; } - - #endregion Properties - - #region Methods - - /// - /// Returns a string with essential information for debugging. - /// - public static string ToDebugReport() - { - string report = "C# SDK (Tribufu) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.4.3\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - - #region Static Members - /// - /// Merge configurations. - /// - /// First configuration. - /// Second configuration. - /// Merged configuration. - public static IReadableConfiguration MergeConfigurations(IReadableConfiguration first, IReadableConfiguration second) - { - if (second == null) return first ?? GlobalConfiguration.Instance; - - Dictionary apiKey = first.ApiKey.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary apiKeyPrefix = first.ApiKeyPrefix.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - Dictionary defaultHeaders = first.DefaultHeaders.ToDictionary(kvp => kvp.Key, kvp => kvp.Value); - - foreach (var kvp in second.ApiKey) apiKey[kvp.Key] = kvp.Value; - foreach (var kvp in second.ApiKeyPrefix) apiKeyPrefix[kvp.Key] = kvp.Value; - foreach (var kvp in second.DefaultHeaders) defaultHeaders[kvp.Key] = kvp.Value; - - var config = new Configuration - { - ApiKey = apiKey, - ApiKeyPrefix = apiKeyPrefix, - DefaultHeaders = defaultHeaders, - BasePath = second.BasePath ?? first.BasePath, - Timeout = second.Timeout, - Proxy = second.Proxy ?? first.Proxy, - UserAgent = second.UserAgent ?? first.UserAgent, - Username = second.Username ?? first.Username, - Password = second.Password ?? first.Password, - AccessToken = second.AccessToken ?? first.AccessToken, - TempFolderPath = second.TempFolderPath ?? first.TempFolderPath, - DateTimeFormat = second.DateTimeFormat ?? first.DateTimeFormat, - ClientCertificates = second.ClientCertificates ?? first.ClientCertificates, - UseDefaultCredentials = second.UseDefaultCredentials, - RemoteCertificateValidationCallback = second.RemoteCertificateValidationCallback ?? first.RemoteCertificateValidationCallback, - }; - return config; - } - #endregion Static Members - } -} diff --git a/Source/Tribufu/Client/ExceptionFactory.cs b/Source/Tribufu/Client/ExceptionFactory.cs deleted file mode 100644 index 64d31e7..0000000 --- a/Source/Tribufu/Client/ExceptionFactory.cs +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; - -namespace Tribufu.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IApiResponse response); -} diff --git a/Source/Tribufu/Client/GlobalConfiguration.cs b/Source/Tribufu/Client/GlobalConfiguration.cs deleted file mode 100644 index 21a4195..0000000 --- a/Source/Tribufu/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Tribufu.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - #region Private Members - - private static readonly object GlobalConfigSync = new { }; - private static IReadableConfiguration _globalConfiguration; - - #endregion Private Members - - #region Constructors - - /// - private GlobalConfiguration() - { - } - - /// - public GlobalConfiguration(IDictionary defaultHeader, IDictionary apiKey, IDictionary apiKeyPrefix, string basePath = "http://localhost:3000/api") : base(defaultHeader, apiKey, apiKeyPrefix, basePath) - { - } - - static GlobalConfiguration() - { - Instance = new GlobalConfiguration(); - } - - #endregion Constructors - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static IReadableConfiguration Instance - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - } -} diff --git a/Source/Tribufu/Client/HttpMethod.cs b/Source/Tribufu/Client/HttpMethod.cs deleted file mode 100644 index 7df4f3a..0000000 --- a/Source/Tribufu/Client/HttpMethod.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -namespace Tribufu.Client -{ - /// - /// Http methods supported by swagger - /// - public enum HttpMethod - { - /// HTTP GET request. - Get, - /// HTTP POST request. - Post, - /// HTTP PUT request. - Put, - /// HTTP DELETE request. - Delete, - /// HTTP HEAD request. - Head, - /// HTTP OPTIONS request. - Options, - /// HTTP PATCH request. - Patch - } -} diff --git a/Source/Tribufu/Client/IApiAccessor.cs b/Source/Tribufu/Client/IApiAccessor.cs deleted file mode 100644 index 7447d6a..0000000 --- a/Source/Tribufu/Client/IApiAccessor.cs +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; - -namespace Tribufu.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - IReadableConfiguration Configuration { get; set; } - - /// - /// Gets the base path of the API client. - /// - /// The base path - string GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/Source/Tribufu/Client/IAsynchronousClient.cs b/Source/Tribufu/Client/IAsynchronousClient.cs deleted file mode 100644 index 429cbaa..0000000 --- a/Source/Tribufu/Client/IAsynchronousClient.cs +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Threading.Tasks; - -namespace Tribufu.Client -{ - /// - /// Contract for Asynchronous RESTful API interactions. - /// - /// This interface allows consumers to provide a custom API accessor client. - /// - public interface IAsynchronousClient - { - /// - /// Executes a non-blocking call to some using the GET http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the POST http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the PUT http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PutAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the DELETE http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> DeleteAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the HEAD http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> HeadAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the OPTIONS http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> OptionsAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - - /// - /// Executes a non-blocking call to some using the PATCH http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// Cancellation Token to cancel the request. - /// The return type. - /// A task eventually representing the response data, decorated with - Task> PatchAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(global::System.Threading.CancellationToken)); - } -} diff --git a/Source/Tribufu/Client/IReadableConfiguration.cs b/Source/Tribufu/Client/IReadableConfiguration.cs deleted file mode 100644 index fba571c..0000000 --- a/Source/Tribufu/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Net; -using System.Net.Security; -using System.Security.Cryptography.X509Certificates; - -namespace Tribufu.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - [Obsolete("Use DefaultHeaders instead.")] - IDictionary DefaultHeader { get; } - - /// - /// Gets the default headers. - /// - /// Default headers. - IDictionary DefaultHeaders { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout. - /// - /// HTTP connection timeout. - TimeSpan Timeout { get; } - - /// - /// Gets the proxy. - /// - /// Proxy. - WebProxy Proxy { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Determine whether or not the "default credentials" (e.g. the user account under which the current process is running) will be sent along to the server. The default is false. - /// - bool UseDefaultCredentials { get; } - - /// - /// Get the servers associated with the operation. - /// - /// Operation servers. - IReadOnlyDictionary>> OperationServers { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - - /// - /// Gets the Operation server url at the provided index. - /// - /// Operation server name. - /// Index of the operation server settings. - /// - string GetOperationServerUrl(string operation, int index); - - /// - /// Gets certificate collection to be sent with requests. - /// - /// X509 Certificate collection. - X509CertificateCollection ClientCertificates { get; } - - /// - /// Callback function for handling the validation of remote certificates. Useful for certificate pinning and - /// overriding certificate errors in the scope of a request. - /// - RemoteCertificateValidationCallback RemoteCertificateValidationCallback { get; } - } -} diff --git a/Source/Tribufu/Client/ISynchronousClient.cs b/Source/Tribufu/Client/ISynchronousClient.cs deleted file mode 100644 index a1cfb4f..0000000 --- a/Source/Tribufu/Client/ISynchronousClient.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.IO; - -namespace Tribufu.Client -{ - /// - /// Contract for Synchronous RESTful API interactions. - /// - /// This interface allows consumers to provide a custom API accessor client. - /// - public interface ISynchronousClient - { - /// - /// Executes a blocking call to some using the GET http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Get(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the POST http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Post(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the PUT http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Put(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the DELETE http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Delete(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the HEAD http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Head(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the OPTIONS http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Options(string path, RequestOptions options, IReadableConfiguration configuration = null); - - /// - /// Executes a blocking call to some using the PATCH http verb. - /// - /// The relative path to invoke. - /// The request parameters to pass along to the client. - /// Per-request configurable settings. - /// The return type. - /// The response data, decorated with - ApiResponse Patch(string path, RequestOptions options, IReadableConfiguration configuration = null); - } -} diff --git a/Source/Tribufu/Client/Multimap.cs b/Source/Tribufu/Client/Multimap.cs deleted file mode 100644 index a83d159..0000000 --- a/Source/Tribufu/Client/Multimap.cs +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; - -namespace Tribufu.Client -{ - /// - /// A dictionary in which one key has many associated values. - /// - /// The type of the key - /// The type of the value associated with the key. - public class Multimap : IDictionary> - { - #region Private Fields - - private readonly Dictionary> _dictionary; - - #endregion Private Fields - - #region Constructors - - /// - /// Empty Constructor. - /// - public Multimap() - { - _dictionary = new Dictionary>(); - } - - /// - /// Constructor with comparer. - /// - /// - public Multimap(IEqualityComparer comparer) - { - _dictionary = new Dictionary>(comparer); - } - - #endregion Constructors - - #region Enumerators - - /// - /// To get the enumerator. - /// - /// Enumerator - public IEnumerator>> GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - /// - /// To get the enumerator. - /// - /// Enumerator - IEnumerator IEnumerable.GetEnumerator() - { - return _dictionary.GetEnumerator(); - } - - #endregion Enumerators - - #region Public Members - /// - /// Add values to Multimap - /// - /// Key value pair - public void Add(KeyValuePair> item) - { - if (!TryAdd(item.Key, item.Value)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - - /// - /// Add Multimap to Multimap - /// - /// Multimap - public void Add(Multimap multimap) - { - foreach (var item in multimap) - { - if (!TryAdd(item.Key, item.Value)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - } - - /// - /// Clear Multimap - /// - public void Clear() - { - _dictionary.Clear(); - } - - /// - /// Determines whether Multimap contains the specified item. - /// - /// Key value pair - /// Method needs to be implemented - /// true if the Multimap contains the item; otherwise, false. - public bool Contains(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - /// - /// Copy items of the Multimap to an array, - /// starting at a particular array index. - /// - /// The array that is the destination of the items copied - /// from Multimap. The array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - /// Method needs to be implemented - public void CopyTo(KeyValuePair>[] array, int arrayIndex) - { - throw new NotImplementedException(); - } - - /// - /// Removes the specified item from the Multimap. - /// - /// Key value pair - /// true if the item is successfully removed; otherwise, false. - /// Method needs to be implemented - public bool Remove(KeyValuePair> item) - { - throw new NotImplementedException(); - } - - /// - /// Gets the number of items contained in the Multimap. - /// - public int Count => _dictionary.Count; - - /// - /// Gets a value indicating whether the Multimap is read-only. - /// - public bool IsReadOnly => false; - - /// - /// Adds an item with the provided key and value to the Multimap. - /// - /// The object to use as the key of the item to add. - /// The object to use as the value of the item to add. - /// Thrown when couldn't add the value to Multimap. - public void Add(TKey key, IList value) - { - if (value != null && value.Count > 0) - { - if (_dictionary.TryGetValue(key, out var list)) - { - foreach (var k in value) list.Add(k); - } - else - { - list = new List(value); - if (!TryAdd(key, list)) - throw new InvalidOperationException("Could not add values to Multimap."); - } - } - } - - /// - /// Determines whether the Multimap contains an item with the specified key. - /// - /// The key to locate in the Multimap. - /// true if the Multimap contains an item with - /// the key; otherwise, false. - public bool ContainsKey(TKey key) - { - return _dictionary.ContainsKey(key); - } - - /// - /// Removes item with the specified key from the Multimap. - /// - /// The key to locate in the Multimap. - /// true if the item is successfully removed; otherwise, false. - public bool Remove(TKey key) - { - return TryRemove(key, out var _); - } - - /// - /// Gets the value associated with the specified key. - /// - /// The key whose value to get. - /// When this method returns, the value associated with the specified key, if the - /// key is found; otherwise, the default value for the type of the value parameter. - /// This parameter is passed uninitialized. - /// true if the object that implements Multimap contains - /// an item with the specified key; otherwise, false. - public bool TryGetValue(TKey key, out IList value) - { - return _dictionary.TryGetValue(key, out value); - } - - /// - /// Gets or sets the item with the specified key. - /// - /// The key of the item to get or set. - /// The value of the specified key. - public IList this[TKey key] - { - get => _dictionary[key]; - set => _dictionary[key] = value; - } - - /// - /// Gets a System.Collections.Generic.ICollection containing the keys of the Multimap. - /// - public ICollection Keys => _dictionary.Keys; - - /// - /// Gets a System.Collections.Generic.ICollection containing the values of the Multimap. - /// - public ICollection> Values => _dictionary.Values; - - /// - /// Copy the items of the Multimap to an System.Array, - /// starting at a particular System.Array index. - /// - /// The one-dimensional System.Array that is the destination of the items copied - /// from Multimap. The System.Array must have zero-based indexing. - /// The zero-based index in array at which copying begins. - public void CopyTo(Array array, int index) - { - ((ICollection)_dictionary).CopyTo(array, index); - } - - /// - /// Adds an item with the provided key and value to the Multimap. - /// - /// The object to use as the key of the item to add. - /// The object to use as the value of the item to add. - /// Thrown when couldn't add value to Multimap. - public void Add(TKey key, TValue value) - { - if (value != null) - { - if (_dictionary.TryGetValue(key, out var list)) - { - list.Add(value); - } - else - { - list = new List { value }; - if (!TryAdd(key, list)) - throw new InvalidOperationException("Could not add value to Multimap."); - } - } - } - - #endregion Public Members - - #region Private Members - - /** - * Helper method to encapsulate generator differences between dictionary types. - */ - private bool TryRemove(TKey key, out IList value) - { - _dictionary.TryGetValue(key, out value); - return _dictionary.Remove(key); - } - - /** - * Helper method to encapsulate generator differences between dictionary types. - */ - private bool TryAdd(TKey key, IList value) - { - try - { - _dictionary.Add(key, value); - } - catch (ArgumentException) - { - return false; - } - - return true; - } - #endregion Private Members - } -} diff --git a/Source/Tribufu/Client/OpenAPIDateConverter.cs b/Source/Tribufu/Client/OpenAPIDateConverter.cs deleted file mode 100644 index 4452f49..0000000 --- a/Source/Tribufu/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Tribufu.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/Source/Tribufu/Client/RequestOptions.cs b/Source/Tribufu/Client/RequestOptions.cs deleted file mode 100644 index 2a7cc7a..0000000 --- a/Source/Tribufu/Client/RequestOptions.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; - -namespace Tribufu.Client -{ - /// - /// A container for generalized request inputs. This type allows consumers to extend the request functionality - /// by abstracting away from the default (built-in) request framework (e.g. RestSharp). - /// - public class RequestOptions - { - /// - /// Parameters to be bound to path parts of the Request's URL - /// - public Dictionary PathParameters { get; set; } - - /// - /// Query parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap QueryParameters { get; set; } - - /// - /// Header parameters to be applied to the request. - /// Keys may have 1 or more values associated. - /// - public Multimap HeaderParameters { get; set; } - - /// - /// Form parameters to be sent along with the request. - /// - public Dictionary FormParameters { get; set; } - - /// - /// File parameters to be sent along with the request. - /// - public Multimap FileParameters { get; set; } - - /// - /// Cookies to be sent along with the request. - /// - public List Cookies { get; set; } - - /// - /// Operation associated with the request path. - /// - public string Operation { get; set; } - - /// - /// Index associated with the operation. - /// - public int OperationIndex { get; set; } - - /// - /// Any data associated with a request body. - /// - public Object Data { get; set; } - - /// - /// Constructs a new instance of - /// - public RequestOptions() - { - PathParameters = new Dictionary(); - QueryParameters = new Multimap(); - HeaderParameters = new Multimap(); - FormParameters = new Dictionary(); - FileParameters = new Multimap(); - Cookies = new List(); - } - } -} diff --git a/Source/Tribufu/Client/RetryConfiguration.cs b/Source/Tribufu/Client/RetryConfiguration.cs deleted file mode 100644 index c7604ca..0000000 --- a/Source/Tribufu/Client/RetryConfiguration.cs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using Polly; -using RestSharp; - -namespace Tribufu.Client -{ - /// - /// Configuration class to set the polly retry policies to be applied to the requests. - /// - public static class RetryConfiguration - { - /// - /// Retry policy - /// - public static Policy RetryPolicy { get; set; } - - /// - /// Async retry policy - /// - public static AsyncPolicy AsyncRetryPolicy { get; set; } - } -} diff --git a/Source/Tribufu/Model/AbstractOpenAPISchema.cs b/Source/Tribufu/Model/AbstractOpenAPISchema.cs deleted file mode 100644 index 0a5ee40..0000000 --- a/Source/Tribufu/Model/AbstractOpenAPISchema.cs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using Newtonsoft.Json; -using Newtonsoft.Json.Serialization; - -namespace Tribufu.Model -{ - /// - /// Abstract base class for oneOf, anyOf schemas in the OpenAPI specification - /// - public abstract partial class AbstractOpenAPISchema - { - /// - /// Custom JSON serializer - /// - static public readonly JsonSerializerSettings SerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Error, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Custom JSON serializer for objects with additional properties - /// - static public readonly JsonSerializerSettings AdditionalPropertiesSerializerSettings = new JsonSerializerSettings - { - // OpenAPI generated types generally hide default constructors. - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor, - MissingMemberHandling = MissingMemberHandling.Ignore, - ContractResolver = new DefaultContractResolver - { - NamingStrategy = new CamelCaseNamingStrategy - { - OverrideSpecifiedNames = false - } - } - }; - - /// - /// Gets or Sets the actual instance - /// - public abstract Object ActualInstance { get; set; } - - /// - /// Gets or Sets IsNullable to indicate whether the instance is nullable - /// - public bool IsNullable { get; protected set; } - - /// - /// Gets or Sets the schema type, which can be either `oneOf` or `anyOf` - /// - public string SchemaType { get; protected set; } - - /// - /// Converts the instance into JSON string. - /// - public abstract string ToJson(); - } -} diff --git a/Source/Tribufu/Model/Application.cs b/Source/Tribufu/Model/Application.cs deleted file mode 100644 index ec6e6b8..0000000 --- a/Source/Tribufu/Model/Application.cs +++ /dev/null @@ -1,237 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Application - /// - [DataContract(Name = "Application")] - public partial class Application : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public ApplicationType? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Application() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// description. - /// type. - /// organizationId. - /// iconUrl. - /// bannerUrl. - /// capsuleImageUrl. - /// libraryImageUrl. - /// slug. - /// createdAt. - /// updatedAt. - /// deletedAt. - public Application(string id = default(string), string name = default(string), string description = default(string), ApplicationType? type = default(ApplicationType?), string organizationId = default(string), string iconUrl = default(string), string bannerUrl = default(string), string capsuleImageUrl = default(string), string libraryImageUrl = default(string), string slug = default(string), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for Application and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Description = description; - this.Type = type; - this.OrganizationId = organizationId; - this.IconUrl = iconUrl; - this.BannerUrl = bannerUrl; - this.CapsuleImageUrl = capsuleImageUrl; - this.LibraryImageUrl = libraryImageUrl; - this.Slug = slug; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets OrganizationId - /// - [DataMember(Name = "organization_id", EmitDefaultValue = false)] - public string OrganizationId { get; set; } - - /// - /// Gets or Sets IconUrl - /// - [DataMember(Name = "icon_url", EmitDefaultValue = true)] - public string IconUrl { get; set; } - - /// - /// Gets or Sets BannerUrl - /// - [DataMember(Name = "banner_url", EmitDefaultValue = true)] - public string BannerUrl { get; set; } - - /// - /// Gets or Sets CapsuleImageUrl - /// - [DataMember(Name = "capsule_image_url", EmitDefaultValue = true)] - public string CapsuleImageUrl { get; set; } - - /// - /// Gets or Sets LibraryImageUrl - /// - [DataMember(Name = "library_image_url", EmitDefaultValue = true)] - public string LibraryImageUrl { get; set; } - - /// - /// Gets or Sets Slug - /// - [DataMember(Name = "slug", EmitDefaultValue = true)] - public string Slug { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Application {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" OrganizationId: ").Append(OrganizationId).Append("\n"); - sb.Append(" IconUrl: ").Append(IconUrl).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" CapsuleImageUrl: ").Append(CapsuleImageUrl).Append("\n"); - sb.Append(" LibraryImageUrl: ").Append(LibraryImageUrl).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - // IconUrl (string) maxLength - if (this.IconUrl != null && this.IconUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for IconUrl, length must be less than 255.", new [] { "IconUrl" }); - } - - // BannerUrl (string) maxLength - if (this.BannerUrl != null && this.BannerUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for BannerUrl, length must be less than 255.", new [] { "BannerUrl" }); - } - - // CapsuleImageUrl (string) maxLength - if (this.CapsuleImageUrl != null && this.CapsuleImageUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for CapsuleImageUrl, length must be less than 255.", new [] { "CapsuleImageUrl" }); - } - - // LibraryImageUrl (string) maxLength - if (this.LibraryImageUrl != null && this.LibraryImageUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for LibraryImageUrl, length must be less than 255.", new [] { "LibraryImageUrl" }); - } - - // Slug (string) maxLength - if (this.Slug != null && this.Slug.Length > 75) - { - yield return new ValidationResult("Invalid value for Slug, length must be less than 75.", new [] { "Slug" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ApplicationType.cs b/Source/Tribufu/Model/ApplicationType.cs deleted file mode 100644 index d3cd21f..0000000 --- a/Source/Tribufu/Model/ApplicationType.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines ApplicationType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ApplicationType - { - /// - /// Enum Software for value: software - /// - [EnumMember(Value = "software")] - Software, - - /// - /// Enum Game for value: game - /// - [EnumMember(Value = "game")] - Game - } - -} diff --git a/Source/Tribufu/Model/AuthorizeRequest.cs b/Source/Tribufu/Model/AuthorizeRequest.cs deleted file mode 100644 index 6f9a8a3..0000000 --- a/Source/Tribufu/Model/AuthorizeRequest.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// AuthorizeRequest - /// - [DataContract(Name = "AuthorizeRequest")] - public partial class AuthorizeRequest : IValidatableObject - { - - /// - /// Gets or Sets ResponseType - /// - [DataMember(Name = "response_type", EmitDefaultValue = false)] - public ResponseType? ResponseType { get; set; } - - /// - /// Gets or Sets CodeChallengeMethod - /// - [DataMember(Name = "code_challenge_method", EmitDefaultValue = false)] - public CodeChallengeMethod? CodeChallengeMethod { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected AuthorizeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// responseType. - /// clientId (required). - /// codeChallenge. - /// codeChallengeMethod. - /// redirectUri (required). - /// scope. - /// state. - public AuthorizeRequest(ResponseType? responseType = default(ResponseType?), string clientId = default(string), string codeChallenge = default(string), CodeChallengeMethod? codeChallengeMethod = default(CodeChallengeMethod?), string redirectUri = default(string), string scope = default(string), string state = default(string)) - { - // to ensure "clientId" is required (not null) - if (clientId == null) - { - throw new ArgumentNullException("clientId is a required property for AuthorizeRequest and cannot be null"); - } - this.ClientId = clientId; - // to ensure "redirectUri" is required (not null) - if (redirectUri == null) - { - throw new ArgumentNullException("redirectUri is a required property for AuthorizeRequest and cannot be null"); - } - this.RedirectUri = redirectUri; - this.ResponseType = responseType; - this.CodeChallenge = codeChallenge; - this.CodeChallengeMethod = codeChallengeMethod; - this.Scope = scope; - this.State = state; - } - - /// - /// Gets or Sets ClientId - /// - [DataMember(Name = "client_id", IsRequired = true, EmitDefaultValue = true)] - public string ClientId { get; set; } - - /// - /// Gets or Sets CodeChallenge - /// - [DataMember(Name = "code_challenge", EmitDefaultValue = true)] - public string CodeChallenge { get; set; } - - /// - /// Gets or Sets RedirectUri - /// - [DataMember(Name = "redirect_uri", IsRequired = true, EmitDefaultValue = true)] - public string RedirectUri { get; set; } - - /// - /// Gets or Sets Scope - /// - [DataMember(Name = "scope", EmitDefaultValue = true)] - public string Scope { get; set; } - - /// - /// Gets or Sets State - /// - [DataMember(Name = "state", EmitDefaultValue = true)] - public string State { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class AuthorizeRequest {\n"); - sb.Append(" ResponseType: ").Append(ResponseType).Append("\n"); - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - sb.Append(" CodeChallenge: ").Append(CodeChallenge).Append("\n"); - sb.Append(" CodeChallengeMethod: ").Append(CodeChallengeMethod).Append("\n"); - sb.Append(" RedirectUri: ").Append(RedirectUri).Append("\n"); - sb.Append(" Scope: ").Append(Scope).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ClientInfo.cs b/Source/Tribufu/Model/ClientInfo.cs deleted file mode 100644 index 51a15f2..0000000 --- a/Source/Tribufu/Model/ClientInfo.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ClientInfo - /// - [DataContract(Name = "ClientInfo")] - public partial class ClientInfo : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public ClientType? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ClientInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// type. - /// photoUrl. - /// permissions. - public ClientInfo(string id = default(string), string name = default(string), ClientType? type = default(ClientType?), string photoUrl = default(string), List permissions = default(List)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for ClientInfo and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Type = type; - this.PhotoUrl = photoUrl; - this.Permissions = permissions; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets Permissions - /// - [DataMember(Name = "permissions", EmitDefaultValue = true)] - public List Permissions { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ClientInfo {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" Permissions: ").Append(Permissions).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ClientType.cs b/Source/Tribufu/Model/ClientType.cs deleted file mode 100644 index b2acac7..0000000 --- a/Source/Tribufu/Model/ClientType.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines ClientType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ClientType - { - /// - /// Enum Web for value: web - /// - [EnumMember(Value = "web")] - Web, - - /// - /// Enum Desktop for value: desktop - /// - [EnumMember(Value = "desktop")] - Desktop, - - /// - /// Enum Mobile for value: mobile - /// - [EnumMember(Value = "mobile")] - Mobile - } - -} diff --git a/Source/Tribufu/Model/CodeChallengeMethod.cs b/Source/Tribufu/Model/CodeChallengeMethod.cs deleted file mode 100644 index 6025fd8..0000000 --- a/Source/Tribufu/Model/CodeChallengeMethod.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines CodeChallengeMethod - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum CodeChallengeMethod - { - /// - /// Enum Plain for value: plain - /// - [EnumMember(Value = "plain")] - Plain, - - /// - /// Enum S256 for value: S256 - /// - [EnumMember(Value = "S256")] - S256 - } - -} diff --git a/Source/Tribufu/Model/CodeResponse.cs b/Source/Tribufu/Model/CodeResponse.cs deleted file mode 100644 index 4619640..0000000 --- a/Source/Tribufu/Model/CodeResponse.cs +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// CodeResponse - /// - [DataContract(Name = "CodeResponse")] - public partial class CodeResponse : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CodeResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// code (required). - /// state. - public CodeResponse(string code = default(string), string state = default(string)) - { - // to ensure "code" is required (not null) - if (code == null) - { - throw new ArgumentNullException("code is a required property for CodeResponse and cannot be null"); - } - this.Code = code; - this.State = state; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name = "code", IsRequired = true, EmitDefaultValue = true)] - public string Code { get; set; } - - /// - /// Gets or Sets State - /// - [DataMember(Name = "state", EmitDefaultValue = true)] - public string State { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CodeResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/CreateUser.cs b/Source/Tribufu/Model/CreateUser.cs deleted file mode 100644 index c8acf12..0000000 --- a/Source/Tribufu/Model/CreateUser.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// CreateUser - /// - [DataContract(Name = "CreateUser")] - public partial class CreateUser : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected CreateUser() { } - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// name (required). - /// displayName. - /// email. - /// password. - /// language. - /// timezone. - /// currency. - /// ipAddress. - public CreateUser(string uuid = default(string), string name = default(string), string displayName = default(string), string email = default(string), string password = default(string), string language = default(string), string timezone = default(string), string currency = default(string), string ipAddress = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for CreateUser and cannot be null"); - } - this.Name = name; - this.Uuid = uuid; - this.DisplayName = displayName; - this.Email = email; - this.Password = password; - this.Language = language; - this.Timezone = timezone; - this.Currency = currency; - this.IpAddress = ipAddress; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", EmitDefaultValue = true)] - public string DisplayName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name = "email", EmitDefaultValue = true)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name = "password", EmitDefaultValue = true)] - public string Password { get; set; } - - /// - /// Gets or Sets Language - /// - [DataMember(Name = "language", EmitDefaultValue = true)] - public string Language { get; set; } - - /// - /// Gets or Sets Timezone - /// - [DataMember(Name = "timezone", EmitDefaultValue = true)] - public string Timezone { get; set; } - - /// - /// Gets or Sets Currency - /// - [DataMember(Name = "currency", EmitDefaultValue = true)] - public string Currency { get; set; } - - /// - /// Gets or Sets IpAddress - /// - [DataMember(Name = "ip_address", EmitDefaultValue = true)] - public string IpAddress { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CreateUser {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" Timezone: ").Append(Timezone).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" IpAddress: ").Append(IpAddress).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 45) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 45.", new [] { "Name" }); - } - - // Name (string) minLength - if (this.Name != null && this.Name.Length < 1) - { - yield return new ValidationResult("Invalid value for Name, length must be greater than 1.", new [] { "Name" }); - } - - if (this.Name != null) { - // Name (string) pattern - Regex regexName = new Regex(@"^[a-zA-Z0-9-_]*$", RegexOptions.CultureInvariant); - if (!regexName.Match(this.Name).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Name, must match a pattern of " + regexName, new [] { "Name" }); - } - } - - // DisplayName (string) maxLength - if (this.DisplayName != null && this.DisplayName.Length > 45) - { - yield return new ValidationResult("Invalid value for DisplayName, length must be less than 45.", new [] { "DisplayName" }); - } - - if (this.DisplayName != null) { - // DisplayName (string) pattern - Regex regexDisplayName = new Regex(@"^[a-zA-Z0-9-_ ]*$", RegexOptions.CultureInvariant); - if (!regexDisplayName.Match(this.DisplayName).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for DisplayName, must match a pattern of " + regexDisplayName, new [] { "DisplayName" }); - } - } - - // Email (string) maxLength - if (this.Email != null && this.Email.Length > 255) - { - yield return new ValidationResult("Invalid value for Email, length must be less than 255.", new [] { "Email" }); - } - - // Language (string) maxLength - if (this.Language != null && this.Language.Length > 5) - { - yield return new ValidationResult("Invalid value for Language, length must be less than 5.", new [] { "Language" }); - } - - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - // IpAddress (string) maxLength - if (this.IpAddress != null && this.IpAddress.Length > 255) - { - yield return new ValidationResult("Invalid value for IpAddress, length must be less than 255.", new [] { "IpAddress" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/CryptoViewModel.cs b/Source/Tribufu/Model/CryptoViewModel.cs deleted file mode 100644 index 5b563a2..0000000 --- a/Source/Tribufu/Model/CryptoViewModel.cs +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// CryptoViewModel - /// - [DataContract(Name = "CryptoViewModel")] - public partial class CryptoViewModel : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// encoded. - /// decoded. - public CryptoViewModel(string encoded = default(string), string decoded = default(string)) - { - this.Encoded = encoded; - this.Decoded = decoded; - } - - /// - /// Gets or Sets Encoded - /// - [DataMember(Name = "encoded", EmitDefaultValue = true)] - public string Encoded { get; set; } - - /// - /// Gets or Sets Decoded - /// - [DataMember(Name = "decoded", EmitDefaultValue = true)] - public string Decoded { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class CryptoViewModel {\n"); - sb.Append(" Encoded: ").Append(Encoded).Append("\n"); - sb.Append(" Decoded: ").Append(Decoded).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ExternalAccount.cs b/Source/Tribufu/Model/ExternalAccount.cs deleted file mode 100644 index f24245b..0000000 --- a/Source/Tribufu/Model/ExternalAccount.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ExternalAccount - /// - [DataContract(Name = "ExternalAccount")] - public partial class ExternalAccount : IValidatableObject - { - - /// - /// Gets or Sets Provider - /// - [DataMember(Name = "provider", IsRequired = true, EmitDefaultValue = true)] - public IdentityProviderType Provider { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ExternalAccount() { } - /// - /// Initializes a new instance of the class. - /// - /// userId. - /// provider (required). - /// externalId (required). - /// name. - /// authorized. - /// fields. - /// createdAt. - /// updatedAt. - /// deletedAt. - public ExternalAccount(string userId = default(string), IdentityProviderType provider = default(IdentityProviderType), string externalId = default(string), string name = default(string), bool authorized = default(bool), Dictionary fields = default(Dictionary), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - this.Provider = provider; - // to ensure "externalId" is required (not null) - if (externalId == null) - { - throw new ArgumentNullException("externalId is a required property for ExternalAccount and cannot be null"); - } - this.ExternalId = externalId; - this.UserId = userId; - this.Name = name; - this.Authorized = authorized; - this.Fields = fields; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets UserId - /// - [DataMember(Name = "user_id", EmitDefaultValue = false)] - public string UserId { get; set; } - - /// - /// Gets or Sets ExternalId - /// - [DataMember(Name = "external_id", IsRequired = true, EmitDefaultValue = true)] - public string ExternalId { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Authorized - /// - [DataMember(Name = "authorized", EmitDefaultValue = true)] - public bool Authorized { get; set; } - - /// - /// Gets or Sets Fields - /// - [DataMember(Name = "fields", EmitDefaultValue = true)] - public Dictionary Fields { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ExternalAccount {\n"); - sb.Append(" UserId: ").Append(UserId).Append("\n"); - sb.Append(" Provider: ").Append(Provider).Append("\n"); - sb.Append(" ExternalId: ").Append(ExternalId).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Authorized: ").Append(Authorized).Append("\n"); - sb.Append(" Fields: ").Append(Fields).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // ExternalId (string) maxLength - if (this.ExternalId != null && this.ExternalId.Length > 45) - { - yield return new ValidationResult("Invalid value for ExternalId, length must be less than 45.", new [] { "ExternalId" }); - } - - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/Game.cs b/Source/Tribufu/Model/Game.cs deleted file mode 100644 index 638a09e..0000000 --- a/Source/Tribufu/Model/Game.cs +++ /dev/null @@ -1,306 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Game - /// - [DataContract(Name = "Game")] - public partial class Game : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public ApplicationType? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Game() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// description. - /// type. - /// organizationId. - /// iconUrl. - /// bannerUrl. - /// capsuleImageUrl. - /// libraryImageUrl. - /// slug. - /// createdAt. - /// updatedAt. - /// deletedAt. - /// enableServers. - /// gamePort. - /// queryPort. - /// rconPort. - /// gamedigId. - /// steamAppId. - /// steamServerAppId. - public Game(string id = default(string), string name = default(string), string description = default(string), ApplicationType? type = default(ApplicationType?), string organizationId = default(string), string iconUrl = default(string), string bannerUrl = default(string), string capsuleImageUrl = default(string), string libraryImageUrl = default(string), string slug = default(string), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?), bool enableServers = default(bool), int? gamePort = default(int?), int? queryPort = default(int?), int? rconPort = default(int?), string gamedigId = default(string), int? steamAppId = default(int?), int? steamServerAppId = default(int?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for Game and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Description = description; - this.Type = type; - this.OrganizationId = organizationId; - this.IconUrl = iconUrl; - this.BannerUrl = bannerUrl; - this.CapsuleImageUrl = capsuleImageUrl; - this.LibraryImageUrl = libraryImageUrl; - this.Slug = slug; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - this.EnableServers = enableServers; - this.GamePort = gamePort; - this.QueryPort = queryPort; - this.RconPort = rconPort; - this.GamedigId = gamedigId; - this.SteamAppId = steamAppId; - this.SteamServerAppId = steamServerAppId; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets OrganizationId - /// - [DataMember(Name = "organization_id", EmitDefaultValue = false)] - public string OrganizationId { get; set; } - - /// - /// Gets or Sets IconUrl - /// - [DataMember(Name = "icon_url", EmitDefaultValue = true)] - public string IconUrl { get; set; } - - /// - /// Gets or Sets BannerUrl - /// - [DataMember(Name = "banner_url", EmitDefaultValue = true)] - public string BannerUrl { get; set; } - - /// - /// Gets or Sets CapsuleImageUrl - /// - [DataMember(Name = "capsule_image_url", EmitDefaultValue = true)] - public string CapsuleImageUrl { get; set; } - - /// - /// Gets or Sets LibraryImageUrl - /// - [DataMember(Name = "library_image_url", EmitDefaultValue = true)] - public string LibraryImageUrl { get; set; } - - /// - /// Gets or Sets Slug - /// - [DataMember(Name = "slug", EmitDefaultValue = true)] - public string Slug { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Gets or Sets EnableServers - /// - [DataMember(Name = "enable_servers", EmitDefaultValue = true)] - public bool EnableServers { get; set; } - - /// - /// Gets or Sets GamePort - /// - [DataMember(Name = "game_port", EmitDefaultValue = true)] - public int? GamePort { get; set; } - - /// - /// Gets or Sets QueryPort - /// - [DataMember(Name = "query_port", EmitDefaultValue = true)] - public int? QueryPort { get; set; } - - /// - /// Gets or Sets RconPort - /// - [DataMember(Name = "rcon_port", EmitDefaultValue = true)] - public int? RconPort { get; set; } - - /// - /// Gets or Sets GamedigId - /// - [DataMember(Name = "gamedig_id", EmitDefaultValue = true)] - public string GamedigId { get; set; } - - /// - /// Gets or Sets SteamAppId - /// - [DataMember(Name = "steam_app_id", EmitDefaultValue = true)] - public int? SteamAppId { get; set; } - - /// - /// Gets or Sets SteamServerAppId - /// - [DataMember(Name = "steam_server_app_id", EmitDefaultValue = true)] - public int? SteamServerAppId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Game {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" OrganizationId: ").Append(OrganizationId).Append("\n"); - sb.Append(" IconUrl: ").Append(IconUrl).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" CapsuleImageUrl: ").Append(CapsuleImageUrl).Append("\n"); - sb.Append(" LibraryImageUrl: ").Append(LibraryImageUrl).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append(" EnableServers: ").Append(EnableServers).Append("\n"); - sb.Append(" GamePort: ").Append(GamePort).Append("\n"); - sb.Append(" QueryPort: ").Append(QueryPort).Append("\n"); - sb.Append(" RconPort: ").Append(RconPort).Append("\n"); - sb.Append(" GamedigId: ").Append(GamedigId).Append("\n"); - sb.Append(" SteamAppId: ").Append(SteamAppId).Append("\n"); - sb.Append(" SteamServerAppId: ").Append(SteamServerAppId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - // IconUrl (string) maxLength - if (this.IconUrl != null && this.IconUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for IconUrl, length must be less than 255.", new [] { "IconUrl" }); - } - - // BannerUrl (string) maxLength - if (this.BannerUrl != null && this.BannerUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for BannerUrl, length must be less than 255.", new [] { "BannerUrl" }); - } - - // CapsuleImageUrl (string) maxLength - if (this.CapsuleImageUrl != null && this.CapsuleImageUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for CapsuleImageUrl, length must be less than 255.", new [] { "CapsuleImageUrl" }); - } - - // LibraryImageUrl (string) maxLength - if (this.LibraryImageUrl != null && this.LibraryImageUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for LibraryImageUrl, length must be less than 255.", new [] { "LibraryImageUrl" }); - } - - // Slug (string) maxLength - if (this.Slug != null && this.Slug.Length > 75) - { - yield return new ValidationResult("Invalid value for Slug, length must be less than 75.", new [] { "Slug" }); - } - - // GamedigId (string) maxLength - if (this.GamedigId != null && this.GamedigId.Length > 45) - { - yield return new ValidationResult("Invalid value for GamedigId, length must be less than 45.", new [] { "GamedigId" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GameServer.cs b/Source/Tribufu/Model/GameServer.cs deleted file mode 100644 index 283a689..0000000 --- a/Source/Tribufu/Model/GameServer.cs +++ /dev/null @@ -1,335 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// GameServer - /// - [DataContract(Name = "GameServer")] - public partial class GameServer : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GameServer() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// description. - /// ownerId. - /// address (required). - /// queryPort (required). - /// gamePort. - /// map. - /// varVersion. - /// gameId. - /// gameIconUrl. - /// clusterId. - /// websiteUrl. - /// bannerUrl. - /// uptime. - /// country. - /// steam. - /// discordServerId. - /// youtubeVideoUrl. - /// createdAt. - /// updatedAt. - /// deletedAt. - public GameServer(string id = default(string), string name = default(string), string description = default(string), string ownerId = default(string), string address = default(string), int queryPort = default(int), int? gamePort = default(int?), string map = default(string), string varVersion = default(string), string gameId = default(string), string gameIconUrl = default(string), string clusterId = default(string), string websiteUrl = default(string), string bannerUrl = default(string), double uptime = default(double), string country = default(string), bool steam = default(bool), long? discordServerId = default(long?), string youtubeVideoUrl = default(string), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for GameServer and cannot be null"); - } - this.Name = name; - // to ensure "address" is required (not null) - if (address == null) - { - throw new ArgumentNullException("address is a required property for GameServer and cannot be null"); - } - this.Address = address; - this.QueryPort = queryPort; - this.Id = id; - this.Description = description; - this.OwnerId = ownerId; - this.GamePort = gamePort; - this.Map = map; - this.VarVersion = varVersion; - this.GameId = gameId; - this.GameIconUrl = gameIconUrl; - this.ClusterId = clusterId; - this.WebsiteUrl = websiteUrl; - this.BannerUrl = bannerUrl; - this.Uptime = uptime; - this.Country = country; - this.Steam = steam; - this.DiscordServerId = discordServerId; - this.YoutubeVideoUrl = youtubeVideoUrl; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets OwnerId - /// - [DataMember(Name = "owner_id", EmitDefaultValue = false)] - public string OwnerId { get; set; } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", IsRequired = true, EmitDefaultValue = true)] - public string Address { get; set; } - - /// - /// Gets or Sets QueryPort - /// - [DataMember(Name = "query_port", IsRequired = true, EmitDefaultValue = true)] - public int QueryPort { get; set; } - - /// - /// Gets or Sets GamePort - /// - [DataMember(Name = "game_port", EmitDefaultValue = true)] - public int? GamePort { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name = "map", EmitDefaultValue = true)] - public string Map { get; set; } - - /// - /// Gets or Sets VarVersion - /// - [DataMember(Name = "version", EmitDefaultValue = true)] - public string VarVersion { get; set; } - - /// - /// Gets or Sets GameId - /// - [DataMember(Name = "game_id", EmitDefaultValue = false)] - public string GameId { get; set; } - - /// - /// Gets or Sets GameIconUrl - /// - [DataMember(Name = "game_icon_url", EmitDefaultValue = true)] - public string GameIconUrl { get; set; } - - /// - /// Gets or Sets ClusterId - /// - [DataMember(Name = "cluster_id", EmitDefaultValue = false)] - public string ClusterId { get; set; } - - /// - /// Gets or Sets WebsiteUrl - /// - [DataMember(Name = "website_url", EmitDefaultValue = true)] - public string WebsiteUrl { get; set; } - - /// - /// Gets or Sets BannerUrl - /// - [DataMember(Name = "banner_url", EmitDefaultValue = true)] - public string BannerUrl { get; set; } - - /// - /// Gets or Sets Uptime - /// - [DataMember(Name = "uptime", EmitDefaultValue = false)] - public double Uptime { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = true)] - public string Country { get; set; } - - /// - /// Gets or Sets Steam - /// - [DataMember(Name = "steam", EmitDefaultValue = true)] - public bool Steam { get; set; } - - /// - /// Gets or Sets DiscordServerId - /// - [DataMember(Name = "discord_server_id", EmitDefaultValue = true)] - public long? DiscordServerId { get; set; } - - /// - /// Gets or Sets YoutubeVideoUrl - /// - [DataMember(Name = "youtube_video_url", EmitDefaultValue = true)] - public string YoutubeVideoUrl { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GameServer {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" OwnerId: ").Append(OwnerId).Append("\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" QueryPort: ").Append(QueryPort).Append("\n"); - sb.Append(" GamePort: ").Append(GamePort).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); - sb.Append(" GameId: ").Append(GameId).Append("\n"); - sb.Append(" GameIconUrl: ").Append(GameIconUrl).Append("\n"); - sb.Append(" ClusterId: ").Append(ClusterId).Append("\n"); - sb.Append(" WebsiteUrl: ").Append(WebsiteUrl).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" Uptime: ").Append(Uptime).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Steam: ").Append(Steam).Append("\n"); - sb.Append(" DiscordServerId: ").Append(DiscordServerId).Append("\n"); - sb.Append(" YoutubeVideoUrl: ").Append(YoutubeVideoUrl).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - // Address (string) maxLength - if (this.Address != null && this.Address.Length > 255) - { - yield return new ValidationResult("Invalid value for Address, length must be less than 255.", new [] { "Address" }); - } - - // Map (string) maxLength - if (this.Map != null && this.Map.Length > 255) - { - yield return new ValidationResult("Invalid value for Map, length must be less than 255.", new [] { "Map" }); - } - - // VarVersion (string) maxLength - if (this.VarVersion != null && this.VarVersion.Length > 45) - { - yield return new ValidationResult("Invalid value for VarVersion, length must be less than 45.", new [] { "VarVersion" }); - } - - // WebsiteUrl (string) maxLength - if (this.WebsiteUrl != null && this.WebsiteUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for WebsiteUrl, length must be less than 255.", new [] { "WebsiteUrl" }); - } - - // BannerUrl (string) maxLength - if (this.BannerUrl != null && this.BannerUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for BannerUrl, length must be less than 255.", new [] { "BannerUrl" }); - } - - // Country (string) maxLength - if (this.Country != null && this.Country.Length > 2) - { - yield return new ValidationResult("Invalid value for Country, length must be less than 2.", new [] { "Country" }); - } - - // YoutubeVideoUrl (string) maxLength - if (this.YoutubeVideoUrl != null && this.YoutubeVideoUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for YoutubeVideoUrl, length must be less than 255.", new [] { "YoutubeVideoUrl" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GameServerCluster.cs b/Source/Tribufu/Model/GameServerCluster.cs deleted file mode 100644 index 8c93d83..0000000 --- a/Source/Tribufu/Model/GameServerCluster.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// GameServerCluster - /// - [DataContract(Name = "GameServerCluster")] - public partial class GameServerCluster : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GameServerCluster() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// description. - /// gameId. - /// websiteUrl. - /// bannerUrl. - /// ownerId. - /// discordServerId. - /// youtubeVideoUrl. - /// tags. - /// commentCount. - /// serverCount. - /// createdAt. - /// updatedAt. - /// deletedAt. - public GameServerCluster(string id = default(string), string name = default(string), string description = default(string), string gameId = default(string), string websiteUrl = default(string), string bannerUrl = default(string), string ownerId = default(string), long? discordServerId = default(long?), string youtubeVideoUrl = default(string), string tags = default(string), int commentCount = default(int), int serverCount = default(int), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for GameServerCluster and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Description = description; - this.GameId = gameId; - this.WebsiteUrl = websiteUrl; - this.BannerUrl = bannerUrl; - this.OwnerId = ownerId; - this.DiscordServerId = discordServerId; - this.YoutubeVideoUrl = youtubeVideoUrl; - this.Tags = tags; - this.CommentCount = commentCount; - this.ServerCount = serverCount; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets GameId - /// - [DataMember(Name = "game_id", EmitDefaultValue = false)] - public string GameId { get; set; } - - /// - /// Gets or Sets WebsiteUrl - /// - [DataMember(Name = "website_url", EmitDefaultValue = true)] - public string WebsiteUrl { get; set; } - - /// - /// Gets or Sets BannerUrl - /// - [DataMember(Name = "banner_url", EmitDefaultValue = true)] - public string BannerUrl { get; set; } - - /// - /// Gets or Sets OwnerId - /// - [DataMember(Name = "owner_id", EmitDefaultValue = false)] - public string OwnerId { get; set; } - - /// - /// Gets or Sets DiscordServerId - /// - [DataMember(Name = "discord_server_id", EmitDefaultValue = true)] - public long? DiscordServerId { get; set; } - - /// - /// Gets or Sets YoutubeVideoUrl - /// - [DataMember(Name = "youtube_video_url", EmitDefaultValue = true)] - public string YoutubeVideoUrl { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name = "tags", EmitDefaultValue = true)] - public string Tags { get; set; } - - /// - /// Gets or Sets CommentCount - /// - [DataMember(Name = "comment_count", EmitDefaultValue = false)] - public int CommentCount { get; set; } - - /// - /// Gets or Sets ServerCount - /// - [DataMember(Name = "server_count", EmitDefaultValue = false)] - public int ServerCount { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GameServerCluster {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" GameId: ").Append(GameId).Append("\n"); - sb.Append(" WebsiteUrl: ").Append(WebsiteUrl).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" OwnerId: ").Append(OwnerId).Append("\n"); - sb.Append(" DiscordServerId: ").Append(DiscordServerId).Append("\n"); - sb.Append(" YoutubeVideoUrl: ").Append(YoutubeVideoUrl).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" CommentCount: ").Append(CommentCount).Append("\n"); - sb.Append(" ServerCount: ").Append(ServerCount).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - // WebsiteUrl (string) maxLength - if (this.WebsiteUrl != null && this.WebsiteUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for WebsiteUrl, length must be less than 255.", new [] { "WebsiteUrl" }); - } - - // BannerUrl (string) maxLength - if (this.BannerUrl != null && this.BannerUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for BannerUrl, length must be less than 255.", new [] { "BannerUrl" }); - } - - // YoutubeVideoUrl (string) maxLength - if (this.YoutubeVideoUrl != null && this.YoutubeVideoUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for YoutubeVideoUrl, length must be less than 255.", new [] { "YoutubeVideoUrl" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GameServerQuery.cs b/Source/Tribufu/Model/GameServerQuery.cs deleted file mode 100644 index 1b31d4d..0000000 --- a/Source/Tribufu/Model/GameServerQuery.cs +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// GameServerQuery - /// - [DataContract(Name = "GameServerQuery")] - public partial class GameServerQuery : IValidatableObject - { - - /// - /// Gets or Sets Status - /// - [DataMember(Name = "status", EmitDefaultValue = false)] - public GameServerStatus? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// serverId. - /// status. - /// ping. - /// currentPlayers. - /// maxPlayers. - /// motd. - /// createdAt. - public GameServerQuery(string id = default(string), string serverId = default(string), GameServerStatus? status = default(GameServerStatus?), int ping = default(int), int currentPlayers = default(int), int maxPlayers = default(int), string motd = default(string), DateTime createdAt = default(DateTime)) - { - this.Id = id; - this.ServerId = serverId; - this.Status = status; - this.Ping = ping; - this.CurrentPlayers = currentPlayers; - this.MaxPlayers = maxPlayers; - this.Motd = motd; - this.CreatedAt = createdAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets ServerId - /// - [DataMember(Name = "server_id", EmitDefaultValue = false)] - public string ServerId { get; set; } - - /// - /// Gets or Sets Ping - /// - [DataMember(Name = "ping", EmitDefaultValue = false)] - public int Ping { get; set; } - - /// - /// Gets or Sets CurrentPlayers - /// - [DataMember(Name = "current_players", EmitDefaultValue = false)] - public int CurrentPlayers { get; set; } - - /// - /// Gets or Sets MaxPlayers - /// - [DataMember(Name = "max_players", EmitDefaultValue = false)] - public int MaxPlayers { get; set; } - - /// - /// Gets or Sets Motd - /// - [DataMember(Name = "motd", EmitDefaultValue = true)] - public string Motd { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GameServerQuery {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" ServerId: ").Append(ServerId).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Ping: ").Append(Ping).Append("\n"); - sb.Append(" CurrentPlayers: ").Append(CurrentPlayers).Append("\n"); - sb.Append(" MaxPlayers: ").Append(MaxPlayers).Append("\n"); - sb.Append(" Motd: ").Append(Motd).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Motd (string) maxLength - if (this.Motd != null && this.Motd.Length > 255) - { - yield return new ValidationResult("Invalid value for Motd, length must be less than 255.", new [] { "Motd" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GameServerStatus.cs b/Source/Tribufu/Model/GameServerStatus.cs deleted file mode 100644 index 35648e5..0000000 --- a/Source/Tribufu/Model/GameServerStatus.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines GameServerStatus - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum GameServerStatus - { - /// - /// Enum Unknown for value: unknown - /// - [EnumMember(Value = "unknown")] - Unknown, - - /// - /// Enum Offline for value: offline - /// - [EnumMember(Value = "offline")] - Offline, - - /// - /// Enum Online for value: online - /// - [EnumMember(Value = "online")] - Online - } - -} diff --git a/Source/Tribufu/Model/GrantType.cs b/Source/Tribufu/Model/GrantType.cs deleted file mode 100644 index d371edc..0000000 --- a/Source/Tribufu/Model/GrantType.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines GrantType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum GrantType - { - /// - /// Enum AuthorizationCode for value: authorization_code - /// - [EnumMember(Value = "authorization_code")] - AuthorizationCode, - - /// - /// Enum ClientCredentials for value: client_credentials - /// - [EnumMember(Value = "client_credentials")] - ClientCredentials, - - /// - /// Enum Password for value: password - /// - [EnumMember(Value = "password")] - Password, - - /// - /// Enum RefreshToken for value: refresh_token - /// - [EnumMember(Value = "refresh_token")] - RefreshToken - } - -} diff --git a/Source/Tribufu/Model/Group.cs b/Source/Tribufu/Model/Group.cs deleted file mode 100644 index 474f9ad..0000000 --- a/Source/Tribufu/Model/Group.cs +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Group - /// - [DataContract(Name = "Group")] - public partial class Group : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Group() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// uuid. - /// name (required). - /// tag. - /// description. - /// type. - /// privacy. - /// ownerId. - /// verified. - /// photoUrl. - /// bannerUrl. - /// memberCount. - /// followerCount. - /// viewCount. - /// createdAt. - /// updatedAt. - /// deletedAt. - public Group(string id = default(string), string uuid = default(string), string name = default(string), string tag = default(string), string description = default(string), int type = default(int), int privacy = default(int), string ownerId = default(string), bool verified = default(bool), string photoUrl = default(string), string bannerUrl = default(string), int memberCount = default(int), int followerCount = default(int), int viewCount = default(int), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for Group and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Uuid = uuid; - this.Tag = tag; - this.Description = description; - this.Type = type; - this.Privacy = privacy; - this.OwnerId = ownerId; - this.Verified = verified; - this.PhotoUrl = photoUrl; - this.BannerUrl = bannerUrl; - this.MemberCount = memberCount; - this.FollowerCount = followerCount; - this.ViewCount = viewCount; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Tag - /// - [DataMember(Name = "tag", EmitDefaultValue = true)] - public string Tag { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public int Type { get; set; } - - /// - /// Gets or Sets Privacy - /// - [DataMember(Name = "privacy", EmitDefaultValue = false)] - public int Privacy { get; set; } - - /// - /// Gets or Sets OwnerId - /// - [DataMember(Name = "owner_id", EmitDefaultValue = false)] - public string OwnerId { get; set; } - - /// - /// Gets or Sets Verified - /// - [DataMember(Name = "verified", EmitDefaultValue = true)] - public bool Verified { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets BannerUrl - /// - [DataMember(Name = "banner_url", EmitDefaultValue = true)] - public string BannerUrl { get; set; } - - /// - /// Gets or Sets MemberCount - /// - [DataMember(Name = "member_count", EmitDefaultValue = false)] - public int MemberCount { get; set; } - - /// - /// Gets or Sets FollowerCount - /// - [DataMember(Name = "follower_count", EmitDefaultValue = false)] - public int FollowerCount { get; set; } - - /// - /// Gets or Sets ViewCount - /// - [DataMember(Name = "view_count", EmitDefaultValue = false)] - public int ViewCount { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Group {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Privacy: ").Append(Privacy).Append("\n"); - sb.Append(" OwnerId: ").Append(OwnerId).Append("\n"); - sb.Append(" Verified: ").Append(Verified).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); - sb.Append(" FollowerCount: ").Append(FollowerCount).Append("\n"); - sb.Append(" ViewCount: ").Append(ViewCount).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GroupApplication.cs b/Source/Tribufu/Model/GroupApplication.cs deleted file mode 100644 index 50011a4..0000000 --- a/Source/Tribufu/Model/GroupApplication.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// GroupApplication - /// - [DataContract(Name = "GroupApplication")] - public partial class GroupApplication : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected GroupApplication() { } - /// - /// Initializes a new instance of the class. - /// - /// groupId (required). - /// group. - /// applicationId. - /// application. - /// stats. - /// acquired. - /// lastUsed. - public GroupApplication(string groupId = default(string), Group group = default(Group), string applicationId = default(string), Application application = default(Application), Object stats = default(Object), DateTime acquired = default(DateTime), DateTime? lastUsed = default(DateTime?)) - { - // to ensure "groupId" is required (not null) - if (groupId == null) - { - throw new ArgumentNullException("groupId is a required property for GroupApplication and cannot be null"); - } - this.GroupId = groupId; - this.Group = group; - this.ApplicationId = applicationId; - this.Application = application; - this.Stats = stats; - this.Acquired = acquired; - this.LastUsed = lastUsed; - } - - /// - /// Gets or Sets GroupId - /// - [DataMember(Name = "group_id", IsRequired = true, EmitDefaultValue = true)] - public string GroupId { get; set; } - - /// - /// Gets or Sets Group - /// - [DataMember(Name = "group", EmitDefaultValue = false)] - public Group Group { get; set; } - - /// - /// Gets or Sets ApplicationId - /// - [DataMember(Name = "application_id", EmitDefaultValue = false)] - public string ApplicationId { get; set; } - - /// - /// Gets or Sets Application - /// - [DataMember(Name = "application", EmitDefaultValue = false)] - public Application Application { get; set; } - - /// - /// Gets or Sets Stats - /// - [DataMember(Name = "stats", EmitDefaultValue = true)] - public Object Stats { get; set; } - - /// - /// Gets or Sets Acquired - /// - [DataMember(Name = "acquired", EmitDefaultValue = false)] - public DateTime Acquired { get; set; } - - /// - /// Gets or Sets LastUsed - /// - [DataMember(Name = "last_used", EmitDefaultValue = true)] - public DateTime? LastUsed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GroupApplication {\n"); - sb.Append(" GroupId: ").Append(GroupId).Append("\n"); - sb.Append(" Group: ").Append(Group).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append(" Application: ").Append(Application).Append("\n"); - sb.Append(" Stats: ").Append(Stats).Append("\n"); - sb.Append(" Acquired: ").Append(Acquired).Append("\n"); - sb.Append(" LastUsed: ").Append(LastUsed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GroupMember.cs b/Source/Tribufu/Model/GroupMember.cs deleted file mode 100644 index dc7c3e0..0000000 --- a/Source/Tribufu/Model/GroupMember.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// GroupMember - /// - [DataContract(Name = "GroupMember")] - public partial class GroupMember : IValidatableObject - { - - /// - /// Gets or Sets Rank - /// - [DataMember(Name = "rank", EmitDefaultValue = false)] - public GroupRank? Rank { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// displayName. - /// photoUrl. - /// rank. - /// since. - public GroupMember(string id = default(string), string name = default(string), string displayName = default(string), string photoUrl = default(string), GroupRank? rank = default(GroupRank?), DateTime since = default(DateTime)) - { - this.Id = id; - this.Name = name; - this.DisplayName = displayName; - this.PhotoUrl = photoUrl; - this.Rank = rank; - this.Since = since; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", EmitDefaultValue = true)] - public string DisplayName { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets Since - /// - [DataMember(Name = "since", EmitDefaultValue = false)] - public DateTime Since { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class GroupMember {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" Rank: ").Append(Rank).Append("\n"); - sb.Append(" Since: ").Append(Since).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/GroupRank.cs b/Source/Tribufu/Model/GroupRank.cs deleted file mode 100644 index fd13361..0000000 --- a/Source/Tribufu/Model/GroupRank.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines GroupRank - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum GroupRank - { - /// - /// Enum Member for value: member - /// - [EnumMember(Value = "member")] - Member, - - /// - /// Enum Leader for value: leader - /// - [EnumMember(Value = "leader")] - Leader, - - /// - /// Enum Owner for value: owner - /// - [EnumMember(Value = "owner")] - Owner - } - -} diff --git a/Source/Tribufu/Model/HashViewModel.cs b/Source/Tribufu/Model/HashViewModel.cs deleted file mode 100644 index 3879813..0000000 --- a/Source/Tribufu/Model/HashViewModel.cs +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// HashViewModel - /// - [DataContract(Name = "HashViewModel")] - public partial class HashViewModel : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected HashViewModel() { } - /// - /// Initializes a new instance of the class. - /// - /// value (required). - public HashViewModel(string value = default(string)) - { - // to ensure "value" is required (not null) - if (value == null) - { - throw new ArgumentNullException("value is a required property for HashViewModel and cannot be null"); - } - this.Value = value; - } - - /// - /// Gets or Sets Value - /// - [DataMember(Name = "value", IsRequired = true, EmitDefaultValue = true)] - public string Value { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class HashViewModel {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/IdentityProviderType.cs b/Source/Tribufu/Model/IdentityProviderType.cs deleted file mode 100644 index 9c8de06..0000000 --- a/Source/Tribufu/Model/IdentityProviderType.cs +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines IdentityProviderType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum IdentityProviderType - { - /// - /// Enum Steam for value: steam - /// - [EnumMember(Value = "steam")] - Steam, - - /// - /// Enum Epic for value: epic - /// - [EnumMember(Value = "epic")] - Epic, - - /// - /// Enum Discord for value: discord - /// - [EnumMember(Value = "discord")] - Discord, - - /// - /// Enum Microsoft for value: microsoft - /// - [EnumMember(Value = "microsoft")] - Microsoft, - - /// - /// Enum Playstation for value: playstation - /// - [EnumMember(Value = "playstation")] - Playstation, - - /// - /// Enum Google for value: google - /// - [EnumMember(Value = "google")] - Google, - - /// - /// Enum Apple for value: apple - /// - [EnumMember(Value = "apple")] - Apple - } - -} diff --git a/Source/Tribufu/Model/IntrospectRequest.cs b/Source/Tribufu/Model/IntrospectRequest.cs deleted file mode 100644 index b5dc838..0000000 --- a/Source/Tribufu/Model/IntrospectRequest.cs +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// IntrospectRequest - /// - [DataContract(Name = "IntrospectRequest")] - public partial class IntrospectRequest : IValidatableObject - { - - /// - /// Gets or Sets TokenTypeHint - /// - [DataMember(Name = "token_type_hint", IsRequired = true, EmitDefaultValue = true)] - public TokenHintType TokenTypeHint { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected IntrospectRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// token (required). - /// tokenTypeHint (required). - public IntrospectRequest(string token = default(string), TokenHintType tokenTypeHint = default(TokenHintType)) - { - // to ensure "token" is required (not null) - if (token == null) - { - throw new ArgumentNullException("token is a required property for IntrospectRequest and cannot be null"); - } - this.Token = token; - this.TokenTypeHint = tokenTypeHint; - } - - /// - /// Gets or Sets Token - /// - [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = true)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IntrospectRequest {\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append(" TokenTypeHint: ").Append(TokenTypeHint).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/IntrospectResponse.cs b/Source/Tribufu/Model/IntrospectResponse.cs deleted file mode 100644 index 27e0482..0000000 --- a/Source/Tribufu/Model/IntrospectResponse.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// IntrospectResponse - /// - [DataContract(Name = "IntrospectResponse")] - public partial class IntrospectResponse : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// jti. - /// active. - /// tokenType. - /// clientId. - /// sub. - /// username. - /// scope. - /// iss. - /// aud. - /// iat. - /// exp. - /// nbf. - public IntrospectResponse(string jti = default(string), bool active = default(bool), string tokenType = default(string), string clientId = default(string), string sub = default(string), string username = default(string), string scope = default(string), string iss = default(string), string aud = default(string), long? iat = default(long?), long? exp = default(long?), long? nbf = default(long?)) - { - this.Jti = jti; - this.Active = active; - this.TokenType = tokenType; - this.ClientId = clientId; - this.Sub = sub; - this.Username = username; - this.Scope = scope; - this.Iss = iss; - this.Aud = aud; - this.Iat = iat; - this.Exp = exp; - this.Nbf = nbf; - } - - /// - /// Gets or Sets Jti - /// - [DataMember(Name = "jti", EmitDefaultValue = true)] - public string Jti { get; set; } - - /// - /// Gets or Sets Active - /// - [DataMember(Name = "active", EmitDefaultValue = true)] - public bool Active { get; set; } - - /// - /// Gets or Sets TokenType - /// - [DataMember(Name = "token_type", EmitDefaultValue = true)] - public string TokenType { get; set; } - - /// - /// Gets or Sets ClientId - /// - [DataMember(Name = "client_id", EmitDefaultValue = true)] - public string ClientId { get; set; } - - /// - /// Gets or Sets Sub - /// - [DataMember(Name = "sub", EmitDefaultValue = true)] - public string Sub { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name = "username", EmitDefaultValue = true)] - public string Username { get; set; } - - /// - /// Gets or Sets Scope - /// - [DataMember(Name = "scope", EmitDefaultValue = true)] - public string Scope { get; set; } - - /// - /// Gets or Sets Iss - /// - [DataMember(Name = "iss", EmitDefaultValue = true)] - public string Iss { get; set; } - - /// - /// Gets or Sets Aud - /// - [DataMember(Name = "aud", EmitDefaultValue = true)] - public string Aud { get; set; } - - /// - /// Gets or Sets Iat - /// - [DataMember(Name = "iat", EmitDefaultValue = true)] - public long? Iat { get; set; } - - /// - /// Gets or Sets Exp - /// - [DataMember(Name = "exp", EmitDefaultValue = true)] - public long? Exp { get; set; } - - /// - /// Gets or Sets Nbf - /// - [DataMember(Name = "nbf", EmitDefaultValue = true)] - public long? Nbf { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IntrospectResponse {\n"); - sb.Append(" Jti: ").Append(Jti).Append("\n"); - sb.Append(" Active: ").Append(Active).Append("\n"); - sb.Append(" TokenType: ").Append(TokenType).Append("\n"); - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - sb.Append(" Sub: ").Append(Sub).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" Scope: ").Append(Scope).Append("\n"); - sb.Append(" Iss: ").Append(Iss).Append("\n"); - sb.Append(" Aud: ").Append(Aud).Append("\n"); - sb.Append(" Iat: ").Append(Iat).Append("\n"); - sb.Append(" Exp: ").Append(Exp).Append("\n"); - sb.Append(" Nbf: ").Append(Nbf).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/IpAddress.cs b/Source/Tribufu/Model/IpAddress.cs deleted file mode 100644 index 1aaafa4..0000000 --- a/Source/Tribufu/Model/IpAddress.cs +++ /dev/null @@ -1,329 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// IpAddress - /// - [DataContract(Name = "IpAddress")] - public partial class IpAddress : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// address. - /// varVersion. - /// network. - /// reserved. - /// banned. - /// asn. - /// isp. - /// continent. - /// country. - /// province. - /// city. - /// postalCode. - /// callingCode. - /// tld. - /// language. - /// timezone. - /// currency. - /// latitude. - /// longitude. - public IpAddress(string address = default(string), int varVersion = default(int), string network = default(string), bool reserved = default(bool), bool banned = default(bool), string asn = default(string), string isp = default(string), string continent = default(string), string country = default(string), string province = default(string), string city = default(string), string postalCode = default(string), string callingCode = default(string), string tld = default(string), string language = default(string), string timezone = default(string), string currency = default(string), float? latitude = default(float?), float? longitude = default(float?)) - { - this.Address = address; - this.VarVersion = varVersion; - this.Network = network; - this.Reserved = reserved; - this.Banned = banned; - this.Asn = asn; - this.Isp = isp; - this.Continent = continent; - this.Country = country; - this.Province = province; - this.City = city; - this.PostalCode = postalCode; - this.CallingCode = callingCode; - this.Tld = tld; - this.Language = language; - this.Timezone = timezone; - this.Currency = currency; - this.Latitude = latitude; - this.Longitude = longitude; - } - - /// - /// Gets or Sets Address - /// - [DataMember(Name = "address", EmitDefaultValue = true)] - public string Address { get; set; } - - /// - /// Gets or Sets VarVersion - /// - [DataMember(Name = "version", EmitDefaultValue = false)] - public int VarVersion { get; set; } - - /// - /// Gets or Sets Network - /// - [DataMember(Name = "network", EmitDefaultValue = true)] - public string Network { get; set; } - - /// - /// Gets or Sets Reserved - /// - [DataMember(Name = "reserved", EmitDefaultValue = true)] - public bool Reserved { get; set; } - - /// - /// Gets or Sets Banned - /// - [DataMember(Name = "banned", EmitDefaultValue = true)] - public bool Banned { get; set; } - - /// - /// Gets or Sets Asn - /// - [DataMember(Name = "asn", EmitDefaultValue = true)] - public string Asn { get; set; } - - /// - /// Gets or Sets Isp - /// - [DataMember(Name = "isp", EmitDefaultValue = true)] - public string Isp { get; set; } - - /// - /// Gets or Sets Continent - /// - [DataMember(Name = "continent", EmitDefaultValue = true)] - public string Continent { get; set; } - - /// - /// Gets or Sets Country - /// - [DataMember(Name = "country", EmitDefaultValue = true)] - public string Country { get; set; } - - /// - /// Gets or Sets Province - /// - [DataMember(Name = "province", EmitDefaultValue = true)] - public string Province { get; set; } - - /// - /// Gets or Sets City - /// - [DataMember(Name = "city", EmitDefaultValue = true)] - public string City { get; set; } - - /// - /// Gets or Sets PostalCode - /// - [DataMember(Name = "postal_code", EmitDefaultValue = true)] - public string PostalCode { get; set; } - - /// - /// Gets or Sets CallingCode - /// - [DataMember(Name = "calling_code", EmitDefaultValue = true)] - public string CallingCode { get; set; } - - /// - /// Gets or Sets Tld - /// - [DataMember(Name = "tld", EmitDefaultValue = true)] - public string Tld { get; set; } - - /// - /// Gets or Sets Language - /// - [DataMember(Name = "language", EmitDefaultValue = true)] - public string Language { get; set; } - - /// - /// Gets or Sets Timezone - /// - [DataMember(Name = "timezone", EmitDefaultValue = true)] - public string Timezone { get; set; } - - /// - /// Gets or Sets Currency - /// - [DataMember(Name = "currency", EmitDefaultValue = true)] - public string Currency { get; set; } - - /// - /// Gets or Sets Latitude - /// - [DataMember(Name = "latitude", EmitDefaultValue = true)] - public float? Latitude { get; set; } - - /// - /// Gets or Sets Longitude - /// - [DataMember(Name = "longitude", EmitDefaultValue = true)] - public float? Longitude { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class IpAddress {\n"); - sb.Append(" Address: ").Append(Address).Append("\n"); - sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); - sb.Append(" Network: ").Append(Network).Append("\n"); - sb.Append(" Reserved: ").Append(Reserved).Append("\n"); - sb.Append(" Banned: ").Append(Banned).Append("\n"); - sb.Append(" Asn: ").Append(Asn).Append("\n"); - sb.Append(" Isp: ").Append(Isp).Append("\n"); - sb.Append(" Continent: ").Append(Continent).Append("\n"); - sb.Append(" Country: ").Append(Country).Append("\n"); - sb.Append(" Province: ").Append(Province).Append("\n"); - sb.Append(" City: ").Append(City).Append("\n"); - sb.Append(" PostalCode: ").Append(PostalCode).Append("\n"); - sb.Append(" CallingCode: ").Append(CallingCode).Append("\n"); - sb.Append(" Tld: ").Append(Tld).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" Timezone: ").Append(Timezone).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Latitude: ").Append(Latitude).Append("\n"); - sb.Append(" Longitude: ").Append(Longitude).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Address (string) maxLength - if (this.Address != null && this.Address.Length > 255) - { - yield return new ValidationResult("Invalid value for Address, length must be less than 255.", new [] { "Address" }); - } - - // Network (string) maxLength - if (this.Network != null && this.Network.Length > 255) - { - yield return new ValidationResult("Invalid value for Network, length must be less than 255.", new [] { "Network" }); - } - - // Asn (string) maxLength - if (this.Asn != null && this.Asn.Length > 10) - { - yield return new ValidationResult("Invalid value for Asn, length must be less than 10.", new [] { "Asn" }); - } - - // Isp (string) maxLength - if (this.Isp != null && this.Isp.Length > 255) - { - yield return new ValidationResult("Invalid value for Isp, length must be less than 255.", new [] { "Isp" }); - } - - // Continent (string) maxLength - if (this.Continent != null && this.Continent.Length > 2) - { - yield return new ValidationResult("Invalid value for Continent, length must be less than 2.", new [] { "Continent" }); - } - - // Country (string) maxLength - if (this.Country != null && this.Country.Length > 2) - { - yield return new ValidationResult("Invalid value for Country, length must be less than 2.", new [] { "Country" }); - } - - // Province (string) maxLength - if (this.Province != null && this.Province.Length > 255) - { - yield return new ValidationResult("Invalid value for Province, length must be less than 255.", new [] { "Province" }); - } - - // City (string) maxLength - if (this.City != null && this.City.Length > 255) - { - yield return new ValidationResult("Invalid value for City, length must be less than 255.", new [] { "City" }); - } - - // PostalCode (string) maxLength - if (this.PostalCode != null && this.PostalCode.Length > 45) - { - yield return new ValidationResult("Invalid value for PostalCode, length must be less than 45.", new [] { "PostalCode" }); - } - - // CallingCode (string) maxLength - if (this.CallingCode != null && this.CallingCode.Length > 4) - { - yield return new ValidationResult("Invalid value for CallingCode, length must be less than 4.", new [] { "CallingCode" }); - } - - // Tld (string) maxLength - if (this.Tld != null && this.Tld.Length > 3) - { - yield return new ValidationResult("Invalid value for Tld, length must be less than 3.", new [] { "Tld" }); - } - - // Language (string) maxLength - if (this.Language != null && this.Language.Length > 5) - { - yield return new ValidationResult("Invalid value for Language, length must be less than 5.", new [] { "Language" }); - } - - // Timezone (string) maxLength - if (this.Timezone != null && this.Timezone.Length > 45) - { - yield return new ValidationResult("Invalid value for Timezone, length must be less than 45.", new [] { "Timezone" }); - } - - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/LeaderboardItem.cs b/Source/Tribufu/Model/LeaderboardItem.cs deleted file mode 100644 index 0222cb9..0000000 --- a/Source/Tribufu/Model/LeaderboardItem.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// LeaderboardItem - /// - [DataContract(Name = "LeaderboardItem")] - public partial class LeaderboardItem : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// displayName. - /// photoUrl. - /// level. - /// experience. - /// points. - public LeaderboardItem(string name = default(string), string displayName = default(string), string photoUrl = default(string), int level = default(int), double experience = default(double), double points = default(double)) - { - this.Name = name; - this.DisplayName = displayName; - this.PhotoUrl = photoUrl; - this.Level = level; - this.Experience = experience; - this.Points = points; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", EmitDefaultValue = true)] - public string DisplayName { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets Level - /// - [DataMember(Name = "level", EmitDefaultValue = false)] - public int Level { get; set; } - - /// - /// Gets or Sets Experience - /// - [DataMember(Name = "experience", EmitDefaultValue = false)] - public double Experience { get; set; } - - /// - /// Gets or Sets Points - /// - [DataMember(Name = "points", EmitDefaultValue = false)] - public double Points { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class LeaderboardItem {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" Level: ").Append(Level).Append("\n"); - sb.Append(" Experience: ").Append(Experience).Append("\n"); - sb.Append(" Points: ").Append(Points).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/LeaderboardOrder.cs b/Source/Tribufu/Model/LeaderboardOrder.cs deleted file mode 100644 index b0ec474..0000000 --- a/Source/Tribufu/Model/LeaderboardOrder.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines LeaderboardOrder - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum LeaderboardOrder - { - /// - /// Enum Level for value: level - /// - [EnumMember(Value = "level")] - Level, - - /// - /// Enum Points for value: points - /// - [EnumMember(Value = "points")] - Points - } - -} diff --git a/Source/Tribufu/Model/ModelClient.cs b/Source/Tribufu/Model/ModelClient.cs deleted file mode 100644 index 5ca9c5a..0000000 --- a/Source/Tribufu/Model/ModelClient.cs +++ /dev/null @@ -1,234 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ModelClient - /// - [DataContract(Name = "varClient")] - public partial class ModelClient : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public ClientType? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ModelClient() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// type. - /// organizationId. - /// trusted. - /// websiteUrl. - /// photoUrl. - /// backgroundUrl. - /// redirects. - /// scopes. - /// createdAt. - /// updatedAt. - /// deletedAt. - public ModelClient(string id = default(string), string name = default(string), ClientType? type = default(ClientType?), string organizationId = default(string), bool trusted = default(bool), string websiteUrl = default(string), string photoUrl = default(string), string backgroundUrl = default(string), string redirects = default(string), string scopes = default(string), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for ModelClient and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Type = type; - this.OrganizationId = organizationId; - this.Trusted = trusted; - this.WebsiteUrl = websiteUrl; - this.PhotoUrl = photoUrl; - this.BackgroundUrl = backgroundUrl; - this.Redirects = redirects; - this.Scopes = scopes; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets OrganizationId - /// - [DataMember(Name = "organization_id", EmitDefaultValue = false)] - public string OrganizationId { get; set; } - - /// - /// Gets or Sets Trusted - /// - [DataMember(Name = "trusted", EmitDefaultValue = true)] - public bool Trusted { get; set; } - - /// - /// Gets or Sets WebsiteUrl - /// - [DataMember(Name = "website_url", EmitDefaultValue = true)] - public string WebsiteUrl { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets BackgroundUrl - /// - [DataMember(Name = "background_url", EmitDefaultValue = true)] - public string BackgroundUrl { get; set; } - - /// - /// Gets or Sets Redirects - /// - [DataMember(Name = "redirects", EmitDefaultValue = true)] - public string Redirects { get; set; } - - /// - /// Gets or Sets Scopes - /// - [DataMember(Name = "scopes", EmitDefaultValue = true)] - public string Scopes { get; set; } - - /// - /// Gets or Sets Permissions - /// - [DataMember(Name = "permissions", EmitDefaultValue = true)] - public List Permissions { get; private set; } - - /// - /// Returns false as Permissions should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializePermissions() - { - return false; - } - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" OrganizationId: ").Append(OrganizationId).Append("\n"); - sb.Append(" Trusted: ").Append(Trusted).Append("\n"); - sb.Append(" WebsiteUrl: ").Append(WebsiteUrl).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" BackgroundUrl: ").Append(BackgroundUrl).Append("\n"); - sb.Append(" Redirects: ").Append(Redirects).Append("\n"); - sb.Append(" Scopes: ").Append(Scopes).Append("\n"); - sb.Append(" Permissions: ").Append(Permissions).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - // PhotoUrl (string) maxLength - if (this.PhotoUrl != null && this.PhotoUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for PhotoUrl, length must be less than 255.", new [] { "PhotoUrl" }); - } - - // BackgroundUrl (string) maxLength - if (this.BackgroundUrl != null && this.BackgroundUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for BackgroundUrl, length must be less than 255.", new [] { "BackgroundUrl" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/Package.cs b/Source/Tribufu/Model/Package.cs deleted file mode 100644 index d48442a..0000000 --- a/Source/Tribufu/Model/Package.cs +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Package - /// - [DataContract(Name = "Package")] - public partial class Package : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Package() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// description. - /// authorId. - /// imageUrl (required). - /// applicationId. - /// categoryId. - /// downloadCount. - /// lastDownload. - /// releases. - /// createdAt. - /// updatedAt. - /// deletedAt. - public Package(string id = default(string), string name = default(string), string description = default(string), string authorId = default(string), string imageUrl = default(string), string applicationId = default(string), string categoryId = default(string), int downloadCount = default(int), DateTime? lastDownload = default(DateTime?), List releases = default(List), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for Package and cannot be null"); - } - this.Name = name; - // to ensure "imageUrl" is required (not null) - if (imageUrl == null) - { - throw new ArgumentNullException("imageUrl is a required property for Package and cannot be null"); - } - this.ImageUrl = imageUrl; - this.Id = id; - this.Description = description; - this.AuthorId = authorId; - this.ApplicationId = applicationId; - this.CategoryId = categoryId; - this.DownloadCount = downloadCount; - this.LastDownload = lastDownload; - this.Releases = releases; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets AuthorId - /// - [DataMember(Name = "author_id", EmitDefaultValue = false)] - public string AuthorId { get; set; } - - /// - /// Gets or Sets ImageUrl - /// - [DataMember(Name = "image_url", IsRequired = true, EmitDefaultValue = true)] - public string ImageUrl { get; set; } - - /// - /// Gets or Sets ApplicationId - /// - [DataMember(Name = "application_id", EmitDefaultValue = false)] - public string ApplicationId { get; set; } - - /// - /// Gets or Sets CategoryId - /// - [DataMember(Name = "category_id", EmitDefaultValue = false)] - public string CategoryId { get; set; } - - /// - /// Gets or Sets DownloadCount - /// - [DataMember(Name = "download_count", EmitDefaultValue = false)] - public int DownloadCount { get; set; } - - /// - /// Gets or Sets LastDownload - /// - [DataMember(Name = "last_download", EmitDefaultValue = true)] - public DateTime? LastDownload { get; set; } - - /// - /// Gets or Sets Releases - /// - [DataMember(Name = "releases", EmitDefaultValue = true)] - public List Releases { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Package {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" AuthorId: ").Append(AuthorId).Append("\n"); - sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); - sb.Append(" ApplicationId: ").Append(ApplicationId).Append("\n"); - sb.Append(" CategoryId: ").Append(CategoryId).Append("\n"); - sb.Append(" DownloadCount: ").Append(DownloadCount).Append("\n"); - sb.Append(" LastDownload: ").Append(LastDownload).Append("\n"); - sb.Append(" Releases: ").Append(Releases).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 45) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 45.", new [] { "Name" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/PackageRelease.cs b/Source/Tribufu/Model/PackageRelease.cs deleted file mode 100644 index 4052067..0000000 --- a/Source/Tribufu/Model/PackageRelease.cs +++ /dev/null @@ -1,168 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// PackageRelease - /// - [DataContract(Name = "PackageRelease")] - public partial class PackageRelease : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected PackageRelease() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// varVersion (required). - /// packageId. - /// notes. - /// createdAt. - /// updatedAt. - /// deletedAt. - public PackageRelease(string id = default(string), string varVersion = default(string), string packageId = default(string), string notes = default(string), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "varVersion" is required (not null) - if (varVersion == null) - { - throw new ArgumentNullException("varVersion is a required property for PackageRelease and cannot be null"); - } - this.VarVersion = varVersion; - this.Id = id; - this.PackageId = packageId; - this.Notes = notes; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets VarVersion - /// - [DataMember(Name = "version", IsRequired = true, EmitDefaultValue = true)] - public string VarVersion { get; set; } - - /// - /// Gets or Sets PackageId - /// - [DataMember(Name = "package_id", EmitDefaultValue = false)] - public string PackageId { get; set; } - - /// - /// Gets or Sets Notes - /// - [DataMember(Name = "notes", EmitDefaultValue = true)] - public string Notes { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name = "files", EmitDefaultValue = true)] - public List Files { get; private set; } - - /// - /// Returns false as Files should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeFiles() - { - return false; - } - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class PackageRelease {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" VarVersion: ").Append(VarVersion).Append("\n"); - sb.Append(" PackageId: ").Append(PackageId).Append("\n"); - sb.Append(" Notes: ").Append(Notes).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // VarVersion (string) maxLength - if (this.VarVersion != null && this.VarVersion.Length > 45) - { - yield return new ValidationResult("Invalid value for VarVersion, length must be less than 45.", new [] { "VarVersion" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/Product.cs b/Source/Tribufu/Model/Product.cs deleted file mode 100644 index e8ca8b0..0000000 --- a/Source/Tribufu/Model/Product.cs +++ /dev/null @@ -1,207 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Product - /// - [DataContract(Name = "Product")] - public partial class Product : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public ProductType? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Product() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// sku. - /// description. - /// type. - /// slug. - /// imageUrl. - /// prices. - /// createdAt. - /// updatedAt. - /// deletedAt. - public Product(string id = default(string), string name = default(string), string sku = default(string), string description = default(string), ProductType? type = default(ProductType?), string slug = default(string), string imageUrl = default(string), List prices = default(List), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for Product and cannot be null"); - } - this.Name = name; - this.Id = id; - this.Sku = sku; - this.Description = description; - this.Type = type; - this.Slug = slug; - this.ImageUrl = imageUrl; - this.Prices = prices; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Sku - /// - [DataMember(Name = "sku", EmitDefaultValue = true)] - public string Sku { get; set; } - - /// - /// Gets or Sets Description - /// - [DataMember(Name = "description", EmitDefaultValue = true)] - public string Description { get; set; } - - /// - /// Gets or Sets Slug - /// - [DataMember(Name = "slug", EmitDefaultValue = true)] - public string Slug { get; set; } - - /// - /// Gets or Sets ImageUrl - /// - [DataMember(Name = "image_url", EmitDefaultValue = true)] - public string ImageUrl { get; set; } - - /// - /// Gets or Sets Prices - /// - [DataMember(Name = "prices", EmitDefaultValue = true)] - public List Prices { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Product {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Sku: ").Append(Sku).Append("\n"); - sb.Append(" Description: ").Append(Description).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); - sb.Append(" Prices: ").Append(Prices).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 75) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 75.", new [] { "Name" }); - } - - // Sku (string) maxLength - if (this.Sku != null && this.Sku.Length > 75) - { - yield return new ValidationResult("Invalid value for Sku, length must be less than 75.", new [] { "Sku" }); - } - - // Slug (string) maxLength - if (this.Slug != null && this.Slug.Length > 75) - { - yield return new ValidationResult("Invalid value for Slug, length must be less than 75.", new [] { "Slug" }); - } - - // ImageUrl (string) maxLength - if (this.ImageUrl != null && this.ImageUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for ImageUrl, length must be less than 255.", new [] { "ImageUrl" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ProductPrice.cs b/Source/Tribufu/Model/ProductPrice.cs deleted file mode 100644 index a01ebea..0000000 --- a/Source/Tribufu/Model/ProductPrice.cs +++ /dev/null @@ -1,117 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ProductPrice - /// - [DataContract(Name = "ProductPrice")] - public partial class ProductPrice : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected ProductPrice() { } - /// - /// Initializes a new instance of the class. - /// - /// currency (required). - /// price. - /// renewal. - public ProductPrice(string currency = default(string), double price = default(double), double? renewal = default(double?)) - { - // to ensure "currency" is required (not null) - if (currency == null) - { - throw new ArgumentNullException("currency is a required property for ProductPrice and cannot be null"); - } - this.Currency = currency; - this.Price = price; - this.Renewal = renewal; - } - - /// - /// Gets or Sets Currency - /// - [DataMember(Name = "currency", IsRequired = true, EmitDefaultValue = true)] - public string Currency { get; set; } - - /// - /// Gets or Sets Price - /// - [DataMember(Name = "price", EmitDefaultValue = false)] - public double Price { get; set; } - - /// - /// Gets or Sets Renewal - /// - [DataMember(Name = "renewal", EmitDefaultValue = true)] - public double? Renewal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ProductPrice {\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" Price: ").Append(Price).Append("\n"); - sb.Append(" Renewal: ").Append(Renewal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Currency (string) maxLength - if (this.Currency != null && this.Currency.Length > 3) - { - yield return new ValidationResult("Invalid value for Currency, length must be less than 3.", new [] { "Currency" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ProductType.cs b/Source/Tribufu/Model/ProductType.cs deleted file mode 100644 index a75e466..0000000 --- a/Source/Tribufu/Model/ProductType.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines ProductType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ProductType - { - /// - /// Enum Product for value: product - /// - [EnumMember(Value = "product")] - Product, - - /// - /// Enum Subscription for value: subscription - /// - [EnumMember(Value = "subscription")] - Subscription - } - -} diff --git a/Source/Tribufu/Model/Profile.cs b/Source/Tribufu/Model/Profile.cs deleted file mode 100644 index 02724d5..0000000 --- a/Source/Tribufu/Model/Profile.cs +++ /dev/null @@ -1,283 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Profile - /// - [DataContract(Name = "Profile")] - public partial class Profile : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public Profile() - { - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; private set; } - - /// - /// Returns false as Id should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeId() - { - return false; - } - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; private set; } - - /// - /// Returns false as Name should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeName() - { - return false; - } - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", EmitDefaultValue = true)] - public string DisplayName { get; private set; } - - /// - /// Returns false as DisplayName should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeDisplayName() - { - return false; - } - /// - /// Gets or Sets Level - /// - [DataMember(Name = "level", EmitDefaultValue = false)] - public int Level { get; private set; } - - /// - /// Returns false as Level should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeLevel() - { - return false; - } - /// - /// Gets or Sets Experience - /// - [DataMember(Name = "experience", EmitDefaultValue = false)] - public double Experience { get; private set; } - - /// - /// Returns false as Experience should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeExperience() - { - return false; - } - /// - /// Gets or Sets Birthday - /// - [DataMember(Name = "birthday", EmitDefaultValue = true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? Birthday { get; private set; } - - /// - /// Returns false as Birthday should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBirthday() - { - return false; - } - /// - /// Gets or Sets Points - /// - [DataMember(Name = "points", EmitDefaultValue = false)] - public double Points { get; private set; } - - /// - /// Returns false as Points should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializePoints() - { - return false; - } - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; private set; } - - /// - /// Returns false as PhotoUrl should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializePhotoUrl() - { - return false; - } - /// - /// Gets or Sets BannerUrl - /// - [DataMember(Name = "banner_url", EmitDefaultValue = true)] - public string BannerUrl { get; private set; } - - /// - /// Returns false as BannerUrl should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBannerUrl() - { - return false; - } - /// - /// Gets or Sets LastOnline - /// - [DataMember(Name = "last_online", EmitDefaultValue = true)] - public DateTime? LastOnline { get; private set; } - - /// - /// Returns false as LastOnline should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeLastOnline() - { - return false; - } - /// - /// Gets or Sets Biography - /// - [DataMember(Name = "biography", EmitDefaultValue = true)] - public string Biography { get; private set; } - - /// - /// Returns false as Biography should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeBiography() - { - return false; - } - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; private set; } - - /// - /// Returns false as CreatedAt should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeCreatedAt() - { - return false; - } - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; private set; } - - /// - /// Returns false as UpdatedAt should not be serialized given that it's read-only. - /// - /// false (boolean) - public bool ShouldSerializeUpdatedAt() - { - return false; - } - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Profile {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" Level: ").Append(Level).Append("\n"); - sb.Append(" Experience: ").Append(Experience).Append("\n"); - sb.Append(" Birthday: ").Append(Birthday).Append("\n"); - sb.Append(" Points: ").Append(Points).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" BannerUrl: ").Append(BannerUrl).Append("\n"); - sb.Append(" LastOnline: ").Append(LastOnline).Append("\n"); - sb.Append(" Biography: ").Append(Biography).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // DisplayName (string) maxLength - if (this.DisplayName != null && this.DisplayName.Length > 45) - { - yield return new ValidationResult("Invalid value for DisplayName, length must be less than 45.", new [] { "DisplayName" }); - } - - // BannerUrl (string) maxLength - if (this.BannerUrl != null && this.BannerUrl.Length > 255) - { - yield return new ValidationResult("Invalid value for BannerUrl, length must be less than 255.", new [] { "BannerUrl" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ProfileGame.cs b/Source/Tribufu/Model/ProfileGame.cs deleted file mode 100644 index 4451c1b..0000000 --- a/Source/Tribufu/Model/ProfileGame.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ProfileGame - /// - [DataContract(Name = "ProfileGame")] - public partial class ProfileGame : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - /// capsuleImageUrl. - /// libraryImageUrl. - /// slug. - /// timeUsed. - /// unlockedAchievements. - /// totalAchievements. - /// stats. - /// acquired. - /// lastUsed. - public ProfileGame(string id = default(string), string name = default(string), string capsuleImageUrl = default(string), string libraryImageUrl = default(string), string slug = default(string), double timeUsed = default(double), int unlockedAchievements = default(int), int totalAchievements = default(int), Object stats = default(Object), DateTime acquired = default(DateTime), DateTime? lastUsed = default(DateTime?)) - { - this.Id = id; - this.Name = name; - this.CapsuleImageUrl = capsuleImageUrl; - this.LibraryImageUrl = libraryImageUrl; - this.Slug = slug; - this.TimeUsed = timeUsed; - this.UnlockedAchievements = unlockedAchievements; - this.TotalAchievements = totalAchievements; - this.Stats = stats; - this.Acquired = acquired; - this.LastUsed = lastUsed; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets CapsuleImageUrl - /// - [DataMember(Name = "capsule_image_url", EmitDefaultValue = true)] - public string CapsuleImageUrl { get; set; } - - /// - /// Gets or Sets LibraryImageUrl - /// - [DataMember(Name = "library_image_url", EmitDefaultValue = true)] - public string LibraryImageUrl { get; set; } - - /// - /// Gets or Sets Slug - /// - [DataMember(Name = "slug", EmitDefaultValue = true)] - public string Slug { get; set; } - - /// - /// Gets or Sets TimeUsed - /// - [DataMember(Name = "time_used", EmitDefaultValue = false)] - public double TimeUsed { get; set; } - - /// - /// Gets or Sets UnlockedAchievements - /// - [DataMember(Name = "unlocked_achievements", EmitDefaultValue = false)] - public int UnlockedAchievements { get; set; } - - /// - /// Gets or Sets TotalAchievements - /// - [DataMember(Name = "total_achievements", EmitDefaultValue = false)] - public int TotalAchievements { get; set; } - - /// - /// Gets or Sets Stats - /// - [DataMember(Name = "stats", EmitDefaultValue = true)] - public Object Stats { get; set; } - - /// - /// Gets or Sets Acquired - /// - [DataMember(Name = "acquired", EmitDefaultValue = false)] - public DateTime Acquired { get; set; } - - /// - /// Gets or Sets LastUsed - /// - [DataMember(Name = "last_used", EmitDefaultValue = true)] - public DateTime? LastUsed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ProfileGame {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" CapsuleImageUrl: ").Append(CapsuleImageUrl).Append("\n"); - sb.Append(" LibraryImageUrl: ").Append(LibraryImageUrl).Append("\n"); - sb.Append(" Slug: ").Append(Slug).Append("\n"); - sb.Append(" TimeUsed: ").Append(TimeUsed).Append("\n"); - sb.Append(" UnlockedAchievements: ").Append(UnlockedAchievements).Append("\n"); - sb.Append(" TotalAchievements: ").Append(TotalAchievements).Append("\n"); - sb.Append(" Stats: ").Append(Stats).Append("\n"); - sb.Append(" Acquired: ").Append(Acquired).Append("\n"); - sb.Append(" LastUsed: ").Append(LastUsed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ProfileGroup.cs b/Source/Tribufu/Model/ProfileGroup.cs deleted file mode 100644 index 711c9ec..0000000 --- a/Source/Tribufu/Model/ProfileGroup.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ProfileGroup - /// - [DataContract(Name = "ProfileGroup")] - public partial class ProfileGroup : IValidatableObject - { - - /// - /// Gets or Sets Rank - /// - [DataMember(Name = "rank", EmitDefaultValue = false)] - public GroupRank? Rank { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// uuid. - /// name. - /// tag. - /// privacy. - /// verified. - /// photoUrl. - /// memberCount. - /// rank. - /// since. - public ProfileGroup(string id = default(string), string uuid = default(string), string name = default(string), string tag = default(string), int privacy = default(int), bool verified = default(bool), string photoUrl = default(string), int memberCount = default(int), GroupRank? rank = default(GroupRank?), DateTime since = default(DateTime)) - { - this.Id = id; - this.Uuid = uuid; - this.Name = name; - this.Tag = tag; - this.Privacy = privacy; - this.Verified = verified; - this.PhotoUrl = photoUrl; - this.MemberCount = memberCount; - this.Rank = rank; - this.Since = since; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name = "uuid", EmitDefaultValue = false)] - public string Uuid { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets Tag - /// - [DataMember(Name = "tag", EmitDefaultValue = true)] - public string Tag { get; set; } - - /// - /// Gets or Sets Privacy - /// - [DataMember(Name = "privacy", EmitDefaultValue = false)] - public int Privacy { get; set; } - - /// - /// Gets or Sets Verified - /// - [DataMember(Name = "verified", EmitDefaultValue = true)] - public bool Verified { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets MemberCount - /// - [DataMember(Name = "member_count", EmitDefaultValue = false)] - public int MemberCount { get; set; } - - /// - /// Gets or Sets Since - /// - [DataMember(Name = "since", EmitDefaultValue = false)] - public DateTime Since { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ProfileGroup {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Tag: ").Append(Tag).Append("\n"); - sb.Append(" Privacy: ").Append(Privacy).Append("\n"); - sb.Append(" Verified: ").Append(Verified).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" MemberCount: ").Append(MemberCount).Append("\n"); - sb.Append(" Rank: ").Append(Rank).Append("\n"); - sb.Append(" Since: ").Append(Since).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/ResponseType.cs b/Source/Tribufu/Model/ResponseType.cs deleted file mode 100644 index 7e0403b..0000000 --- a/Source/Tribufu/Model/ResponseType.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines ResponseType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ResponseType - { - /// - /// Enum Code for value: code - /// - [EnumMember(Value = "code")] - Code, - - /// - /// Enum Token for value: token - /// - [EnumMember(Value = "token")] - Token - } - -} diff --git a/Source/Tribufu/Model/RevokeRequest.cs b/Source/Tribufu/Model/RevokeRequest.cs deleted file mode 100644 index 20c4209..0000000 --- a/Source/Tribufu/Model/RevokeRequest.cs +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// RevokeRequest - /// - [DataContract(Name = "RevokeRequest")] - public partial class RevokeRequest : IValidatableObject - { - - /// - /// Gets or Sets TokenTypeHint - /// - [DataMember(Name = "token_type_hint", IsRequired = true, EmitDefaultValue = true)] - public TokenHintType TokenTypeHint { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected RevokeRequest() { } - /// - /// Initializes a new instance of the class. - /// - /// token (required). - /// tokenTypeHint (required). - public RevokeRequest(string token = default(string), TokenHintType tokenTypeHint = default(TokenHintType)) - { - // to ensure "token" is required (not null) - if (token == null) - { - throw new ArgumentNullException("token is a required property for RevokeRequest and cannot be null"); - } - this.Token = token; - this.TokenTypeHint = tokenTypeHint; - } - - /// - /// Gets or Sets Token - /// - [DataMember(Name = "token", IsRequired = true, EmitDefaultValue = true)] - public string Token { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class RevokeRequest {\n"); - sb.Append(" Token: ").Append(Token).Append("\n"); - sb.Append(" TokenTypeHint: ").Append(TokenTypeHint).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/Search.cs b/Source/Tribufu/Model/Search.cs deleted file mode 100644 index b6a3dc0..0000000 --- a/Source/Tribufu/Model/Search.cs +++ /dev/null @@ -1,120 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Search - /// - [DataContract(Name = "Search")] - public partial class Search : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", IsRequired = true, EmitDefaultValue = true)] - public SearchType Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Search() { } - /// - /// Initializes a new instance of the class. - /// - /// type (required). - /// query (required). - /// page. - /// gameId. - public Search(SearchType type = default(SearchType), string query = default(string), int? page = default(int?), string gameId = default(string)) - { - this.Type = type; - // to ensure "query" is required (not null) - if (query == null) - { - throw new ArgumentNullException("query is a required property for Search and cannot be null"); - } - this.Query = query; - this.Page = page; - this.GameId = gameId; - } - - /// - /// Gets or Sets Query - /// - [DataMember(Name = "query", IsRequired = true, EmitDefaultValue = true)] - public string Query { get; set; } - - /// - /// Gets or Sets Page - /// - [DataMember(Name = "page", EmitDefaultValue = true)] - public int? Page { get; set; } - - /// - /// Gets or Sets GameId - /// - [DataMember(Name = "game_id", EmitDefaultValue = false)] - public string GameId { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class Search {\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Query: ").Append(Query).Append("\n"); - sb.Append(" Page: ").Append(Page).Append("\n"); - sb.Append(" GameId: ").Append(GameId).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/SearchType.cs b/Source/Tribufu/Model/SearchType.cs deleted file mode 100644 index 0253ad1..0000000 --- a/Source/Tribufu/Model/SearchType.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines SearchType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum SearchType - { - /// - /// Enum User for value: user - /// - [EnumMember(Value = "user")] - User, - - /// - /// Enum Group for value: group - /// - [EnumMember(Value = "group")] - Group, - - /// - /// Enum GameServer for value: game_server - /// - [EnumMember(Value = "game_server")] - GameServer, - - /// - /// Enum GameServerCluster for value: game_server_cluster - /// - [EnumMember(Value = "game_server_cluster")] - GameServerCluster - } - -} diff --git a/Source/Tribufu/Model/ServerMetrics.cs b/Source/Tribufu/Model/ServerMetrics.cs deleted file mode 100644 index 2f6359e..0000000 --- a/Source/Tribufu/Model/ServerMetrics.cs +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// ServerMetrics - /// - [DataContract(Name = "ServerMetrics")] - public partial class ServerMetrics : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// serverCount. - /// packageCount. - /// countryCount. - public ServerMetrics(int serverCount = default(int), int packageCount = default(int), int countryCount = default(int)) - { - this.ServerCount = serverCount; - this.PackageCount = packageCount; - this.CountryCount = countryCount; - } - - /// - /// Gets or Sets ServerCount - /// - [DataMember(Name = "server_count", EmitDefaultValue = false)] - public int ServerCount { get; set; } - - /// - /// Gets or Sets PackageCount - /// - [DataMember(Name = "package_count", EmitDefaultValue = false)] - public int PackageCount { get; set; } - - /// - /// Gets or Sets CountryCount - /// - [DataMember(Name = "country_count", EmitDefaultValue = false)] - public int CountryCount { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class ServerMetrics {\n"); - sb.Append(" ServerCount: ").Append(ServerCount).Append("\n"); - sb.Append(" PackageCount: ").Append(PackageCount).Append("\n"); - sb.Append(" CountryCount: ").Append(CountryCount).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/StorageFile.cs b/Source/Tribufu/Model/StorageFile.cs deleted file mode 100644 index 56025ef..0000000 --- a/Source/Tribufu/Model/StorageFile.cs +++ /dev/null @@ -1,214 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// StorageFile - /// - [DataContract(Name = "StorageFile")] - public partial class StorageFile : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected StorageFile() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// contentType (required). - /// url (required). - /// size. - /// hash. - /// etag. - /// createdAt. - /// updatedAt. - /// deletedAt. - public StorageFile(string id = default(string), string name = default(string), string contentType = default(string), string url = default(string), long size = default(long), string hash = default(string), string etag = default(string), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?), DateTime? deletedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for StorageFile and cannot be null"); - } - this.Name = name; - // to ensure "contentType" is required (not null) - if (contentType == null) - { - throw new ArgumentNullException("contentType is a required property for StorageFile and cannot be null"); - } - this.ContentType = contentType; - // to ensure "url" is required (not null) - if (url == null) - { - throw new ArgumentNullException("url is a required property for StorageFile and cannot be null"); - } - this.Url = url; - this.Id = id; - this.Size = size; - this.Hash = hash; - this.Etag = etag; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - this.DeletedAt = deletedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets ContentType - /// - [DataMember(Name = "content_type", IsRequired = true, EmitDefaultValue = true)] - public string ContentType { get; set; } - - /// - /// Gets or Sets Url - /// - [DataMember(Name = "url", IsRequired = true, EmitDefaultValue = true)] - public string Url { get; set; } - - /// - /// Gets or Sets Size - /// - [DataMember(Name = "size", EmitDefaultValue = false)] - public long Size { get; set; } - - /// - /// Gets or Sets Hash - /// - [DataMember(Name = "hash", EmitDefaultValue = true)] - public string Hash { get; set; } - - /// - /// Gets or Sets Etag - /// - [DataMember(Name = "etag", EmitDefaultValue = true)] - public string Etag { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Gets or Sets DeletedAt - /// - [DataMember(Name = "deleted_at", EmitDefaultValue = true)] - public DateTime? DeletedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class StorageFile {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" ContentType: ").Append(ContentType).Append("\n"); - sb.Append(" Url: ").Append(Url).Append("\n"); - sb.Append(" Size: ").Append(Size).Append("\n"); - sb.Append(" Hash: ").Append(Hash).Append("\n"); - sb.Append(" Etag: ").Append(Etag).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append(" DeletedAt: ").Append(DeletedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - // Name (string) maxLength - if (this.Name != null && this.Name.Length > 45) - { - yield return new ValidationResult("Invalid value for Name, length must be less than 45.", new [] { "Name" }); - } - - // ContentType (string) maxLength - if (this.ContentType != null && this.ContentType.Length > 45) - { - yield return new ValidationResult("Invalid value for ContentType, length must be less than 45.", new [] { "ContentType" }); - } - - // Url (string) maxLength - if (this.Url != null && this.Url.Length > 255) - { - yield return new ValidationResult("Invalid value for Url, length must be less than 255.", new [] { "Url" }); - } - - // Hash (string) maxLength - if (this.Hash != null && this.Hash.Length > 64) - { - yield return new ValidationResult("Invalid value for Hash, length must be less than 64.", new [] { "Hash" }); - } - - // Etag (string) maxLength - if (this.Etag != null && this.Etag.Length > 32) - { - yield return new ValidationResult("Invalid value for Etag, length must be less than 32.", new [] { "Etag" }); - } - - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/TokenHintType.cs b/Source/Tribufu/Model/TokenHintType.cs deleted file mode 100644 index 099dc37..0000000 --- a/Source/Tribufu/Model/TokenHintType.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines TokenHintType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenHintType - { - /// - /// Enum AccessToken for value: access_token - /// - [EnumMember(Value = "access_token")] - AccessToken, - - /// - /// Enum RefreshToken for value: refresh_token - /// - [EnumMember(Value = "refresh_token")] - RefreshToken - } - -} diff --git a/Source/Tribufu/Model/TokenRequest.cs b/Source/Tribufu/Model/TokenRequest.cs deleted file mode 100644 index bcbc3e3..0000000 --- a/Source/Tribufu/Model/TokenRequest.cs +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// TokenRequest - /// - [DataContract(Name = "TokenRequest")] - public partial class TokenRequest : IValidatableObject - { - - /// - /// Gets or Sets GrantType - /// - [DataMember(Name = "grant_type", EmitDefaultValue = false)] - public GrantType? GrantType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// grantType. - /// code. - /// username. - /// password. - /// refreshToken. - /// redirectUri. - /// codeVerifier. - public TokenRequest(GrantType? grantType = default(GrantType?), string code = default(string), string username = default(string), string password = default(string), string refreshToken = default(string), string redirectUri = default(string), string codeVerifier = default(string)) - { - this.GrantType = grantType; - this.Code = code; - this.Username = username; - this.Password = password; - this.RefreshToken = refreshToken; - this.RedirectUri = redirectUri; - this.CodeVerifier = codeVerifier; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name = "code", EmitDefaultValue = true)] - public string Code { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name = "username", EmitDefaultValue = true)] - public string Username { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name = "password", EmitDefaultValue = true)] - public string Password { get; set; } - - /// - /// Gets or Sets RefreshToken - /// - [DataMember(Name = "refresh_token", EmitDefaultValue = true)] - public string RefreshToken { get; set; } - - /// - /// Gets or Sets RedirectUri - /// - [DataMember(Name = "redirect_uri", EmitDefaultValue = true)] - public string RedirectUri { get; set; } - - /// - /// Gets or Sets CodeVerifier - /// - [DataMember(Name = "code_verifier", EmitDefaultValue = true)] - public string CodeVerifier { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TokenRequest {\n"); - sb.Append(" GrantType: ").Append(GrantType).Append("\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); - sb.Append(" RedirectUri: ").Append(RedirectUri).Append("\n"); - sb.Append(" CodeVerifier: ").Append(CodeVerifier).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/TokenResponse.cs b/Source/Tribufu/Model/TokenResponse.cs deleted file mode 100644 index d410c4d..0000000 --- a/Source/Tribufu/Model/TokenResponse.cs +++ /dev/null @@ -1,138 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// TokenResponse - /// - [DataContract(Name = "TokenResponse")] - public partial class TokenResponse : IValidatableObject - { - - /// - /// Gets or Sets TokenType - /// - [DataMember(Name = "token_type", IsRequired = true, EmitDefaultValue = true)] - public TokenType TokenType { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TokenResponse() { } - /// - /// Initializes a new instance of the class. - /// - /// tokenType (required). - /// accessToken (required). - /// refreshToken. - /// scope. - /// state. - /// expiresIn. - public TokenResponse(TokenType tokenType = default(TokenType), string accessToken = default(string), string refreshToken = default(string), string scope = default(string), string state = default(string), long expiresIn = default(long)) - { - this.TokenType = tokenType; - // to ensure "accessToken" is required (not null) - if (accessToken == null) - { - throw new ArgumentNullException("accessToken is a required property for TokenResponse and cannot be null"); - } - this.AccessToken = accessToken; - this.RefreshToken = refreshToken; - this.Scope = scope; - this.State = state; - this.ExpiresIn = expiresIn; - } - - /// - /// Gets or Sets AccessToken - /// - [DataMember(Name = "access_token", IsRequired = true, EmitDefaultValue = true)] - public string AccessToken { get; set; } - - /// - /// Gets or Sets RefreshToken - /// - [DataMember(Name = "refresh_token", EmitDefaultValue = true)] - public string RefreshToken { get; set; } - - /// - /// Gets or Sets Scope - /// - [DataMember(Name = "scope", EmitDefaultValue = true)] - public string Scope { get; set; } - - /// - /// Gets or Sets State - /// - [DataMember(Name = "state", EmitDefaultValue = true)] - public string State { get; set; } - - /// - /// Gets or Sets ExpiresIn - /// - [DataMember(Name = "expires_in", EmitDefaultValue = false)] - public long ExpiresIn { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class TokenResponse {\n"); - sb.Append(" TokenType: ").Append(TokenType).Append("\n"); - sb.Append(" AccessToken: ").Append(AccessToken).Append("\n"); - sb.Append(" RefreshToken: ").Append(RefreshToken).Append("\n"); - sb.Append(" Scope: ").Append(Scope).Append("\n"); - sb.Append(" State: ").Append(State).Append("\n"); - sb.Append(" ExpiresIn: ").Append(ExpiresIn).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/TokenType.cs b/Source/Tribufu/Model/TokenType.cs deleted file mode 100644 index 058d4b4..0000000 --- a/Source/Tribufu/Model/TokenType.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines TokenType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum TokenType - { - /// - /// Enum Bearer for value: bearer - /// - [EnumMember(Value = "bearer")] - Bearer - } - -} diff --git a/Source/Tribufu/Model/UpdateProfile.cs b/Source/Tribufu/Model/UpdateProfile.cs deleted file mode 100644 index 0de3f9d..0000000 --- a/Source/Tribufu/Model/UpdateProfile.cs +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// UpdateProfile - /// - [DataContract(Name = "UpdateProfile")] - public partial class UpdateProfile : IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UpdateProfile() { } - /// - /// Initializes a new instance of the class. - /// - /// displayName (required). - /// biography. - public UpdateProfile(string displayName = default(string), string biography = default(string)) - { - // to ensure "displayName" is required (not null) - if (displayName == null) - { - throw new ArgumentNullException("displayName is a required property for UpdateProfile and cannot be null"); - } - this.DisplayName = displayName; - this.Biography = biography; - } - - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", IsRequired = true, EmitDefaultValue = true)] - public string DisplayName { get; set; } - - /// - /// Gets or Sets Biography - /// - [DataMember(Name = "biography", EmitDefaultValue = true)] - public string Biography { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UpdateProfile {\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" Biography: ").Append(Biography).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/UserInfo.cs b/Source/Tribufu/Model/UserInfo.cs deleted file mode 100644 index 8be80ce..0000000 --- a/Source/Tribufu/Model/UserInfo.cs +++ /dev/null @@ -1,201 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// UserInfo - /// - [DataContract(Name = "UserInfo")] - public partial class UserInfo : IValidatableObject - { - - /// - /// Gets or Sets Type - /// - [DataMember(Name = "type", EmitDefaultValue = false)] - public UserType? Type { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected UserInfo() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required). - /// displayName. - /// emailAddress. - /// emailVerified. - /// type. - /// language. - /// timezone. - /// currency. - /// photoUrl. - /// permissions. - /// createdAt. - /// updatedAt. - public UserInfo(string id = default(string), string name = default(string), string displayName = default(string), string emailAddress = default(string), bool emailVerified = default(bool), UserType? type = default(UserType?), string language = default(string), string timezone = default(string), string currency = default(string), string photoUrl = default(string), List permissions = default(List), DateTime createdAt = default(DateTime), DateTime? updatedAt = default(DateTime?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new ArgumentNullException("name is a required property for UserInfo and cannot be null"); - } - this.Name = name; - this.Id = id; - this.DisplayName = displayName; - this.EmailAddress = emailAddress; - this.EmailVerified = emailVerified; - this.Type = type; - this.Language = language; - this.Timezone = timezone; - this.Currency = currency; - this.PhotoUrl = photoUrl; - this.Permissions = permissions; - this.CreatedAt = createdAt; - this.UpdatedAt = updatedAt; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name = "id", EmitDefaultValue = false)] - public string Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name = "name", IsRequired = true, EmitDefaultValue = true)] - public string Name { get; set; } - - /// - /// Gets or Sets DisplayName - /// - [DataMember(Name = "display_name", EmitDefaultValue = true)] - public string DisplayName { get; set; } - - /// - /// Gets or Sets EmailAddress - /// - [DataMember(Name = "email_address", EmitDefaultValue = true)] - public string EmailAddress { get; set; } - - /// - /// Gets or Sets EmailVerified - /// - [DataMember(Name = "email_verified", EmitDefaultValue = true)] - public bool EmailVerified { get; set; } - - /// - /// Gets or Sets Language - /// - [DataMember(Name = "language", EmitDefaultValue = true)] - public string Language { get; set; } - - /// - /// Gets or Sets Timezone - /// - [DataMember(Name = "timezone", EmitDefaultValue = true)] - public string Timezone { get; set; } - - /// - /// Gets or Sets Currency - /// - [DataMember(Name = "currency", EmitDefaultValue = true)] - public string Currency { get; set; } - - /// - /// Gets or Sets PhotoUrl - /// - [DataMember(Name = "photo_url", EmitDefaultValue = true)] - public string PhotoUrl { get; set; } - - /// - /// Gets or Sets Permissions - /// - [DataMember(Name = "permissions", EmitDefaultValue = true)] - public List Permissions { get; set; } - - /// - /// Gets or Sets CreatedAt - /// - [DataMember(Name = "created_at", EmitDefaultValue = false)] - public DateTime CreatedAt { get; set; } - - /// - /// Gets or Sets UpdatedAt - /// - [DataMember(Name = "updated_at", EmitDefaultValue = true)] - public DateTime? UpdatedAt { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - StringBuilder sb = new StringBuilder(); - sb.Append("class UserInfo {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - sb.Append(" EmailAddress: ").Append(EmailAddress).Append("\n"); - sb.Append(" EmailVerified: ").Append(EmailVerified).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Language: ").Append(Language).Append("\n"); - sb.Append(" Timezone: ").Append(Timezone).Append("\n"); - sb.Append(" Currency: ").Append(Currency).Append("\n"); - sb.Append(" PhotoUrl: ").Append(PhotoUrl).Append("\n"); - sb.Append(" Permissions: ").Append(Permissions).Append("\n"); - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/Source/Tribufu/Model/UserType.cs b/Source/Tribufu/Model/UserType.cs deleted file mode 100644 index 4df6b64..0000000 --- a/Source/Tribufu/Model/UserType.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Tribufu API - * - * API to access Tribufu services. - * - * The version of the OpenAPI document: 1.4.3 - * Contact: contact@tribufu.com - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.IO; -using System.Runtime.Serialization; -using System.Text; -using System.Text.RegularExpressions; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using Newtonsoft.Json.Linq; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Tribufu.Client.OpenAPIDateConverter; - -namespace Tribufu.Model -{ - /// - /// Defines UserType - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum UserType - { - /// - /// Enum User for value: user - /// - [EnumMember(Value = "user")] - User, - - /// - /// Enum Bot for value: bot - /// - [EnumMember(Value = "bot")] - Bot - } - -} diff --git a/Source/Tribufu/TribufuApi.cs b/Source/Tribufu/TribufuApi.cs deleted file mode 100644 index d8ed7fb..0000000 --- a/Source/Tribufu/TribufuApi.cs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -using System; -using System.Net; -using System.Runtime.InteropServices; -using Tribufu.Api; -using Tribufu.Client; - -namespace Tribufu -{ - /// - /// Tribufu API - /// - /// - /// Use this class to interact with the Tribufu API. - /// - public sealed class TribufuApi : TribufuGeneratedApi - { - /// - /// The default base URL for the Tribufu API. - /// - public const string DefaultBaseUrl = "https://api.tribufu.com"; - - /// - /// Create a instance. - /// - public TribufuApi(string apiKey = null) : base(CreateConfiguration(apiKey)) - { - } - - /// - /// Create a TribufuApi with the default options. - /// - /// TribufuApi instance with default configuration - public static TribufuApi Default() - { - return new TribufuApi(); - } - - /// - /// Create a with the given API key. - /// - /// - /// An API key gives you public read only access to the Tribufu API. - /// - /// The API key for authentication - /// instance configured with the API key - public static TribufuApi WithApiKey(string apiKey) - { - return new TribufuApi(apiKey); - } - - /// - /// Try to create a from environment variables. - /// - /// - /// This will only work if the environment variables are set. - /// - /// A prefix for the environment variables. Default is "TRIBUFU". - /// instance or null if environment variables not set - /// - /// // Environment variable TRIBUFU_API_KEY must be set - /// var api = TribufuApi.FromEnv(); - /// - public static TribufuApi FromEnv(string prefix = null) - { - if (prefix == null) - { - prefix = "TRIBUFU"; - } - - var apiKey = Environment.GetEnvironmentVariable($"{prefix}_API_KEY"); - - if (!string.IsNullOrEmpty(apiKey)) - { - return WithApiKey(apiKey); - } - - return null; - } - - /// - /// Create a from environment variables or the default API. - /// - /// - /// This will fallback to the default API if the environment variables are not set. - /// - /// A prefix for the environment variables. Default is "TRIBUFU". - /// instance - /// - /// // Environment variable TRIBUFU_API_KEY might be unset - /// var api = TribufuApi.FromEnvOrDefault(); - /// - public static TribufuApi FromEnvOrDefault(string prefix = "TRIBUFU") - { - return FromEnv(prefix) ?? Default(); - } - - /// - /// Gets the version of the Tribufu API client. - /// - public static string GetVersion() - { - var version = typeof(TribufuApi).Assembly.GetName().Version; - return $"{version?.Major}.{version?.Minor}.{version?.Build}"; - } - - /// - /// Gets the user agent string for the Tribufu API client. - /// - public static string GetUserAgent() - { - var version = GetVersion(); - var frameworkDescription = RuntimeInformation.FrameworkDescription.Trim(); - //var runtimeIdentifier = RuntimeInformation.RuntimeIdentifier.Trim(); - return $"Tribufu/{version} ({frameworkDescription})"; //; {runtimeIdentifier})"; - } - - /// - /// Checks if debug mode is enabled. - /// - /// True if debug mode is enabled, otherwise false - public static bool DebugEnabled() - { -#if DEBUG - return true; -#else - return false; -#endif - } - - /// - /// Get the base URL for the Tribufu API. - /// - /// - /// The base URL can be set using the environment variable TRIBUFU_API_URL. - /// The custom base URL is only used if debug mode is enabled. - /// The default base URL is https://api.tribufu.com. - /// - /// Base URL string - private static string GetBaseUrl() - { - var baseUrl = Environment.GetEnvironmentVariable("TRIBUFU_API_URL"); - - if (DebugEnabled() && !string.IsNullOrEmpty(baseUrl)) - { - return baseUrl; - } - - return DefaultBaseUrl; - } - - /// - /// Creates a configuration for the Tribufu API client. - /// - private static Configuration CreateConfiguration(string apiKey) - { - var config = new Configuration - { - BasePath = GetBaseUrl(), - UserAgent = WebUtility.UrlEncode(GetUserAgent()), - }; - - if (!string.IsNullOrEmpty(apiKey)) - { - config.AddApiKeyPrefix("Authorization", "ApiKey"); - config.AddApiKey("Authorization", apiKey); - } - - return config; - } - } -} diff --git a/Source/Tribufu/TribufuApiSingleton.cs b/Source/Tribufu/TribufuApiSingleton.cs deleted file mode 100644 index 8eca3d6..0000000 --- a/Source/Tribufu/TribufuApiSingleton.cs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) Tribufu. All Rights Reserved. -// SPDX-License-Identifier: MIT - -namespace Tribufu -{ - /// - /// Tribufu API - /// - /// - /// Helper class to get a singleton instance of the . - /// - public static class TribufuApiSingleton - { - private static TribufuApi _instance = null; - - /// - /// Get the singleton instance of . - /// - public static TribufuApi GetInstance() - { - if (_instance == null) - { - _instance = TribufuApi.FromEnvOrDefault(); - } - - return _instance; - } - - /// - /// Reset the singleton instance of . - /// - public static void ResetInstance() - { - _instance = null; - } - } -} diff --git a/Tribufu.sln b/Tribufu.sln new file mode 100644 index 0000000..997c7df --- /dev/null +++ b/Tribufu.sln @@ -0,0 +1,50 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.Native", "src\Tribufu.Native\Tribufu.Native.csproj", "{C66D6B57-324D-EAF2-3B65-75C9A7C35054}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.Serialization", "src\Tribufu.Serialization\Tribufu.Serialization.csproj", "{322FE36B-9E9B-9E66-678F-36C4D3BAC0CE}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.Serialization.Newtonsoft", "src\Tribufu.Serialization.Newtonsoft\Tribufu.Serialization.Newtonsoft.csproj", "{B7019B7B-A352-86BD-CCB6-747FB8661927}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu", "src\Tribufu\Tribufu.csproj", "{7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.Utils", "src\Tribufu.Utils\Tribufu.Utils.csproj", "{8F16FBBB-199E-4EE3-BFF3-31DD6F84DCD0}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tribufu.ComponentModel", "src\Tribufu.ComponentModel\Tribufu.ComponentModel.csproj", "{3DFBC35E-62A7-4CB0-81D9-5E7AA1882557}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {C66D6B57-324D-EAF2-3B65-75C9A7C35054}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C66D6B57-324D-EAF2-3B65-75C9A7C35054}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C66D6B57-324D-EAF2-3B65-75C9A7C35054}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C66D6B57-324D-EAF2-3B65-75C9A7C35054}.Release|Any CPU.Build.0 = Release|Any CPU + {322FE36B-9E9B-9E66-678F-36C4D3BAC0CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {322FE36B-9E9B-9E66-678F-36C4D3BAC0CE}.Debug|Any CPU.Build.0 = Debug|Any CPU + {322FE36B-9E9B-9E66-678F-36C4D3BAC0CE}.Release|Any CPU.ActiveCfg = Release|Any CPU + {322FE36B-9E9B-9E66-678F-36C4D3BAC0CE}.Release|Any CPU.Build.0 = Release|Any CPU + {B7019B7B-A352-86BD-CCB6-747FB8661927}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B7019B7B-A352-86BD-CCB6-747FB8661927}.Debug|Any CPU.Build.0 = Debug|Any CPU + {B7019B7B-A352-86BD-CCB6-747FB8661927}.Release|Any CPU.ActiveCfg = Release|Any CPU + {B7019B7B-A352-86BD-CCB6-747FB8661927}.Release|Any CPU.Build.0 = Release|Any CPU + {7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7B7890D8-863A-4F1D-98C0-4B7D8C46CB52}.Release|Any CPU.Build.0 = Release|Any CPU + {8F16FBBB-199E-4EE3-BFF3-31DD6F84DCD0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8F16FBBB-199E-4EE3-BFF3-31DD6F84DCD0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8F16FBBB-199E-4EE3-BFF3-31DD6F84DCD0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8F16FBBB-199E-4EE3-BFF3-31DD6F84DCD0}.Release|Any CPU.Build.0 = Release|Any CPU + {3DFBC35E-62A7-4CB0-81D9-5E7AA1882557}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3DFBC35E-62A7-4CB0-81D9-5E7AA1882557}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3DFBC35E-62A7-4CB0-81D9-5E7AA1882557}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3DFBC35E-62A7-4CB0-81D9-5E7AA1882557}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/TribufuDotNet.slnx b/TribufuDotNet.slnx deleted file mode 100644 index cb7cb6c..0000000 --- a/TribufuDotNet.slnx +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - diff --git a/Vendor/openapi-generator/LICENSE b/Vendor/openapi-generator/LICENSE deleted file mode 100644 index 310853b..0000000 --- a/Vendor/openapi-generator/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - Copyright 2018 SmartBear Software - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - https://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/Vendor/openapi-generator/openapi-generator-cli.jar b/Vendor/openapi-generator/openapi-generator-cli.jar deleted file mode 100644 index f373b7a..0000000 Binary files a/Vendor/openapi-generator/openapi-generator-cli.jar and /dev/null differ diff --git a/scripts/nswag.ps1 b/scripts/nswag.ps1 new file mode 100644 index 0000000..13d4968 --- /dev/null +++ b/scripts/nswag.ps1 @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +nswag run ./src/Tribufu/api.nswag diff --git a/scripts/pack.sh b/scripts/pack.sh new file mode 100644 index 0000000..58f8eb2 --- /dev/null +++ b/scripts/pack.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env sh + +dotnet pack diff --git a/Source/Tribufu.ComponentModel/EnumMemberConverter.cs b/src/Tribufu.ComponentModel/EnumMemberConverter.cs similarity index 100% rename from Source/Tribufu.ComponentModel/EnumMemberConverter.cs rename to src/Tribufu.ComponentModel/EnumMemberConverter.cs diff --git a/src/Tribufu.ComponentModel/README.md b/src/Tribufu.ComponentModel/README.md new file mode 100644 index 0000000..54c1ab5 --- /dev/null +++ b/src/Tribufu.ComponentModel/README.md @@ -0,0 +1 @@ +# Tribufu diff --git a/Source/Tribufu.ComponentModel/Tribufu.ComponentModel.csproj b/src/Tribufu.ComponentModel/Tribufu.ComponentModel.csproj similarity index 84% rename from Source/Tribufu.ComponentModel/Tribufu.ComponentModel.csproj rename to src/Tribufu.ComponentModel/Tribufu.ComponentModel.csproj index 05ddc36..c2368b5 100644 --- a/Source/Tribufu.ComponentModel/Tribufu.ComponentModel.csproj +++ b/src/Tribufu.ComponentModel/Tribufu.ComponentModel.csproj @@ -1,15 +1,14 @@ Tribufu.ComponentModel - Tribufu ComponentModel + Tribufu Component Model Helpers README.md - Properties - true - false Library + Properties netstandard2.0;net45;net5.0 + true diff --git a/src/Tribufu.Native/README.md b/src/Tribufu.Native/README.md new file mode 100644 index 0000000..54c1ab5 --- /dev/null +++ b/src/Tribufu.Native/README.md @@ -0,0 +1 @@ +# Tribufu diff --git a/src/Tribufu.Native/Tribufu.Native.csproj b/src/Tribufu.Native/Tribufu.Native.csproj new file mode 100644 index 0000000..948bb44 --- /dev/null +++ b/src/Tribufu.Native/Tribufu.Native.csproj @@ -0,0 +1,21 @@ + + + Tribufu.Native + Tribufu Native Interop + README.md + + + Library + Properties + netstandard2.0;net45;net5.0 + true + + + + + + + + + + diff --git a/src/Tribufu.Native/TribufuNative.cs b/src/Tribufu.Native/TribufuNative.cs new file mode 100644 index 0000000..d17a9ff --- /dev/null +++ b/src/Tribufu.Native/TribufuNative.cs @@ -0,0 +1,13 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System.Runtime.InteropServices; + +namespace Tribufu.Native +{ + public class TribufuNative + { + [DllImport("tribufu_sdk")] + public static extern void tribufu_sdk_shutdown(); + } +} diff --git a/src/Tribufu.Serialization.Newtonsoft/DecimalStringConverter.cs b/src/Tribufu.Serialization.Newtonsoft/DecimalStringConverter.cs new file mode 100644 index 0000000..ba22445 --- /dev/null +++ b/src/Tribufu.Serialization.Newtonsoft/DecimalStringConverter.cs @@ -0,0 +1,21 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System; +using Newtonsoft.Json; + +namespace Tribufu.Serialization.Newtonsoft +{ + public class DecimalStringConverter : JsonConverter + { + public override decimal ReadJson(JsonReader reader, Type objectType, decimal existingValue, bool hasExistingValue, JsonSerializer serializer) + { + return decimal.Parse(reader.ToString()); + } + + public override void WriteJson(JsonWriter writer, decimal value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + } +} diff --git a/src/Tribufu.Serialization.Newtonsoft/LongStringConverter.cs b/src/Tribufu.Serialization.Newtonsoft/LongStringConverter.cs new file mode 100644 index 0000000..417af47 --- /dev/null +++ b/src/Tribufu.Serialization.Newtonsoft/LongStringConverter.cs @@ -0,0 +1,21 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System; +using Newtonsoft.Json; + +namespace Tribufu.Serialization.Newtonsoft +{ + public class LongStringConverter : JsonConverter + { + public override ulong ReadJson(JsonReader reader, Type objectType, ulong existingValue, bool hasExistingValue, JsonSerializer serializer) + { + return ulong.Parse(reader.ToString()); + } + + public override void WriteJson(JsonWriter writer, ulong value, JsonSerializer serializer) + { + writer.WriteValue(value.ToString()); + } + } +} diff --git a/src/Tribufu.Serialization.Newtonsoft/README.md b/src/Tribufu.Serialization.Newtonsoft/README.md new file mode 100644 index 0000000..54c1ab5 --- /dev/null +++ b/src/Tribufu.Serialization.Newtonsoft/README.md @@ -0,0 +1 @@ +# Tribufu diff --git a/Source/Tribufu.Serialization/Tribufu.Serialization.csproj b/src/Tribufu.Serialization.Newtonsoft/Tribufu.Serialization.Newtonsoft.csproj similarity index 79% rename from Source/Tribufu.Serialization/Tribufu.Serialization.csproj rename to src/Tribufu.Serialization.Newtonsoft/Tribufu.Serialization.Newtonsoft.csproj index 6a7981a..0d33420 100644 --- a/Source/Tribufu.Serialization/Tribufu.Serialization.csproj +++ b/src/Tribufu.Serialization.Newtonsoft/Tribufu.Serialization.Newtonsoft.csproj @@ -1,15 +1,14 @@  - Tribufu.Serialization - Tribufu Serialization + Tribufu.Serialization.Newtonsoft + Tribufu Serialization Helpers for Newtonsoft.Json README.md - Properties - true - false Library + Properties netstandard2.0;net45;net5.0 + true diff --git a/src/Tribufu.Serialization/DecimalStringConverter.cs b/src/Tribufu.Serialization/DecimalStringConverter.cs new file mode 100644 index 0000000..d610ae5 --- /dev/null +++ b/src/Tribufu.Serialization/DecimalStringConverter.cs @@ -0,0 +1,22 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Tribufu.Serialization +{ + public class DecimalStringConverter : JsonConverter + { + public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return Convert.ToUInt64(reader.GetString()); + } + + public override void Write(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options) + { + writer.WriteStringValue(value.ToString()); + } + } +} diff --git a/src/Tribufu.Serialization/LongStringConverter.cs b/src/Tribufu.Serialization/LongStringConverter.cs new file mode 100644 index 0000000..e7f335a --- /dev/null +++ b/src/Tribufu.Serialization/LongStringConverter.cs @@ -0,0 +1,22 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Tribufu.Serialization +{ + public class LongStringConverter : JsonConverter + { + public override ulong Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + return Convert.ToUInt64(reader.GetString()); + } + + public override void Write(Utf8JsonWriter writer, ulong value, JsonSerializerOptions options) + { + writer.WriteStringValue(value.ToString()); + } + } +} diff --git a/src/Tribufu.Serialization/README.md b/src/Tribufu.Serialization/README.md new file mode 100644 index 0000000..54c1ab5 --- /dev/null +++ b/src/Tribufu.Serialization/README.md @@ -0,0 +1 @@ +# Tribufu diff --git a/Source/Tribufu.Platform/Tribufu.Platform.csproj b/src/Tribufu.Serialization/Tribufu.Serialization.csproj similarity index 53% rename from Source/Tribufu.Platform/Tribufu.Platform.csproj rename to src/Tribufu.Serialization/Tribufu.Serialization.csproj index b1a39fa..8efd520 100644 --- a/Source/Tribufu.Platform/Tribufu.Platform.csproj +++ b/src/Tribufu.Serialization/Tribufu.Serialization.csproj @@ -1,24 +1,16 @@  - Tribufu.Platform - Tribufu Platform + Tribufu.Serialization + Tribufu Serialization Helpers README.md - Properties - true - false Library + Properties net5.0 + true - - - - - - - diff --git a/src/Tribufu.Utils/README.md b/src/Tribufu.Utils/README.md new file mode 100644 index 0000000..54c1ab5 --- /dev/null +++ b/src/Tribufu.Utils/README.md @@ -0,0 +1 @@ +# Tribufu diff --git a/Source/Tribufu.Logging/Tribufu.Logging.csproj b/src/Tribufu.Utils/Tribufu.Utils.csproj similarity index 68% rename from Source/Tribufu.Logging/Tribufu.Logging.csproj rename to src/Tribufu.Utils/Tribufu.Utils.csproj index cade901..026c17d 100644 --- a/Source/Tribufu.Logging/Tribufu.Logging.csproj +++ b/src/Tribufu.Utils/Tribufu.Utils.csproj @@ -1,15 +1,14 @@  - Tribufu.Logging - Tribufu Logging + Tribufu.Utils + Tribufu Utils README.md - Properties - true - false Library - netstandard2.0;net45;net5.0 + Properties + net5.0 + true diff --git a/src/Tribufu.Utils/TribufuAppContext.cs b/src/Tribufu.Utils/TribufuAppContext.cs new file mode 100644 index 0000000..1939059 --- /dev/null +++ b/src/Tribufu.Utils/TribufuAppContext.cs @@ -0,0 +1,72 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace Tribufu.Utils +{ + public static class TribufuAppContext + { + public static string GetBaseDirectory() + { + string defaultBaseDirectory = AppContext.BaseDirectory; + string baseDirectory; + + if (defaultBaseDirectory.Contains("Debug") || defaultBaseDirectory.Contains("Release")) + { + baseDirectory = Path.Combine(defaultBaseDirectory, "..", "..", "..", "..", ".."); + } + else + { + baseDirectory = Path.Combine(defaultBaseDirectory, "..", ".."); + } + + baseDirectory = Path.GetFullPath(baseDirectory); + + return baseDirectory; + } + + public static string GetBinDirectory() + { + var binDirectory = Path.Combine(GetBaseDirectory(), "bin"); + + if (!string.IsNullOrEmpty(RuntimeInformation.RuntimeIdentifier)) + { + binDirectory = Path.Combine(binDirectory, RuntimeInformation.RuntimeIdentifier); + } + else + { + binDirectory = Path.Combine(binDirectory, "dotnet"); + } + + return binDirectory; + } + + public static string GetConfigDirectory() + { + return Path.Combine(GetBaseDirectory(), "config"); + } + + public static string GetAssetsDirectory() + { + return Path.Combine(GetBaseDirectory(), "assets"); + } + + public static string GetSavedDirectory() + { + return Path.Combine(GetBaseDirectory(), "saved"); + } + + public static string GetCacheDirectory() + { + return Path.Combine(GetSavedDirectory(), "cache"); + } + + public static string GetLogsDirectory() + { + return Path.Combine(GetSavedDirectory(), "logs"); + } + } +} diff --git a/src/Tribufu/README.md b/src/Tribufu/README.md new file mode 100644 index 0000000..54c1ab5 --- /dev/null +++ b/src/Tribufu/README.md @@ -0,0 +1 @@ +# Tribufu diff --git a/Source/Tribufu/Tribufu.csproj b/src/Tribufu/Tribufu.csproj similarity index 54% rename from Source/Tribufu/Tribufu.csproj rename to src/Tribufu/Tribufu.csproj index 7337e40..386d19f 100644 --- a/Source/Tribufu/Tribufu.csproj +++ b/src/Tribufu/Tribufu.csproj @@ -1,28 +1,24 @@ - + Tribufu Tribufu .NET SDK README.md - Properties - true - true - false Library - netstandard2.0;net472;net5.0 + Properties + netstandard2.0;net45;net5.0 + true - + - - - + - + diff --git a/src/Tribufu/TribufuApi.cs b/src/Tribufu/TribufuApi.cs new file mode 100644 index 0000000..d0be776 --- /dev/null +++ b/src/Tribufu/TribufuApi.cs @@ -0,0 +1,14 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +using System.Net.Http; + +namespace Tribufu +{ + public class TribufuApi : TribufuApiGenerated + { + public TribufuApi(TribufuApiOptions options) : base(options.BaseUrl, new HttpClient()) + { + } + } +} diff --git a/src/Tribufu/TribufuApi.generated.cs b/src/Tribufu/TribufuApi.generated.cs new file mode 100644 index 0000000..b0e4686 --- /dev/null +++ b/src/Tribufu/TribufuApi.generated.cs @@ -0,0 +1,5889 @@ +//---------------------- +// +// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// +//---------------------- + +#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended." +#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." +#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' +#pragma warning disable 612 // Disable "CS0612 '...' is obsolete" +#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null" +#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... +#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." +#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" +#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant" +#pragma warning disable 8603 // Disable "CS8603 Possible null reference return" +#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" +#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" +#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." + +namespace Tribufu +{ + using System = global::System; + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class TribufuApiGenerated + { +#pragma warning disable 8618 + private string _baseUrl; +#pragma warning restore 8618 + + private System.Net.Http.HttpClient _httpClient; + private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true); + private Newtonsoft.Json.JsonSerializerSettings _instanceSettings; + +#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + public TribufuApiGenerated(string baseUrl, System.Net.Http.HttpClient httpClient) +#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. + { + BaseUrl = baseUrl; + _httpClient = httpClient; + Initialize(); + } + + private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() + { + var settings = new Newtonsoft.Json.JsonSerializerSettings(); + UpdateJsonSerializerSettings(settings); + return settings; + } + + public string BaseUrl + { + get { return _baseUrl; } + set + { + _baseUrl = value; + if (!string.IsNullOrEmpty(_baseUrl) && !_baseUrl.EndsWith("/")) + _baseUrl += '/'; + } + } + + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _instanceSettings ?? _settings.Value; } } + + static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + + partial void Initialize(); + + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, string url); + partial void PrepareRequest(System.Net.Http.HttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); + partial void ProcessResponse(System.Net.Http.HttpClient client, System.Net.Http.HttpResponseMessage response); + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get current user information. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetUserInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/me" + urlBuilder_.Append("v1/me"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Login with name or email and password. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task LoginAsync(LoginRequest body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/login" + urlBuilder_.Append("v1/login"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create a new user. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task RegisterAsync(RegisterRequest body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/register" + urlBuilder_.Append("v1/register"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Refresh credentials. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task RefreshAsync(RefreshRequest body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/refresh" + urlBuilder_.Append("v1/refresh"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Invalidate credentials. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task LogoutAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Content = new System.Net.Http.StringContent(string.Empty, System.Text.Encoding.UTF8, "application/json"); + request_.Method = new System.Net.Http.HttpMethod("POST"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/logout" + urlBuilder_.Append("v1/logout"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of game server clusters. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetClustersAsync(int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/clusters" + urlBuilder_.Append("v1/clusters"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create a new game server cluster. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task CreateClusterAsync(object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/clusters" + urlBuilder_.Append("v1/clusters"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a game server cluster by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetClusterGetByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/clusters/{id}" + urlBuilder_.Append("v1/clusters/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update a game server cluster. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateClusterAsync(string id, object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/clusters/{id}" + urlBuilder_.Append("v1/clusters/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Delete a game server cluster. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task DeleteClusterAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/clusters/{id}" + urlBuilder_.Append("v1/clusters/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of files. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetFilesAsync(int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/files" + urlBuilder_.Append("v1/files"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a file by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetFileByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/files/{id}" + urlBuilder_.Append("v1/files/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of games. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetGamesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/games" + urlBuilder_.Append("v1/games"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a game by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetGameByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/games/{id}" + urlBuilder_.Append("v1/games/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of game servers of a game. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetGameServersAsync(string id, int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/games/{id}/servers" + urlBuilder_.Append("v1/games/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/servers"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of game server clusters of a game. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetGameClustersAsync(string id, int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/games/{id}/clusters" + urlBuilder_.Append("v1/games/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/clusters"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of groups. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetGroupsAsync(int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups" + urlBuilder_.Append("v1/groups"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create a new group. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task CreateGroupAsync(object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups" + urlBuilder_.Append("v1/groups"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a group by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetGroupByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/{id}" + urlBuilder_.Append("v1/groups/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update a group. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateGroupAsync(string id, object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/{id}" + urlBuilder_.Append("v1/groups/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Delete a group. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task DeleteGroupAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/{id}" + urlBuilder_.Append("v1/groups/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a group by uuid. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetGroupByUuidAsync(System.Guid uuid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (uuid == null) + throw new System.ArgumentNullException("uuid"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/uuid/{uuid}" + urlBuilder_.Append("v1/groups/uuid/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(uuid, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a group by tag. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetGroupByTagAsync(string tag, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (tag == null) + throw new System.ArgumentNullException("tag"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/tag/{tag}" + urlBuilder_.Append("v1/groups/tag/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(tag, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of members in a group. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetGroupMembersAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/{id}/members" + urlBuilder_.Append("v1/groups/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/members"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of games of a group. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetGroupGamesAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/groups/{id}/games" + urlBuilder_.Append("v1/groups/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/games"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get the top 20 leaderboard users. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetLeaderboardAsync(LeaderboardOrder? order = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/leaderboard" + urlBuilder_.Append("v1/leaderboard"); + urlBuilder_.Append('?'); + if (order != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("Order")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(order, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Advanced search for servers or players. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> SearchAsync(SearchRequest body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/search" + urlBuilder_.Append("v1/search"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of game servers. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetServersAsync(int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers" + urlBuilder_.Append("v1/servers"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Create a new game server. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task CreateServerAsync(object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers" + urlBuilder_.Append("v1/servers"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a game server by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetServerByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/{id}" + urlBuilder_.Append("v1/servers/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update a game server. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateServerAsync(string id, object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/{id}" + urlBuilder_.Append("v1/servers/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Delete a game server. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task DeleteServerAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("DELETE"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/{id}" + urlBuilder_.Append("v1/servers/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a game server by address and query port. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetServerByAddressAndQueryPortAsync(string address, int port, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (address == null) + throw new System.ArgumentNullException("address"); + + if (port == null) + throw new System.ArgumentNullException("port"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/address/{address}:{port}" + urlBuilder_.Append("v1/servers/address/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(address, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append(':'); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(port, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of game servers from a country. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetServersByCountryAsync(string country, int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (country == null) + throw new System.ArgumentNullException("country"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/country/{country}" + urlBuilder_.Append("v1/servers/country/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(country, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Claim a game server. + /// + /// + /// This endpoint is not available with an api key, only with a bearer token. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ClaimServerAsync(string id, object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/{id}/claim" + urlBuilder_.Append("v1/servers/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/claim"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get metrics about the tracked game servers. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetServersMetricsAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/metrics" + urlBuilder_.Append("v1/servers/metrics"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of countries with the number of game servers. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetServersCountriesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/servers/countries" + urlBuilder_.Append("v1/servers/countries"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of subscriptions. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetSubscriptionsAsync(int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/subscriptions" + urlBuilder_.Append("v1/subscriptions"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a subscription by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetSubscriptionByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/subscriptions/{id}" + urlBuilder_.Append("v1/subscriptions/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of user profiles. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUsersAsync(int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users" + urlBuilder_.Append("v1/users"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a user profile by id. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetUserByIdAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a user profile by uuid. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetUserByUuidAsync(System.Guid uuid, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (uuid == null) + throw new System.ArgumentNullException("uuid"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/uuid/{uuid}" + urlBuilder_.Append("v1/users/uuid/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(uuid, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a user profile by name. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GetUserByNameAsync(string name, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (name == null) + throw new System.ArgumentNullException("name"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/name/{name}" + urlBuilder_.Append("v1/users/name/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(name, System.Globalization.CultureInfo.InvariantCulture))); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of groups the user is a member of. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUserGroupsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/groups" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/groups"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of games the user has played. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUserGamesAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/games" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/games"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of friends of the user. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUserFriendsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/friends" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/friends"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of servers the user is owner of. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUserServersAsync(string id, int? page = null, int? limit = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/servers" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/servers"); + urlBuilder_.Append('?'); + if (page != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("page")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(page, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (limit != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("limit")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(limit, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of connected accounts of the user. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUserAccountsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/accounts" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/accounts"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Get a list of punishments the user has received. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GetUserPunishmentsAsync(string id, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/punishments" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/punishments"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Update a user profile. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task UpdateUserProfileAsync(string id, UpdateProfile body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/profile" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/profile"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Change the email of a user. + /// + /// + /// This endpoint is not available with an api key, only with a bearer token. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ChangeEmailAsync(string id, object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/email" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/email"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Change the password of a user. + /// + /// + /// This endpoint is not available with an api key, only with a bearer token. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ChangePasswordAsync(string id, object body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + if (id == null) + throw new System.ArgumentNullException("id"); + + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("PUT"); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/users/{id}/password" + urlBuilder_.Append("v1/users/"); + urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(id, System.Globalization.CultureInfo.InvariantCulture))); + urlBuilder_.Append("/password"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + return; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Generate a random password. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task GeneratePasswordAsync(int? length = null, bool? symbols = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/password" + urlBuilder_.Append("v1/utils/password"); + urlBuilder_.Append('?'); + if (length != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("length")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(length, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (symbols != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("symbols")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(symbols, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Generate one or more flake ids. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GenerateFlakeIdAsync(int? amount = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/flake" + urlBuilder_.Append("v1/utils/flake"); + urlBuilder_.Append('?'); + if (amount != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("amount")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(amount, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Generate one or more uuids with a specific version. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task> GenerateUuidAsync(int? version = null, int? amount = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + request_.Method = new System.Net.Http.HttpMethod("GET"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/uuid" + urlBuilder_.Append("v1/utils/uuid"); + urlBuilder_.Append('?'); + if (version != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("version")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(version, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + if (amount != null) + { + urlBuilder_.Append(System.Uri.EscapeDataString("amount")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(amount, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); + } + urlBuilder_.Length--; + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Convert a string to base64 or vice versa. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task ConvertBase64Async(CryptoViewModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/base64" + urlBuilder_.Append("v1/utils/base64"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Hash a string using md5. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HashMd5Async(HashViewModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/md5" + urlBuilder_.Append("v1/utils/md5"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Hash a string using sha256. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HashSha256Async(HashViewModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/sha256" + urlBuilder_.Append("v1/utils/sha256"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Hash a string using bcrypt. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HashBcryptAsync(HashViewModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/bcrypt" + urlBuilder_.Append("v1/utils/bcrypt"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + /// A cancellation token that can be used by other objects or threads to receive notice of cancellation. + /// + /// Hash a string using argon2. + /// + /// OK + /// A server side error occurred. + public virtual async System.Threading.Tasks.Task HashArgon2Async(HashViewModel body = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) + { + var client_ = _httpClient; + var disposeClient_ = false; + try + { + using (var request_ = new System.Net.Http.HttpRequestMessage()) + { + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); + var content_ = new System.Net.Http.StringContent(json_); + content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json-patch+json"); + request_.Content = content_; + request_.Method = new System.Net.Http.HttpMethod("POST"); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + + var urlBuilder_ = new System.Text.StringBuilder(); + if (!string.IsNullOrEmpty(_baseUrl)) urlBuilder_.Append(_baseUrl); + // Operation Path: "v1/utils/argon2" + urlBuilder_.Append("v1/utils/argon2"); + + PrepareRequest(client_, request_, urlBuilder_); + + var url_ = urlBuilder_.ToString(); + request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); + + PrepareRequest(client_, request_, url_); + + var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); + var disposeResponse_ = true; + try + { + var headers_ = new System.Collections.Generic.Dictionary>(); + foreach (var item_ in response_.Headers) + headers_[item_.Key] = item_.Value; + if (response_.Content != null && response_.Content.Headers != null) + { + foreach (var item_ in response_.Content.Headers) + headers_[item_.Key] = item_.Value; + } + + ProcessResponse(client_, response_); + + var status_ = (int)response_.StatusCode; + if (status_ == 200) + { + var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new TribufuApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; + } + else + { + var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); + throw new TribufuApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null); + } + } + finally + { + if (disposeResponse_) + response_.Dispose(); + } + } + } + finally + { + if (disposeClient_) + client_.Dispose(); + } + } + + protected struct ObjectResponseResult + { + public ObjectResponseResult(T responseObject, string responseText) + { + this.Object = responseObject; + this.Text = responseText; + } + + public T Object { get; } + + public string Text { get; } + } + + public bool ReadResponseAsString { get; set; } + + protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken) + { + if (response == null || response.Content == null) + { + return new ObjectResponseResult(default(T), string.Empty); + } + + if (ReadResponseAsString) + { + var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false); + try + { + var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings); + return new ObjectResponseResult(typedBody, responseText); + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body string as " + typeof(T).FullName + "."; + throw new TribufuApiException(message, (int)response.StatusCode, responseText, headers, exception); + } + } + else + { + try + { + using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false)) + using (var streamReader = new System.IO.StreamReader(responseStream)) + using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader)) + { + var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings); + var typedBody = serializer.Deserialize(jsonTextReader); + return new ObjectResponseResult(typedBody, string.Empty); + } + } + catch (Newtonsoft.Json.JsonException exception) + { + var message = "Could not deserialize the response body stream as " + typeof(T).FullName + "."; + throw new TribufuApiException(message, (int)response.StatusCode, string.Empty, headers, exception); + } + } + } + + private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo) + { + if (value == null) + { + return ""; + } + + if (value is System.Enum) + { + var name = System.Enum.GetName(value.GetType(), value); + if (name != null) + { + var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name); + if (field != null) + { + var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute)) + as System.Runtime.Serialization.EnumMemberAttribute; + if (attribute != null) + { + return attribute.Value != null ? attribute.Value : name; + } + } + + var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo)); + return converted == null ? string.Empty : converted; + } + } + else if (value is bool) + { + return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant(); + } + else if (value is byte[]) + { + return System.Convert.ToBase64String((byte[])value); + } + else if (value is string[]) + { + return string.Join(",", (string[])value); + } + else if (value.GetType().IsArray) + { + var valueArray = (System.Array)value; + var valueTextArray = new string[valueArray.Length]; + for (var i = 0; i < valueArray.Length; i++) + { + valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo); + } + return string.Join(",", valueTextArray); + } + + var result = System.Convert.ToString(value, cultureInfo); + return result == null ? "" : result; + } + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Account + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("provider", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public LoginProvider Provider { get; set; } + + [Newtonsoft.Json.JsonProperty("user_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string User_id { get; set; } + + [Newtonsoft.Json.JsonProperty("authorized", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Authorized { get; set; } + + [Newtonsoft.Json.JsonProperty("fields", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Fields { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class CryptoViewModel + { + [Newtonsoft.Json.JsonProperty("encoded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Encoded { get; set; } + + [Newtonsoft.Json.JsonProperty("decoded", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Decoded { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class File + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("image_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Image_url { get; set; } + + [Newtonsoft.Json.JsonProperty("author_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Author_id { get; set; } + + [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Version { get; set; } + + [Newtonsoft.Json.JsonProperty("file_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string File_url { get; set; } + + [Newtonsoft.Json.JsonProperty("raw_size", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Raw_size { get; set; } + + [Newtonsoft.Json.JsonProperty("download_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Download_count { get; set; } + + [Newtonsoft.Json.JsonProperty("last_download", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_download { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Game + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Type { get; set; } + + [Newtonsoft.Json.JsonProperty("organization_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Organization_id { get; set; } + + [Newtonsoft.Json.JsonProperty("icon_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Icon_url { get; set; } + + [Newtonsoft.Json.JsonProperty("banner_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Banner_url { get; set; } + + [Newtonsoft.Json.JsonProperty("capsule_image_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Capsule_image_url { get; set; } + + [Newtonsoft.Json.JsonProperty("library_image_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Library_image_url { get; set; } + + [Newtonsoft.Json.JsonProperty("parent_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Parent_id { get; set; } + + [Newtonsoft.Json.JsonProperty("slug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Slug { get; set; } + + [Newtonsoft.Json.JsonProperty("visibility", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Visibility { get; set; } + + [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password { get; set; } + + [Newtonsoft.Json.JsonProperty("primary", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Primary { get; set; } + + [Newtonsoft.Json.JsonProperty("game_port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Game_port { get; set; } + + [Newtonsoft.Json.JsonProperty("query_port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Query_port { get; set; } + + [Newtonsoft.Json.JsonProperty("rcon_port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Rcon_port { get; set; } + + [Newtonsoft.Json.JsonProperty("user_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int User_count { get; set; } + + [Newtonsoft.Json.JsonProperty("server_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Server_count { get; set; } + + [Newtonsoft.Json.JsonProperty("achievement_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Achievement_count { get; set; } + + [Newtonsoft.Json.JsonProperty("badge_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Badge_count { get; set; } + + [Newtonsoft.Json.JsonProperty("download_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Download_count { get; set; } + + [Newtonsoft.Json.JsonProperty("steam_app_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Steam_app_id { get; set; } + + [Newtonsoft.Json.JsonProperty("steam_server_app_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Steam_server_app_id { get; set; } + + [Newtonsoft.Json.JsonProperty("enable_servers", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Enable_servers { get; set; } + + [Newtonsoft.Json.JsonProperty("rust_gamedig_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Rust_gamedig_id { get; set; } + + [Newtonsoft.Json.JsonProperty("node_gamedig_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Node_gamedig_id { get; set; } + + [Newtonsoft.Json.JsonProperty("server_connect_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Server_connect_url { get; set; } + + [Newtonsoft.Json.JsonProperty("server_tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Server_tags { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GameServer + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("address", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Address { get; set; } + + [Newtonsoft.Json.JsonProperty("game_port", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Game_port { get; set; } + + [Newtonsoft.Json.JsonProperty("query_port", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Query_port { get; set; } + + [Newtonsoft.Json.JsonProperty("game_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Game_id { get; set; } + + [Newtonsoft.Json.JsonProperty("game_icon_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Game_icon_url { get; set; } + + [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Version { get; set; } + + [Newtonsoft.Json.JsonProperty("featured", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Featured { get; set; } + + [Newtonsoft.Json.JsonProperty("cluster_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Cluster_id { get; set; } + + [Newtonsoft.Json.JsonProperty("website_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Website_url { get; set; } + + [Newtonsoft.Json.JsonProperty("banner_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Banner_url { get; set; } + + [Newtonsoft.Json.JsonProperty("owner_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Owner_id { get; set; } + + [Newtonsoft.Json.JsonProperty("uptime", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Uptime { get; set; } + + [Newtonsoft.Json.JsonProperty("status", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public ServerStatus Status { get; set; } + + [Newtonsoft.Json.JsonProperty("ping", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Ping { get; set; } + + [Newtonsoft.Json.JsonProperty("map", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Map { get; set; } + + [Newtonsoft.Json.JsonProperty("used_slots", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Used_slots { get; set; } + + [Newtonsoft.Json.JsonProperty("max_slots", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Max_slots { get; set; } + + [Newtonsoft.Json.JsonProperty("motd", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Motd { get; set; } + + [Newtonsoft.Json.JsonProperty("players", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Players { get; set; } + + [Newtonsoft.Json.JsonProperty("last_online", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_online { get; set; } + + [Newtonsoft.Json.JsonProperty("country", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Country { get; set; } + + [Newtonsoft.Json.JsonProperty("steam", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Steam { get; set; } + + [Newtonsoft.Json.JsonProperty("discord_server_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Discord_server_id { get; set; } + + [Newtonsoft.Json.JsonProperty("youtube_video_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Youtube_video_url { get; set; } + + [Newtonsoft.Json.JsonProperty("tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tags { get; set; } + + [Newtonsoft.Json.JsonProperty("comment_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Comment_count { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GameServerCluster + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("package_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Package_id { get; set; } + + [Newtonsoft.Json.JsonProperty("website_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Website_url { get; set; } + + [Newtonsoft.Json.JsonProperty("banner_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Banner_url { get; set; } + + [Newtonsoft.Json.JsonProperty("owner_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Owner_id { get; set; } + + [Newtonsoft.Json.JsonProperty("discord_server_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Discord_server_id { get; set; } + + [Newtonsoft.Json.JsonProperty("youtube_video_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Youtube_video_url { get; set; } + + [Newtonsoft.Json.JsonProperty("tags", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tags { get; set; } + + [Newtonsoft.Json.JsonProperty("comment_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Comment_count { get; set; } + + [Newtonsoft.Json.JsonProperty("server_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Server_count { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Group + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Uuid { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("tag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tag { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Type { get; set; } + + [Newtonsoft.Json.JsonProperty("privacy", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Privacy { get; set; } + + [Newtonsoft.Json.JsonProperty("owner_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Owner_id { get; set; } + + [Newtonsoft.Json.JsonProperty("verified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Verified { get; set; } + + [Newtonsoft.Json.JsonProperty("photo_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Photo_url { get; set; } + + [Newtonsoft.Json.JsonProperty("banner_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Banner_url { get; set; } + + [Newtonsoft.Json.JsonProperty("member_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Member_count { get; set; } + + [Newtonsoft.Json.JsonProperty("follower_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Follower_count { get; set; } + + [Newtonsoft.Json.JsonProperty("view_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int View_count { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GroupGame + { + [Newtonsoft.Json.JsonProperty("group_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Group_id { get; set; } + + [Newtonsoft.Json.JsonProperty("game_id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Game_id { get; set; } + + [Newtonsoft.Json.JsonProperty("stats", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Stats { get; set; } + + [Newtonsoft.Json.JsonProperty("acquired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Acquired { get; set; } + + [Newtonsoft.Json.JsonProperty("last_used", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_used { get; set; } + + [Newtonsoft.Json.JsonProperty("group", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public Group Group { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class GroupMember + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Uuid { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("display_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display_name { get; set; } + + [Newtonsoft.Json.JsonProperty("verified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Verified { get; set; } + + [Newtonsoft.Json.JsonProperty("photo_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Photo_url { get; set; } + + [Newtonsoft.Json.JsonProperty("last_online", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_online { get; set; } + + [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public GroupRank Rank { get; set; } + + [Newtonsoft.Json.JsonProperty("since", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Since { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum GroupRank + { + + [System.Runtime.Serialization.EnumMember(Value = @"member")] + Member = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"leader")] + Leader = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"owner")] + Owner = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class HashViewModel + { + [Newtonsoft.Json.JsonProperty("value", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Value { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class LeaderboardItem + { + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("display_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display_name { get; set; } + + [Newtonsoft.Json.JsonProperty("photo_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Photo_url { get; set; } + + [Newtonsoft.Json.JsonProperty("level", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Level { get; set; } + + [Newtonsoft.Json.JsonProperty("experience", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Experience { get; set; } + + [Newtonsoft.Json.JsonProperty("points", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Points { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum LeaderboardOrder + { + + [System.Runtime.Serialization.EnumMember(Value = @"level")] + Level = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"points")] + Points = 1, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum LoginProvider + { + + [System.Runtime.Serialization.EnumMember(Value = @"steam")] + Steam = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"epic")] + Epic = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"discord")] + Discord = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"microsoft")] + Microsoft = 3, + + [System.Runtime.Serialization.EnumMember(Value = @"playstation")] + Playstation = 4, + + [System.Runtime.Serialization.EnumMember(Value = @"google")] + Google = 5, + + [System.Runtime.Serialization.EnumMember(Value = @"apple")] + Apple = 6, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class LoginRequest + { + [Newtonsoft.Json.JsonProperty("login", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Login { get; set; } + + [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Password { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class LoginResponse + { + [Newtonsoft.Json.JsonProperty("user", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public UserInfo User { get; set; } + + [Newtonsoft.Json.JsonProperty("access_token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Access_token { get; set; } + + [Newtonsoft.Json.JsonProperty("refresh_token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Refresh_token { get; set; } + + [Newtonsoft.Json.JsonProperty("expires_in", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public long Expires_in { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Profile + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Uuid { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("display_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display_name { get; set; } + + [Newtonsoft.Json.JsonProperty("flags", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Flags { get; set; } + + [Newtonsoft.Json.JsonProperty("verified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Verified { get; set; } + + [Newtonsoft.Json.JsonProperty("level", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Level { get; set; } + + [Newtonsoft.Json.JsonProperty("experience", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Experience { get; set; } + + [Newtonsoft.Json.JsonProperty("public_birthday", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Public_birthday { get; set; } + + [Newtonsoft.Json.JsonProperty("birthday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] + public System.DateTimeOffset? Birthday { get; set; } + + [Newtonsoft.Json.JsonProperty("points", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Points { get; set; } + + [Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Location { get; set; } + + [Newtonsoft.Json.JsonProperty("photo_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Photo_url { get; set; } + + [Newtonsoft.Json.JsonProperty("banner_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Banner_url { get; set; } + + [Newtonsoft.Json.JsonProperty("last_online", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_online { get; set; } + + [Newtonsoft.Json.JsonProperty("biography", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Biography { get; set; } + + [Newtonsoft.Json.JsonProperty("view_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int View_count { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProfileGame + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("capsule_image_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Capsule_image_url { get; set; } + + [Newtonsoft.Json.JsonProperty("library_image_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Library_image_url { get; set; } + + [Newtonsoft.Json.JsonProperty("slug", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Slug { get; set; } + + [Newtonsoft.Json.JsonProperty("time_used", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Time_used { get; set; } + + [Newtonsoft.Json.JsonProperty("unlocked_achievements", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Unlocked_achievements { get; set; } + + [Newtonsoft.Json.JsonProperty("total_achievements", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Total_achievements { get; set; } + + [Newtonsoft.Json.JsonProperty("stats", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public object Stats { get; set; } + + [Newtonsoft.Json.JsonProperty("acquired", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Acquired { get; set; } + + [Newtonsoft.Json.JsonProperty("last_used", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_used { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ProfileGroup + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Uuid { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("tag", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Tag { get; set; } + + [Newtonsoft.Json.JsonProperty("privacy", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Privacy { get; set; } + + [Newtonsoft.Json.JsonProperty("verified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Verified { get; set; } + + [Newtonsoft.Json.JsonProperty("photo_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Photo_url { get; set; } + + [Newtonsoft.Json.JsonProperty("member_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Member_count { get; set; } + + [Newtonsoft.Json.JsonProperty("rank", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public GroupRank Rank { get; set; } + + [Newtonsoft.Json.JsonProperty("since", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Since { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class RefreshRequest + { + [Newtonsoft.Json.JsonProperty("refresh_token", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Refresh_token { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class RegisterRequest + { + [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid? Uuid { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + [System.ComponentModel.DataAnnotations.StringLength(45, MinimumLength = 3)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^[a-zA-Z0-9-_]*$")] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [System.ComponentModel.DataAnnotations.StringLength(255)] + [System.ComponentModel.DataAnnotations.RegularExpression(@"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$")] + public string Email { get; set; } + + [Newtonsoft.Json.JsonProperty("password", Required = Newtonsoft.Json.Required.Always)] + [System.ComponentModel.DataAnnotations.Required] + public string Password { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class SearchRequest + { + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public SearchType Type { get; set; } + + [Newtonsoft.Json.JsonProperty("query", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Query { get; set; } + + [Newtonsoft.Json.JsonProperty("page", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int? Page { get; set; } + + [Newtonsoft.Json.JsonProperty("game_id", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Game_id { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum SearchType + { + + [System.Runtime.Serialization.EnumMember(Value = @"user")] + User = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"group")] + Group = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"server")] + Server = 2, + + [System.Runtime.Serialization.EnumMember(Value = @"cluster")] + Cluster = 3, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class ServerMetrics + { + [Newtonsoft.Json.JsonProperty("server_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Server_count { get; set; } + + [Newtonsoft.Json.JsonProperty("package_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Package_count { get; set; } + + [Newtonsoft.Json.JsonProperty("country_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Country_count { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum ServerStatus + { + + [System.Runtime.Serialization.EnumMember(Value = @"unknown")] + Unknown = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"offline")] + Offline = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"online")] + Online = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Subscription + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("description", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Description { get; set; } + + [Newtonsoft.Json.JsonProperty("image_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Image_url { get; set; } + + [Newtonsoft.Json.JsonProperty("prices", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Collections.Generic.IDictionary Prices { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class UpdateProfile + { + [Newtonsoft.Json.JsonProperty("display_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display_name { get; set; } + + [Newtonsoft.Json.JsonProperty("biography", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Biography { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class UserInfo + { + [Newtonsoft.Json.JsonProperty("id", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Id { get; set; } + + [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.Guid Uuid { get; set; } + + [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Name { get; set; } + + [Newtonsoft.Json.JsonProperty("display_name", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Display_name { get; set; } + + [Newtonsoft.Json.JsonProperty("email", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Email { get; set; } + + [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] + public UserType Type { get; set; } + + [Newtonsoft.Json.JsonProperty("flags", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Flags { get; set; } + + [Newtonsoft.Json.JsonProperty("permissions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Permissions { get; set; } + + [Newtonsoft.Json.JsonProperty("verified", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Verified { get; set; } + + [Newtonsoft.Json.JsonProperty("level", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int Level { get; set; } + + [Newtonsoft.Json.JsonProperty("experience", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Experience { get; set; } + + [Newtonsoft.Json.JsonProperty("public_birthday", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public bool Public_birthday { get; set; } + + [Newtonsoft.Json.JsonProperty("birthday", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + [Newtonsoft.Json.JsonConverter(typeof(DateFormatConverter))] + public System.DateTimeOffset? Birthday { get; set; } + + [Newtonsoft.Json.JsonProperty("points", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public double Points { get; set; } + + [Newtonsoft.Json.JsonProperty("location", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Location { get; set; } + + [Newtonsoft.Json.JsonProperty("language", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Language { get; set; } + + [Newtonsoft.Json.JsonProperty("timezone", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Timezone { get; set; } + + [Newtonsoft.Json.JsonProperty("currency", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Currency { get; set; } + + [Newtonsoft.Json.JsonProperty("photo_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Photo_url { get; set; } + + [Newtonsoft.Json.JsonProperty("banner_url", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Banner_url { get; set; } + + [Newtonsoft.Json.JsonProperty("last_online", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Last_online { get; set; } + + [Newtonsoft.Json.JsonProperty("biography", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Biography { get; set; } + + [Newtonsoft.Json.JsonProperty("view_count", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public int View_count { get; set; } + + [Newtonsoft.Json.JsonProperty("created", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset Created { get; set; } + + [Newtonsoft.Json.JsonProperty("updated", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public System.DateTimeOffset? Updated { get; set; } + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public enum UserType + { + + [System.Runtime.Serialization.EnumMember(Value = @"user")] + User = 0, + + [System.Runtime.Serialization.EnumMember(Value = @"bot")] + Bot = 1, + + [System.Runtime.Serialization.EnumMember(Value = @"organization")] + Organization = 2, + + } + + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + internal class DateFormatConverter : Newtonsoft.Json.Converters.IsoDateTimeConverter + { + public DateFormatConverter() + { + DateTimeFormat = "yyyy-MM-dd"; + } + } + + + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class TribufuApiException : System.Exception + { + public int StatusCode { get; private set; } + + public string Response { get; private set; } + + public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; } + + public TribufuApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException) + : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException) + { + StatusCode = statusCode; + Response = response; + Headers = headers; + } + + public override string ToString() + { + return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString()); + } + } + + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class TribufuApiException : TribufuApiException + { + public TResult Result { get; private set; } + + public TribufuApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException) + : base(message, statusCode, response, headers, innerException) + { + Result = result; + } + } + +} + +#pragma warning restore 108 +#pragma warning restore 114 +#pragma warning restore 472 +#pragma warning restore 612 +#pragma warning restore 1573 +#pragma warning restore 1591 +#pragma warning restore 8073 +#pragma warning restore 3016 +#pragma warning restore 8603 +#pragma warning restore 8604 +#pragma warning restore 8625 diff --git a/src/Tribufu/TribufuApiOptions.cs b/src/Tribufu/TribufuApiOptions.cs new file mode 100644 index 0000000..0641f1f --- /dev/null +++ b/src/Tribufu/TribufuApiOptions.cs @@ -0,0 +1,18 @@ +// Copyright (c) Tribufu. All Rights Reserved. +// SPDX-License-Identifier: MIT + +namespace Tribufu +{ + public class TribufuApiOptions + { + public string BaseUrl { get; set; } + + public string ApiKey { get; set; } + + public TribufuApiOptions(string baseUrl, string apiKey) + { + BaseUrl = baseUrl; + ApiKey = apiKey; + } + } +} diff --git a/src/Tribufu/api.nswag b/src/Tribufu/api.nswag new file mode 100644 index 0000000..f5b4292 --- /dev/null +++ b/src/Tribufu/api.nswag @@ -0,0 +1,101 @@ +{ + "runtime": "Default", + "defaultVariables": null, + "documentGenerator": { + "fromDocument": { + "json": "", + "url": "https://api.tribufu.com/v1/openapi.json", + "output": null, + "newLineBehavior": "Auto" + } + }, + "codeGenerators": { + "openApiToCSharpClient": { + "clientBaseClass": null, + "configurationClass": null, + "generateClientClasses": true, + "suppressClientClassesOutput": false, + "generateClientInterfaces": false, + "suppressClientInterfacesOutput": false, + "clientBaseInterface": null, + "injectHttpClient": true, + "disposeHttpClient": true, + "protectedMethods": [], + "generateExceptionClasses": true, + "exceptionClass": "TribufuApiException", + "wrapDtoExceptions": true, + "useHttpClientCreationMethod": false, + "httpClientType": "System.Net.Http.HttpClient", + "useHttpRequestMessageCreationMethod": false, + "useBaseUrl": true, + "generateBaseUrlProperty": true, + "generateSyncMethods": false, + "generatePrepareRequestAndProcessResponseAsAsyncMethods": false, + "exposeJsonSerializerSettings": false, + "clientClassAccessModifier": "public", + "typeAccessModifier": "public", + "propertySetterAccessModifier": "", + "generateNativeRecords": false, + "generateContractsOutput": false, + "contractsNamespace": null, + "contractsOutputFilePath": null, + "parameterDateTimeFormat": "s", + "parameterDateFormat": "yyyy-MM-dd", + "generateUpdateJsonSerializerSettingsMethod": true, + "useRequestAndResponseSerializationSettings": false, + "serializeTypeInformation": false, + "queryNullValue": "", + "className": "TribufuApiGenerated", + "operationGenerationMode": "SingleClientFromOperationId", + "additionalNamespaceUsages": [], + "additionalContractNamespaceUsages": [], + "generateOptionalParameters": true, + "generateJsonMethods": false, + "enforceFlagEnums": false, + "parameterArrayType": "System.Collections.Generic.IEnumerable", + "parameterDictionaryType": "System.Collections.Generic.IDictionary", + "responseArrayType": "System.Collections.Generic.ICollection", + "responseDictionaryType": "System.Collections.Generic.IDictionary", + "wrapResponses": false, + "wrapResponseMethods": [], + "generateResponseClasses": true, + "responseClass": "SwaggerResponse", + "namespace": "Tribufu", + "requiredPropertiesMustBeDefined": true, + "dateType": "System.DateTimeOffset", + "jsonConverters": null, + "anyType": "object", + "dateTimeType": "System.DateTimeOffset", + "timeType": "System.TimeSpan", + "timeSpanType": "System.TimeSpan", + "arrayType": "System.Collections.Generic.ICollection", + "arrayInstanceType": "System.Collections.ObjectModel.Collection", + "dictionaryType": "System.Collections.Generic.IDictionary", + "dictionaryInstanceType": "System.Collections.Generic.Dictionary", + "arrayBaseType": "System.Collections.ObjectModel.Collection", + "dictionaryBaseType": "System.Collections.Generic.Dictionary", + "classStyle": "Poco", + "jsonLibrary": "NewtonsoftJson", + "generateDefaultValues": true, + "generateDataAnnotations": true, + "excludedTypeNames": [], + "excludedParameterNames": [], + "handleReferences": false, + "generateImmutableArrayProperties": false, + "generateImmutableDictionaryProperties": false, + "jsonSerializerSettingsTransformationMethod": null, + "inlineNamedArrays": false, + "inlineNamedDictionaries": false, + "inlineNamedTuples": true, + "inlineNamedAny": false, + "generateDtoTypes": true, + "generateOptionalPropertiesAsNullable": false, + "generateNullableReferenceTypes": false, + "templateDirectory": null, + "serviceHost": null, + "serviceSchemes": null, + "output": "TribufuApi.generated.cs", + "newLineBehavior": "LF" + } + } +} diff --git a/vendor/win-arm64/tribufu_sdk.dll b/vendor/win-arm64/tribufu_sdk.dll new file mode 100644 index 0000000..11fd96a Binary files /dev/null and b/vendor/win-arm64/tribufu_sdk.dll differ diff --git a/vendor/win-x64/tribufu_sdk.dll b/vendor/win-x64/tribufu_sdk.dll new file mode 100644 index 0000000..f16e71b Binary files /dev/null and b/vendor/win-x64/tribufu_sdk.dll differ diff --git a/vendor/win-x86/tribufu_sdk.dll b/vendor/win-x86/tribufu_sdk.dll new file mode 100644 index 0000000..a0b5a82 Binary files /dev/null and b/vendor/win-x86/tribufu_sdk.dll differ