From 9d13fce036d2d43fca1d5e7bec0db8cad4b3387a Mon Sep 17 00:00:00 2001 From: Sylvain Renault <sylvain.renault@hhi.fraunhofer.de> Date: Mon, 16 Sep 2024 13:55:12 +0200 Subject: [PATCH] Implementation of the subscription for websockets. Bug fix for the issue with the HTTP header (token). --- Runtime/Packages.meta | 8 + .../websocket-sharp-latest.1.0.2.meta | 8 + .../.signature.p7s | Bin 0 -> 11515 bytes .../websocket-sharp-latest.1.0.2/lib.meta | 8 + .../lib/netstandard2.0.meta | 8 + .../websocket-sharp-latest.dll.meta | 23 + .../websocket-sharp-latest.nuspec | 17 + .../websocket-sharp-latest.nuspec.meta | 7 + .../websocket-sharp_icon.png | Bin 0 -> 911 bytes .../websocket-sharp_icon.png.meta | 153 +++++ .../OpenAPI/Generated/WorldAnalysisOpenAPI.cs | 567 ++++++++++-------- .../OpenAPI/UnityWebRequestHttpClient.cs | 20 +- Runtime/Scripts/WorldAnalysisREST.cs | 16 +- .../Scripts/WorldAnalysisREST_WebSockets.cs | 119 ++++ .../WorldAnalysisREST_WebSockets.cs.meta | 11 + Runtime/Scripts/WorldAnalysisREST_Webhook.cs | 44 ++ .../Scripts/WorldAnalysisREST_Webhook.cs.meta | 11 + 17 files changed, 755 insertions(+), 265 deletions(-) create mode 100644 Runtime/Packages.meta create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2.meta create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/.signature.p7s create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/lib.meta create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0.meta create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0/websocket-sharp-latest.dll.meta create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec.meta create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png create mode 100644 Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png.meta create mode 100644 Runtime/Scripts/WorldAnalysisREST_WebSockets.cs create mode 100644 Runtime/Scripts/WorldAnalysisREST_WebSockets.cs.meta create mode 100644 Runtime/Scripts/WorldAnalysisREST_Webhook.cs create mode 100644 Runtime/Scripts/WorldAnalysisREST_Webhook.cs.meta diff --git a/Runtime/Packages.meta b/Runtime/Packages.meta new file mode 100644 index 0000000..b6c7aec --- /dev/null +++ b/Runtime/Packages.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 953b8657509a139449794a24f2147730 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2.meta b/Runtime/Packages/websocket-sharp-latest.1.0.2.meta new file mode 100644 index 0000000..15642e0 --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 4af05175caa96bb43844e080f1d8701b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/.signature.p7s b/Runtime/Packages/websocket-sharp-latest.1.0.2/.signature.p7s new file mode 100644 index 0000000000000000000000000000000000000000..29b82e384cd4bfbf60c118bfe30e6e30bd1d7699 GIT binary patch literal 11515 zcmeI2XH*nfw}$DaCFdj(o1CG#$p{h!2}(vla?YWf3=*0o7zmOC$w&}HKmi4mD56Ld zL`(#U0)l`bLAli`4m#eMx$CYq-=B{^&FQLB>vYxG&%5`#3&03&;t}%4oQT;Zh2TT; zFoJUcMsNxW!9|b*q<Dl@F()AQxG*T>5DsAX$BB@<(=bCLdlcH)(?bS9M1&MZNC-=b z0m2Aj1b`406&4c)zY;oOjdqd=&~=v5chnR2@t5)q(sk36bP;j!@wU-INE>KLc?OAl z=-DCyk4pr3OBu=$5#?dXl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BF_K- literal 0 HcmV?d00001 diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/lib.meta b/Runtime/Packages/websocket-sharp-latest.1.0.2/lib.meta new file mode 100644 index 0000000..b83a27a --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2/lib.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 1494d109bc218c346ab7622ed734ea86 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0.meta b/Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0.meta new file mode 100644 index 0000000..7d2e7f1 --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 9d5dbed810c34cc4db0fe224cda88d0b +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0/websocket-sharp-latest.dll.meta b/Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0/websocket-sharp-latest.dll.meta new file mode 100644 index 0000000..9be2412 --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2/lib/netstandard2.0/websocket-sharp-latest.dll.meta @@ -0,0 +1,23 @@ +fileFormatVersion: 2 +guid: bddbf4bf9ff11da4885638979b82efb2 +labels: +- NuGetForUnity +PluginImporter: + externalObjects: {} + serializedVersion: 2 + iconMap: {} + executionOrder: {} + defineConstraints: [] + isPreloaded: 0 + isOverridable: 0 + isExplicitlyReferenced: 0 + validateReferences: 1 + platformData: + - first: + Any: + second: + enabled: 1 + settings: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec new file mode 100644 index 0000000..18e382a --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="utf-8"?> +<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> + <metadata> + <id>websocket-sharp-latest</id> + <version>1.0.2</version> + <authors>websocket-sharp-latest</authors> + <license type="expression">MIT</license> + <licenseUrl>https://licenses.nuget.org/MIT</licenseUrl> + <icon>websocket-sharp_icon.png</icon> + <description>Package Description</description> + <releaseNotes>https://github.com/garbles-labs/websocket-sharp/releases</releaseNotes> + <repository type="git" /> + <dependencies> + <group targetFramework=".NETStandard2.0" /> + </dependencies> + </metadata> +</package> \ No newline at end of file diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec.meta b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec.meta new file mode 100644 index 0000000..667b2c7 --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp-latest.nuspec.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a9d61c123a66f5b4a8d236c2972a3609 +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..a07c30eb38d729691b987ff3ae8597fe3256b999 GIT binary patch literal 911 zcmeAS@N?(olHy`uVBq!ia0y~yU~~Xs4mP03*$GQm0V&P`kH}&M25w;xW@MN(M}mQY z+0oO*F{I+w+iMp&4;u)$IBNIizKx#wNtR=V1W%VuaHHjXxpEnxX2QVVq^E&<S!^1+ zzA^)gfCB>~#RP^4KZ*}?Of!GWy91Zu6kGcvP2yntOZmCkyYI}IbR#vUfq{ub0Zt$> z5rSl}fLi*EdlD)y-<t!rs3KmEl<*=cVDn7D(PDSKY^SB_$7iu1&rru7Oc^ZjkO2ik zPKpGhb%u5L?`10YrgM`L6&MkXM{`3oukwTN+~-;MryS9H%!Cpaqy!=!D;O9VSqP_h dkcx)6dl~1tNi#?;v3(2Td%F6$taD0e0s#I1gB<_> literal 0 HcmV?d00001 diff --git a/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png.meta b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png.meta new file mode 100644 index 0000000..76b216b --- /dev/null +++ b/Runtime/Packages/websocket-sharp-latest.1.0.2/websocket-sharp_icon.png.meta @@ -0,0 +1,153 @@ +fileFormatVersion: 2 +guid: b3235afb951bf0a4f9e21db48a0937f6 +TextureImporter: + internalIDToNameTable: [] + externalObjects: {} + serializedVersion: 13 + mipmaps: + mipMapMode: 0 + enableMipMap: 1 + 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 + flipGreenChannel: 0 + isReadable: 0 + streamingMipmaps: 0 + streamingMipmapsPriority: 0 + vTOnly: 0 + ignoreMipmapLimit: 0 + grayScaleToAlpha: 0 + generateCubemap: 6 + cubemapConvolution: 0 + seamlessCubemap: 0 + textureFormat: 1 + maxTextureSize: 2048 + textureSettings: + serializedVersion: 2 + filterMode: 1 + aniso: 1 + mipBias: 0 + wrapU: 0 + wrapV: 0 + wrapW: 0 + nPOTScale: 1 + lightmap: 0 + compressionQuality: 50 + spriteMode: 0 + 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: 0 + spriteTessellationDetail: -1 + textureType: 0 + textureShape: 1 + singleChannelComponent: 0 + flipbookRows: 1 + flipbookColumns: 1 + maxTextureSizeSet: 0 + compressionQualitySet: 0 + textureFormatSet: 0 + ignorePngGamma: 0 + applyGammaDecoding: 0 + swizzle: 50462976 + cookieLightType: 0 + platformSettings: + - serializedVersion: 3 + buildTarget: DefaultTexturePlatform + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Standalone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: iPhone + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: WebGL + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + - serializedVersion: 3 + buildTarget: Android + maxTextureSize: 2048 + resizeAlgorithm: 0 + textureFormat: -1 + textureCompression: 1 + compressionQuality: 50 + crunchedCompression: 0 + allowsAlphaSplitting: 0 + overridden: 0 + ignorePlatformSupport: 0 + androidETC2FallbackOverride: 0 + forceMaximumCompressionQuality_BC6H_BC7: 0 + spriteSheet: + serializedVersion: 2 + sprites: [] + outline: [] + physicsShape: [] + bones: [] + spriteID: + internalID: 0 + vertices: [] + indices: + edges: [] + weights: [] + secondaryTextures: [] + nameFileIdTable: {} + mipmapLimitGroupName: + pSDRemoveMatte: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Scripts/OpenAPI/Generated/WorldAnalysisOpenAPI.cs b/Runtime/Scripts/OpenAPI/Generated/WorldAnalysisOpenAPI.cs index fe98f3a..126f5ab 100644 --- a/Runtime/Scripts/OpenAPI/Generated/WorldAnalysisOpenAPI.cs +++ b/Runtime/Scripts/OpenAPI/Generated/WorldAnalysisOpenAPI.cs @@ -1,6 +1,6 @@ //---------------------- // <auto-generated> -// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) +// Generated using the NSwag toolchain v14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org) // </auto-generated> //---------------------- @@ -8,6 +8,7 @@ #pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword." #pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?' #pragma warning disable 612 // Disable "CS0612 '...' is obsolete" +#pragma warning disable 649 // Disable "CS0649 Field is never assigned to, and will always have its default value null" #pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ... #pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..." #pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'" @@ -15,23 +16,25 @@ #pragma warning disable 8603 // Disable "CS8603 Possible null reference return" #pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter" #pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type" -#pragma warning disable CS8765 // Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes). +#pragma warning disable 8765 // Disable "CS8765 Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes)." namespace ETSI.ARF.OpenAPI.WorldAnalysis { using System = global::System; - [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class WorldAnalysisClient { private ETSI.ARF.OpenAPI.WorldAnalysis.IHttpClient _httpClient; private static System.Lazy<Newtonsoft.Json.JsonSerializerSettings> _settings = new System.Lazy<Newtonsoft.Json.JsonSerializerSettings>(CreateSerializerSettings, true); + private Newtonsoft.Json.JsonSerializerSettings _instanceSettings; #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. public WorldAnalysisClient(ETSI.ARF.OpenAPI.WorldAnalysis.IHttpClient httpClient) #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable. { _httpClient = httpClient; + Initialize(); } private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings() @@ -41,10 +44,12 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis return settings; } - protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } } + protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _instanceSettings ?? _settings.Value; } } static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings); + partial void Initialize(); + partial void PrepareRequest(ETSI.ARF.OpenAPI.WorldAnalysis.IHttpClient client, System.Net.Http.HttpRequestMessage request, string url); partial void PrepareRequest(ETSI.ARF.OpenAPI.WorldAnalysis.IHttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder); partial void ProcessResponse(ETSI.ARF.OpenAPI.WorldAnalysis.IHttpClient client, System.Net.Http.HttpResponseMessage response); @@ -374,7 +379,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis if (sessionID != null) request_.Headers.TryAddWithoutValidation("sessionID", ConvertToString(sessionID, System.Globalization.CultureInfo.InvariantCulture)); - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; @@ -415,9 +420,22 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 405) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not supported.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not supported.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -551,30 +569,52 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 403) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not allowed.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not allowed.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 405) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not supported.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not supported.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -609,7 +649,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <param name="uuid">List of UUIDs of the Trackables and Anchors to request with the mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)</param> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual System.Threading.Tasks.Task<Response> GetPosesAsync(string token, string sessionID, System.Collections.Generic.IEnumerable<Anonymous> uuid) + public virtual System.Threading.Tasks.Task<Poses> GetPosesAsync(string token, string sessionID, System.Collections.Generic.IEnumerable<UuidAndMode> uuid) { return GetPosesAsync(token, sessionID, uuid, System.Threading.CancellationToken.None); } @@ -623,7 +663,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <param name="uuid">List of UUIDs of the Trackables and Anchors to request with the mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)</param> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual Response GetPoses(string token, string sessionID, System.Collections.Generic.IEnumerable<Anonymous> uuid) + public virtual Poses GetPoses(string token, string sessionID, System.Collections.Generic.IEnumerable<UuidAndMode> uuid) { return System.Threading.Tasks.Task.Run(async () => await GetPosesAsync(token, sessionID, uuid, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); } @@ -638,7 +678,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <param name="uuid">List of UUIDs of the Trackables and Anchors to request with the mode representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)</param> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual async System.Threading.Tasks.Task<Response> GetPosesAsync(string token, string sessionID, System.Collections.Generic.IEnumerable<Anonymous> uuid, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task<Poses> GetPosesAsync(string token, string sessionID, System.Collections.Generic.IEnumerable<UuidAndMode> uuid, System.Threading.CancellationToken cancellationToken) { if (uuid == null) throw new System.ArgumentNullException("uuid"); @@ -691,7 +731,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync<Response>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync<Poses>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -701,30 +741,52 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 403) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not allowed.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not allowed.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 405) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not supported.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not supported.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -763,12 +825,6 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis return SubscribeToPoseAsync(token, sessionID, body, System.Threading.CancellationToken.None); } - // SylR - public virtual System.Threading.Tasks.Task<SubscriptionMultiple> SubscribeToPoseAsync(string token, string sessionID, SubscriptionMultipleRequest body) - { - return SubscribeToPoseAsync(token, sessionID, body, System.Threading.CancellationToken.None); - } - /// <summary> /// Subscribe to collect the pose of an AR device, an Anchor or a Trackable /// </summary> @@ -781,12 +837,6 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis { return System.Threading.Tasks.Task.Run(async () => await SubscribeToPoseAsync(token, sessionID, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); } - - // SylR - public virtual SubscriptionMultiple SubscribeToPose(string token, string sessionID, SubscriptionMultipleRequest body) - { - return System.Threading.Tasks.Task.Run(async () => await SubscribeToPoseAsync(token, sessionID, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); - } /// <param name="cancellationToken">A cancellation token that can be used by other objects or threads to receive notice of cancellation.</param> /// <summary> @@ -814,7 +864,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis if (sessionID != null) request_.Headers.TryAddWithoutValidation("sessionID", ConvertToString(sessionID, System.Globalization.CultureInfo.InvariantCulture)); - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; @@ -861,144 +911,52 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 403) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not allowed.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not allowed.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 405) - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not supported.", status_, responseData_, headers_, result_, null); - } - else { var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - throw new ApiException<Error>("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + throw new ApiException<Error>("Not supported.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } - } - finally - { - if (disposeResponse_) - response_.Dispose(); - } - } - } - finally - { - if (disposeClient_) - client_.Dispose(); - } - } - - // SylR - public virtual async System.Threading.Tasks.Task<SubscriptionMultiple> SubscribeToPoseAsync(string token, string sessionID, SubscriptionMultipleRequest body, System.Threading.CancellationToken cancellationToken) - { - if (body == null) - throw new System.ArgumentNullException("body"); - - var client_ = _httpClient; - var disposeClient_ = false; - try - { - using (var request_ = new System.Net.Http.HttpRequestMessage()) - { - - if (token != null) - request_.Headers.TryAddWithoutValidation("token", ConvertToString(token, System.Globalization.CultureInfo.InvariantCulture)); - - if (sessionID != null) - request_.Headers.TryAddWithoutValidation("sessionID", ConvertToString(sessionID, System.Globalization.CultureInfo.InvariantCulture)); - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); - var content_ = new System.Net.Http.StringContent(json_); - content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); - request_.Content = content_; - request_.Method = new System.Net.Http.HttpMethod("POST"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); - - var urlBuilder_ = new System.Text.StringBuilder(); - - // Operation Path: "pose/subscriptions" - urlBuilder_.Append("pose/subscriptions"); - - PrepareRequest(client_, request_, urlBuilder_); - - var url_ = urlBuilder_.ToString(); - request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute); - - PrepareRequest(client_, request_, url_); - - var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false); - var disposeResponse_ = true; - try - { - var headers_ = new System.Collections.Generic.Dictionary<string, System.Collections.Generic.IEnumerable<string>>(); - foreach (var item_ in response_.Headers) - headers_[item_.Key] = item_.Value; - if (response_.Content != null && response_.Content.Headers != null) - { - foreach (var item_ in response_.Content.Headers) - headers_[item_.Key] = item_.Value; - } - - ProcessResponse(client_, response_); - - var status_ = (int)response_.StatusCode; - if (status_ == 200) + else + if (status_ == 511) { - var objectResponse_ = await ReadObjectResponseAsync<SubscriptionMultiple>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); } - return objectResponse_.Object; - } - else - if (status_ == 400) - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); - } - else - if (status_ == 403) - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not allowed.", status_, responseData_, headers_, result_, null); - } - else - if (status_ == 404) - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); - } - else - if (status_ == 405) - { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not supported.", status_, responseData_, headers_, result_, null); + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -1123,16 +1081,32 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -1212,7 +1186,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis if (sessionID != null) request_.Headers.TryAddWithoutValidation("sessionID", ConvertToString(sessionID, System.Globalization.CultureInfo.InvariantCulture)); - var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, _settings.Value); + var json_ = Newtonsoft.Json.JsonConvert.SerializeObject(body, JsonSerializerSettings); var content_ = new System.Net.Http.StringContent(json_); content_.Headers.ContentType = System.Net.Http.Headers.MediaTypeHeaderValue.Parse("application/json"); request_.Content = content_; @@ -1260,16 +1234,32 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -1298,9 +1288,9 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// End the subscription and the associated callback for collecting a given pose /// </remarks> /// <param name="subscriptionUUID">Subscription UUID to delete.</param> - /// <returns>OK, unsubcription successful.</returns> + /// <returns>Success request.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual System.Threading.Tasks.Task<string> UnsubscribeFromPoseAsync(string token, string sessionID, System.Guid subscriptionUUID) + public virtual System.Threading.Tasks.Task<Success> UnsubscribeFromPoseAsync(string token, string sessionID, System.Guid subscriptionUUID) { return UnsubscribeFromPoseAsync(token, sessionID, subscriptionUUID, System.Threading.CancellationToken.None); } @@ -1312,9 +1302,9 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// End the subscription and the associated callback for collecting a given pose /// </remarks> /// <param name="subscriptionUUID">Subscription UUID to delete.</param> - /// <returns>OK, unsubcription successful.</returns> + /// <returns>Success request.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual string UnsubscribeFromPose(string token, string sessionID, System.Guid subscriptionUUID) + public virtual Success UnsubscribeFromPose(string token, string sessionID, System.Guid subscriptionUUID) { return System.Threading.Tasks.Task.Run(async () => await UnsubscribeFromPoseAsync(token, sessionID, subscriptionUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); } @@ -1327,9 +1317,9 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// End the subscription and the associated callback for collecting a given pose /// </remarks> /// <param name="subscriptionUUID">Subscription UUID to delete.</param> - /// <returns>OK, unsubcription successful.</returns> + /// <returns>Success request.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual async System.Threading.Tasks.Task<string> UnsubscribeFromPoseAsync(string token, string sessionID, System.Guid subscriptionUUID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task<Success> UnsubscribeFromPoseAsync(string token, string sessionID, System.Guid subscriptionUUID, System.Threading.CancellationToken cancellationToken) { if (subscriptionUUID == null) throw new System.ArgumentNullException("subscriptionUUID"); @@ -1347,7 +1337,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis if (sessionID != null) request_.Headers.TryAddWithoutValidation("sessionID", ConvertToString(sessionID, System.Globalization.CultureInfo.InvariantCulture)); request_.Method = new System.Net.Http.HttpMethod("DELETE"); - request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain")); + request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json")); var urlBuilder_ = new System.Text.StringBuilder(); @@ -1380,23 +1370,42 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis var status_ = (int)response_.StatusCode; if (status_ == 200) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - return result_; + var objectResponse_ = await ReadObjectResponseAsync<Success>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + return objectResponse_.Object; } else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -1426,7 +1435,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// </remarks> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual System.Threading.Tasks.Task<Response2> GetCapabilitiesAsync(string token, string sessionID) + public virtual System.Threading.Tasks.Task<Capabilities> GetCapabilitiesAsync(string token, string sessionID) { return GetCapabilitiesAsync(token, sessionID, System.Threading.CancellationToken.None); } @@ -1439,7 +1448,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// </remarks> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual Response2 GetCapabilities(string token, string sessionID) + public virtual Capabilities GetCapabilities(string token, string sessionID) { return System.Threading.Tasks.Task.Run(async () => await GetCapabilitiesAsync(token, sessionID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); } @@ -1453,7 +1462,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// </remarks> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual async System.Threading.Tasks.Task<Response2> GetCapabilitiesAsync(string token, string sessionID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task<Capabilities> GetCapabilitiesAsync(string token, string sessionID, System.Threading.CancellationToken cancellationToken) { var client_ = _httpClient; var disposeClient_ = false; @@ -1500,7 +1509,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync<Response2>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync<Capabilities>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1508,6 +1517,16 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis return objectResponse_.Object; } else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else { var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) @@ -1540,7 +1559,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <param name="trackableOrAnchorUUID">UUID of the Trackable or Anchor to check support</param> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual System.Threading.Tasks.Task<Response3> GetSupportAsync(string token, string sessionID, System.Guid trackableOrAnchorUUID) + public virtual System.Threading.Tasks.Task<Supports> GetSupportAsync(string token, string sessionID, System.Guid trackableOrAnchorUUID) { return GetSupportAsync(token, sessionID, trackableOrAnchorUUID, System.Threading.CancellationToken.None); } @@ -1554,7 +1573,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <param name="trackableOrAnchorUUID">UUID of the Trackable or Anchor to check support</param> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual Response3 GetSupport(string token, string sessionID, System.Guid trackableOrAnchorUUID) + public virtual Supports GetSupport(string token, string sessionID, System.Guid trackableOrAnchorUUID) { return System.Threading.Tasks.Task.Run(async () => await GetSupportAsync(token, sessionID, trackableOrAnchorUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult(); } @@ -1569,7 +1588,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <param name="trackableOrAnchorUUID">UUID of the Trackable or Anchor to check support</param> /// <returns>Successful operation.</returns> /// <exception cref="ApiException">A server side error occurred.</exception> - public virtual async System.Threading.Tasks.Task<Response3> GetSupportAsync(string token, string sessionID, System.Guid trackableOrAnchorUUID, System.Threading.CancellationToken cancellationToken) + public virtual async System.Threading.Tasks.Task<Supports> GetSupportAsync(string token, string sessionID, System.Guid trackableOrAnchorUUID, System.Threading.CancellationToken cancellationToken) { if (trackableOrAnchorUUID == null) throw new System.ArgumentNullException("trackableOrAnchorUUID"); @@ -1620,7 +1639,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis var status_ = (int)response_.StatusCode; if (status_ == 200) { - var objectResponse_ = await ReadObjectResponseAsync<Response3>(response_, headers_, cancellationToken).ConfigureAwait(false); + var objectResponse_ = await ReadObjectResponseAsync<Supports>(response_, headers_, cancellationToken).ConfigureAwait(false); if (objectResponse_.Object == null) { throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); @@ -1630,30 +1649,52 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis else if (status_ == 400) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Bad request.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Bad request.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 403) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not allowed.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not allowed.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 404) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not found.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not found.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else if (status_ == 405) { - var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false); - var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string)); - throw new ApiException<string>("Not supported.", status_, responseData_, headers_, result_, null); + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("Not supported.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); + } + else + if (status_ == 511) + { + var objectResponse_ = await ReadObjectResponseAsync<Error>(response_, headers_, cancellationToken).ConfigureAwait(false); + if (objectResponse_.Object == null) + { + throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null); + } + throw new ApiException<Error>("The secret token is not valid. Please ask an ISG ARF team member for a valid token.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null); } else { @@ -1794,7 +1835,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// An element representing the result of the pose estimation of an AR device, a Trackable or a WorldAnchor by the World Analysis /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Pose { /// <summary> @@ -1861,7 +1902,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Base type to define the pose value /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PoseValue { /// <summary> @@ -1885,7 +1926,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// A pose value that is described with a 4*4 matrix /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class MatrixPoseValue : PoseValue { /// <summary> @@ -1906,7 +1947,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// A pose value that is described with a position and a rotation /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class VectorQuaternionPoseValue : PoseValue { /// <summary> @@ -1933,7 +1974,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// A pose value in a geodetic coordinate system /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class GeodeticPoseValue : PoseValue { [Newtonsoft.Json.JsonProperty("altitude", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1969,7 +2010,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// An object representing the framerate that the World Analysis needs to reach for a given Trackable Type /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class PoseConfiguration { [Newtonsoft.Json.JsonProperty("trackableType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -1999,7 +2040,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Request when subscribing for pose update of a Trackable or a WorldAnchor /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SubscriptionSingleRequest { /// <summary> @@ -2041,14 +2082,14 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Request when subscribing for pose update of multiple Trackable or a WorldAnchor /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SubscriptionMultipleRequest { /// <summary> /// List of UUID of the Trackable or Anchor to subscribe /// </summary> [Newtonsoft.Json.JsonProperty("targets", Required = Newtonsoft.Json.Required.Always)] - public System.Collections.Generic.ICollection<object> Targets { get; set; } = new System.Collections.ObjectModel.Collection<object>(); + public System.Collections.Generic.ICollection<System.Guid> Targets { get; set; } = new System.Collections.ObjectModel.Collection<System.Guid>(); /// <summary> /// List of modes representing the context of the Relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) @@ -2082,7 +2123,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Response when subscribing for pose update of a Trackable or a WorldAnchor /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SubscriptionSingle { /// <summary> @@ -2133,7 +2174,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Response when subscribing for pose update of multiple Trackable or a WorldAnchor /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class SubscriptionMultiple { [Newtonsoft.Json.JsonProperty("subscriptions", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2153,7 +2194,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// An object representing a supported capability of the World Analysis and its associated metadata /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Capability { [Newtonsoft.Json.JsonProperty("trackableType", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] @@ -2195,7 +2236,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// An object holding the info of a Trackable`'`s encoding information `:` the data format and the version. /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class EncodingInformationStructure { /// <summary> @@ -2222,13 +2263,10 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Error { - [Newtonsoft.Json.JsonProperty("code", Required = Newtonsoft.Json.Required.Always)] - public int Code { get; set; } - - [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.Always)] + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] public string Message { get; set; } private System.Collections.Generic.IDictionary<string, object> _additionalProperties; @@ -2245,7 +2283,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device) /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum Mode_WorldAnalysis { @@ -2260,16 +2298,33 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// A quaternion /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Quaternion : System.Collections.ObjectModel.Collection<float> { } + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Success + { + [Newtonsoft.Json.JsonProperty("message", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] + public string Message { get; set; } + + private System.Collections.Generic.IDictionary<string, object> _additionalProperties; + + [Newtonsoft.Json.JsonExtensionData] + public System.Collections.Generic.IDictionary<string, object> AdditionalProperties + { + get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary<string, object>()); } + set { _additionalProperties = value; } + } + + } + /// <summary> /// Type for trackable /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum TrackableType { @@ -2296,7 +2351,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Transform3D : System.Collections.ObjectModel.Collection<float> { @@ -2305,7 +2360,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Trackable or Anchor /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum TypeWorldStorage { @@ -2323,7 +2378,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// Unit of length. /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum UnitSystem { @@ -2365,14 +2420,14 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis /// <summary> /// A 3 coordinates vector /// </summary> - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Vector3 : System.Collections.ObjectModel.Collection<float> { } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Anonymous + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class UuidAndMode { [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.Always)] public System.Guid Uuid { get; set; } @@ -2395,7 +2450,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class Body { /// <summary> @@ -2428,11 +2483,11 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Poses { [Newtonsoft.Json.JsonProperty("poses", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection<Pose> Poses { get; set; } + public System.Collections.Generic.ICollection<Pose> Poses1 { get; set; } private System.Collections.Generic.IDictionary<string, object> _additionalProperties; @@ -2445,11 +2500,11 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response2 + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Capabilities { [Newtonsoft.Json.JsonProperty("capabilities", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] - public System.Collections.Generic.ICollection<Capability> Capabilities { get; set; } + public System.Collections.Generic.ICollection<Capability> Capabilities1 { get; set; } private System.Collections.Generic.IDictionary<string, object> _additionalProperties; @@ -2462,8 +2517,8 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] - public partial class Response3 + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] + public partial class Supports { [Newtonsoft.Json.JsonProperty("type", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)] [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))] @@ -2483,7 +2538,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum PoseEstimationState { @@ -2495,7 +2550,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum PoseValueType { @@ -2510,7 +2565,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum GeodeticPoseValueRotationTarget { @@ -2522,7 +2577,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum PoseConfigurationTrackableType { @@ -2546,7 +2601,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } - [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public enum EncodingInformationStructureDataFormat { @@ -2572,7 +2627,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis - [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ApiException : System.Exception { public int StatusCode { get; private set; } @@ -2595,7 +2650,7 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis } } - [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")] + [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.1.0.0 (NJsonSchema v11.0.2.0 (Newtonsoft.Json v13.0.0.0))")] public partial class ApiException<TResult> : ApiException { public TResult Result { get; private set; } diff --git a/Runtime/Scripts/OpenAPI/UnityWebRequestHttpClient.cs b/Runtime/Scripts/OpenAPI/UnityWebRequestHttpClient.cs index 8d696aa..c841a48 100644 --- a/Runtime/Scripts/OpenAPI/UnityWebRequestHttpClient.cs +++ b/Runtime/Scripts/OpenAPI/UnityWebRequestHttpClient.cs @@ -15,7 +15,7 @@ // See the License for the specific language governing permissions and // limitations under the License. // -// Last change: June 2024 +// Last change: September 2024 // // Depends on UniTask to support cancellation token and GetAwaiter: https://github.com/Cysharp/UniTask @@ -101,6 +101,21 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis private readonly HttpClient _httpClient = new HttpClient(); + private void AppendARFHeaders(HttpRequestMessage message, UnityWebRequest webRequest) + { + // Add some ARF headers + foreach (var item in message.Headers) + { + try + { + List<string> li = item.Value as List<string>; + if (item.Key == "token") webRequest.SetRequestHeader(item.Key, li[0].ToString()); // add it + if (item.Key == "sessionID") webRequest.SetRequestHeader(item.Key, li[0].ToString()); // add it + } + catch { } // ignore it + } + } + public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage message, HttpCompletionOption option, CancellationToken token) { var content = await (message.Content?.ReadAsStringAsync() ?? Task.FromResult("")); @@ -108,6 +123,9 @@ namespace ETSI.ARF.OpenAPI.WorldAnalysis AppendHeaders(webRequest); + // Add the ARF API headers + AppendARFHeaders(message, webRequest); + Debug.Log("[HTTP] Request " + webRequest.uri.ToString()); try { diff --git a/Runtime/Scripts/WorldAnalysisREST.cs b/Runtime/Scripts/WorldAnalysisREST.cs index c4e0d6c..073f237 100644 --- a/Runtime/Scripts/WorldAnalysisREST.cs +++ b/Runtime/Scripts/WorldAnalysisREST.cs @@ -183,9 +183,9 @@ public partial class WorldAnalysisREST : MonoBehaviour, WorldAnalysisInterface } PoseEstimationResult[] resul = new PoseEstimationResult[uuids.Length]; poses = new ETSI.ARF.OpenAPI.WorldAnalysis.Pose[uuids.Length]; - List<Anonymous> uuidList = new List<Anonymous>(); - Response poses_ = apiClient.GetPoses(token, sessionID, uuidList.ToArray()); - List<ETSI.ARF.OpenAPI.WorldAnalysis.Pose> posesList = poses_.Poses as List<ETSI.ARF.OpenAPI.WorldAnalysis.Pose>; + List<UuidAndMode> uuidList = new List<UuidAndMode>(); + Poses poses_ = apiClient.GetPoses(token, sessionID, uuidList.ToArray()); + List<ETSI.ARF.OpenAPI.WorldAnalysis.Pose> posesList = poses_.Poses1 as List<ETSI.ARF.OpenAPI.WorldAnalysis.Pose>; if (poses_ != null && posesList != null && posesList.Count > 0) { @@ -398,16 +398,16 @@ public partial class WorldAnalysisREST : MonoBehaviour, WorldAnalysisInterface public CapabilityResult GetCapabilities(string token, out Capability[] capabilities) { - Response2 cap = apiClient.GetCapabilities(token, sessionID); - if (cap == null || cap.Capabilities == null || cap.Capabilities.Count == 0) + Capabilities cap = apiClient.GetCapabilities(token, sessionID); + if (cap == null || cap.Capabilities1 == null || cap.Capabilities1.Count == 0) { capabilities = null; return CapabilityResult.FAIL; } else { - capabilities = new Capability[cap.Capabilities.Count]; - cap.Capabilities.CopyTo(capabilities, 0); + capabilities = new Capability[cap.Capabilities1.Count]; + cap.Capabilities1.CopyTo(capabilities, 0); return CapabilityResult.OK; } } @@ -418,7 +418,7 @@ public partial class WorldAnalysisREST : MonoBehaviour, WorldAnalysisInterface type = TypeWorldStorage.UNKNOWN; capability = null; - Response3 cap = apiClient.GetSupport(token, sessionID, uuid); + Supports cap = apiClient.GetSupport(token, sessionID, uuid); if (cap == null || cap.Capabilities == null || cap.Capabilities.Count == 0) { isSupported = false; diff --git a/Runtime/Scripts/WorldAnalysisREST_WebSockets.cs b/Runtime/Scripts/WorldAnalysisREST_WebSockets.cs new file mode 100644 index 0000000..118c780 --- /dev/null +++ b/Runtime/Scripts/WorldAnalysisREST_WebSockets.cs @@ -0,0 +1,119 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using ETSI.ARF.OpenAPI.WorldAnalysis; + +using WebSocketSharp; +using static WorldAnalysisInterface; + +//Implementation of the WorldAnalysis interface +public partial class WorldAnalysisREST +{ + // + // Inspector variables + // + public StringEvent webSocketMessage; + + // + // Private members + // + private WebSocketSharp.WebSocket webSocket; // For WebSockets + private bool websocketConnected = false; + + #region Communication system for WebSockets + public WebSocket WebSocketClient_Create(string url) + { + webSocket = new WebSocketSharp.WebSocket(url); + + // + // Define standard callbacks + // + webSocket.OnOpen += (sender, e) => + { + Debug.Log("[WS] Connected"); + websocketConnected = true; + webSocket.Send("RegisterClient:UnitySceneManagement"); + }; + webSocket.OnClose += (sender, e) => + { + Debug.Log("[WS] Disconnected"); + websocketConnected = false; + }; + webSocket.OnError += (sender, e) => Debug.Log("[WS] Error!"); + webSocket.OnMessage += (sender, e) => WebSocketClient_OnReceive(e.Data); + webSocket.Connect(); + + return webSocket; + } + + private void WebSocketClient_Close() + { + if (websocketConnected) + { + webSocket.Send("UnregisterClient"); + webSocket.Close(); + webSocket = null; + } + } + + public void WebSocketClient_Send(string msg) + { + webSocket?.Send(msg); + } + + bool isRegistered = false; + public void WebSocketClient_OnReceive(string data) + { + //Debug.Log("[WS] Receiving: " + data); + + if (data.Contains("You are now registered")) + { + isRegistered = true; + if (isDebug) + { + webSocket.Send("TimeStart:3"); // test + } + } + else if (isRegistered) + { + if (data.StartsWith("Time=")) + { + // test the communication + Debug.Log("[WS] Server time is: " + data.Split('=')[1]); + webSocketMessage?.Invoke(data); + } + else if (data == "TimeStop") + { + // Get some dummy poses? + //webSocket.Send("PoseStart:5"); // test + } + else if (data == "PoseStop") + { + //SetColor(Color.yellow); + } + else if (data.StartsWith("Pose=") && data.Contains("estimationState")) + { + // Handle the new pose + string json = data.Substring("Pose=".Length); + ETSI.ARF.OpenAPI.WorldAnalysis.Pose pose = JsonUtility.FromJson<ETSI.ARF.OpenAPI.WorldAnalysis.Pose>(json); + Debug.Log("[WS][Pose] State: " + pose.EstimationState.ToString()); + + // to check: p.Confidence + // to check: p.Mode, p.Value + + PoseEstimationResult res = pose.EstimationState == PoseEstimationState.OK ? PoseEstimationResult.OK : PoseEstimationResult.FAILURE; + + // Look for the corresponding callbacks + foreach (var item in m_subscriptionsPoses.Values) + { + if (pose.Uuid == item.uuidTarget) + { + item.callback(res, pose); + } + } + } + } + } + #endregion +} \ No newline at end of file diff --git a/Runtime/Scripts/WorldAnalysisREST_WebSockets.cs.meta b/Runtime/Scripts/WorldAnalysisREST_WebSockets.cs.meta new file mode 100644 index 0000000..31b4333 --- /dev/null +++ b/Runtime/Scripts/WorldAnalysisREST_WebSockets.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 7b7bcc535a949e24283db7e23c51dc46 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Scripts/WorldAnalysisREST_Webhook.cs b/Runtime/Scripts/WorldAnalysisREST_Webhook.cs new file mode 100644 index 0000000..1b4a981 --- /dev/null +++ b/Runtime/Scripts/WorldAnalysisREST_Webhook.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using ETSI.ARF.OpenAPI.WorldAnalysis; +using ETSI.ARF.WorldAnalysis; +using ETSI.ARF.WorldAnalysis.REST; + +//Implementation of the WorldAnalysis interface +public partial class WorldAnalysisREST +{ + // + // Inspector variables + // + public StringEvent webhookMessage; + private bool webhookRunning = false; + + #region Communication system for WebHooks + private void WebHookServer_Create(string url) + { + webhookRunning = true; + throw new Exception("[API] WebHookServer_Create(): Not implemented!"); + } + + private void WebHookServer_Close() + { + if (webhookRunning) + { + webhookRunning = false; + throw new Exception("[API] WebHookServer_Close(): Not implemented!"); + } + } + + private object WebHookServer_OnReceive() + { + throw new Exception("[API] WebHookServer_OnReceive(): Not implemented!"); + } + + private void WebHookServer_Send(object message) + { + throw new Exception("[API] WebHookServer_Send(): Not implemented!"); + } + #endregion +} \ No newline at end of file diff --git a/Runtime/Scripts/WorldAnalysisREST_Webhook.cs.meta b/Runtime/Scripts/WorldAnalysisREST_Webhook.cs.meta new file mode 100644 index 0000000..b7ce0cd --- /dev/null +++ b/Runtime/Scripts/WorldAnalysisREST_Webhook.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 67d4b99a5f7593e4a857b6c88249d564 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: -- GitLab