feature: Edgegap Hosting Plugin (#3636)

* edgegap plugin from https://github.com/edgegap/edgegap-unity-plugin

* newtonsoft.json plugin from https://github.com/JamesNK/Newtonsoft.Json/releases/tag/13.0.3 (

* fix stylesheet paths

* version

* fix stylesheet paths

* syntax: remove redundant private identifiers

* readme

* syntax: use explicit type instead of var

* syntax: remove redundant private identifiers

* styling

* rename folder

* plugins

* styles

* readme updated

* fix deprecated warning

* mark mirror changes

* naming

* stylesheet path const

* namespace Edgegap

* remove unused imports

* delete scenes

* syntax

* mirror.hosting.asmdef

* only in editor

* syntax

* show error in error window

* fix typo

* syntax

* RunCommand_DockerVersion helper to prepare for platform indepenent code

* add logging

* logging better

* syntax

* mac and linux cmd docker version support

* syntax

* improve error

* syntax

* check linux build support

* detailed instructions

* restart warning

* gitignore builds

* mirror change mark

* docker build and push command platform independent

* improve log

* helpful docker daemon error

* unauthorized access error
This commit is contained in:
mischa 2023-11-03 19:39:19 +01:00 committed by GitHub
parent 631b8e0eac
commit 05e9ca4646
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
222 changed files with 9345 additions and 0 deletions

1
.gitignore vendored
View File

@ -16,6 +16,7 @@ UserSettings/Search.settings
# ===================================== # # ===================================== #
Database.sqlite Database.sqlite
Database/ Database/
Builds/
# ===================================== # # ===================================== #
# Visual Studio / MonoDevelop / Rider # # Visual Studio / MonoDevelop / Rider #

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b13bce90dfb604c2d9170e3640f59ad9
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b7c51dc3e45095f4a8a960150837fe7b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 635b395f47dc9f742b4d71144921bb0d
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,219 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using UnityEditor;
using UnityEditor.Build.Reporting;
using Debug = UnityEngine.Debug;
namespace Edgegap
{
internal static class EdgegapBuildUtils
{
public static BuildReport BuildServer()
{
IEnumerable<string> scenes = EditorBuildSettings.scenes.Select(s=>s.path);
BuildPlayerOptions options = new BuildPlayerOptions
{
scenes = scenes.ToArray(),
target = BuildTarget.StandaloneLinux64,
#pragma warning disable CS0618 // disable deprecated warning until Edgegap updates this
options = BuildOptions.EnableHeadlessMode,
#pragma warning restore CS0618
locationPathName = "Builds/EdgegapServer/ServerBuild"
};
return BuildPipeline.BuildPlayer(options);
}
public static async Task<bool> DockerSetupAndInstallationCheck()
{
if (!File.Exists("Dockerfile"))
{
File.WriteAllText("Dockerfile", dockerFileText);
}
string output = null;
string error = null;
await RunCommand_DockerVersion(msg => output = msg, msg => error = msg); // MIRROR CHANGE
if (!string.IsNullOrEmpty(error))
{
Debug.LogError(error);
return false;
}
Debug.Log($"[Edgegap] Docker version detected: {output}"); // MIRROR CHANGE
return true;
}
// MIRROR CHANGE
static async Task RunCommand_DockerVersion(Action<string> outputReciever = null, Action<string> errorReciever = null)
{
#if UNITY_EDITOR_WIN
await RunCommand("cmd.exe", "/c docker --version", outputReciever, errorReciever);
#elif UNITY_EDITOR_OSX
await RunCommand("/bin/bash", "-c \"docker --version\"", outputReciever, errorReciever);
#elif UNITY_EDITOR_LINUX
await RunCommand("/bin/bash", "-c \"docker --version\"", outputReciever, errorReciever);
#else
Debug.LogError("The platform is not supported yet.");
#endif
}
// MIRROR CHANGE
public static async Task RunCommand_DockerBuild(string registry, string imageRepo, string tag, Action<string> onStatusUpdate)
{
string realErrorMessage = null;
#if UNITY_EDITOR_WIN
await RunCommand("docker.exe", $"build -t {registry}/{imageRepo}:{tag} .", onStatusUpdate,
#elif UNITY_EDITOR_OSX
await RunCommand("/bin/bash", $"-c \"docker build -t {registry}/{imageRepo}:{tag} .\"", onStatusUpdate,
#elif UNITY_EDITOR_LINUX
await RunCommand("/bin/bash", $"-c \"docker build -t {registry}/{imageRepo}:{tag} .\"", onStatusUpdate,
#endif
(msg) =>
{
if (msg.Contains("ERROR"))
{
realErrorMessage = msg;
}
onStatusUpdate(msg);
});
if(realErrorMessage != null)
{
throw new Exception(realErrorMessage);
}
}
public static async Task<(bool, string)> RunCommand_DockerPush(string registry, string imageRepo, string tag, Action<string> onStatusUpdate)
{
string error = string.Empty;
#if UNITY_EDITOR_WIN
await RunCommand("docker.exe", $"push {registry}/{imageRepo}:{tag}", onStatusUpdate, (msg) => error += msg + "\n");
#elif UNITY_EDITOR_OSX
await RunCommand("/bin/bash", $"-c \"docker push {registry}/{imageRepo}:{tag}\"", onStatusUpdate, (msg) => error += msg + "\n");
#elif UNITY_EDITOR_LINUX
await RunCommand("/bin/bash", $"-c \"docker push {registry}/{imageRepo}:{tag}\"", onStatusUpdate, (msg) => error += msg + "\n");
#endif
if (!string.IsNullOrEmpty(error))
{
Debug.LogError(error);
return (false, error);
}
return (true, null);
}
// END MIRROR CHANGE
static async Task RunCommand(string command, string arguments, Action<string> outputReciever = null, Action<string> errorReciever = null)
{
ProcessStartInfo startInfo = new ProcessStartInfo()
{
FileName = command,
Arguments = arguments,
RedirectStandardOutput = true,
RedirectStandardError = true,
UseShellExecute = false,
CreateNoWindow = true,
};
// MIRROR CHANGE
#if !UNITY_EDITOR_WIN
// on mac, commands like 'docker' aren't found because it's not in the application's PATH
// even if it runs on mac's terminal.
// to solve this we need to do two steps:
// 1. add /usr/bin/local to PATH if it's not there already. often this is missing in the application.
// this is where docker is usually instaled.
// 2. add PATH to ProcessStartInfo
string existingPath = Environment.GetEnvironmentVariable("PATH");
string customPath = $"{existingPath}:/usr/local/bin";
startInfo.EnvironmentVariables["PATH"] = customPath;
// Debug.Log("PATH: " + customPath);
#endif
// END MIRROR CHANGE
Process proc = new Process() { StartInfo = startInfo, };
proc.EnableRaisingEvents = true;
ConcurrentQueue<string> errors = new ConcurrentQueue<string>();
ConcurrentQueue<string> outputs = new ConcurrentQueue<string>();
void PipeQueue(ConcurrentQueue<string> q, Action<string> opt)
{
while (!q.IsEmpty)
{
if (q.TryDequeue(out string msg) && !string.IsNullOrWhiteSpace(msg))
{
opt?.Invoke(msg);
}
}
}
proc.OutputDataReceived += (s, e) => outputs.Enqueue(e.Data);
proc.ErrorDataReceived += (s, e) => errors.Enqueue(e.Data);
proc.Start();
proc.BeginOutputReadLine();
proc.BeginErrorReadLine();
while (!proc.HasExited)
{
await Task.Delay(100);
PipeQueue(errors, errorReciever);
PipeQueue(outputs, outputReciever);
}
PipeQueue(errors, errorReciever);
PipeQueue(outputs, outputReciever);
}
static void Proc_OutputDataReceived(object sender, DataReceivedEventArgs e)
{
throw new NotImplementedException();
}
static Regex lastDigitsRegex = new Regex("([0-9])+$");
public static string IncrementTag(string tag)
{
Match lastDigits = lastDigitsRegex.Match(tag);
if (!lastDigits.Success)
{
return tag + " _1";
}
int number = int.Parse(lastDigits.Groups[0].Value);
number++;
return lastDigitsRegex.Replace(tag, number.ToString());
}
public static void UpdateEdgegapAppTag(string tag)
{
// throw new NotImplementedException();
}
static string dockerFileText = @"FROM ubuntu:bionic
ARG DEBIAN_FRONTEND=noninteractive
COPY Builds/EdgegapServer /root/build/
WORKDIR /root/
RUN chmod +x /root/build/ServerBuild
ENTRYPOINT [ ""/root/build/ServerBuild"", ""-batchmode"", ""-nographics""]
";
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 97dadab2a073d8b47bf9a270401f0a8f
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
using UnityEditor;
using UnityEngine.UIElements;
namespace Edgegap
{
[CustomEditor(typeof(EdgegapToolScript))]
public class EdgegapPluginScriptEditor : Editor
{
VisualElement _serverDataContainer;
void OnEnable()
{
_serverDataContainer = EdgegapServerDataManager.GetServerDataVisualTree();
EdgegapServerDataManager.RegisterServerDataContainer(_serverDataContainer);
}
void OnDisable()
{
EdgegapServerDataManager.DeregisterServerDataContainer(_serverDataContainer);
}
public override VisualElement CreateInspectorGUI()
{
return _serverDataContainer;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c4c676ae6dcca0e458c6a8f06571f8fc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
.row__port-table {
padding: 2px 4px;
display: flex;
flex-direction: row;
align-items: center;
width: auto;
justify-content: space-around;
-unity-text-align: middle-left;
}
.row__port-table > * {
width: 0px;
flex-grow: 1;
align-self: center;
margin: 0px;
padding: 0px;
}
.focusable:hover {
background-color: rgba(0,0,0,0.2);
border-radius: 3px;
}
.row__dns {
display: flex;
flex-direction: row;
align-items: center;
width: auto;
justify-content: space-between;
-unity-text-align: middle-left;
}
.row__status {
display: flex;
flex-direction: row;
align-items: center;
width: auto;
justify-content: space-between;
-unity-text-align: middle-left;
}
.label__header {
-unity-font-style: bold
}
.label__status {
-unity-font-style: bold;
border-radius: 2px;
width: 100px;
color: #fff;
-unity-text-align: middle-center;
}
.label__info-text {
padding: 8px;
margin: 4px;
border-radius: 3px;
-unity-text-align: middle-center;
white-space: normal;
background-color: rgba(42, 42, 42, 0.5);
}
.container {
margin: 8px 0px;
}
.bg--secondary {
background-color: #8a8a8a;
}
.bg--success {
background-color: #90be6d;
}
.bg--danger {
background-color: #f94144;
}
.bg--warning {
background-color: #f9c74f;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: da5e3f58bd8cde14789f7c61df3f59f4
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0

View File

@ -0,0 +1,242 @@
using IO.Swagger.Model;
using System.Collections.Generic;
using System.Linq;
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
namespace Edgegap
{
static class EdgegapServerDataManagerUtils
{
public static Label GetHeader(string text)
{
Label header = new Label(text);
header.AddToClassList("label__header");
return header;
}
public static VisualElement GetHeaderRow()
{
VisualElement row = new VisualElement();
row.AddToClassList("row__port-table");
row.AddToClassList("label__header");
row.Add(new Label("Name"));
row.Add(new Label("External"));
row.Add(new Label("Internal"));
row.Add(new Label("Protocol"));
row.Add(new Label("Link"));
return row;
}
public static VisualElement GetRowFromPortResponse(PortMapping port)
{
VisualElement row = new VisualElement();
row.AddToClassList("row__port-table");
row.AddToClassList("focusable");
row.Add(new Label(port.Name));
row.Add(new Label(port.External.ToString()));
row.Add(new Label(port.Internal.ToString()));
row.Add(new Label(port.Protocol));
row.Add(GetCopyButton("Copy", port.Link));
return row;
}
public static Button GetCopyButton(string btnText, string copiedText)
{
Button copyBtn = new Button();
copyBtn.text = btnText;
copyBtn.clickable.clicked += () => GUIUtility.systemCopyBuffer = copiedText;
return copyBtn;
}
public static Button GetLinkButton(string btnText, string targetUrl)
{
Button copyBtn = new Button();
copyBtn.text = btnText;
copyBtn.clickable.clicked += () => UnityEngine.Application.OpenURL(targetUrl);
return copyBtn;
}
public static Label GetInfoText(string innerText)
{
Label infoText = new Label(innerText);
infoText.AddToClassList("label__info-text");
return infoText;
}
}
/// <summary>
/// Utility class to centrally manage the Edgegap server data, and create / update the elements displaying the server info.
/// </summary>
public static class EdgegapServerDataManager
{
static Status _serverData;
static ApiEnvironment _apiEnvironment;
// UI elements
static readonly StyleSheet _serverDataStylesheet;
static readonly List<VisualElement> _serverDataContainers = new List<VisualElement>();
public static Status GetServerStatus() => _serverData;
static EdgegapServerDataManager()
{
// MIRROR CHANGE
_serverDataStylesheet = AssetDatabase.LoadAssetAtPath<StyleSheet>($"{EdgegapWindow.StylesheetPath}/EdgegapServerData.uss");
// END MIRROR CHANGE
}
public static void RegisterServerDataContainer(VisualElement serverDataContainer)
{
_serverDataContainers.Add(serverDataContainer);
}
public static void DeregisterServerDataContainer(VisualElement serverDataContainer)
{
_serverDataContainers.Remove(serverDataContainer);
}
public static void SetServerData(Status serverData, ApiEnvironment apiEnvironment)
{
_serverData = serverData;
_apiEnvironment = apiEnvironment;
RefreshServerDataContainers();
}
static VisualElement GetStatusSection()
{
ServerStatus serverStatus = _serverData.GetServerStatus();
string dashboardUrl = _apiEnvironment.GetDashboardUrl();
string requestId = _serverData.RequestId;
string deploymentDashboardUrl = "";
if (!string.IsNullOrEmpty(requestId) && !string.IsNullOrEmpty(dashboardUrl))
{
deploymentDashboardUrl = $"{dashboardUrl}/arbitrium/deployment/read/{requestId}/";
}
VisualElement container = new VisualElement();
container.AddToClassList("container");
container.Add(EdgegapServerDataManagerUtils.GetHeader("Server Status"));
VisualElement row = new VisualElement();
row.AddToClassList("row__status");
// Status pill
Label statusLabel = new Label(serverStatus.GetLabelText());
statusLabel.AddToClassList(serverStatus.GetStatusBgClass());
statusLabel.AddToClassList("label__status");
row.Add(statusLabel);
// Link to dashboard
if (!string.IsNullOrEmpty(deploymentDashboardUrl))
{
row.Add(EdgegapServerDataManagerUtils.GetLinkButton("See in the dashboard", deploymentDashboardUrl));
}
else
{
row.Add(new Label("Could not resolve link to this deployment"));
}
container.Add(row);
return container;
}
static VisualElement GetDnsSection()
{
string serverDns = _serverData.Fqdn;
VisualElement container = new VisualElement();
container.AddToClassList("container");
container.Add(EdgegapServerDataManagerUtils.GetHeader("Server DNS"));
VisualElement row = new VisualElement();
row.AddToClassList("row__dns");
row.AddToClassList("focusable");
row.Add(new Label(serverDns));
row.Add(EdgegapServerDataManagerUtils.GetCopyButton("Copy", serverDns));
container.Add(row);
return container;
}
static VisualElement GetPortsSection()
{
List<PortMapping> serverPorts = _serverData.Ports.Values.ToList();
VisualElement container = new VisualElement();
container.AddToClassList("container");
container.Add(EdgegapServerDataManagerUtils.GetHeader("Server Ports"));
container.Add(EdgegapServerDataManagerUtils.GetHeaderRow());
VisualElement portList = new VisualElement();
if (serverPorts.Count > 0)
{
foreach (PortMapping port in serverPorts)
{
portList.Add(EdgegapServerDataManagerUtils.GetRowFromPortResponse(port));
}
}
else
{
portList.Add(new Label("No port configured for this app version."));
}
container.Add(portList);
return container;
}
public static VisualElement GetServerDataVisualTree()
{
VisualElement serverDataTree = new VisualElement();
serverDataTree.styleSheets.Add(_serverDataStylesheet);
bool hasServerData = _serverData != null;
bool isReady = hasServerData && _serverData.GetServerStatus().IsOneOf(ServerStatus.Ready, ServerStatus.Error);
if (hasServerData)
{
serverDataTree.Add(GetStatusSection());
if (isReady)
{
serverDataTree.Add(GetDnsSection());
serverDataTree.Add(GetPortsSection());
}
else
{
serverDataTree.Add(EdgegapServerDataManagerUtils.GetInfoText("Additionnal information will be displayed when the server is ready."));
}
}
else
{
serverDataTree.Add(EdgegapServerDataManagerUtils.GetInfoText("Server data will be displayed here when a server is running."));
}
return serverDataTree;
}
static void RefreshServerDataContainers()
{
foreach (VisualElement serverDataContainer in _serverDataContainers)
{
serverDataContainer.Clear();
serverDataContainer.Add(GetServerDataVisualTree()); // Cannot reuse a same instance of VisualElement
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 39f5f27c13279a34eb116630a00e41c2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,15 @@
using UnityEngine;
using Edgegap;
using IO.Swagger.Model;
namespace Edgegap
{
/// <summary>
/// This script acts as an interface to display and use the necessary variables from the Edgegap tool.
/// The server info can be accessed from the tool window, as well as through the public script property.
/// </summary>
public class EdgegapToolScript : MonoBehaviour
{
public Status ServerStatus => EdgegapServerDataManager.GetServerStatus();
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5963202433da25448a22def99f5a598b
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,698 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
using UnityEditor.UIElements;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Collections.Generic;
using Newtonsoft.Json;
using System.Net;
using System.Text;
using System;
using System.Threading.Tasks;
using IO.Swagger.Model;
using UnityEditor.Build.Reporting;
using Application = UnityEngine.Application;
namespace Edgegap
{
public class EdgegapWindow : EditorWindow
{
static readonly HttpClient _httpClient = new HttpClient();
const string EditorDataSerializationName = "EdgegapSerializationData";
const int ServerStatusCronjobIntervalMs = 10000; // Interval at which the server status is updated
// MIRROR CHANGE: specify stylesheet paths in one place
// TODO DON'T HARDCODE
public const string StylesheetPath = "Assets/Mirror/Hosting/Edgegap/Editor";
// END MIRROR CHANGE
readonly System.Timers.Timer _updateServerStatusCronjob = new System.Timers.Timer(ServerStatusCronjobIntervalMs);
[SerializeField] string _userExternalIp;
[SerializeField] string _apiKey;
[SerializeField] ApiEnvironment _apiEnvironment;
[SerializeField] string _appName;
[SerializeField] string _appVersionName;
[SerializeField] string _deploymentRequestId;
[SerializeField] string _containerRegistry;
[SerializeField] string _containerImageRepo;
[SerializeField] string _containerImageTag;
[SerializeField] bool _autoIncrementTag = true;
VisualTreeAsset _visualTree;
bool _shouldUpdateServerStatus = false;
// Interactable elements
EnumField _apiEnvironmentSelect;
TextField _apiKeyInput;
TextField _appNameInput;
TextField _appVersionNameInput;
TextField _containerRegistryInput;
TextField _containerImageRepoInput;
TextField _containerImageTagInput;
Toggle _autoIncrementTagInput;
Button _connectionButton;
Button _serverActionButton;
Button _documentationBtn;
Button _buildAndPushServerBtn;
// Readonly elements
Label _connectionStatusLabel;
VisualElement _serverDataContainer;
[MenuItem("Edgegap/Edgegap Hosting")] // MIRROR CHANGE
public static void ShowEdgegapToolWindow()
{
EdgegapWindow window = GetWindow<EdgegapWindow>();
window.titleContent = new GUIContent("Edgegap Hosting"); // MIRROR CHANGE
}
protected void OnEnable()
{
// Set root VisualElement and style
// BEGIN MIRROR CHANGE
_visualTree = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>($"{StylesheetPath}/EdgegapWindow.uxml");
StyleSheet styleSheet = AssetDatabase.LoadAssetAtPath<StyleSheet>($"{StylesheetPath}/EdgegapWindow.uss");
// END MIRROR CHANGE
rootVisualElement.styleSheets.Add(styleSheet);
LoadToolData();
if (string.IsNullOrWhiteSpace(_userExternalIp))
{
_userExternalIp = GetExternalIpAddress();
}
}
protected void Update()
{
if (_shouldUpdateServerStatus)
{
_shouldUpdateServerStatus = false;
UpdateServerStatus();
}
}
public void CreateGUI()
{
rootVisualElement.Clear();
_visualTree.CloneTree(rootVisualElement);
InitUIElements();
SyncFormWithObject();
bool hasActiveDeployment = !string.IsNullOrEmpty(_deploymentRequestId);
if (hasActiveDeployment)
{
RestoreActiveDeployment();
}
else
{
DisconnectCallback();
}
}
protected void OnDestroy()
{
bool deploymentActive = !string.IsNullOrEmpty(_deploymentRequestId);
if (deploymentActive)
{
EditorUtility.DisplayDialog(
"Warning",
$"You have an active deployment ({_deploymentRequestId}) that won't be stopped automatically.",
"Ok"
);
}
}
protected void OnDisable()
{
SyncObjectWithForm();
SaveToolData();
EdgegapServerDataManager.DeregisterServerDataContainer(_serverDataContainer);
}
/// <summary>
/// Binds the form inputs to the associated variables and initializes the inputs as required.
/// Requires the VisualElements to be loaded before this call. Otherwise, the elements cannot be found.
/// </summary>
void InitUIElements()
{
_apiEnvironmentSelect = rootVisualElement.Q<EnumField>("environmentSelect");
_apiKeyInput = rootVisualElement.Q<TextField>("apiKey");
_appNameInput = rootVisualElement.Q<TextField>("appName");
_appVersionNameInput = rootVisualElement.Q<TextField>("appVersionName");
_containerRegistryInput = rootVisualElement.Q<TextField>("containerRegistry");
_containerImageRepoInput = rootVisualElement.Q<TextField>("containerImageRepo");
_containerImageTagInput = rootVisualElement.Q<TextField>("tag");
_autoIncrementTagInput = rootVisualElement.Q<Toggle>("autoIncrementTag");
_connectionButton = rootVisualElement.Q<Button>("connectionBtn");
_serverActionButton = rootVisualElement.Q<Button>("serverActionBtn");
_documentationBtn = rootVisualElement.Q<Button>("documentationBtn");
_buildAndPushServerBtn = rootVisualElement.Q<Button>("buildAndPushBtn");
_buildAndPushServerBtn.clickable.clicked += BuildAndPushServer;
_connectionStatusLabel = rootVisualElement.Q<Label>("connectionStatusLabel");
_serverDataContainer = rootVisualElement.Q<VisualElement>("serverDataContainer");
// Load initial server data UI element and register for updates.
VisualElement serverDataElement = EdgegapServerDataManager.GetServerDataVisualTree();
EdgegapServerDataManager.RegisterServerDataContainer(serverDataElement);
_serverDataContainer.Clear();
_serverDataContainer.Add(serverDataElement);
_documentationBtn.clickable.clicked += OpenDocumentationCallback;
// Init the ApiEnvironment dropdown
_apiEnvironmentSelect.Init(ApiEnvironment.Console);
}
/// <summary>
/// With a call to an external resource, determines the current user's public IP address.
/// </summary>
/// <returns>External IP address</returns>
string GetExternalIpAddress()
{
string externalIpString = new WebClient()
.DownloadString("http://icanhazip.com")
.Replace("\\r\\n", "")
.Replace("\\n", "")
.Trim();
IPAddress externalIp = IPAddress.Parse(externalIpString);
return externalIp.ToString();
}
void OpenDocumentationCallback()
{
ApiEnvironment selectedApiEnvironment = (ApiEnvironment)_apiEnvironmentSelect.value;
string documentationUrl = selectedApiEnvironment.GetDocumentationUrl();
if (!string.IsNullOrEmpty(documentationUrl))
{
UnityEngine.Application.OpenURL(documentationUrl);
}
else
{
string apiEnvName = Enum.GetName(typeof(ApiEnvironment), selectedApiEnvironment);
Debug.LogWarning($"Could not open documentation for api environment {apiEnvName}: No documentation URL.");
}
}
void ConnectCallback()
{
ApiEnvironment selectedApiEnvironment = (ApiEnvironment)_apiEnvironmentSelect.value;
string selectedAppName = _appNameInput.value;
string selectedVersionName = _appVersionNameInput.value;
string selectedApiKey = _apiKeyInput.value;
bool validAppName = !string.IsNullOrEmpty(selectedAppName) && !string.IsNullOrWhiteSpace(selectedAppName);
bool validVersionName = !string.IsNullOrEmpty(selectedVersionName) && !string.IsNullOrWhiteSpace(selectedVersionName);
bool validApiKey = selectedApiKey.StartsWith("token ");
if (validAppName && validVersionName && validApiKey)
{
string apiKeyValue = selectedApiKey.Substring(6);
Connect(selectedApiEnvironment, selectedAppName, selectedVersionName, apiKeyValue);
}
else
{
EditorUtility.DisplayDialog(
"Could not connect - Invalid data",
"The data provided is invalid. " +
"Make sure every field is filled, and that you provide your complete Edgegap API token " +
"(including the \"token\" part).",
"Ok"
);
}
}
async void Connect(
ApiEnvironment selectedApiEnvironment,
string selectedAppName,
string selectedAppVersionName,
string selectedApiTokenValue
)
{
SetToolUIState(ToolState.Connecting);
_httpClient.BaseAddress = new Uri(selectedApiEnvironment.GetApiUrl());
string path = $"/v1/app/{selectedAppName}/version/{selectedAppVersionName}";
// Headers
_httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
_httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("token", selectedApiTokenValue);
// Make HTTP request
HttpResponseMessage response = await _httpClient.GetAsync(path);
if (response.IsSuccessStatusCode)
{
SyncObjectWithForm();
SetToolUIState(ToolState.Connected);
}
else
{
int status = (int)response.StatusCode;
string title;
string message;
if (status == 401)
{
string apiEnvName = Enum.GetName(typeof(ApiEnvironment), selectedApiEnvironment);
title = "Invalid credentials";
message = $"Could not find an Edgegap account with this API key for the {apiEnvName} environment.";
}
else if (status == 404)
{
title = "App not found";
message = $"Could not find app {selectedAppName} with version {selectedAppVersionName}.";
}
else
{
title = "Oops";
message = $"There was an error while connecting you to the Edgegap API. Please try again later.";
}
EditorUtility.DisplayDialog(title, message, "Ok");
SetToolUIState(ToolState.Disconnected);
}
}
void DisconnectCallback()
{
if (string.IsNullOrEmpty(_deploymentRequestId))
{
SetToolUIState(ToolState.Disconnected);
}
else
{
EditorUtility.DisplayDialog("Cannot disconnect", "Make sure no server is running in the Edgegap tool before disconnecting", "Ok");
}
}
float ProgressCounter = 0;
void ShowBuildWorkInProgress(string status)
{
EditorUtility.DisplayProgressBar("Build and push progress", status, ProgressCounter++ / 50);
}
async void BuildAndPushServer()
{
SetToolUIState(ToolState.Building);
SyncObjectWithForm();
ProgressCounter = 0;
Action<string> onError = (msg) =>
{
EditorUtility.DisplayDialog("Error", msg, "Ok");
SetToolUIState(ToolState.Connected);
};
try
{
// check for installation and setup docker file
if (!await EdgegapBuildUtils.DockerSetupAndInstallationCheck())
{
onError("Docker installation not found. Docker can be downloaded from:\n\nhttps://www.docker.com/");
return;
}
// MIRROR CHANGE
// make sure Linux build target is installed before attemping to build.
// if it's not installed, tell the user about it.
if (!BuildPipeline.IsBuildTargetSupported(BuildTargetGroup.Standalone, BuildTarget.StandaloneLinux64))
{
onError($"Linux Build Support is missing.\n\nPlease open Unity Hub -> Installs -> Unity {Application.unityVersion} -> Add Modules -> Linux Build Support (IL2CPP & Mono & Dedicated Server) -> Install\n\nAfterwards restart Unity!");
return;
}
// END MIRROR CHANGE
// create server build
BuildReport buildResult = EdgegapBuildUtils.BuildServer();
if (buildResult.summary.result != BuildResult.Succeeded)
{
onError("Edgegap build failed, please check the Unity console logs.");
return;
}
string registry = _containerRegistry;
string imageName = _containerImageRepo;
string tag = _containerImageTag;
// increment tag for quicker iteration
if (_autoIncrementTag)
{
tag = EdgegapBuildUtils.IncrementTag(tag);
}
// create docker image
await EdgegapBuildUtils.RunCommand_DockerBuild(registry, imageName, tag, ShowBuildWorkInProgress);
SetToolUIState(ToolState.Pushing);
// push docker image
(bool result, string error) = await EdgegapBuildUtils.RunCommand_DockerPush(registry, imageName, tag, ShowBuildWorkInProgress);
if (!result)
{
// catch common issues with detailed solutions
if (error.Contains("Cannot connect to the Docker daemon"))
{
onError($"{error}\nTo solve this, you can install and run Docker Desktop from:\n\nhttps://www.docker.com/products/docker-desktop");
return;
}
if (error.Contains("unauthorized to access repository"))
{
onError($"Docker authorization failed:\n\n{error}\nTo solve this, you can open a terminal and enter 'docker login {registry}', then enter your credentials.");
return;
}
// otherwise show generic error message
onError($"Unable to push docker image to registry. Please make sure you're logged in to {registry} and check the following error:\n\n{error}");
return;
}
// update edgegap server settings for new tag
ShowBuildWorkInProgress("Updating server info on Edgegap");
await UpdateAppTagOnEdgegap(tag);
// cleanup
_containerImageTag = tag;
SyncFormWithObject();
EditorUtility.ClearProgressBar();
SetToolUIState(ToolState.Connected);
Debug.Log("Server built and pushed successfully");
}
catch (Exception ex)
{
EditorUtility.ClearProgressBar();
Debug.LogError(ex);
onError($"Edgegap build and push failed with Error: {ex}");
}
}
async Task UpdateAppTagOnEdgegap(string newTag)
{
string path = $"/v1/app/{_appName}/version/{_appVersionName}";
// Setup post data
AppVersionUpdatePatchData updatePatchData = new AppVersionUpdatePatchData { DockerImage = _containerImageRepo, DockerRegistry = _containerRegistry, DockerTag = newTag };
string json = JsonConvert.SerializeObject(updatePatchData);
StringContent patchData = new StringContent(json, Encoding.UTF8, "application/json");
// Make HTTP request
HttpRequestMessage request = new HttpRequestMessage(new HttpMethod("PATCH"), path);
request.Content = patchData;
HttpResponseMessage response = await _httpClient.SendAsync(request);
string content = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
throw new Exception($"Could not update Edgegap server tag. Got {(int)response.StatusCode} with response:\n{content}");
}
}
async void StartServerCallback()
{
SetToolUIState(ToolState.ProcessingDeployment); // Prevents being called multiple times.
const string path = "/v1/deploy";
// Setup post data
DeployPostData deployPostData = new DeployPostData(_appName, _appVersionName, new List<string> { _userExternalIp });
string json = JsonConvert.SerializeObject(deployPostData);
StringContent postData = new StringContent(json, Encoding.UTF8, "application/json");
// Make HTTP request
HttpResponseMessage response = await _httpClient.PostAsync(path, postData);
string content = await response.Content.ReadAsStringAsync();
if (response.IsSuccessStatusCode)
{
// Parse response
Deployment parsedResponse = JsonConvert.DeserializeObject<Deployment>(content);
_deploymentRequestId = parsedResponse.RequestId;
UpdateServerStatus();
StartServerStatusCronjob();
}
else
{
Debug.LogError($"Could not start Edgegap server. Got {(int)response.StatusCode} with response:\n{content}");
SetToolUIState(ToolState.Connected);
}
}
async void StopServerCallback()
{
string path = $"/v1/stop/{_deploymentRequestId}";
// Make HTTP request
HttpResponseMessage response = await _httpClient.DeleteAsync(path);
if (response.IsSuccessStatusCode)
{
UpdateServerStatus();
SetToolUIState(ToolState.ProcessingDeployment);
}
else
{
// Parse response
string content = await response.Content.ReadAsStringAsync();
Debug.LogError($"Could not stop Edgegap server. Got {(int)response.StatusCode} with response:\n{content}");
}
}
void StartServerStatusCronjob()
{
_updateServerStatusCronjob.Elapsed += (sourceObject, elaspedEvent) => _shouldUpdateServerStatus = true;
_updateServerStatusCronjob.AutoReset = true;
_updateServerStatusCronjob.Start();
}
void StopServerStatusCronjob() => _updateServerStatusCronjob.Stop();
async void UpdateServerStatus()
{
Status serverStatusResponse = await FetchServerStatus();
ToolState toolState;
ServerStatus serverStatus = serverStatusResponse.GetServerStatus();
if (serverStatus == ServerStatus.Terminated)
{
EdgegapServerDataManager.SetServerData(null, _apiEnvironment);
if (_updateServerStatusCronjob.Enabled)
{
StopServerStatusCronjob();
}
_deploymentRequestId = null;
toolState = ToolState.Connected;
}
else
{
EdgegapServerDataManager.SetServerData(serverStatusResponse, _apiEnvironment);
if (serverStatus == ServerStatus.Ready || serverStatus == ServerStatus.Error)
{
toolState = ToolState.DeploymentRunning;
}
else
{
toolState = ToolState.ProcessingDeployment;
}
}
SetToolUIState(toolState);
}
async Task<Status> FetchServerStatus()
{
string path = $"/v1/status/{_deploymentRequestId}";
// Make HTTP request
HttpResponseMessage response = await _httpClient.GetAsync(path);
// Parse response
string content = await response.Content.ReadAsStringAsync();
Status parsedData;
if (response.IsSuccessStatusCode)
{
parsedData = JsonConvert.DeserializeObject<Status>(content);
}
else
{
if ((int)response.StatusCode == 400)
{
Debug.LogError("The deployment that was active in the tool is now unreachable. Considering it Terminated.");
parsedData = new Status() { CurrentStatus = ServerStatus.Terminated.GetLabelText() };
}
else
{
Debug.LogError(
$"Could not fetch status of Edgegap deployment {_deploymentRequestId}. " +
$"Got {(int)response.StatusCode} with response:\n{content}"
);
parsedData = new Status() { CurrentStatus = ServerStatus.NA.GetLabelText() };
}
}
return parsedData;
}
void RestoreActiveDeployment()
{
ConnectCallback();
_shouldUpdateServerStatus = true;
StartServerStatusCronjob();
}
void SyncObjectWithForm()
{
_apiKey = _apiKeyInput.value;
_apiEnvironment = (ApiEnvironment)_apiEnvironmentSelect.value;
_appName = _appNameInput.value;
_appVersionName = _appVersionNameInput.value;
_containerRegistry = _containerRegistryInput.value;
_containerImageTag = _containerImageTagInput.value;
_containerImageRepo = _containerImageRepoInput.value;
_autoIncrementTag = _autoIncrementTagInput.value;
}
void SyncFormWithObject()
{
_apiKeyInput.value = _apiKey;
_apiEnvironmentSelect.value = _apiEnvironment;
_appNameInput.value = _appName;
_appVersionNameInput.value = _appVersionName;
_containerRegistryInput.value = _containerRegistry;
_containerImageTagInput.value = _containerImageTag;
_containerImageRepoInput.value = _containerImageRepo;
_autoIncrementTagInput.value = _autoIncrementTag;
}
void SetToolUIState(ToolState toolState)
{
SetConnectionInfoUI(toolState);
SetConnectionButtonUI(toolState);
SetServerActionUI(toolState);
SetDockerRepoInfoUI(toolState);
}
void SetDockerRepoInfoUI(ToolState toolState)
{
bool connected = toolState.CanStartDeployment();
_containerRegistryInput.SetEnabled(connected);
_autoIncrementTagInput.SetEnabled(connected);
_containerImageRepoInput.SetEnabled(connected);
_containerImageTagInput.SetEnabled(connected);
}
void SetConnectionInfoUI(ToolState toolState)
{
bool canEditConnectionInfo = toolState.CanEditConnectionInfo();
_apiKeyInput.SetEnabled(canEditConnectionInfo);
_apiEnvironmentSelect.SetEnabled(canEditConnectionInfo);
_appNameInput.SetEnabled(canEditConnectionInfo);
_appVersionNameInput.SetEnabled(canEditConnectionInfo);
}
void SetConnectionButtonUI(ToolState toolState)
{
bool canConnect = toolState.CanConnect();
bool canDisconnect = toolState.CanDisconnect();
_connectionButton.SetEnabled(canConnect || canDisconnect);
// A bit dirty, but ensures the callback is not bound multiple times on the button.
_connectionButton.clickable.clicked -= ConnectCallback;
_connectionButton.clickable.clicked -= DisconnectCallback;
if (canConnect || toolState == ToolState.Connecting)
{
_connectionButton.text = "Connect";
_connectionStatusLabel.text = "Awaiting connection";
_connectionStatusLabel.RemoveFromClassList("text--success");
_connectionButton.clickable.clicked += ConnectCallback;
}
else
{
_connectionButton.text = "Disconnect";
_connectionStatusLabel.text = "Connected";
_connectionStatusLabel.AddToClassList("text--success");
_connectionButton.clickable.clicked += DisconnectCallback;
}
}
void SetServerActionUI(ToolState toolState)
{
bool canStartDeployment = toolState.CanStartDeployment();
bool canStopDeployment = toolState.CanStopDeployment();
// A bit dirty, but ensures the callback is not bound multiple times on the button.
_serverActionButton.clickable.clicked -= StartServerCallback;
_serverActionButton.clickable.clicked -= StopServerCallback;
_serverActionButton.SetEnabled(canStartDeployment || canStopDeployment);
_buildAndPushServerBtn.SetEnabled(canStartDeployment);
if (canStopDeployment)
{
_serverActionButton.text = "Stop Server";
_serverActionButton.clickable.clicked += StopServerCallback;
}
else
{
_serverActionButton.text = "Start Server";
_serverActionButton.clickable.clicked += StartServerCallback;
}
}
/// <summary>
/// Save the tool's serializable data to the EditorPrefs to allow persistence across restarts.
/// Any field with [SerializeField] will be saved.
/// </summary>
void SaveToolData()
{
string data = JsonUtility.ToJson(this, false);
EditorPrefs.SetString(EditorDataSerializationName, data);
}
/// <summary>
/// Load the tool's serializable data from the EditorPrefs to the object, restoring the tool's state.
/// </summary>
void LoadToolData()
{
string data = EditorPrefs.GetString(EditorDataSerializationName, JsonUtility.ToJson(this, false));
JsonUtility.FromJsonOverwrite(data, this);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 28bfb13cf2845d04eb5cbee51f9353d0
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,60 @@
#serverDataContainer {
margin: 4px 0px 0px 0px;
}
.content {
position: relative;
height: auto;
overflow: hidden;
padding: 8px 0px 8px 0px;
}
.background {
position: absolute;
height: 400px;
width: 400px;
top: -10px;
right: -150px;
background-image: url("./Images/logo_transparent_400_alpha25.png");
-unity-background-scale-mode: scale-and-crop;
}
.text__title {
font-size: 20px;
color: rgb(36, 194, 237);
padding-top: 8px;
padding-bottom: 8px;
-unity-text-align: middle-center;
-unity-font: url("./Fonts/BaronNeue.otf");
}
.text--muted {
color: #8a8a8a;
}
.text--success {
color: #90be6d;
}
.container {
padding: 4px 4px;
}
.flex {
display: flex;
flex-direction: row;
align-items: center;
width: auto;
}
.flex--wrap {
flex-wrap: wrap;
}
.flex--right {
justify-content: flex-end;
}
.flex--between {
justify-content: space-between;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b1a2e4572c5de8840ac8d98377d409ae
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 12385, guid: 0000000000000000e000000000000000, type: 0}
disableValidation: 0

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<engine:UXML
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:engine="UnityEngine.UIElements"
xmlns:editor="UnityEditor.UIElements"
xmlns:uie="UnityEditor.UIElements"
>
<engine:VisualElement class="content">
<engine:VisualElement class="background" />
<engine:Label class="text__title" text="Edgegap Hosting" />
<engine:ScrollView>
<engine:VisualElement class="container">
<engine:TextField name="apiKey" label="API key" password="true" view-data-key="apiKey" />
<uie:EnumField name="environmentSelect" label="API environment" include-obsolete-values="false"/>
<engine:TextField name="appName" label="App name" view-data-key="appName" />
<engine:TextField name="appVersionName" label="App version" view-data-key="appVersionName" />
</engine:VisualElement>
<engine:VisualElement class="container">
<engine:VisualElement class="flex flex--right">
<engine:Label name="connectionStatusLabel" class="text--muted" text="Awaiting connection" />
<engine:Button name="connectionBtn" />
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement class="container">
<engine:TextField name="containerRegistry" tooltip="ex: docker.io or harbor.edgegap.net" label="Container Registry" view-data-key="containerRegistry" />
<engine:TextField name="containerImageRepo" tooltip="ex: edgegap/image" label="Image repository" view-data-key="containerImageRepo" />
<engine:TextField name="tag" label="Tag" tooltip="ex: 1.2" view-data-key="tag" />
<engine:Toggle name="autoIncrementTag" tooltip="Auto increment the tag on build for quicker iteration" label="Increment tag on build" />
</engine:VisualElement>
<engine:VisualElement class="container" />
<engine:VisualElement class="container">
<engine:VisualElement class="flex">
<engine:Button name="buildAndPushBtn" text="Build and Push" />
<engine:Button name="serverActionBtn" />
</engine:VisualElement>
</engine:VisualElement>
<engine:VisualElement name="serverDataContainer" />
<engine:VisualElement class="container flex flex--right">
<engine:Button name="documentationBtn" text="Documentation" tooltip="Opens the documentation website. The website version changes depending on the selected API environment."/>
</engine:VisualElement>
</engine:ScrollView>
</engine:VisualElement>
</engine:UXML>

View File

@ -0,0 +1,10 @@
fileFormatVersion: 2
guid: 8f6d8a95cd8228e468ad40dbec5ca478
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 13804, guid: 0000000000000000e000000000000000, type: 0}

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 906ea06ae52d7f641958c4777a431af5
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: fb67205c672fbb04d829783b9f771fc9
TrueTypeFontImporter:
externalObjects: {}
serializedVersion: 4
fontSize: 16
forceTextureCase: -2
characterSpacing: 0
characterPadding: 1
includeFontData: 1
fontNames:
- Baron Neue
fallbackFontReferences: []
customCharacters:
fontRenderingMode: 0
ascentCalculationMode: 1
useLegacyBoundsCalculation: 0
shouldRoundAdvanceValue: 1
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 57243654a91bff64ba14f4dd51959d32
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -0,0 +1,96 @@
fileFormatVersion: 2
guid: b7012da4ebf9008458abc3ef9a741f3c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 11
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d1255fab0d2789b47975aa6fda86b94b
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,71 @@
namespace Edgegap
{
public enum ApiEnvironment
{
Staging,
Console,
}
public static class ApiEnvironmentsExtensions
{
public static string GetApiUrl(this ApiEnvironment apiEnvironment)
{
string apiUrl;
switch (apiEnvironment)
{
case ApiEnvironment.Staging:
apiUrl = "https://staging-api.edgegap.com";
break;
case ApiEnvironment.Console:
apiUrl = "https://api.edgegap.com";
break;
default:
apiUrl = null;
break;
}
return apiUrl;
}
public static string GetDashboardUrl(this ApiEnvironment apiEnvironment)
{
string apiUrl;
switch (apiEnvironment)
{
case ApiEnvironment.Staging:
apiUrl = "https://staging-console.edgegap.com";
break;
case ApiEnvironment.Console:
apiUrl = "https://console.edgegap.com";
break;
default:
apiUrl = null;
break;
}
return apiUrl;
}
public static string GetDocumentationUrl(this ApiEnvironment apiEnvironment)
{
string apiUrl;
switch (apiEnvironment)
{
case ApiEnvironment.Staging:
apiUrl = "https://staging-docs.edgegap.com";
break;
case ApiEnvironment.Console:
apiUrl = "https://docs.edgegap.com";
break;
default:
apiUrl = null;
break;
}
return apiUrl;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: dd1ad4f631934cc42b0bc025483f7ffc
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,84 @@
using IO.Swagger.Model;
using System;
using System.Linq;
using UnityEngine;
namespace Edgegap
{
public enum ServerStatus
{
NA, // Not an actual Edgegap server status. Indicates that there are no active server.
Initializing,
Seeking,
Deploying,
Ready,
Seeked,
Terminated,
Scanning,
Terminating,
Error,
}
public static class ServerStatusExtensions
{
private static string GetServerStatusLabel(this Status serverStatusResponse) => char.ToUpper(serverStatusResponse.CurrentStatus[7]) + serverStatusResponse.CurrentStatus.Substring(8).ToLower();
public static ServerStatus GetServerStatus(this Status serverStatusResponse)
{
ServerStatus serverStatus;
try
{
serverStatus = (ServerStatus)Enum.Parse(typeof(ServerStatus), serverStatusResponse.GetServerStatusLabel());
}
catch (Exception)
{
Debug.LogError($"Got unexpected server status: {serverStatusResponse.CurrentStatus}. Considering the deployment to be terminated.");
serverStatus = ServerStatus.Terminated;
}
return serverStatus;
}
public static string GetStatusBgClass(this ServerStatus serverStatus)
{
string statusBgClass;
switch (serverStatus)
{
case ServerStatus.NA:
case ServerStatus.Terminated:
statusBgClass = "bg--secondary"; break;
case ServerStatus.Ready:
statusBgClass = "bg--success"; break;
case ServerStatus.Error:
statusBgClass = "bg--danger"; break;
default:
statusBgClass = "bg--warning"; break;
}
return statusBgClass;
}
public static string GetLabelText(this ServerStatus serverStatus)
{
string statusLabel;
if (serverStatus == ServerStatus.NA)
{
statusLabel = "N/A";
}
else
{
statusLabel = Enum.GetName(typeof(ServerStatus), serverStatus);
}
return statusLabel;
}
public static bool IsOneOf(this ServerStatus serverStatus, params ServerStatus[] serverStatusOptions)
{
return serverStatusOptions.Contains(serverStatus);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 880f675359f40d24e99109ad46894688
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,46 @@
namespace Edgegap
{
public enum ToolState
{
Disconnected,
Connecting,
Connected, // Waiting for a deployment
Building,
Pushing,
ProcessingDeployment,
DeploymentRunning,
}
public static class PluginStateExtensions
{
public static bool CanConnect(this ToolState currentState)
{
return currentState == ToolState.Disconnected;
}
public static bool CanDisconnect(this ToolState currentState)
{
return currentState == ToolState.Connected;
}
public static bool CanStartDeployment(this ToolState currentState)
{
return currentState == ToolState.Connected;
}
public static bool CanStopDeployment(this ToolState currentState)
{
return currentState == ToolState.DeploymentRunning;
}
public static bool CanEditConnectionInfo(this ToolState currentState)
{
return currentState.CanConnect();
}
public static bool HasActiveDeployment(this ToolState currentState)
{
return currentState == ToolState.ProcessingDeployment || currentState == ToolState.DeploymentRunning;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a6d6b357e2b245e4fb9758d8175a6554
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a030ede0c55547e4a9e16fbbaff39b06
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,16 @@
using Newtonsoft.Json;
namespace Edgegap
{
public struct AppVersionUpdatePatchData
{
[JsonProperty("docker_repository")]
public string DockerRegistry;
[JsonProperty("docker_image")]
public string DockerImage;
[JsonProperty("docker_tag")]
public string DockerTag;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6020c692d54ec0944b7f85d3b5714f5c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
using Newtonsoft.Json;
using System.Collections.Generic;
namespace Edgegap
{
public struct DeployPostData
{
[JsonProperty("app_name")]
public string AppName { get; set; }
[JsonProperty("version_name")]
public string AppVersionName { get; set; }
[JsonProperty("ip_list")]
public IList<string> IpList { get; set; }
public DeployPostData(string appName, string appVersionName, IList<string> ipList)
{
AppName = appName;
AppVersionName = appVersionName;
IpList = ipList;
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1104fd207090055458d0a140f0c8ab0d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e6606d7d8eafec541bd872fd36a93b41
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ApiModelContainercrashdata {
/// <summary>
/// Auto Generated Field for exit_code
/// </summary>
/// <value>Auto Generated Field for exit_code</value>
[DataMember(Name="exit_code", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "exit_code")]
public int? ExitCode { get; set; }
/// <summary>
/// Auto Generated Field for message
/// </summary>
/// <value>Auto Generated Field for message</value>
[DataMember(Name="message", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// Auto Generated Field for restart_count
/// </summary>
/// <value>Auto Generated Field for restart_count</value>
[DataMember(Name="restart_count", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "restart_count")]
public int? RestartCount { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class ApiModelContainercrashdata {\n");
sb.Append(" ExitCode: ").Append(ExitCode).Append("\n");
sb.Append(" Message: ").Append(Message).Append("\n");
sb.Append(" RestartCount: ").Append(RestartCount).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: b888d877048876b40a346a5c2874b740
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,71 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ApiModelContainerlogs {
/// <summary>
/// Auto Generated Field for logs
/// </summary>
/// <value>Auto Generated Field for logs</value>
[DataMember(Name="logs", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "logs")]
public string Logs { get; set; }
/// <summary>
/// Auto Generated Field for encoding
/// </summary>
/// <value>Auto Generated Field for encoding</value>
[DataMember(Name="encoding", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "encoding")]
public string Encoding { get; set; }
/// <summary>
/// Auto Generated Field for crash_logs
/// </summary>
/// <value>Auto Generated Field for crash_logs</value>
[DataMember(Name="crash_logs", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "crash_logs")]
public string CrashLogs { get; set; }
/// <summary>
/// Gets or Sets CrashData
/// </summary>
[DataMember(Name="crash_data", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "crash_data")]
public ApiModelContainercrashdata CrashData { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class ApiModelContainerlogs {\n");
sb.Append(" Logs: ").Append(Logs).Append("\n");
sb.Append(" Encoding: ").Append(Encoding).Append("\n");
sb.Append(" CrashLogs: ").Append(CrashLogs).Append("\n");
sb.Append(" CrashData: ").Append(CrashData).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 10664f91af08bc14a966ec6d11ca01bd
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,53 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppCreation {
/// <summary>
/// If the creation happened correctly
/// </summary>
/// <value>If the creation happened correctly</value>
[DataMember(Name="success", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "success")]
public bool? Success { get; set; }
/// <summary>
/// Gets or Sets Version
/// </summary>
[DataMember(Name="version", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "version")]
public AppVersion Version { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppCreation {\n");
sb.Append(" Success: ").Append(Success).Append("\n");
sb.Append(" Version: ").Append(Version).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6519afc2ead759f47a1384db15030792
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,240 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersion {
/// <summary>
/// The Version Name
/// </summary>
/// <value>The Version Name</value>
[DataMember(Name="name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// If the Version is active currently in the system
/// </summary>
/// <value>If the Version is active currently in the system</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// The Repository where the image is (i.e. 'harbor.edgegap.com' or 'docker.io')
/// </summary>
/// <value>The Repository where the image is (i.e. 'harbor.edgegap.com' or 'docker.io')</value>
[DataMember(Name="docker_repository", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "docker_repository")]
public string DockerRepository { get; set; }
/// <summary>
/// The name of your image (i.e. 'edgegap/demo')
/// </summary>
/// <value>The name of your image (i.e. 'edgegap/demo')</value>
[DataMember(Name="docker_image", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "docker_image")]
public string DockerImage { get; set; }
/// <summary>
/// The tag of your image (i.e. '0.1.2')
/// </summary>
/// <value>The tag of your image (i.e. '0.1.2')</value>
[DataMember(Name="docker_tag", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "docker_tag")]
public string DockerTag { get; set; }
/// <summary>
/// The username to access the docker repository
/// </summary>
/// <value>The username to access the docker repository</value>
[DataMember(Name="private_username", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "private_username")]
public string PrivateUsername { get; set; }
/// <summary>
/// The Private Password or Token of the username (We recommend to use a token)
/// </summary>
/// <value>The Private Password or Token of the username (We recommend to use a token)</value>
[DataMember(Name="private_token", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "private_token")]
public string PrivateToken { get; set; }
/// <summary>
/// Units of vCPU needed (1024= 1vcpu)
/// </summary>
/// <value>Units of vCPU needed (1024= 1vcpu)</value>
[DataMember(Name="req_cpu", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "req_cpu")]
public int? ReqCpu { get; set; }
/// <summary>
/// Units of memory in MB needed (1024 = 1GB)
/// </summary>
/// <value>Units of memory in MB needed (1024 = 1GB)</value>
[DataMember(Name="req_memory", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "req_memory")]
public int? ReqMemory { get; set; }
/// <summary>
/// Units of GPU needed (1024= 1 GPU)
/// </summary>
/// <value>Units of GPU needed (1024= 1 GPU)</value>
[DataMember(Name="req_video", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "req_video")]
public int? ReqVideo { get; set; }
/// <summary>
/// The Max duration of the game in minute. 0 means forever.
/// </summary>
/// <value>The Max duration of the game in minute. 0 means forever.</value>
[DataMember(Name="max_duration", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "max_duration")]
public int? MaxDuration { get; set; }
/// <summary>
/// Allow to inject ASA Variables
/// </summary>
/// <value>Allow to inject ASA Variables</value>
[DataMember(Name="use_telemetry", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "use_telemetry")]
public bool? UseTelemetry { get; set; }
/// <summary>
/// Allow to inject Context Variables
/// </summary>
/// <value>Allow to inject Context Variables</value>
[DataMember(Name="inject_context_env", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "inject_context_env")]
public bool? InjectContextEnv { get; set; }
/// <summary>
/// ACL Protection is active
/// </summary>
/// <value>ACL Protection is active</value>
[DataMember(Name="whitelisting_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "whitelisting_active")]
public bool? WhitelistingActive { get; set; }
/// <summary>
/// Allow faster deployment by caching your container image in every Edge site
/// </summary>
/// <value>Allow faster deployment by caching your container image in every Edge site</value>
[DataMember(Name="force_cache", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "force_cache")]
public bool? ForceCache { get; set; }
/// <summary>
/// Start of the preferred interval for caching your container
/// </summary>
/// <value>Start of the preferred interval for caching your container</value>
[DataMember(Name="cache_min_hour", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "cache_min_hour")]
public int? CacheMinHour { get; set; }
/// <summary>
/// End of the preferred interval for caching your container
/// </summary>
/// <value>End of the preferred interval for caching your container</value>
[DataMember(Name="cache_max_hour", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "cache_max_hour")]
public int? CacheMaxHour { get; set; }
/// <summary>
/// Estimated maximum time in seconds to deploy, after this time we will consider it not working and retry.
/// </summary>
/// <value>Estimated maximum time in seconds to deploy, after this time we will consider it not working and retry.</value>
[DataMember(Name="time_to_deploy", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "time_to_deploy")]
public int? TimeToDeploy { get; set; }
/// <summary>
/// Enable every location available. By enabling this, your request will use every potential location, including those which may require a longer time to deploy. This means that your application could take significantly more time before being ready. We do not recommend this feature for live games. This functionality does not support ACL and Caching at the moment.
/// </summary>
/// <value>Enable every location available. By enabling this, your request will use every potential location, including those which may require a longer time to deploy. This means that your application could take significantly more time before being ready. We do not recommend this feature for live games. This functionality does not support ACL and Caching at the moment.</value>
[DataMember(Name="enable_all_locations", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "enable_all_locations")]
public bool? EnableAllLocations { get; set; }
/// <summary>
/// Parameters defining the behavior of a session-based app version. If set, the app is considered to be session-based.
/// </summary>
/// <value>Parameters defining the behavior of a session-based app version. If set, the app is considered to be session-based.</value>
[DataMember(Name="session_config", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "session_config")]
public AppVersionCreateSessionConfig SessionConfig { get; set; }
/// <summary>
/// Gets or Sets Ports
/// </summary>
[DataMember(Name="ports", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "ports")]
public List<AppVersionPort> Ports { get; set; }
/// <summary>
/// Gets or Sets Probe
/// </summary>
[DataMember(Name="probe", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "probe")]
public AppVersionProbe Probe { get; set; }
/// <summary>
/// Gets or Sets Envs
/// </summary>
[DataMember(Name="envs", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "envs")]
public List<AppVersionEnv> Envs { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersion {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append(" DockerRepository: ").Append(DockerRepository).Append("\n");
sb.Append(" DockerImage: ").Append(DockerImage).Append("\n");
sb.Append(" DockerTag: ").Append(DockerTag).Append("\n");
sb.Append(" PrivateUsername: ").Append(PrivateUsername).Append("\n");
sb.Append(" PrivateToken: ").Append(PrivateToken).Append("\n");
sb.Append(" ReqCpu: ").Append(ReqCpu).Append("\n");
sb.Append(" ReqMemory: ").Append(ReqMemory).Append("\n");
sb.Append(" ReqVideo: ").Append(ReqVideo).Append("\n");
sb.Append(" MaxDuration: ").Append(MaxDuration).Append("\n");
sb.Append(" UseTelemetry: ").Append(UseTelemetry).Append("\n");
sb.Append(" InjectContextEnv: ").Append(InjectContextEnv).Append("\n");
sb.Append(" WhitelistingActive: ").Append(WhitelistingActive).Append("\n");
sb.Append(" ForceCache: ").Append(ForceCache).Append("\n");
sb.Append(" CacheMinHour: ").Append(CacheMinHour).Append("\n");
sb.Append(" CacheMaxHour: ").Append(CacheMaxHour).Append("\n");
sb.Append(" TimeToDeploy: ").Append(TimeToDeploy).Append("\n");
sb.Append(" EnableAllLocations: ").Append(EnableAllLocations).Append("\n");
sb.Append(" SessionConfig: ").Append(SessionConfig).Append("\n");
sb.Append(" Ports: ").Append(Ports).Append("\n");
sb.Append(" Probe: ").Append(Probe).Append("\n");
sb.Append(" Envs: ").Append(Envs).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c93e03e03405cab49bad0e219e383d16
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionCreateSessionConfig {
/// <summary>
/// The kind of session to create. If 'Default' if chosen, the 'session_config' will be ignored. The kind of session must be: Default, Seat, Match
/// </summary>
/// <value>The kind of session to create. If 'Default' if chosen, the 'session_config' will be ignored. The kind of session must be: Default, Seat, Match</value>
[DataMember(Name="kind", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// The number of game slots on each deployment of this app version.
/// </summary>
/// <value>The number of game slots on each deployment of this app version.</value>
[DataMember(Name="sockets", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "sockets")]
public int? Sockets { get; set; }
/// <summary>
/// If a deployment should be made autonomously if there is not enough sockets open on a new session.
/// </summary>
/// <value>If a deployment should be made autonomously if there is not enough sockets open on a new session.</value>
[DataMember(Name="autodeploy", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "autodeploy")]
public bool? Autodeploy { get; set; }
/// <summary>
/// The number of minutes a deployment of this app version can spend with no session connected before being terminated.
/// </summary>
/// <value>The number of minutes a deployment of this app version can spend with no session connected before being terminated.</value>
[DataMember(Name="empty_ttl", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "empty_ttl")]
public int? EmptyTtl { get; set; }
/// <summary>
/// The number of minutes after a session-type deployment has been terminated to remove all the session information connected to your deployment. Minimum and default value is set to 60 minutes so you can manage your session termination before it is removed.
/// </summary>
/// <value>The number of minutes after a session-type deployment has been terminated to remove all the session information connected to your deployment. Minimum and default value is set to 60 minutes so you can manage your session termination before it is removed.</value>
[DataMember(Name="session_max_duration", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "session_max_duration")]
public int? SessionMaxDuration { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionCreateSessionConfig {\n");
sb.Append(" Kind: ").Append(Kind).Append("\n");
sb.Append(" Sockets: ").Append(Sockets).Append("\n");
sb.Append(" Autodeploy: ").Append(Autodeploy).Append("\n");
sb.Append(" EmptyTtl: ").Append(EmptyTtl).Append("\n");
sb.Append(" SessionMaxDuration: ").Append(SessionMaxDuration).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a7e9f357c6d819947927f8157abe13db
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionEnv {
/// <summary>
/// The Key where the Environment Variable will be set
/// </summary>
/// <value>The Key where the Environment Variable will be set</value>
[DataMember(Name="key", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "key")]
public string Key { get; set; }
/// <summary>
/// The Value to retrieve at the Key
/// </summary>
/// <value>The Value to retrieve at the Key</value>
[DataMember(Name="value", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "value")]
public string Value { get; set; }
/// <summary>
/// This will encrypt the value in our database, won't be readable by external source
/// </summary>
/// <value>This will encrypt the value in our database, won't be readable by external source</value>
[DataMember(Name="is_secret", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_secret")]
public bool? IsSecret { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionEnv {\n");
sb.Append(" Key: ").Append(Key).Append("\n");
sb.Append(" Value: ").Append(Value).Append("\n");
sb.Append(" IsSecret: ").Append(IsSecret).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2634231e11968f8408c40e97914878d9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionPort {
/// <summary>
/// The Port to Expose your service
/// </summary>
/// <value>The Port to Expose your service</value>
[DataMember(Name="port", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "port")]
public int? Port { get; set; }
/// <summary>
/// Available protocols: TCP, UDP, TCP/UDP, HTTP, HTTPS, WS or WSS
/// </summary>
/// <value>Available protocols: TCP, UDP, TCP/UDP, HTTP, HTTPS, WS or WSS</value>
[DataMember(Name="protocol", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "protocol")]
public string Protocol { get; set; }
/// <summary>
/// If the port must be verified by our port validations
/// </summary>
/// <value>If the port must be verified by our port validations</value>
[DataMember(Name="to_check", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "to_check")]
public bool? ToCheck { get; set; }
/// <summary>
/// Enabling with HTTP or WS will inject a sidecar proxy that upgrades the connection with TLS
/// </summary>
/// <value>Enabling with HTTP or WS will inject a sidecar proxy that upgrades the connection with TLS</value>
[DataMember(Name="tls_upgrade", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "tls_upgrade")]
public bool? TlsUpgrade { get; set; }
/// <summary>
/// An optional name for the port for easier handling
/// </summary>
/// <value>An optional name for the port for easier handling</value>
[DataMember(Name="name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionPort {\n");
sb.Append(" Port: ").Append(Port).Append("\n");
sb.Append(" Protocol: ").Append(Protocol).Append("\n");
sb.Append(" ToCheck: ").Append(ToCheck).Append("\n");
sb.Append(" TlsUpgrade: ").Append(TlsUpgrade).Append("\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8cf7d7e082a71564d8aa1a3c5918a302
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionProbe {
/// <summary>
/// Your optimal value for Latency
/// </summary>
/// <value>Your optimal value for Latency</value>
[DataMember(Name="optimal_ping", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "optimal_ping")]
public int? OptimalPing { get; set; }
/// <summary>
/// Your reject value for Latency
/// </summary>
/// <value>Your reject value for Latency</value>
[DataMember(Name="rejected_ping", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "rejected_ping")]
public int? RejectedPing { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionProbe {\n");
sb.Append(" OptimalPing: ").Append(OptimalPing).Append("\n");
sb.Append(" RejectedPing: ").Append(RejectedPing).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 61df96f44f0cdfb42bae8941be0121fe
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,240 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionUpdate {
/// <summary>
/// The Version Name
/// </summary>
/// <value>The Version Name</value>
[DataMember(Name="name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// If the Version is active currently in the system
/// </summary>
/// <value>If the Version is active currently in the system</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// The Repository where the image is (i.e. 'harbor.edgegap.com' or 'docker.io')
/// </summary>
/// <value>The Repository where the image is (i.e. 'harbor.edgegap.com' or 'docker.io')</value>
[DataMember(Name="docker_repository", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "docker_repository")]
public string DockerRepository { get; set; }
/// <summary>
/// The name of your image (i.e. 'edgegap/demo')
/// </summary>
/// <value>The name of your image (i.e. 'edgegap/demo')</value>
[DataMember(Name="docker_image", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "docker_image")]
public string DockerImage { get; set; }
/// <summary>
/// The tag of your image (i.e. '0.1.2')
/// </summary>
/// <value>The tag of your image (i.e. '0.1.2')</value>
[DataMember(Name="docker_tag", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "docker_tag")]
public string DockerTag { get; set; }
/// <summary>
/// The username to access the docker repository
/// </summary>
/// <value>The username to access the docker repository</value>
[DataMember(Name="private_username", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "private_username")]
public string PrivateUsername { get; set; }
/// <summary>
/// The Private Password or Token of the username (We recommend to use a token)
/// </summary>
/// <value>The Private Password or Token of the username (We recommend to use a token)</value>
[DataMember(Name="private_token", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "private_token")]
public string PrivateToken { get; set; }
/// <summary>
/// Units of vCPU needed (1024= 1vcpu)
/// </summary>
/// <value>Units of vCPU needed (1024= 1vcpu)</value>
[DataMember(Name="req_cpu", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "req_cpu")]
public int? ReqCpu { get; set; }
/// <summary>
/// Units of memory in MB needed (1024 = 1GB)
/// </summary>
/// <value>Units of memory in MB needed (1024 = 1GB)</value>
[DataMember(Name="req_memory", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "req_memory")]
public int? ReqMemory { get; set; }
/// <summary>
/// Units of GPU needed (1024= 1 GPU)
/// </summary>
/// <value>Units of GPU needed (1024= 1 GPU)</value>
[DataMember(Name="req_video", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "req_video")]
public int? ReqVideo { get; set; }
/// <summary>
/// The Max duration of the game
/// </summary>
/// <value>The Max duration of the game</value>
[DataMember(Name="max_duration", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "max_duration")]
public int? MaxDuration { get; set; }
/// <summary>
/// Allow to inject ASA Variables
/// </summary>
/// <value>Allow to inject ASA Variables</value>
[DataMember(Name="use_telemetry", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "use_telemetry")]
public bool? UseTelemetry { get; set; }
/// <summary>
/// Allow to inject Context Variables
/// </summary>
/// <value>Allow to inject Context Variables</value>
[DataMember(Name="inject_context_env", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "inject_context_env")]
public bool? InjectContextEnv { get; set; }
/// <summary>
/// ACL Protection is active
/// </summary>
/// <value>ACL Protection is active</value>
[DataMember(Name="whitelisting_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "whitelisting_active")]
public bool? WhitelistingActive { get; set; }
/// <summary>
/// Allow faster deployment by caching your container image in every Edge site
/// </summary>
/// <value>Allow faster deployment by caching your container image in every Edge site</value>
[DataMember(Name="force_cache", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "force_cache")]
public bool? ForceCache { get; set; }
/// <summary>
/// Start of the preferred interval for caching your container
/// </summary>
/// <value>Start of the preferred interval for caching your container</value>
[DataMember(Name="cache_min_hour", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "cache_min_hour")]
public int? CacheMinHour { get; set; }
/// <summary>
/// End of the preferred interval for caching your container
/// </summary>
/// <value>End of the preferred interval for caching your container</value>
[DataMember(Name="cache_max_hour", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "cache_max_hour")]
public int? CacheMaxHour { get; set; }
/// <summary>
/// Estimated maximum time in seconds to deploy, after this time we will consider it not working and retry.
/// </summary>
/// <value>Estimated maximum time in seconds to deploy, after this time we will consider it not working and retry.</value>
[DataMember(Name="time_to_deploy", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "time_to_deploy")]
public int? TimeToDeploy { get; set; }
/// <summary>
/// Enable every location available. By enabling this, your request will use every potential location, including those which may require a longer time to deploy. This means that your application may take up to 2 minutes before being up and ready. This functionality does not support ACL and Caching at the moment.
/// </summary>
/// <value>Enable every location available. By enabling this, your request will use every potential location, including those which may require a longer time to deploy. This means that your application may take up to 2 minutes before being up and ready. This functionality does not support ACL and Caching at the moment.</value>
[DataMember(Name="enable_all_locations", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "enable_all_locations")]
public bool? EnableAllLocations { get; set; }
/// <summary>
/// Parameters defining the behavior of a session-based app version. If set, the app is considered to be session-based.
/// </summary>
/// <value>Parameters defining the behavior of a session-based app version. If set, the app is considered to be session-based.</value>
[DataMember(Name="session_config", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "session_config")]
public AppVersionUpdateSessionConfig SessionConfig { get; set; }
/// <summary>
/// Gets or Sets Ports
/// </summary>
[DataMember(Name="ports", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "ports")]
public List<AppVersionPort> Ports { get; set; }
/// <summary>
/// Gets or Sets Probe
/// </summary>
[DataMember(Name="probe", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "probe")]
public AppVersionProbe Probe { get; set; }
/// <summary>
/// Gets or Sets Envs
/// </summary>
[DataMember(Name="envs", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "envs")]
public List<AppVersionEnv> Envs { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionUpdate {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append(" DockerRepository: ").Append(DockerRepository).Append("\n");
sb.Append(" DockerImage: ").Append(DockerImage).Append("\n");
sb.Append(" DockerTag: ").Append(DockerTag).Append("\n");
sb.Append(" PrivateUsername: ").Append(PrivateUsername).Append("\n");
sb.Append(" PrivateToken: ").Append(PrivateToken).Append("\n");
sb.Append(" ReqCpu: ").Append(ReqCpu).Append("\n");
sb.Append(" ReqMemory: ").Append(ReqMemory).Append("\n");
sb.Append(" ReqVideo: ").Append(ReqVideo).Append("\n");
sb.Append(" MaxDuration: ").Append(MaxDuration).Append("\n");
sb.Append(" UseTelemetry: ").Append(UseTelemetry).Append("\n");
sb.Append(" InjectContextEnv: ").Append(InjectContextEnv).Append("\n");
sb.Append(" WhitelistingActive: ").Append(WhitelistingActive).Append("\n");
sb.Append(" ForceCache: ").Append(ForceCache).Append("\n");
sb.Append(" CacheMinHour: ").Append(CacheMinHour).Append("\n");
sb.Append(" CacheMaxHour: ").Append(CacheMaxHour).Append("\n");
sb.Append(" TimeToDeploy: ").Append(TimeToDeploy).Append("\n");
sb.Append(" EnableAllLocations: ").Append(EnableAllLocations).Append("\n");
sb.Append(" SessionConfig: ").Append(SessionConfig).Append("\n");
sb.Append(" Ports: ").Append(Ports).Append("\n");
sb.Append(" Probe: ").Append(Probe).Append("\n");
sb.Append(" Envs: ").Append(Envs).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3575ab93231caa34eb36d9fc5f9c0d87
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionUpdateSessionConfig {
/// <summary>
/// The kind of session to create. If 'Default' if chosen, the application will be handled like a normal application. The kind of session must be: Default, Seat, Match
/// </summary>
/// <value>The kind of session to create. If 'Default' if chosen, the application will be handled like a normal application. The kind of session must be: Default, Seat, Match</value>
[DataMember(Name="kind", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "kind")]
public string Kind { get; set; }
/// <summary>
/// The number of game slots on each deployment of this app version.
/// </summary>
/// <value>The number of game slots on each deployment of this app version.</value>
[DataMember(Name="sockets", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "sockets")]
public int? Sockets { get; set; }
/// <summary>
/// If a deployment should be made autonomously if there is not enough sockets open on a new session.
/// </summary>
/// <value>If a deployment should be made autonomously if there is not enough sockets open on a new session.</value>
[DataMember(Name="autodeploy", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "autodeploy")]
public bool? Autodeploy { get; set; }
/// <summary>
/// The number of minutes a deployment of this app version can spend with no session connected before being terminated.
/// </summary>
/// <value>The number of minutes a deployment of this app version can spend with no session connected before being terminated.</value>
[DataMember(Name="empty_ttl", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "empty_ttl")]
public int? EmptyTtl { get; set; }
/// <summary>
/// The number of minutes after a session-type deployment has been terminated to remove all the session information connected to your deployment. Minimum and default value is set to 60 minutes so you can manage your session termination before it is removed.
/// </summary>
/// <value>The number of minutes after a session-type deployment has been terminated to remove all the session information connected to your deployment. Minimum and default value is set to 60 minutes so you can manage your session termination before it is removed.</value>
[DataMember(Name="session_max_duration", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "session_max_duration")]
public int? SessionMaxDuration { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionUpdateSessionConfig {\n");
sb.Append(" Kind: ").Append(Kind).Append("\n");
sb.Append(" Sockets: ").Append(Sockets).Append("\n");
sb.Append(" Autodeploy: ").Append(Autodeploy).Append("\n");
sb.Append(" EmptyTtl: ").Append(EmptyTtl).Append("\n");
sb.Append(" SessionMaxDuration: ").Append(SessionMaxDuration).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 48101a3efe2b64c49a3aa4def2246393
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,72 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionWhitelistEntry {
/// <summary>
/// Unique ID of the entry
/// </summary>
/// <value>Unique ID of the entry</value>
[DataMember(Name="id", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "id")]
public string Id { get; set; }
/// <summary>
/// CIDR to allow
/// </summary>
/// <value>CIDR to allow</value>
[DataMember(Name="cidr", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "cidr")]
public string Cidr { get; set; }
/// <summary>
/// Label to organized your entries
/// </summary>
/// <value>Label to organized your entries</value>
[DataMember(Name="label", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "label")]
public string Label { get; set; }
/// <summary>
/// If the Rule will be applied on runtime
/// </summary>
/// <value>If the Rule will be applied on runtime</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionWhitelistEntry {\n");
sb.Append(" Id: ").Append(Id).Append("\n");
sb.Append(" Cidr: ").Append(Cidr).Append("\n");
sb.Append(" Label: ").Append(Label).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 842bcb36eece6a349be9f12052d70501
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionWhitelistEntryPayload {
/// <summary>
/// CIDR to allow
/// </summary>
/// <value>CIDR to allow</value>
[DataMember(Name="cidr", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "cidr")]
public string Cidr { get; set; }
/// <summary>
/// Label to organized your entries
/// </summary>
/// <value>Label to organized your entries</value>
[DataMember(Name="label", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "label")]
public string Label { get; set; }
/// <summary>
/// If the Rule will be applied on runtime
/// </summary>
/// <value>If the Rule will be applied on runtime</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionWhitelistEntryPayload {\n");
sb.Append(" Cidr: ").Append(Cidr).Append("\n");
sb.Append(" Label: ").Append(Label).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f217d709e767e4d46a7a725b2eba602d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,53 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionWhitelistEntrySuccess {
/// <summary>
/// if the operation succeed
/// </summary>
/// <value>if the operation succeed</value>
[DataMember(Name="success", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "success")]
public bool? Success { get; set; }
/// <summary>
/// Gets or Sets WhitelistEntry
/// </summary>
[DataMember(Name="whitelist_entry", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "whitelist_entry")]
public AppVersionWhitelistEntry WhitelistEntry { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionWhitelistEntrySuccess {\n");
sb.Append(" Success: ").Append(Success).Append("\n");
sb.Append(" WhitelistEntry: ").Append(WhitelistEntry).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2fd2776b60ac941479df7e8dd021993e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,44 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersionWhitelistResponse {
/// <summary>
/// Gets or Sets WhitelistEntries
/// </summary>
[DataMember(Name="whitelist_entries", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "whitelist_entries")]
public List<AppVersionWhitelistEntry> WhitelistEntries { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersionWhitelistResponse {\n");
sb.Append(" WhitelistEntries: ").Append(WhitelistEntries).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c9cc8fbc419fc0a49ac4fc8bee1150e6
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,52 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class AppVersions {
/// <summary>
/// Gets or Sets Versions
/// </summary>
[DataMember(Name="versions", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "versions")]
public List<AppVersion> Versions { get; set; }
/// <summary>
/// Gets or Sets TotalCount
/// </summary>
[DataMember(Name="total_count", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "total_count")]
public int? TotalCount { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class AppVersions {\n");
sb.Append(" Versions: ").Append(Versions).Append("\n");
sb.Append(" TotalCount: ").Append(TotalCount).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9512253adc2b9554e92ac5746f581ce4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,81 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class Application {
/// <summary>
/// Application name
/// </summary>
/// <value>Application name</value>
[DataMember(Name="name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// If the application can be deployed
/// </summary>
/// <value>If the application can be deployed</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// Image base64 string
/// </summary>
/// <value>Image base64 string</value>
[DataMember(Name="image", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
/// <summary>
/// Creation date
/// </summary>
/// <value>Creation date</value>
[DataMember(Name="create_time", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "create_time")]
public string CreateTime { get; set; }
/// <summary>
/// Date of the last update
/// </summary>
/// <value>Date of the last update</value>
[DataMember(Name="last_updated", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "last_updated")]
public string LastUpdated { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class Application {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append(" Image: ").Append(Image).Append("\n");
sb.Append(" CreateTime: ").Append(CreateTime).Append("\n");
sb.Append(" LastUpdated: ").Append(LastUpdated).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f9f095c7512ac664486cfc6dedc7d6f4
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ApplicationPatch {
/// <summary>
/// Application name
/// </summary>
/// <value>Application name</value>
[DataMember(Name="name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// If the application can be deployed
/// </summary>
/// <value>If the application can be deployed</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// Image base64 string
/// </summary>
/// <value>Image base64 string</value>
[DataMember(Name="image", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class ApplicationPatch {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append(" Image: ").Append(Image).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 05c69e87c7ee66e4e9985719430e264a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ApplicationPost {
/// <summary>
/// Application name
/// </summary>
/// <value>Application name</value>
[DataMember(Name="name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "name")]
public string Name { get; set; }
/// <summary>
/// If the application can be deployed
/// </summary>
/// <value>If the application can be deployed</value>
[DataMember(Name="is_active", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_active")]
public bool? IsActive { get; set; }
/// <summary>
/// Image base64 string
/// </summary>
/// <value>Image base64 string</value>
[DataMember(Name="image", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "image")]
public string Image { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class ApplicationPost {\n");
sb.Append(" Name: ").Append(Name).Append("\n");
sb.Append(" IsActive: ").Append(IsActive).Append("\n");
sb.Append(" Image: ").Append(Image).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 3e081dfd085dbbc4898bbcd0029b7a6a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,44 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class Applications {
/// <summary>
/// Gets or Sets _Applications
/// </summary>
[DataMember(Name="applications", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "applications")]
public List<Application> _Applications { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class Applications {\n");
sb.Append(" _Applications: ").Append(_Applications).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 9806c3999b04b1f48b255f6802422747
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,52 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class BaseModel {
/// <summary>
/// Gets or Sets CreatedAt
/// </summary>
[DataMember(Name="created_at", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "created_at")]
public string CreatedAt { get; set; }
/// <summary>
/// Gets or Sets UpdatedAt
/// </summary>
[DataMember(Name="updated_at", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "updated_at")]
public string UpdatedAt { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class BaseModel {\n");
sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n");
sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 402da57a3af5ccb4c8a39a3d236399e5
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class BulkSessionDelete {
/// <summary>
/// List of Delete
/// </summary>
/// <value>List of Delete</value>
[DataMember(Name="sessions", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "sessions")]
public List<SessionDelete> Sessions { get; set; }
/// <summary>
/// List of Delete Errors
/// </summary>
/// <value>List of Delete Errors</value>
[DataMember(Name="errors", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "errors")]
public List<string> Errors { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class BulkSessionDelete {\n");
sb.Append(" Sessions: ").Append(Sessions).Append("\n");
sb.Append(" Errors: ").Append(Errors).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: f05e5c21cd34f6a4481b871e1c6d4b6a
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class BulkSessionPost {
/// <summary>
/// List of Creation Reply
/// </summary>
/// <value>List of Creation Reply</value>
[DataMember(Name="sessions", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "sessions")]
public List<SessionRequest> Sessions { get; set; }
/// <summary>
/// List of Creation Errors Reply
/// </summary>
/// <value>List of Creation Errors Reply</value>
[DataMember(Name="errors", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "errors")]
public List<string> Errors { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class BulkSessionPost {\n");
sb.Append(" Sessions: ").Append(Sessions).Append("\n");
sb.Append(" Errors: ").Append(Errors).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2b6aca9495ade244ab590d8ff446dd5d
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ComponentCredentials {
/// <summary>
/// Username for the component's private repository.
/// </summary>
/// <value>Username for the component's private repository.</value>
[DataMember(Name="username", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "username")]
public string Username { get; set; }
/// <summary>
/// Password (token) of the component's private repository.
/// </summary>
/// <value>Password (token) of the component's private repository.</value>
[DataMember(Name="token", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "token")]
public string Token { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class ComponentCredentials {\n");
sb.Append(" Username: ").Append(Username).Append("\n");
sb.Append(" Token: ").Append(Token).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: db129ae1efd1800498f963192357b08e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class ContainerLogStorageModel {
/// <summary>
/// Will override the app version container log storage for this deployment
/// </summary>
/// <value>Will override the app version container log storage for this deployment</value>
[DataMember(Name="enabled", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "enabled")]
public bool? Enabled { get; set; }
/// <summary>
/// The name of your endpoint storage. If container log storage is enabled without this parameter, we will try to take the app version endpoint storage. If there is no endpoint storage in your app version, the container logs will not be stored. If we don't find any endpoint storage associated with this name, the container logs will not be stored.
/// </summary>
/// <value>The name of your endpoint storage. If container log storage is enabled without this parameter, we will try to take the app version endpoint storage. If there is no endpoint storage in your app version, the container logs will not be stored. If we don't find any endpoint storage associated with this name, the container logs will not be stored.</value>
[DataMember(Name="endpoint_storage", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "endpoint_storage")]
public string EndpointStorage { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class ContainerLogStorageModel {\n");
sb.Append(" Enabled: ").Append(Enabled).Append("\n");
sb.Append(" EndpointStorage: ").Append(EndpointStorage).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: c242b19f23fce03459abad5816ec5370
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class CustomBulkSessionModel {
/// <summary>
/// Custom Session ID
/// </summary>
/// <value>Custom Session ID</value>
[DataMember(Name="custom_id", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "custom_id")]
public string CustomId { get; set; }
/// <summary>
/// The List of IP of your user, Array of String, example: [\"162.254.103.13\",\"198.12.116.39\", \"162.254.135.39\", \"162.254.129.34\"]
/// </summary>
/// <value>The List of IP of your user, Array of String, example: [\"162.254.103.13\",\"198.12.116.39\", \"162.254.135.39\", \"162.254.129.34\"]</value>
[DataMember(Name="ip_list", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "ip_list")]
public List<string> IpList { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class CustomBulkSessionModel {\n");
sb.Append(" CustomId: ").Append(CustomId).Append("\n");
sb.Append(" IpList: ").Append(IpList).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5749cb98bffa9524381bd3552b7960bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,44 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class CustomBulkSessionsModel {
/// <summary>
/// Gets or Sets Sessions
/// </summary>
[DataMember(Name="sessions", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "sessions")]
public List<CustomBulkSessionModel> Sessions { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class CustomBulkSessionsModel {\n");
sb.Append(" Sessions: ").Append(Sessions).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: a8b8fef93e7235545a31f603476f6cd9
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,45 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class CustomSessionDeleteModel {
/// <summary>
/// List of Custom IDs to Delete
/// </summary>
/// <value>List of Custom IDs to Delete</value>
[DataMember(Name="sessions", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "sessions")]
public List<string> Sessions { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class CustomSessionDeleteModel {\n");
sb.Append(" Sessions: ").Append(Sessions).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 6dacb4e01b4ec0c42a1ec4e2bd7524e8
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,45 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class CustomSessionModel {
/// <summary>
/// The List of IP of your user, Array of String, example: [\"162.254.103.13\",\"198.12.116.39\", \"162.254.135.39\", \"162.254.129.34\"]
/// </summary>
/// <value>The List of IP of your user, Array of String, example: [\"162.254.103.13\",\"198.12.116.39\", \"162.254.135.39\", \"162.254.129.34\"]</value>
[DataMember(Name="ip_list", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "ip_list")]
public List<string> IpList { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class CustomSessionModel {\n");
sb.Append(" IpList: ").Append(IpList).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cadab219fe9aa04429246bb44aaa17ee
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,54 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class Delete {
/// <summary>
/// A message depending of the request termination
/// </summary>
/// <value>A message depending of the request termination</value>
[DataMember(Name="message", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "message")]
public string Message { get; set; }
/// <summary>
/// The status/summary of the deployment
/// </summary>
/// <value>The status/summary of the deployment</value>
[DataMember(Name="deployment_summary", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "deployment_summary")]
public Status DeploymentSummary { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class Delete {\n");
sb.Append(" Message: ").Append(Message).Append("\n");
sb.Append(" DeploymentSummary: ").Append(DeploymentSummary).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 194e968969469794186c2983239884bb
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,63 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class DeployEnvModel {
/// <summary>
/// The Key to retrieve the value in your instance
/// </summary>
/// <value>The Key to retrieve the value in your instance</value>
[DataMember(Name="key", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "key")]
public string Key { get; set; }
/// <summary>
/// The value to set in your instance
/// </summary>
/// <value>The value to set in your instance</value>
[DataMember(Name="value", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "value")]
public string Value { get; set; }
/// <summary>
/// If set to true, the value will be encrypted during the process of deployment
/// </summary>
/// <value>If set to true, the value will be encrypted during the process of deployment</value>
[DataMember(Name="is_hidden", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_hidden")]
public bool? IsHidden { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class DeployEnvModel {\n");
sb.Append(" Key: ").Append(Key).Append("\n");
sb.Append(" Value: ").Append(Value).Append("\n");
sb.Append(" IsHidden: ").Append(IsHidden).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 5f4823de9a0196e40bc3e151f4f8953c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,180 @@
using System;
using System.Text;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using Newtonsoft.Json;
namespace IO.Swagger.Model {
/// <summary>
///
/// </summary>
[DataContract]
public class DeployModel {
/// <summary>
/// The Name of the App you want to deploy
/// </summary>
/// <value>The Name of the App you want to deploy</value>
[DataMember(Name="app_name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "app_name")]
public string AppName { get; set; }
/// <summary>
/// The Name of the App Version you want to deploy, if not present, the last version created is picked
/// </summary>
/// <value>The Name of the App Version you want to deploy, if not present, the last version created is picked</value>
[DataMember(Name="version_name", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "version_name")]
public string VersionName { get; set; }
/// <summary>
/// If the Application is public or private. If not specified, we will look for a private Application
/// </summary>
/// <value>If the Application is public or private. If not specified, we will look for a private Application</value>
[DataMember(Name="is_public_app", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "is_public_app")]
public bool? IsPublicApp { get; set; }
/// <summary>
/// The List of IP of your user
/// </summary>
/// <value>The List of IP of your user</value>
[DataMember(Name="ip_list", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "ip_list")]
public List<string> IpList { get; set; }
/// <summary>
/// The list of IP of your user with their location (latitude, longitude)
/// </summary>
/// <value>The list of IP of your user with their location (latitude, longitude)</value>
[DataMember(Name="geo_ip_list", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "geo_ip_list")]
public List<GeoIpListModel> GeoIpList { get; set; }
/// <summary>
/// A list of deployment variables
/// </summary>
/// <value>A list of deployment variables</value>
[DataMember(Name="env_vars", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "env_vars")]
public List<DeployEnvModel> EnvVars { get; set; }
/// <summary>
/// If you want to skip the Telemetry and use a geolocations decision only
/// </summary>
/// <value>If you want to skip the Telemetry and use a geolocations decision only</value>
[DataMember(Name="skip_telemetry", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "skip_telemetry")]
public bool? SkipTelemetry { get; set; }
/// <summary>
/// If you want to specify a centroid for your deployment.
/// </summary>
/// <value>If you want to specify a centroid for your deployment.</value>
[DataMember(Name="location", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "location")]
public LocationModel Location { get; set; }
/// <summary>
/// If you want to deploy in a specific city
/// </summary>
/// <value>If you want to deploy in a specific city</value>
[DataMember(Name="city", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "city")]
public string City { get; set; }
/// <summary>
/// If you want to deploy in a specific country
/// </summary>
/// <value>If you want to deploy in a specific country</value>
[DataMember(Name="country", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "country")]
public string Country { get; set; }
/// <summary>
/// If you want to deploy in a specific continent
/// </summary>
/// <value>If you want to deploy in a specific continent</value>
[DataMember(Name="continent", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "continent")]
public string Continent { get; set; }
/// <summary>
/// If you want to deploy in a specific region
/// </summary>
/// <value>If you want to deploy in a specific region</value>
[DataMember(Name="region", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "region")]
public string Region { get; set; }
/// <summary>
/// If you want to deploy in a specific administrative division
/// </summary>
/// <value>If you want to deploy in a specific administrative division</value>
[DataMember(Name="administrative_division", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "administrative_division")]
public string AdministrativeDivision { get; set; }
/// <summary>
/// A web URL. This url will be called with method POST. The deployment status will be send in JSON format
/// </summary>
/// <value>A web URL. This url will be called with method POST. The deployment status will be send in JSON format</value>
[DataMember(Name="webhook_url", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "webhook_url")]
public string WebhookUrl { get; set; }
/// <summary>
/// The list of tags for your deployment
/// </summary>
/// <value>The list of tags for your deployment</value>
[DataMember(Name="tags", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "tags")]
public List<string> Tags { get; set; }
/// <summary>
/// The container log storage options for the deployment
/// </summary>
/// <value>The container log storage options for the deployment</value>
[DataMember(Name="container_log_storage", EmitDefaultValue=false)]
[JsonProperty(PropertyName = "container_log_storage")]
public ContainerLogStorageModel ContainerLogStorage { get; set; }
/// <summary>
/// Get the string presentation of the object
/// </summary>
/// <returns>String presentation of the object</returns>
public override string ToString() {
StringBuilder sb = new StringBuilder();
sb.Append("class DeployModel {\n");
sb.Append(" AppName: ").Append(AppName).Append("\n");
sb.Append(" VersionName: ").Append(VersionName).Append("\n");
sb.Append(" IsPublicApp: ").Append(IsPublicApp).Append("\n");
sb.Append(" IpList: ").Append(IpList).Append("\n");
sb.Append(" GeoIpList: ").Append(GeoIpList).Append("\n");
sb.Append(" EnvVars: ").Append(EnvVars).Append("\n");
sb.Append(" SkipTelemetry: ").Append(SkipTelemetry).Append("\n");
sb.Append(" Location: ").Append(Location).Append("\n");
sb.Append(" City: ").Append(City).Append("\n");
sb.Append(" Country: ").Append(Country).Append("\n");
sb.Append(" Continent: ").Append(Continent).Append("\n");
sb.Append(" Region: ").Append(Region).Append("\n");
sb.Append(" AdministrativeDivision: ").Append(AdministrativeDivision).Append("\n");
sb.Append(" WebhookUrl: ").Append(WebhookUrl).Append("\n");
sb.Append(" Tags: ").Append(Tags).Append("\n");
sb.Append(" ContainerLogStorage: ").Append(ContainerLogStorage).Append("\n");
sb.Append("}\n");
return sb.ToString();
}
/// <summary>
/// Get the JSON string presentation of the object
/// </summary>
/// <returns>JSON string presentation of the object</returns>
public string ToJson() {
return JsonConvert.SerializeObject(this, Formatting.Indented);
}
}
}

Some files were not shown because too many files have changed in this diff Show More