diff --git a/Assets/Editor/WorldStorageInfoEditor.cs b/Assets/Editor/WorldStorageInfoEditor.cs
index 6ac82e6d08546aec8bf9271ff4b89c70fdc08420..7d7e422b0becfcdf4863964beb1167be692de1a3 100644
--- a/Assets/Editor/WorldStorageInfoEditor.cs
+++ b/Assets/Editor/WorldStorageInfoEditor.cs
@@ -30,10 +30,10 @@ public class WorldStorageInfoEditor : Editor
EditorGUILayout.Space();
WorldStorageInfo srv = (WorldStorageInfo)target;
- string state = srv.GetServerState();
+ string state = "";// srv.GetServerState();
EditorGUILayout.LabelField("Server State", state);
- string api = srv.GetAPIVersion();
+ string api = "";// srv.GetAPIVersion();
EditorGUILayout.LabelField("OpenAPI Version", api);
}
}
diff --git a/Assets/Plugins/JsonSubTypes.dll b/Assets/Plugins/JsonSubTypes.dll
deleted file mode 100644
index 71fe39b7ff18fac5dbfd2185f353e1aab5db005d..0000000000000000000000000000000000000000
Binary files a/Assets/Plugins/JsonSubTypes.dll and /dev/null differ
diff --git a/Assets/Plugins/JsonSubTypes.dll.meta b/Assets/Plugins/JsonSubTypes.dll.meta
deleted file mode 100644
index 3025c8ddfda6913154444d4adf80d329b9e9daa9..0000000000000000000000000000000000000000
--- a/Assets/Plugins/JsonSubTypes.dll.meta
+++ /dev/null
@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 5d8884e5b43d30c44a0dd7f6d04e4930
-PluginImporter:
- externalObjects: {}
- serializedVersion: 2
- iconMap: {}
- executionOrder: {}
- defineConstraints: []
- isPreloaded: 0
- isOverridable: 0
- isExplicitlyReferenced: 0
- validateReferences: 1
- platformData:
- - first:
- Any:
- second:
- enabled: 1
- settings: {}
- - first:
- Editor: Editor
- second:
- enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
- second:
- enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Plugins/Newtonsoft.Json.dll b/Assets/Plugins/Newtonsoft.Json.dll
deleted file mode 100644
index e4a63399d0d92764c849df273d5cff4bf1cd829a..0000000000000000000000000000000000000000
Binary files a/Assets/Plugins/Newtonsoft.Json.dll and /dev/null differ
diff --git a/Assets/Plugins/Newtonsoft.Json.dll.meta b/Assets/Plugins/Newtonsoft.Json.dll.meta
deleted file mode 100644
index b98603e67c0b248a1b998802766faea3aeb49f83..0000000000000000000000000000000000000000
--- a/Assets/Plugins/Newtonsoft.Json.dll.meta
+++ /dev/null
@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 8e129f0a00a01af4e9687332997ac12e
-PluginImporter:
- externalObjects: {}
- serializedVersion: 2
- iconMap: {}
- executionOrder: {}
- defineConstraints: []
- isPreloaded: 0
- isOverridable: 0
- isExplicitlyReferenced: 0
- validateReferences: 1
- platformData:
- - first:
- Any:
- second:
- enabled: 1
- settings: {}
- - first:
- Editor: Editor
- second:
- enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
- second:
- enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Plugins/Org.OpenAPITools.dll b/Assets/Plugins/Org.OpenAPITools.dll
deleted file mode 100644
index 08853b7fcc62536f192d6716bbed7dfc3fe82bc3..0000000000000000000000000000000000000000
Binary files a/Assets/Plugins/Org.OpenAPITools.dll and /dev/null differ
diff --git a/Assets/Plugins/Org.OpenAPITools.dll.meta b/Assets/Plugins/Org.OpenAPITools.dll.meta
deleted file mode 100644
index 5fdc847178b556c18edf4172bd10d3b6c14c520a..0000000000000000000000000000000000000000
--- a/Assets/Plugins/Org.OpenAPITools.dll.meta
+++ /dev/null
@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 6a54ead1df0e6334aa8d4520cae26cab
-PluginImporter:
- externalObjects: {}
- serializedVersion: 2
- iconMap: {}
- executionOrder: {}
- defineConstraints: []
- isPreloaded: 0
- isOverridable: 0
- isExplicitlyReferenced: 0
- validateReferences: 1
- platformData:
- - first:
- Any:
- second:
- enabled: 1
- settings: {}
- - first:
- Editor: Editor
- second:
- enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
- second:
- enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Plugins/Org.OpenAPITools.xml b/Assets/Plugins/Org.OpenAPITools.xml
deleted file mode 100644
index 748dfe1ba81001daf100f1a596a418f03082da55..0000000000000000000000000000000000000000
--- a/Assets/Plugins/Org.OpenAPITools.xml
+++ /dev/null
@@ -1,2960 +0,0 @@
-
-
-
- Org.OpenAPITools
-
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Represents configuration aspects required to interact with the API endpoints.
-
-
-
-
- Gets the base path of the API client.
-
- The base path
-
-
-
- Gets or sets the configuration object
-
- An instance of the Configuration
-
-
-
- Provides a factory method hook for the creation of exceptions.
-
-
-
-
- Get the state of the server.
-
-
-
-
- Thrown when fails to make API call
- string
-
-
-
- Get the state of the server.
-
-
-
-
- Thrown when fails to make API call
- ApiResponse of string
-
-
-
- Test the server availability.
-
-
-
-
- Thrown when fails to make API call
- string
-
-
-
- Test the server availability.
-
-
-
-
- Thrown when fails to make API call
- ApiResponse of string
-
-
-
- Get the version of the ARF API.
-
-
-
-
- Thrown when fails to make API call
- string
-
-
-
- Get the version of the ARF API.
-
-
-
-
- Thrown when fails to make API call
- ApiResponse of string
-
-
-
- Get the state of the server.
-
-
-
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Get the state of the server.
-
-
-
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Test the server availability.
-
-
-
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Test the server availability.
-
-
-
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Get the version of the ARF API.
-
-
-
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Get the version of the ARF API.
-
-
-
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
-
- Initializes a new instance of the class
-
-
-
-
-
- Initializes a new instance of the class
- using Configuration object
-
- An instance of Configuration
-
-
-
-
- Gets the base path of the API client.
-
- The base path
-
-
-
- Sets the base path of the API client.
-
- The base path
-
-
-
- Gets the default header.
-
- Dictionary of HTTP header
-
-
-
- Add default header.
-
- Header field name.
- Header field value.
-
-
-
-
- Get the state of the server.
-
- Thrown when fails to make API call
- string
-
-
-
- Get the state of the server.
-
- Thrown when fails to make API call
- ApiResponse of string
-
-
-
- Get the state of the server.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Get the state of the server.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Test the server availability.
-
- Thrown when fails to make API call
- string
-
-
-
- Test the server availability.
-
- Thrown when fails to make API call
- ApiResponse of string
-
-
-
- Test the server availability.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Test the server availability.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Get the version of the ARF API.
-
- Thrown when fails to make API call
- string
-
-
-
- Get the version of the ARF API.
-
- Thrown when fails to make API call
- ApiResponse of string
-
-
-
- Get the version of the ARF API.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Get the version of the ARF API.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Gets or sets the configuration object
-
- An instance of the Configuration
-
-
-
- Provides a factory method hook for the creation of exceptions.
-
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Create a Trackable.
-
-
- Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- string
-
-
-
- Create a Trackable.
-
-
- Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- ApiResponse of string
-
-
-
- Delete a Trackable.
-
-
- Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- string
-
-
-
- Delete a Trackable.
-
-
- Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- ApiResponse of string
-
-
-
- Find a Trackable by its UUID.
-
-
- Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- Trackable
-
-
-
- Find a Trackable by its UUID.
-
-
- Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- ApiResponse of Trackable
-
-
-
- Return all the Trackables.
-
-
- Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- List<Trackable>
-
-
-
- Return all the Trackables.
-
-
- Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- ApiResponse of List<Trackable>
-
-
-
- Modify a Trackable.
-
-
- Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- string
-
-
-
- Modify a Trackable.
-
-
- Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- ApiResponse of string
-
-
-
- Create a Trackable.
-
-
- Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Create a Trackable.
-
-
- Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Delete a Trackable.
-
-
- Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Delete a Trackable.
-
-
- Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Find a Trackable by its UUID.
-
-
- Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- Cancellation Token to cancel request (optional)
- Task of Trackable
-
-
-
- Find a Trackable by its UUID.
-
-
- Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (Trackable)
-
-
-
- Return all the Trackables.
-
-
- Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of List<Trackable>
-
-
-
- Return all the Trackables.
-
-
- Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (List<Trackable>)
-
-
-
- Modify a Trackable.
-
-
- Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Modify a Trackable.
-
-
- Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
-
- Initializes a new instance of the class
-
-
-
-
-
- Initializes a new instance of the class
- using Configuration object
-
- An instance of Configuration
-
-
-
-
- Gets the base path of the API client.
-
- The base path
-
-
-
- Sets the base path of the API client.
-
- The base path
-
-
-
- Gets the default header.
-
- Dictionary of HTTP header
-
-
-
- Add default header.
-
- Header field name.
- Header field value.
-
-
-
-
- Create a Trackable. Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- string
-
-
-
- Create a Trackable. Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- ApiResponse of string
-
-
-
- Create a Trackable. Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Create a Trackable. Create a new Trackable from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
-
- Thrown when fails to make API call
- The Trackable to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Delete a Trackable. Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- string
-
-
-
- Delete a Trackable. Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- ApiResponse of string
-
-
-
- Delete a Trackable. Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Delete a Trackable. Delete a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- Trackable UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Find a Trackable by its UUID. Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- Trackable
-
-
-
- Find a Trackable by its UUID. Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- ApiResponse of Trackable
-
-
-
- Find a Trackable by its UUID. Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- Cancellation Token to cancel request (optional)
- Task of Trackable
-
-
-
- Find a Trackable by its UUID. Get a single Trackable stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the Trackable to retrieve.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (Trackable)
-
-
-
- Return all the Trackables. Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- List<Trackable>
-
-
-
- Return all the Trackables. Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- ApiResponse of List<Trackable>
-
-
-
- Return all the Trackables. Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of List<Trackable>
-
-
-
- Return all the Trackables. Get all the Trackables currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (List<Trackable>)
-
-
-
- Modify a Trackable. Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- string
-
-
-
- Modify a Trackable. Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- ApiResponse of string
-
-
-
- Modify a Trackable. Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Modify a Trackable. Modify an existing Trackable given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The Trackable to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Gets or sets the configuration object
-
- An instance of the Configuration
-
-
-
- Provides a factory method hook for the creation of exceptions.
-
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Create a World Anchor.
-
-
- Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- string
-
-
-
- Create a World Anchor.
-
-
- Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- ApiResponse of string
-
-
-
- Delete a World Anchor.
-
-
- Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- string
-
-
-
- Delete a World Anchor.
-
-
- Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- ApiResponse of string
-
-
-
- Find a World Anchor by its UUID.
-
-
- Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- WorldAnchor
-
-
-
- Find a World Anchor by its UUID.
-
-
- Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- ApiResponse of WorldAnchor
-
-
-
- Return all the World Anchors.
-
-
- Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- List<WorldAnchor>
-
-
-
- Return all the World Anchors.
-
-
- Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- ApiResponse of List<WorldAnchor>
-
-
-
- Modify a World Anchor.
-
-
- Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- string
-
-
-
- Modify a World Anchor.
-
-
- Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- ApiResponse of string
-
-
-
- Create a World Anchor.
-
-
- Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Create a World Anchor.
-
-
- Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Delete a World Anchor.
-
-
- Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Delete a World Anchor.
-
-
- Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Find a World Anchor by its UUID.
-
-
- Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- Cancellation Token to cancel request (optional)
- Task of WorldAnchor
-
-
-
- Find a World Anchor by its UUID.
-
-
- Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (WorldAnchor)
-
-
-
- Return all the World Anchors.
-
-
- Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of List<WorldAnchor>
-
-
-
- Return all the World Anchors.
-
-
- Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (List<WorldAnchor>)
-
-
-
- Modify a World Anchor.
-
-
- Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Modify a World Anchor.
-
-
- Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
-
- Initializes a new instance of the class
-
-
-
-
-
- Initializes a new instance of the class
- using Configuration object
-
- An instance of Configuration
-
-
-
-
- Gets the base path of the API client.
-
- The base path
-
-
-
- Sets the base path of the API client.
-
- The base path
-
-
-
- Gets the default header.
-
- Dictionary of HTTP header
-
-
-
- Add default header.
-
- Header field name.
- Header field value.
-
-
-
-
- Create a World Anchor. Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- string
-
-
-
- Create a World Anchor. Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- ApiResponse of string
-
-
-
- Create a World Anchor. Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Create a World Anchor. Create a new World Anchor from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
-
- Thrown when fails to make API call
- The World Anchor to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Delete a World Anchor. Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- string
-
-
-
- Delete a World Anchor. Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- ApiResponse of string
-
-
-
- Delete a World Anchor. Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Delete a World Anchor. Delete a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Anchor UUID to delete.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Find a World Anchor by its UUID. Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- WorldAnchor
-
-
-
- Find a World Anchor by its UUID. Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- ApiResponse of WorldAnchor
-
-
-
- Find a World Anchor by its UUID. Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- Cancellation Token to cancel request (optional)
- Task of WorldAnchor
-
-
-
- Find a World Anchor by its UUID. Get a single World Anchor stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Anchor to retrieve.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (WorldAnchor)
-
-
-
- Return all the World Anchors. Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- List<WorldAnchor>
-
-
-
- Return all the World Anchors. Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- ApiResponse of List<WorldAnchor>
-
-
-
- Return all the World Anchors. Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of List<WorldAnchor>
-
-
-
- Return all the World Anchors. Get all the World Anchors currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (List<WorldAnchor>)
-
-
-
- Modify a World Anchor. Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- string
-
-
-
- Modify a World Anchor. Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- ApiResponse of string
-
-
-
- Modify a World Anchor. Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Modify a World Anchor. Modify an existing World Anchor given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Anchor to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Gets or sets the configuration object
-
- An instance of the Configuration
-
-
-
- Provides a factory method hook for the creation of exceptions.
-
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Create a World Link between elements (world anchors and/or trackables).
-
-
- Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- string
-
-
-
- Create a World Link between elements (world anchors and/or trackables).
-
-
- Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- ApiResponse of string
-
-
-
- Delete a World Link.
-
-
- Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- string
-
-
-
- Delete a World Link.
-
-
- Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- ApiResponse of string
-
-
-
- Find a World Link by its UUID.
-
-
- Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- WorldLink
-
-
-
- Find a World Link by its UUID.
-
-
- Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- ApiResponse of WorldLink
-
-
-
- Return all World Links.
-
-
- Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- List<WorldLink>
-
-
-
- Return all World Links.
-
-
- Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- ApiResponse of List<WorldLink>
-
-
-
- Modify a World Link.
-
-
- Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- string
-
-
-
- Modify a World Link.
-
-
- Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- ApiResponse of string
-
-
-
- Create a World Link between elements (world anchors and/or trackables).
-
-
- Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Create a World Link between elements (world anchors and/or trackables).
-
-
- Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Delete a World Link.
-
-
- Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Delete a World Link.
-
-
- Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Find a World Link by its UUID.
-
-
- Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- Cancellation Token to cancel request (optional)
- Task of WorldLink
-
-
-
- Find a World Link by its UUID.
-
-
- Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (WorldLink)
-
-
-
- Return all World Links.
-
-
- Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of List<WorldLink>
-
-
-
- Return all World Links.
-
-
- Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (List<WorldLink>)
-
-
-
- Modify a World Link.
-
-
- Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Modify a World Link.
-
-
- Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Represents a collection of functions to interact with the API endpoints
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
-
- Initializes a new instance of the class
-
-
-
-
-
- Initializes a new instance of the class
- using Configuration object
-
- An instance of Configuration
-
-
-
-
- Gets the base path of the API client.
-
- The base path
-
-
-
- Sets the base path of the API client.
-
- The base path
-
-
-
- Gets the default header.
-
- Dictionary of HTTP header
-
-
-
- Add default header.
-
- Header field name.
- Header field value.
-
-
-
-
- Create a World Link between elements (world anchors and/or trackables). Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- string
-
-
-
- Create a World Link between elements (world anchors and/or trackables). Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- ApiResponse of string
-
-
-
- Create a World Link between elements (world anchors and/or trackables). Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Create a World Link between elements (world anchors and/or trackables). Create a new World Link from a json object containing all the required informations and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
-
- Thrown when fails to make API call
- The link to be added to the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Delete a World Link. Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- string
-
-
-
- Delete a World Link. Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- ApiResponse of string
-
-
-
- Delete a World Link. Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Delete a World Link. Delete a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- World Link id to delete.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Find a World Link by its UUID. Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- WorldLink
-
-
-
- Find a World Link by its UUID. Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- ApiResponse of WorldLink
-
-
-
- Find a World Link by its UUID. Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- Cancellation Token to cancel request (optional)
- Task of WorldLink
-
-
-
- Find a World Link by its UUID. Get a single World Link stored in the world storage from its ID.
-
- Thrown when fails to make API call
- UUID of the World Link to retrieve.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (WorldLink)
-
-
-
- Return all World Links. Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- List<WorldLink>
-
-
-
- Return all World Links. Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- ApiResponse of List<WorldLink>
-
-
-
- Return all World Links. Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of List<WorldLink>
-
-
-
- Return all World Links. Get all the World Links currently being stored in the world storage.
-
- Thrown when fails to make API call
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (List<WorldLink>)
-
-
-
- Modify a World Link. Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- string
-
-
-
- Modify a World Link. Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- ApiResponse of string
-
-
-
- Modify a World Link. Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of string
-
-
-
- Modify a World Link. Modify an existing World Link given a json object containing all the required informations. <br> **Please note that ID of the object is required in the JSON**
-
- Thrown when fails to make API call
- The World Link to be modified in the world storage.
- Cancellation Token to cancel request (optional)
- Task of ApiResponse (string)
-
-
-
- Gets or sets the configuration object
-
- An instance of the Configuration
-
-
-
- Provides a factory method hook for the creation of exceptions.
-
-
-
-
- API client is mainly responsible for making the HTTP call to the API backend.
-
-
-
-
- Initializes a new instance of the class
- with default configuration.
-
-
-
-
- Initializes a new instance of the class
- with default base path (http://localhost:8080).
-
- An instance of Configuration.
-
-
-
- Initializes a new instance of the class
- with default configuration.
-
- The base path.
-
-
-
- Gets or sets the default API client for making HTTP calls.
-
- The default API client.
-
-
-
- Makes the HTTP request (Sync).
-
- URL path.
- HTTP method.
- Query parameters.
- HTTP body (POST request).
- Header parameters.
- Form parameters.
- File parameters.
- Path parameters.
- Content Type of the request
- Object
-
-
-
- Makes the asynchronous HTTP request.
-
- URL path.
- HTTP method.
- Query parameters.
- HTTP body (POST request).
- Header parameters.
- Form parameters.
- File parameters.
- Path parameters.
- Content type.
- Cancellation Token.
- The Task instance.
-
-
-
- Escape string (url-encoded).
-
- String to be escaped.
- Escaped string.
-
-
-
- Create FileParameter based on Stream.
-
- Parameter name.
- Input stream.
- FileParameter.
-
-
-
- If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime.
- If parameter is a list, join the list with ",".
- Otherwise just return the string.
-
- The parameter (header, path, query, form).
- Formatted string.
-
-
-
- Deserialize the JSON string into a proper object.
-
- The HTTP response.
- Object type.
- Object representation of the JSON string.
-
-
-
- Serialize an input (model) into JSON string
-
- Object.
- JSON string.
-
-
-
- Check if the given MIME is a JSON MIME.
- JSON MIME examples:
- application/json
- application/json; charset=UTF8
- APPLICATION/JSON
- application/vnd.company+json
-
- MIME
- Returns True if MIME type is json.
-
-
-
- Select the Content-Type header's value from the given content-type array:
- if JSON type exists in the given array, use it;
- otherwise use the first one defined in 'consumes'
-
- The Content-Type array to select from.
- The Content-Type header to use.
-
-
-
- Select the Accept header's value from the given accepts array:
- if JSON exists in the given array, use it;
- otherwise use all of them (joining into a string)
-
- The accepts array to select from.
- The Accept header to use.
-
-
-
- Encode string in base64 format.
-
- String to be encoded.
- Encoded string.
-
-
-
- Dynamically cast the object into target type.
-
- Object to be casted
- Target type
- Casted object
-
-
-
- Convert stream to byte array
-
- Input stream to be converted
- Byte array
-
-
-
- URL encode a string
- Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50
-
- String to be URL encoded
- Byte array
-
-
-
- Sanitize filename by removing the path
-
- Filename
- Filename
-
-
-
- Convert params to key/value pairs.
- Use collectionFormat to properly format lists and collections.
-
- Collection format.
- Key name.
- Value object.
- A list of KeyValuePairs
-
-
-
- Check if generic object is a collection.
-
-
- True if object is a collection type
-
-
-
- Gets or sets an instance of the IReadableConfiguration.
-
- An instance of the IReadableConfiguration.
-
- helps us to avoid modifying possibly global
- configuration values from within a given client. It does not guarantee thread-safety
- of the instance in any way.
-
-
-
-
- Gets or sets the RestClient.
-
- An instance of the RestClient
-
-
-
- API Exception
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- HTTP status code.
- Error message.
-
-
-
- Initializes a new instance of the class.
-
- HTTP status code.
- Error message.
- Error content.
-
-
-
- Gets or sets the error code (HTTP status code)
-
- The error code (HTTP status code).
-
-
-
- Gets or sets the error content (body json object)
-
- The error content (Http response body).
-
-
-
- API Response
-
-
-
-
- Initializes a new instance of the class.
-
- HTTP status code.
- HTTP headers.
- Data (parsed HTTP body)
-
-
-
- Gets or sets the status code (HTTP status code)
-
- The status code.
-
-
-
- Gets or sets the HTTP headers
-
- HTTP headers
-
-
-
- Gets or sets the data (parsed HTTP body)
-
- The data.
-
-
-
- Represents a set of configuration settings
-
-
-
-
- Represents a readable-only configuration contract.
-
-
-
-
- Gets the API key with prefix.
-
- API key identifier (authentication scheme).
- API key with prefix.
-
-
-
- Gets the access token.
-
- Access token.
-
-
-
- Gets the API key.
-
- API key.
-
-
-
- Gets the API key prefix.
-
- API key prefix.
-
-
-
- Gets the base path.
-
- Base path.
-
-
-
- Gets the date time format.
-
- Date time format.
-
-
-
- Gets the default header.
-
- Default header.
-
-
-
- Gets the temp folder path.
-
- Temp folder path.
-
-
-
- Gets the HTTP connection timeout (in milliseconds)
-
- HTTP connection timeout.
-
-
-
- Gets the user agent.
-
- User agent.
-
-
-
- Gets the username.
-
- Username.
-
-
-
- Gets the password.
-
- Password.
-
-
-
- Version of the package.
-
- Version of the package.
-
-
-
- Identifier for ISO 8601 DateTime Format
-
- See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information.
-
-
-
- Default creation of exceptions for a given method name and response object
-
-
-
-
- Gets or sets the API key based on the authentication name.
-
- The API key.
-
-
-
- Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.
-
- The prefix of the API key.
-
-
-
- Initializes a new instance of the class
-
-
-
-
- Initializes a new instance of the class
-
-
-
-
- Initializes a new instance of the class with different settings
-
- Api client
- Dictionary of default HTTP header
- Username
- Password
- accessToken
- Dictionary of API key
- Dictionary of API key prefix
- Temp folder path
- DateTime format string
- HTTP connection timeout (in milliseconds)
- HTTP user agent
-
-
-
- Initializes a new instance of the Configuration class.
-
- Api client.
-
-
-
- Gets the API key with prefix.
-
- API key identifier (authentication scheme).
- API key with prefix.
-
-
-
- Add default header.
-
- Header field name.
- Header field value.
-
-
-
-
- Creates a new based on this instance.
-
-
-
-
-
- Returns a string with essential information for debugging.
-
-
-
-
- Add Api Key Header.
-
- Api Key name.
- Api Key value.
-
-
-
-
- Sets the API key prefix.
-
- Api Key name.
- Api Key value.
-
-
-
- Gets or sets the default Configuration.
-
- Configuration.
-
-
-
- Gets an instance of an ApiClient for this configuration
-
-
-
-
- Gets or sets the base path for API access.
-
-
-
-
- Gets or sets the default header.
-
-
-
-
- Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds.
-
-
-
-
- Gets or sets the HTTP user agent.
-
- Http user agent.
-
-
-
- Gets or sets the username (HTTP basic authentication).
-
- The username.
-
-
-
- Gets or sets the password (HTTP basic authentication).
-
- The password.
-
-
-
- Gets or sets the access token for OAuth2 authentication.
-
- The access token.
-
-
-
- Gets or sets the temporary folder path to store the files downloaded from the server.
-
- Folder path.
-
-
-
- Gets or sets the date time format used when serializing in the ApiClient
- By default, it's set to ISO 8601 - "o", for others see:
- https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx
- and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx
- No validation is done to ensure that the string you're providing is valid
-
- The DateTimeFormat string
-
-
-
- Gets or sets the prefix (e.g. Token) of the API key based on the authentication name.
-
- The prefix of the API key.
-
-
-
- Gets or sets the API key based on the authentication name.
-
- The API key.
-
-
-
- A delegate to ExceptionFactory method
-
- Method name
- Response
- Exceptions
-
-
-
- provides a compile-time extension point for globally configuring
- API Clients.
-
-
- A customized implementation via partial class may reside in another file and may
- be excluded from automatic generation via a .openapi-generator-ignore file.
-
-
-
-
- Formatter for 'date' openapi formats ss defined by full-date - RFC3339
- see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- AttachedObjects
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- A Universally Unique IDentifier identifying the link. (required).
- A Universally Unique IDentifier identifying a world anchor or trackable. (required).
- A Universally Unique IDentifier identifying a world anchor or trackable. (required).
- typeFrom (required).
- typeTo (required).
-
-
-
- Returns the string presentation of the object
-
- String presentation of the object
-
-
-
- Returns the JSON string presentation of the object
-
- JSON string presentation of the object
-
-
-
- Returns true if objects are equal
-
- Object to be compared
- Boolean
-
-
-
- Returns true if AttachedObjects instances are equal
-
- Instance of AttachedObjects to be compared
- Boolean
-
-
-
- Gets the hash code
-
- Hash code
-
-
-
- To validate all properties of the instance
-
- Validation context
- Validation Result
-
-
-
- Gets or Sets TypeFrom
-
-
-
-
- Gets or Sets TypeTo
-
-
-
-
- A Universally Unique IDentifier identifying the link.
-
- A Universally Unique IDentifier identifying the link.
-
-
-
- A Universally Unique IDentifier identifying a world anchor or trackable.
-
- A Universally Unique IDentifier identifying a world anchor or trackable.
-
-
-
- A Universally Unique IDentifier identifying a world anchor or trackable.
-
- A Universally Unique IDentifier identifying a world anchor or trackable.
-
-
-
- An object holding the info of a Trackable`'`s encoding informations `:` the data format and the version.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- Identifier of the target framework. (required).
- The version of the format (required).
-
-
-
- Returns the string presentation of the object
-
- String presentation of the object
-
-
-
- Returns the JSON string presentation of the object
-
- JSON string presentation of the object
-
-
-
- Returns true if objects are equal
-
- Object to be compared
- Boolean
-
-
-
- Returns true if EncodingInformationStructure instances are equal
-
- Instance of EncodingInformationStructure to be compared
- Boolean
-
-
-
- Gets the hash code
-
- Hash code
-
-
-
- To validate all properties of the instance
-
- Validation context
- Validation Result
-
-
-
- Identifier of the target framework.
-
- Identifier of the target framework.
-
-
-
- The version of the format
-
- The version of the format
-
-
-
- Identifier of the target framework.
-
- Identifier of the target framework.
-
-
-
- Enum HOLOLENS for value: HOLOLENS
-
-
-
-
- Enum ARKIT for value: ARKIT
-
-
-
-
- Enum ARCORE for value: ARCORE
-
-
-
-
- Enum VUFORIA for value: VUFORIA
-
-
-
-
- Enum ARUCO for value: ARUCO
-
-
-
-
- Enum OTHER for value: OTHER
-
-
-
-
- Error
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- code (required).
- message (required).
-
-
-
- Returns the string presentation of the object
-
- String presentation of the object
-
-
-
- Returns the JSON string presentation of the object
-
- JSON string presentation of the object
-
-
-
- Returns true if objects are equal
-
- Object to be compared
- Boolean
-
-
-
- Returns true if Error instances are equal
-
- Instance of Error to be compared
- Boolean
-
-
-
- Gets the hash code
-
- Hash code
-
-
-
- To validate all properties of the instance
-
- Validation context
- Validation Result
-
-
-
- Gets or Sets Code
-
-
-
-
- Gets or Sets Message
-
-
-
-
- Type of a world representaion object.
-
- Type of a world representaion object.
-
-
-
- Enum Trackable for value: Trackable
-
-
-
-
- Enum WorldAnchor for value: WorldAnchor
-
-
-
-
- Enum NotIdentified for value: NotIdentified
-
-
-
-
- An element representing a Trackable object in the real world.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- An Universally Unique IDentifier identifying the Trackable (RFC 4122)..
- A human readable name for the Trackable. (required).
- An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company). (required).
- Extensible list of Trackable types, possibly handled by complient world storage implementation. (required).
- trackableEncodingInformation (required).
- The data provided to create the Trackable in a specific format handled by the world storage service. (required).
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. (required).
- unit (required).
- Size object in format {width, length, depth}. (required).
- List of additional parameters to be stored with the object. (required).
-
-
-
- Returns the string presentation of the object
-
- String presentation of the object
-
-
-
- Returns the JSON string presentation of the object
-
- JSON string presentation of the object
-
-
-
- Returns true if objects are equal
-
- Object to be compared
- Boolean
-
-
-
- Returns true if Trackable instances are equal
-
- Instance of Trackable to be compared
- Boolean
-
-
-
- Gets the hash code
-
- Hash code
-
-
-
- To validate all properties of the instance
-
- Validation context
- Validation Result
-
-
-
- Extensible list of Trackable types, possibly handled by complient world storage implementation.
-
- Extensible list of Trackable types, possibly handled by complient world storage implementation.
-
-
-
- Gets or Sets Unit
-
-
-
-
- An Universally Unique IDentifier identifying the Trackable (RFC 4122).
-
- An Universally Unique IDentifier identifying the Trackable (RFC 4122).
-
-
-
- A human readable name for the Trackable.
-
- A human readable name for the Trackable.
-
-
-
- An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company).
-
- An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company).
-
-
-
- Gets or Sets TrackableEncodingInformation
-
-
-
-
- The data provided to create the Trackable in a specific format handled by the world storage service.
-
- The data provided to create the Trackable in a specific format handled by the world storage service.
-
-
-
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
-
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
-
-
-
- Size object in format {width, length, depth}.
-
- Size object in format {width, length, depth}.
-
-
-
- List of additional parameters to be stored with the object.
-
- List of additional parameters to be stored with the object.
-
-
-
- Extensible list of Trackable types, possibly handled by complient world storage implementation.
-
- Extensible list of Trackable types, possibly handled by complient world storage implementation.
-
-
-
- Enum FIDUCIALMARKER for value: FIDUCIAL_MARKER
-
-
-
-
- Enum IMAGEMARKER for value: IMAGE_MARKER
-
-
-
-
- Enum MAP for value: MAP
-
-
-
-
- Enum GEOPOSE for value: GEOPOSE
-
-
-
-
- Enum OTHER for value: OTHER
-
-
-
-
- Unit of length.
-
- Unit of length.
-
-
-
- Enum MM for value: MM
-
-
-
-
- Enum CM for value: CM
-
-
-
-
- Enum DM for value: DM
-
-
-
-
- Enum M for value: M
-
-
-
-
- Enum DAM for value: DAM
-
-
-
-
- Enum HM for value: HM
-
-
-
-
- Enum KM for value: KM
-
-
-
-
- Enum INCH for value: INCH
-
-
-
-
- Enum FOOT for value: FOOT
-
-
-
-
- Enum YARD for value: YARD
-
-
-
-
- Enum MILE for value: MILE
-
-
-
-
- An element describing a pose in the world graph.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- An Universally Unique IDentifier identifying the World Anchor (RFC 4122)..
- A human readable name for the World Anchor. (required).
- An Universally Unique IDentifier identifying the creator of the World Anchor. (required).
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. (required).
- unit (required).
- Size object in format {width, length, depth}. (required).
- List of additional parameters to be stored with the object. (required).
-
-
-
- Returns the string presentation of the object
-
- String presentation of the object
-
-
-
- Returns the JSON string presentation of the object
-
- JSON string presentation of the object
-
-
-
- Returns true if objects are equal
-
- Object to be compared
- Boolean
-
-
-
- Returns true if WorldAnchor instances are equal
-
- Instance of WorldAnchor to be compared
- Boolean
-
-
-
- Gets the hash code
-
- Hash code
-
-
-
- To validate all properties of the instance
-
- Validation context
- Validation Result
-
-
-
- Gets or Sets Unit
-
-
-
-
- An Universally Unique IDentifier identifying the World Anchor (RFC 4122).
-
- An Universally Unique IDentifier identifying the World Anchor (RFC 4122).
-
-
-
- A human readable name for the World Anchor.
-
- A human readable name for the World Anchor.
-
-
-
- An Universally Unique IDentifier identifying the creator of the World Anchor.
-
- An Universally Unique IDentifier identifying the creator of the World Anchor.
-
-
-
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
-
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
-
-
-
- Size object in format {width, length, depth}.
-
- Size object in format {width, length, depth}.
-
-
-
- List of additional parameters to be stored with the object.
-
- List of additional parameters to be stored with the object.
-
-
-
- An object holding the info of a transform between two elements.
-
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Initializes a new instance of the class.
-
- An Universally Unique IDentifier identifying the World Link (RFC 4122)..
- An Universally Unique IDentifier identifying the creator of the World Link. (required).
- An Universally Unique IDentifier identifying a World Anchor or Trackable. (required).
- An Universally Unique IDentifier identifying a World Anchor or Trackable. (required).
- typeFrom (required).
- typeTo (required).
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector. (required).
- unit (required).
- List of additional parameters to be stored with the object. (required).
-
-
-
- Returns the string presentation of the object
-
- String presentation of the object
-
-
-
- Returns the JSON string presentation of the object
-
- JSON string presentation of the object
-
-
-
- Returns true if objects are equal
-
- Object to be compared
- Boolean
-
-
-
- Returns true if WorldLink instances are equal
-
- Instance of WorldLink to be compared
- Boolean
-
-
-
- Gets the hash code
-
- Hash code
-
-
-
- To validate all properties of the instance
-
- Validation context
- Validation Result
-
-
-
- Gets or Sets TypeFrom
-
-
-
-
- Gets or Sets TypeTo
-
-
-
-
- Gets or Sets Unit
-
-
-
-
- An Universally Unique IDentifier identifying the World Link (RFC 4122).
-
- An Universally Unique IDentifier identifying the World Link (RFC 4122).
-
-
-
- An Universally Unique IDentifier identifying the creator of the World Link.
-
- An Universally Unique IDentifier identifying the creator of the World Link.
-
-
-
- An Universally Unique IDentifier identifying a World Anchor or Trackable.
-
- An Universally Unique IDentifier identifying a World Anchor or Trackable.
-
-
-
- An Universally Unique IDentifier identifying a World Anchor or Trackable.
-
- An Universally Unique IDentifier identifying a World Anchor or Trackable.
-
-
-
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
-
- Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
-
-
-
- List of additional parameters to be stored with the object.
-
- List of additional parameters to be stored with the object.
-
-
-
diff --git a/Assets/Plugins/RestSharp.dll b/Assets/Plugins/RestSharp.dll
deleted file mode 100644
index 59d82f94198e053a62d648c27671eaf45fff0dad..0000000000000000000000000000000000000000
Binary files a/Assets/Plugins/RestSharp.dll and /dev/null differ
diff --git a/Assets/Plugins/RestSharp.dll.meta b/Assets/Plugins/RestSharp.dll.meta
deleted file mode 100644
index ad5dfc89734ed152983843bbf0c302b96b3a9f5d..0000000000000000000000000000000000000000
--- a/Assets/Plugins/RestSharp.dll.meta
+++ /dev/null
@@ -1,33 +0,0 @@
-fileFormatVersion: 2
-guid: 434491b56b23fa2449fb310cafa1ddef
-PluginImporter:
- externalObjects: {}
- serializedVersion: 2
- iconMap: {}
- executionOrder: {}
- defineConstraints: []
- isPreloaded: 0
- isOverridable: 0
- isExplicitlyReferenced: 0
- validateReferences: 1
- platformData:
- - first:
- Any:
- second:
- enabled: 1
- settings: {}
- - first:
- Editor: Editor
- second:
- enabled: 0
- settings:
- DefaultValueInitialized: true
- - first:
- Windows Store Apps: WindowsStoreApps
- second:
- enabled: 0
- settings:
- CPU: AnyCPU
- userData:
- assetBundleName:
- assetBundleVariant:
diff --git a/Assets/Plugins.meta b/Assets/Runtime/OpenAPI.meta
similarity index 77%
rename from Assets/Plugins.meta
rename to Assets/Runtime/OpenAPI.meta
index b1e3b19ff9e30afbbfc97d8e36cca5246ca5538a..78baa8b5739e9df7dc1998082d79d7934d13eefb 100644
--- a/Assets/Plugins.meta
+++ b/Assets/Runtime/OpenAPI.meta
@@ -1,5 +1,5 @@
fileFormatVersion: 2
-guid: 7428887401623a946a71e87a3e6fb843
+guid: ab559568a816d2249859f15aab5beaf5
folderAsset: yes
DefaultImporter:
externalObjects: {}
diff --git a/Assets/Runtime/OpenAPI/DataModels.cs b/Assets/Runtime/OpenAPI/DataModels.cs
new file mode 100644
index 0000000000000000000000000000000000000000..d017018f2a55c03d3380daaf4354d6c8d5d1a32e
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/DataModels.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+
+namespace ETSI.ARF.OpenAPI.WorldStorage
+{
+ public interface IModel
+ {
+ public System.Guid UUID { get; set; }
+ }
+
+ //
+ // Implement here some constructors
+ //
+ public partial class Trackable : IModel
+ {
+ public Trackable(string name)
+ {
+ UUID = Guid.NewGuid();
+ Name = name;
+ }
+ }
+
+ public partial class WorldAnchor : IModel
+ {
+ public WorldAnchor(string name)
+ {
+ UUID = Guid.NewGuid();
+ Name = name;
+ }
+ }
+
+ public partial class WorldLink : IModel
+ {
+ public WorldLink()
+ {
+ UUID = Guid.NewGuid();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Runtime/OpenAPI/DataModels.cs.meta b/Assets/Runtime/OpenAPI/DataModels.cs.meta
new file mode 100644
index 0000000000000000000000000000000000000000..9c09d378305dd7e6825b638c9a741a3d822a1bc6
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/DataModels.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 01be611ab05b75b42a3b176770fe33ae
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/OpenAPI/Generated.meta b/Assets/Runtime/OpenAPI/Generated.meta
new file mode 100644
index 0000000000000000000000000000000000000000..05f59fc49d49f362c9e23b0e36024b4ae54d5674
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/Generated.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 0b55aeff11c61a34e9fbaaeaeb1c9efc
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/OpenAPI/Generated/WorldStorageOpenAPI.cs b/Assets/Runtime/OpenAPI/Generated/WorldStorageOpenAPI.cs
new file mode 100644
index 0000000000000000000000000000000000000000..07258786672fe224bac882b10a8698bc9644e62c
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/Generated/WorldStorageOpenAPI.cs
@@ -0,0 +1,3050 @@
+//----------------------
+//
+// Generated using the NSwag toolchain v14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
+//
+//----------------------
+
+#pragma warning disable 108 // Disable "CS0108 '{derivedDto}.ToJson()' hides inherited member '{dtoBase}.ToJson()'. Use the new keyword if hiding was intended."
+#pragma warning disable 114 // Disable "CS0114 '{derivedDto}.RaisePropertyChanged(String)' hides inherited member 'dtoBase.RaisePropertyChanged(String)'. To make the current member override that implementation, add the override keyword. Otherwise add the new keyword."
+#pragma warning disable 472 // Disable "CS0472 The result of the expression is always 'false' since a value of type 'Int32' is never equal to 'null' of type 'Int32?'
+#pragma warning disable 612 // Disable "CS0612 '...' is obsolete"
+#pragma warning disable 1573 // Disable "CS1573 Parameter '...' has no matching param tag in the XML comment for ...
+#pragma warning disable 1591 // Disable "CS1591 Missing XML comment for publicly visible type or member ..."
+#pragma warning disable 8073 // Disable "CS8073 The result of the expression is always 'false' since a value of type 'T' is never equal to 'null' of type 'T?'"
+#pragma warning disable 3016 // Disable "CS3016 Arrays as attribute arguments is not CLS-compliant"
+#pragma warning disable 8603 // Disable "CS8603 Possible null reference return"
+#pragma warning disable 8604 // Disable "CS8604 Possible null reference argument for parameter"
+#pragma warning disable 8625 // Disable "CS8625 Cannot convert null literal to non-nullable reference type"
+#pragma warning disable CS8765 // Nullability of type of parameter doesn't match overridden member (possibly because of nullability attributes).
+
+namespace ETSI.ARF.OpenAPI.WorldStorage
+{
+ using System = global::System;
+
+ [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class WorldStorageClient
+ {
+ private ETSI.ARF.OpenAPI.IHttpClient _httpClient;
+ private static System.Lazy _settings = new System.Lazy(CreateSerializerSettings, true);
+
+ #pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
+ public WorldStorageClient(ETSI.ARF.OpenAPI.IHttpClient httpClient)
+ #pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
+ {
+ _httpClient = httpClient;
+ }
+
+ private static Newtonsoft.Json.JsonSerializerSettings CreateSerializerSettings()
+ {
+ var settings = new Newtonsoft.Json.JsonSerializerSettings();
+ UpdateJsonSerializerSettings(settings);
+ return settings;
+ }
+
+ protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get { return _settings.Value; } }
+
+ static partial void UpdateJsonSerializerSettings(Newtonsoft.Json.JsonSerializerSettings settings);
+
+ partial void PrepareRequest(ETSI.ARF.OpenAPI.IHttpClient client, System.Net.Http.HttpRequestMessage request, string url);
+ partial void PrepareRequest(ETSI.ARF.OpenAPI.IHttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder);
+ partial void ProcessResponse(ETSI.ARF.OpenAPI.IHttpClient client, System.Net.Http.HttpResponseMessage response);
+
+ ///
+ /// Test the server availability.
+ ///
+ /// Ok, returns a string message.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetPingAsync()
+ {
+ return GetPingAsync(System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Test the server availability.
+ ///
+ /// Ok, returns a string message.
+ /// A server side error occurred.
+ public virtual string GetPing()
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetPingAsync(System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Test the server availability.
+ ///
+ /// Ok, returns a string message.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetPingAsync(System.Threading.CancellationToken cancellationToken)
+ {
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
+ {
+ using (var request_ = new System.Net.Http.HttpRequestMessage())
+ {
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "ping"
+ urlBuilder_.Append("ping");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Get the state of the server.
+ ///
+ /// OK, world storage server ready.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetAdminAsync()
+ {
+ return GetAdminAsync(System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Get the state of the server.
+ ///
+ /// OK, world storage server ready.
+ /// A server side error occurred.
+ public virtual string GetAdmin()
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetAdminAsync(System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Get the state of the server.
+ ///
+ /// OK, world storage server ready.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetAdminAsync(System.Threading.CancellationToken cancellationToken)
+ {
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
+ {
+ using (var request_ = new System.Net.Http.HttpRequestMessage())
+ {
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "admin"
+ urlBuilder_.Append("admin");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Get the version of the ARF API.
+ ///
+ /// Current version.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetVersionAsync()
+ {
+ return GetVersionAsync(System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Get the version of the ARF API.
+ ///
+ /// Current version.
+ /// A server side error occurred.
+ public virtual string GetVersion()
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetVersionAsync(System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Get the version of the ARF API.
+ ///
+ /// Current version.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetVersionAsync(System.Threading.CancellationToken cancellationToken)
+ {
+ var client_ = _httpClient;
+ var disposeClient_ = false;
+ try
+ {
+ using (var request_ = new System.Net.Http.HttpRequestMessage())
+ {
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "version"
+ urlBuilder_.Append("version");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Operation to retrieve all the relocalization information of one or severals WorldAnchors or Trackables.
+ ///
+ /// List of pairs consisting of UUIDs of requested World Anchors or Trackables and a mode representing the context of the requested information
+ /// the list of all trackables and his encoding structure associated representing the supported data of the User
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetRelocalizationInformationAsync(string token, System.Collections.Generic.IEnumerable uuids, System.Collections.Generic.IEnumerable capabilities)
+ {
+ return GetRelocalizationInformationAsync(token, uuids, capabilities, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Operation to retrieve all the relocalization information of one or severals WorldAnchors or Trackables.
+ ///
+ /// List of pairs consisting of UUIDs of requested World Anchors or Trackables and a mode representing the context of the requested information
+ /// the list of all trackables and his encoding structure associated representing the supported data of the User
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual Response GetRelocalizationInformation(string token, System.Collections.Generic.IEnumerable uuids, System.Collections.Generic.IEnumerable capabilities)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetRelocalizationInformationAsync(token, uuids, capabilities, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Operation to retrieve all the relocalization information of one or severals WorldAnchors or Trackables.
+ ///
+ /// List of pairs consisting of UUIDs of requested World Anchors or Trackables and a mode representing the context of the requested information
+ /// the list of all trackables and his encoding structure associated representing the supported data of the User
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetRelocalizationInformationAsync(string token, System.Collections.Generic.IEnumerable uuids, System.Collections.Generic.IEnumerable capabilities, System.Threading.CancellationToken cancellationToken)
+ {
+ if (uuids == null)
+ throw new System.ArgumentNullException("uuids");
+
+ if (capabilities == null)
+ throw new System.ArgumentNullException("capabilities");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "relocalizationInformation"
+ urlBuilder_.Append("relocalizationInformation");
+ urlBuilder_.Append('?');
+ foreach (var item_ in uuids) { urlBuilder_.Append(System.Uri.EscapeDataString("uuids")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); }
+ foreach (var item_ in capabilities) { urlBuilder_.Append(System.Uri.EscapeDataString("capabilities")).Append('=').Append(System.Uri.EscapeDataString(ConvertToString(item_, System.Globalization.CultureInfo.InvariantCulture))).Append('&'); }
+ urlBuilder_.Length--;
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Create a Trackable.
+ ///
+ ///
+ /// Create a new Trackable from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
+ ///
+ /// The Trackable to be added to the world storage.
+ /// OK, return the UUID of the Trackable defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task AddTrackableAsync(string token, Trackable body)
+ {
+ return AddTrackableAsync(token, body, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Create a Trackable.
+ ///
+ ///
+ /// Create a new Trackable from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
+ ///
+ /// The Trackable to be added to the world storage.
+ /// OK, return the UUID of the Trackable defined by the world storage.
+ /// A server side error occurred.
+ public virtual string AddTrackable(string token, Trackable body)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await AddTrackableAsync(token, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Create a Trackable.
+ ///
+ ///
+ /// Create a new Trackable from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created Trackable.
+ ///
+ /// The Trackable to be added to the world storage.
+ /// OK, return the UUID of the Trackable defined by the world storage.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task AddTrackableAsync(string token, Trackable 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));
+ 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("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "trackables"
+ urlBuilder_.Append("trackables");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ else
+ if (status_ == 201)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Bad request.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ if (status_ == 409)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ throw new ApiException("Invalid UUID, id must be a Nil value.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Modify a Trackable.
+ ///
+ ///
+ /// Modify an existing Trackable given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The Trackable to be modified in the world storage.
+ /// OK, return the UUID of the modified Trackable.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task ModifyTrackableAsync(string token, Trackable body)
+ {
+ return ModifyTrackableAsync(token, body, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Modify a Trackable.
+ ///
+ ///
+ /// Modify an existing Trackable given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The Trackable to be modified in the world storage.
+ /// OK, return the UUID of the modified Trackable.
+ /// A server side error occurred.
+ public virtual string ModifyTrackable(string token, Trackable body)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await ModifyTrackableAsync(token, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Modify a Trackable.
+ ///
+ ///
+ /// Modify an existing Trackable given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The Trackable to be modified in the world storage.
+ /// OK, return the UUID of the modified Trackable.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task ModifyTrackableAsync(string token, Trackable 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));
+ 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("PUT");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "trackables"
+ urlBuilder_.Append("trackables");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Bad request.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Return all the Trackables.
+ ///
+ ///
+ /// Get all the Trackables currently being stored in the world storage.
+ ///
+ /// OK, return all the Trackables defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task> GetTrackablesAsync(string token)
+ {
+ return GetTrackablesAsync(token, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Return all the Trackables.
+ ///
+ ///
+ /// Get all the Trackables currently being stored in the world storage.
+ ///
+ /// OK, return all the Trackables defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Collections.Generic.List GetTrackables(string token)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetTrackablesAsync(token, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Return all the Trackables.
+ ///
+ ///
+ /// Get all the Trackables currently being stored in the world storage.
+ ///
+ /// OK, return all the Trackables defined by the world storage.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task> GetTrackablesAsync(string token, System.Threading.CancellationToken cancellationToken)
+ {
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "trackables"
+ urlBuilder_.Append("trackables");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
+ }
+ else
+ if (status_ == 201)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ throw new ApiException("Null response.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Find a Trackable by its UUID.
+ ///
+ ///
+ /// Get a single Trackable stored in the world storage from its ID.
+ ///
+ /// UUID of the Trackable to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetTrackableByIdAsync(string token, System.Guid trackableUUID)
+ {
+ return GetTrackableByIdAsync(token, trackableUUID, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Find a Trackable by its UUID.
+ ///
+ ///
+ /// Get a single Trackable stored in the world storage from its ID.
+ ///
+ /// UUID of the Trackable to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual Trackable GetTrackableById(string token, System.Guid trackableUUID)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetTrackableByIdAsync(token, trackableUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Find a Trackable by its UUID.
+ ///
+ ///
+ /// Get a single Trackable stored in the world storage from its ID.
+ ///
+ /// UUID of the Trackable to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetTrackableByIdAsync(string token, System.Guid trackableUUID, System.Threading.CancellationToken cancellationToken)
+ {
+ if (trackableUUID == null)
+ throw new System.ArgumentNullException("trackableUUID");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "trackables/{trackableUUID}"
+ urlBuilder_.Append("trackables/");
+ urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(trackableUUID, System.Globalization.CultureInfo.InvariantCulture)));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Delete a Trackable.
+ ///
+ ///
+ /// Delete a single Trackable stored in the world storage from its ID.
+ ///
+ /// Trackable UUID to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task DeleteTrackableAsync(string token, System.Guid trackableUUID)
+ {
+ return DeleteTrackableAsync(token, trackableUUID, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Delete a Trackable.
+ ///
+ ///
+ /// Delete a single Trackable stored in the world storage from its ID.
+ ///
+ /// Trackable UUID to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual string DeleteTrackable(string token, System.Guid trackableUUID)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await DeleteTrackableAsync(token, trackableUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Delete a Trackable.
+ ///
+ ///
+ /// Delete a single Trackable stored in the world storage from its ID.
+ ///
+ /// Trackable UUID to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task DeleteTrackableAsync(string token, System.Guid trackableUUID, System.Threading.CancellationToken cancellationToken)
+ {
+ if (trackableUUID == null)
+ throw new System.ArgumentNullException("trackableUUID");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("DELETE");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "trackables/{trackableUUID}"
+ urlBuilder_.Append("trackables/");
+ urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(trackableUUID, System.Globalization.CultureInfo.InvariantCulture)));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Create a World Anchor.
+ ///
+ ///
+ /// Create a new World Anchor from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
+ ///
+ /// The World Anchor to be added to the world storage.
+ /// OK, return the UUID of the World Anchor defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task AddWorldAnchorAsync(string token, WorldAnchor body)
+ {
+ return AddWorldAnchorAsync(token, body, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Create a World Anchor.
+ ///
+ ///
+ /// Create a new World Anchor from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
+ ///
+ /// The World Anchor to be added to the world storage.
+ /// OK, return the UUID of the World Anchor defined by the world storage.
+ /// A server side error occurred.
+ public virtual string AddWorldAnchor(string token, WorldAnchor body)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await AddWorldAnchorAsync(token, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Create a World Anchor.
+ ///
+ ///
+ /// Create a new World Anchor from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created World Anchor.
+ ///
+ /// The World Anchor to be added to the world storage.
+ /// OK, return the UUID of the World Anchor defined by the world storage.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task AddWorldAnchorAsync(string token, WorldAnchor 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));
+ 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("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldAnchors"
+ urlBuilder_.Append("worldAnchors");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ else
+ if (status_ == 201)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Bad request.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ if (status_ == 409)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ throw new ApiException("Invalid UUID, id must be a Nil value.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Modify a World Anchor.
+ ///
+ ///
+ /// Modify an existing World Anchor given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The World Anchor to be modified in the world storage.
+ /// OK, return the UUID of the modified World Anchor.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task ModifyWorldAnchorAsync(string token, WorldAnchor body)
+ {
+ return ModifyWorldAnchorAsync(token, body, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Modify a World Anchor.
+ ///
+ ///
+ /// Modify an existing World Anchor given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The World Anchor to be modified in the world storage.
+ /// OK, return the UUID of the modified World Anchor.
+ /// A server side error occurred.
+ public virtual string ModifyWorldAnchor(string token, WorldAnchor body)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await ModifyWorldAnchorAsync(token, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Modify a World Anchor.
+ ///
+ ///
+ /// Modify an existing World Anchor given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The World Anchor to be modified in the world storage.
+ /// OK, return the UUID of the modified World Anchor.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task ModifyWorldAnchorAsync(string token, WorldAnchor 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));
+ 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("PUT");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldAnchors"
+ urlBuilder_.Append("worldAnchors");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Bad request.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Return all the World Anchors.
+ ///
+ ///
+ /// Get all the World Anchors currently being stored in the world storage.
+ ///
+ /// OK, return all the World Anchors defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task> GetWorldAnchorsAsync(string token)
+ {
+ return GetWorldAnchorsAsync(token, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Return all the World Anchors.
+ ///
+ ///
+ /// Get all the World Anchors currently being stored in the world storage.
+ ///
+ /// OK, return all the World Anchors defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Collections.Generic.List GetWorldAnchors(string token)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetWorldAnchorsAsync(token, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Return all the World Anchors.
+ ///
+ ///
+ /// Get all the World Anchors currently being stored in the world storage.
+ ///
+ /// OK, return all the World Anchors defined by the world storage.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task> GetWorldAnchorsAsync(string token, System.Threading.CancellationToken cancellationToken)
+ {
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldAnchors"
+ urlBuilder_.Append("worldAnchors");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
+ }
+ else
+ if (status_ == 201)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ throw new ApiException("Null response.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Find a World Anchor by its UUID.
+ ///
+ ///
+ /// Get a single World Anchor stored in the world storage from its ID.
+ ///
+ /// UUID of the World Anchor to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetWorldAnchorByIdAsync(string token, System.Guid worldAnchorUUID)
+ {
+ return GetWorldAnchorByIdAsync(token, worldAnchorUUID, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Find a World Anchor by its UUID.
+ ///
+ ///
+ /// Get a single World Anchor stored in the world storage from its ID.
+ ///
+ /// UUID of the World Anchor to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual WorldAnchor GetWorldAnchorById(string token, System.Guid worldAnchorUUID)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetWorldAnchorByIdAsync(token, worldAnchorUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Find a World Anchor by its UUID.
+ ///
+ ///
+ /// Get a single World Anchor stored in the world storage from its ID.
+ ///
+ /// UUID of the World Anchor to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetWorldAnchorByIdAsync(string token, System.Guid worldAnchorUUID, System.Threading.CancellationToken cancellationToken)
+ {
+ if (worldAnchorUUID == null)
+ throw new System.ArgumentNullException("worldAnchorUUID");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldAnchors/{worldAnchorUUID}"
+ urlBuilder_.Append("worldAnchors/");
+ urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(worldAnchorUUID, System.Globalization.CultureInfo.InvariantCulture)));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Delete a World Anchor.
+ ///
+ ///
+ /// Delete a single World Anchor stored in the world storage from its ID.
+ ///
+ /// World Anchor UUID to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task DeleteWorldAnchorAsync(string token, System.Guid worldAnchorUUID)
+ {
+ return DeleteWorldAnchorAsync(token, worldAnchorUUID, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Delete a World Anchor.
+ ///
+ ///
+ /// Delete a single World Anchor stored in the world storage from its ID.
+ ///
+ /// World Anchor UUID to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual string DeleteWorldAnchor(string token, System.Guid worldAnchorUUID)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await DeleteWorldAnchorAsync(token, worldAnchorUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Delete a World Anchor.
+ ///
+ ///
+ /// Delete a single World Anchor stored in the world storage from its ID.
+ ///
+ /// World Anchor UUID to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task DeleteWorldAnchorAsync(string token, System.Guid worldAnchorUUID, System.Threading.CancellationToken cancellationToken)
+ {
+ if (worldAnchorUUID == null)
+ throw new System.ArgumentNullException("worldAnchorUUID");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("DELETE");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldAnchors/{worldAnchorUUID}"
+ urlBuilder_.Append("worldAnchors/");
+ urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(worldAnchorUUID, System.Globalization.CultureInfo.InvariantCulture)));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Create a World Link between elements (world anchors and/or trackables).
+ ///
+ ///
+ /// Create a new World Link from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
+ ///
+ /// The link to be added to the world storage.
+ /// OK, return the UUID of the World Link defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task AddWorldLinkAsync(string token, WorldLink body)
+ {
+ return AddWorldLinkAsync(token, body, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Create a World Link between elements (world anchors and/or trackables).
+ ///
+ ///
+ /// Create a new World Link from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
+ ///
+ /// The link to be added to the world storage.
+ /// OK, return the UUID of the World Link defined by the world storage.
+ /// A server side error occurred.
+ public virtual string AddWorldLink(string token, WorldLink body)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await AddWorldLinkAsync(token, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Create a World Link between elements (world anchors and/or trackables).
+ ///
+ ///
+ /// Create a new World Link from a json object containing all the required information and add it to the world storage. <br>As a result you will get the ID of the newly created World Link.
+ ///
+ /// The link to be added to the world storage.
+ /// OK, return the UUID of the World Link defined by the world storage.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task AddWorldLinkAsync(string token, WorldLink 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));
+ 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("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldLinks"
+ urlBuilder_.Append("worldLinks");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ else
+ if (status_ == 201)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Bad request.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ if (status_ == 409)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ throw new ApiException("Invalid UUID, id must be a Nil value.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Modify a World Link.
+ ///
+ ///
+ /// Modify an existing World Link given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The World Link to be modified in the world storage.
+ /// OK, return the UUID of the modified World Link.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task ModifyWorldLinkAsync(string token, WorldLink body)
+ {
+ return ModifyWorldLinkAsync(token, body, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Modify a World Link.
+ ///
+ ///
+ /// Modify an existing World Link given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The World Link to be modified in the world storage.
+ /// OK, return the UUID of the modified World Link.
+ /// A server side error occurred.
+ public virtual string ModifyWorldLink(string token, WorldLink body)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await ModifyWorldLinkAsync(token, body, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Modify a World Link.
+ ///
+ ///
+ /// Modify an existing World Link given a json object containing all the required information. <br> **Please note that ID of the object is required in the JSON**
+ ///
+ /// The World Link to be modified in the world storage.
+ /// OK, return the UUID of the modified World Link.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task ModifyWorldLinkAsync(string token, WorldLink 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));
+ 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("PUT");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldLinks"
+ urlBuilder_.Append("worldLinks");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Bad request.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Return all World Links.
+ ///
+ ///
+ /// Get all the World Links currently being stored in the world storage.
+ ///
+ /// OK return all the World Links defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task> GetWorldLinksAsync(string token)
+ {
+ return GetWorldLinksAsync(token, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Return all World Links.
+ ///
+ ///
+ /// Get all the World Links currently being stored in the world storage.
+ ///
+ /// OK return all the World Links defined by the world storage.
+ /// A server side error occurred.
+ public virtual System.Collections.Generic.List GetWorldLinks(string token)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetWorldLinksAsync(token, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Return all World Links.
+ ///
+ ///
+ /// Get all the World Links currently being stored in the world storage.
+ ///
+ /// OK return all the World Links defined by the world storage.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task> GetWorldLinksAsync(string token, System.Threading.CancellationToken cancellationToken)
+ {
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldLinks"
+ urlBuilder_.Append("worldLinks");
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync>(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new ApiException("Response was null which was not expected.", status_, objectResponse_.Text, headers_, null);
+ }
+ return objectResponse_.Object;
+ }
+ else
+ if (status_ == 201)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ throw new ApiException("Null response.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(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("Unexpected error.", status_, objectResponse_.Text, headers_, objectResponse_.Object, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Find a World Link by its UUID.
+ ///
+ ///
+ /// Get a single World Link stored in the world storage from its ID.
+ ///
+ /// UUID of the World Link to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task GetWorldLinkByIdAsync(string token, System.Guid worldLinkUUID)
+ {
+ return GetWorldLinkByIdAsync(token, worldLinkUUID, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Find a World Link by its UUID.
+ ///
+ ///
+ /// Get a single World Link stored in the world storage from its ID.
+ ///
+ /// UUID of the World Link to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual WorldLink GetWorldLinkById(string token, System.Guid worldLinkUUID)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await GetWorldLinkByIdAsync(token, worldLinkUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Find a World Link by its UUID.
+ ///
+ ///
+ /// Get a single World Link stored in the world storage from its ID.
+ ///
+ /// UUID of the World Link to retrieve.
+ /// Successful operation.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task GetWorldLinkByIdAsync(string token, System.Guid worldLinkUUID, System.Threading.CancellationToken cancellationToken)
+ {
+ if (worldLinkUUID == null)
+ throw new System.ArgumentNullException("worldLinkUUID");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("GET");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("application/json"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldLinks/{worldLinkUUID}"
+ urlBuilder_.Append("worldLinks/");
+ urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(worldLinkUUID, System.Globalization.CultureInfo.InvariantCulture)));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var objectResponse_ = await ReadObjectResponseAsync(response_, headers_, cancellationToken).ConfigureAwait(false);
+ if (objectResponse_.Object == null)
+ {
+ throw new 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ ///
+ /// Delete a World Link.
+ ///
+ ///
+ /// Delete a single World Link stored in the world storage from its ID.
+ ///
+ /// World Link id to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual System.Threading.Tasks.Task DeleteWorldLinkAsync(string token, System.Guid worldLinkUUID)
+ {
+ return DeleteWorldLinkAsync(token, worldLinkUUID, System.Threading.CancellationToken.None);
+ }
+
+ ///
+ /// Delete a World Link.
+ ///
+ ///
+ /// Delete a single World Link stored in the world storage from its ID.
+ ///
+ /// World Link id to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual string DeleteWorldLink(string token, System.Guid worldLinkUUID)
+ {
+ return System.Threading.Tasks.Task.Run(async () => await DeleteWorldLinkAsync(token, worldLinkUUID, System.Threading.CancellationToken.None)).GetAwaiter().GetResult();
+ }
+
+ /// A cancellation token that can be used by other objects or threads to receive notice of cancellation.
+ ///
+ /// Delete a World Link.
+ ///
+ ///
+ /// Delete a single World Link stored in the world storage from its ID.
+ ///
+ /// World Link id to delete.
+ /// OK, delete successful.
+ /// A server side error occurred.
+ public virtual async System.Threading.Tasks.Task DeleteWorldLinkAsync(string token, System.Guid worldLinkUUID, System.Threading.CancellationToken cancellationToken)
+ {
+ if (worldLinkUUID == null)
+ throw new System.ArgumentNullException("worldLinkUUID");
+
+ 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));
+ request_.Method = new System.Net.Http.HttpMethod("DELETE");
+ request_.Headers.Accept.Add(System.Net.Http.Headers.MediaTypeWithQualityHeaderValue.Parse("text/plain"));
+
+ var urlBuilder_ = new System.Text.StringBuilder();
+
+ // Operation Path: "worldLinks/{worldLinkUUID}"
+ urlBuilder_.Append("worldLinks/");
+ urlBuilder_.Append(System.Uri.EscapeDataString(ConvertToString(worldLinkUUID, System.Globalization.CultureInfo.InvariantCulture)));
+
+ PrepareRequest(client_, request_, urlBuilder_);
+
+ var url_ = urlBuilder_.ToString();
+ request_.RequestUri = new System.Uri(url_, System.UriKind.RelativeOrAbsolute);
+
+ PrepareRequest(client_, request_, url_);
+
+ var response_ = await client_.SendAsync(request_, System.Net.Http.HttpCompletionOption.ResponseHeadersRead, cancellationToken).ConfigureAwait(false);
+ var disposeResponse_ = true;
+ try
+ {
+ var headers_ = new System.Collections.Generic.Dictionary>();
+ foreach (var item_ in response_.Headers)
+ headers_[item_.Key] = item_.Value;
+ if (response_.Content != null && response_.Content.Headers != null)
+ {
+ foreach (var item_ in response_.Content.Headers)
+ headers_[item_.Key] = item_.Value;
+ }
+
+ ProcessResponse(client_, response_);
+
+ var status_ = (int)response_.StatusCode;
+ if (status_ == 200)
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ var result_ = (string)System.Convert.ChangeType(responseData_, typeof(string));
+ return result_;
+ }
+ 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("Invalid UUID supplied.", 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("Not found, could not find UUID in database.", status_, responseData_, headers_, result_, null);
+ }
+ else
+ {
+ var responseData_ = response_.Content == null ? null : await response_.Content.ReadAsStringAsync().ConfigureAwait(false);
+ throw new ApiException("The HTTP status code of the response was not expected (" + status_ + ").", status_, responseData_, headers_, null);
+ }
+ }
+ finally
+ {
+ if (disposeResponse_)
+ response_.Dispose();
+ }
+ }
+ }
+ finally
+ {
+ if (disposeClient_)
+ client_.Dispose();
+ }
+ }
+
+ protected struct ObjectResponseResult
+ {
+ public ObjectResponseResult(T responseObject, string responseText)
+ {
+ this.Object = responseObject;
+ this.Text = responseText;
+ }
+
+ public T Object { get; }
+
+ public string Text { get; }
+ }
+
+ public bool ReadResponseAsString { get; set; }
+
+ protected virtual async System.Threading.Tasks.Task> ReadObjectResponseAsync(System.Net.Http.HttpResponseMessage response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Threading.CancellationToken cancellationToken)
+ {
+ if (response == null || response.Content == null)
+ {
+ return new ObjectResponseResult(default(T), string.Empty);
+ }
+
+ if (ReadResponseAsString)
+ {
+ var responseText = await response.Content.ReadAsStringAsync().ConfigureAwait(false);
+ try
+ {
+ var typedBody = Newtonsoft.Json.JsonConvert.DeserializeObject(responseText, JsonSerializerSettings);
+ return new ObjectResponseResult(typedBody, responseText);
+ }
+ catch (Newtonsoft.Json.JsonException exception)
+ {
+ var message = "Could not deserialize the response body string as " + typeof(T).FullName + ".";
+ throw new ApiException(message, (int)response.StatusCode, responseText, headers, exception);
+ }
+ }
+ else
+ {
+ try
+ {
+ using (var responseStream = await response.Content.ReadAsStreamAsync().ConfigureAwait(false))
+ using (var streamReader = new System.IO.StreamReader(responseStream))
+ using (var jsonTextReader = new Newtonsoft.Json.JsonTextReader(streamReader))
+ {
+ var serializer = Newtonsoft.Json.JsonSerializer.Create(JsonSerializerSettings);
+ var typedBody = serializer.Deserialize(jsonTextReader);
+ return new ObjectResponseResult(typedBody, string.Empty);
+ }
+ }
+ catch (Newtonsoft.Json.JsonException exception)
+ {
+ var message = "Could not deserialize the response body stream as " + typeof(T).FullName + ".";
+ throw new ApiException(message, (int)response.StatusCode, string.Empty, headers, exception);
+ }
+ }
+ }
+
+ private string ConvertToString(object value, System.Globalization.CultureInfo cultureInfo)
+ {
+ if (value == null)
+ {
+ return "";
+ }
+
+ if (value is System.Enum)
+ {
+ var name = System.Enum.GetName(value.GetType(), value);
+ if (name != null)
+ {
+ var field = System.Reflection.IntrospectionExtensions.GetTypeInfo(value.GetType()).GetDeclaredField(name);
+ if (field != null)
+ {
+ var attribute = System.Reflection.CustomAttributeExtensions.GetCustomAttribute(field, typeof(System.Runtime.Serialization.EnumMemberAttribute))
+ as System.Runtime.Serialization.EnumMemberAttribute;
+ if (attribute != null)
+ {
+ return attribute.Value != null ? attribute.Value : name;
+ }
+ }
+
+ var converted = System.Convert.ToString(System.Convert.ChangeType(value, System.Enum.GetUnderlyingType(value.GetType()), cultureInfo));
+ return converted == null ? string.Empty : converted;
+ }
+ }
+ else if (value is bool)
+ {
+ return System.Convert.ToString((bool)value, cultureInfo).ToLowerInvariant();
+ }
+ else if (value is byte[])
+ {
+ return System.Convert.ToBase64String((byte[]) value);
+ }
+ else if (value is string[])
+ {
+ return string.Join(",", (string[])value);
+ }
+ else if (value.GetType().IsArray)
+ {
+ var valueArray = (System.Array)value;
+ var valueTextArray = new string[valueArray.Length];
+ for (var i = 0; i < valueArray.Length; i++)
+ {
+ valueTextArray[i] = ConvertToString(valueArray.GetValue(i), cultureInfo);
+ }
+ return string.Join(",", valueTextArray);
+ }
+
+ var result = System.Convert.ToString(value, cultureInfo);
+ return result == null ? "" : result;
+ }
+ }
+
+ ///
+ /// An element representing all information needed in relation with a Trackable or a WorldAnchor.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class RelocalizationInformation
+ {
+ ///
+ /// The UUID of the original WorldAnchor or the Trackable requested.
+ ///
+ [Newtonsoft.Json.JsonProperty("requestUUID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Guid RequestUUID { get; set; }
+
+ ///
+ /// an array with trackables and their transforms linking them to the requestUUID element.
+ ///
+ [Newtonsoft.Json.JsonProperty("relocObjects", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Collections.Generic.ICollection RelocObjects { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// An element representing a Trackable object in the real world.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Trackable
+ {
+ ///
+ /// An Universally Unique IDentifier identifying the Trackable (RFC 4122).
+ ///
+ [Newtonsoft.Json.JsonProperty("UUID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Guid UUID { get; set; }
+
+ ///
+ /// A human readable name for the Trackable.
+ ///
+ [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)]
+ public string Name { get; set; }
+
+ ///
+ /// An Universally Unique IDentifier identifying the creator of the Trackable (a person, a team or a company).
+ ///
+ [Newtonsoft.Json.JsonProperty("creatorUUID", Required = Newtonsoft.Json.Required.Always)]
+ public System.Guid CreatorUUID { get; set; }
+
+ ///
+ /// Extensible list of Trackable types, possibly handled by complient world storage implementation.
+ ///
+ [Newtonsoft.Json.JsonProperty("trackableType", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public TrackableType TrackableType { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("trackableEncodingInformation", Required = Newtonsoft.Json.Required.Always)]
+ public EncodingInformationStructure TrackableEncodingInformation { get; set; }
+
+ ///
+ /// The data provided to create the Trackable in a specific format handled by the world storage service.
+ ///
+ [Newtonsoft.Json.JsonProperty("trackablePayload", Required = Newtonsoft.Json.Required.Always)]
+ public byte[] TrackablePayload { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("localCRS", Required = Newtonsoft.Json.Required.Always)]
+ public Transform3D LocalCRS { get; set; } = new Transform3D();
+
+ [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public UnitSystem Unit { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("trackableSize", Required = Newtonsoft.Json.Required.Always)]
+ public Size TrackableSize { get; set; } = new Size();
+
+ [Newtonsoft.Json.JsonProperty("keyvalueTags", Required = Newtonsoft.Json.Required.Always)]
+ public KeyvalueTagList KeyvalueTags { get; set; } = new KeyvalueTagList();
+
+ [Newtonsoft.Json.JsonProperty("confidence", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public double Confidence { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// An element describing a pose in the world graph.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class WorldAnchor
+ {
+ ///
+ /// An Universally Unique IDentifier identifying the World Anchor (RFC 4122).
+ ///
+ [Newtonsoft.Json.JsonProperty("UUID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Guid UUID { get; set; }
+
+ ///
+ /// A human readable name for the World Anchor.
+ ///
+ [Newtonsoft.Json.JsonProperty("name", Required = Newtonsoft.Json.Required.Always)]
+ public string Name { get; set; }
+
+ ///
+ /// An Universally Unique IDentifier identifying the creator of the World Anchor.
+ ///
+ [Newtonsoft.Json.JsonProperty("creatorUUID", Required = Newtonsoft.Json.Required.Always)]
+ public System.Guid CreatorUUID { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("localCRS", Required = Newtonsoft.Json.Required.Always)]
+ public Transform3D LocalCRS { get; set; } = new Transform3D();
+
+ [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public UnitSystem Unit { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("worldAnchorSize", Required = Newtonsoft.Json.Required.Always)]
+ public Size WorldAnchorSize { get; set; } = new Size();
+
+ [Newtonsoft.Json.JsonProperty("keyvalueTags", Required = Newtonsoft.Json.Required.Always)]
+ public KeyvalueTagList KeyvalueTags { get; set; } = new KeyvalueTagList();
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// An object holding the info of a transform between two elements.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class WorldLink
+ {
+ ///
+ /// An Universally Unique IDentifier identifying the World Link (RFC 4122).
+ ///
+ [Newtonsoft.Json.JsonProperty("UUID", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Guid UUID { get; set; }
+
+ ///
+ /// An Universally Unique IDentifier identifying the creator of the World Link.
+ ///
+ [Newtonsoft.Json.JsonProperty("creatorUUID", Required = Newtonsoft.Json.Required.Always)]
+ public System.Guid CreatorUUID { get; set; }
+
+ ///
+ /// An Universally Unique IDentifier identifying a World Anchor or Trackable.
+ ///
+ [Newtonsoft.Json.JsonProperty("UUIDFrom", Required = Newtonsoft.Json.Required.Always)]
+ public System.Guid UUIDFrom { get; set; }
+
+ ///
+ /// An Universally Unique IDentifier identifying a World Anchor or Trackable.
+ ///
+ [Newtonsoft.Json.JsonProperty("UUIDTo", Required = Newtonsoft.Json.Required.Always)]
+ public System.Guid UUIDTo { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("typeFrom", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public TypeWorldStorage TypeFrom { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("typeTo", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public TypeWorldStorage TypeTo { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("transform", Required = Newtonsoft.Json.Required.Always)]
+ public Transform3D Transform { get; set; } = new Transform3D();
+
+ [Newtonsoft.Json.JsonProperty("unit", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public UnitSystem Unit { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("keyvalueTags", Required = Newtonsoft.Json.Required.Always)]
+ public KeyvalueTagList KeyvalueTags { get; set; } = new KeyvalueTagList();
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// List of additional parameters to be stored with the object.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class KeyvalueTagList : System.Collections.Generic.Dictionary>
+ {
+
+ }
+
+ ///
+ /// An object representing a supported capability of the World Analysis and its associated metadata
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.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)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public CapabilityTrackableType TrackableType { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("encodingInformation", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public EncodingInformationStructure EncodingInformation { get; set; }
+
+ ///
+ /// Number of frames per second the tracking of this type of trackable is performed by the World Analysis
+ ///
+ [Newtonsoft.Json.JsonProperty("framerate", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public double Framerate { get; set; }
+
+ ///
+ /// Mean tracking latency in milliseconds for this type of trackable
+ ///
+ [Newtonsoft.Json.JsonProperty("latency", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public double Latency { get; set; }
+
+ ///
+ /// Accuracy score for the detection of this type of Trackable by the World Analysis
+ ///
+ [Newtonsoft.Json.JsonProperty("accuracy", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public double Accuracy { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// An object holding the info of a Trackable`'`s encoding information `:` the data format and the version.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class EncodingInformationStructure
+ {
+ ///
+ /// Identifier of the target framework.
+ ///
+ [Newtonsoft.Json.JsonProperty("dataFormat", Required = Newtonsoft.Json.Required.Always)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public EncodingInformationStructureDataFormat DataFormat { get; set; }
+
+ ///
+ /// The version of the format
+ ///
+ [Newtonsoft.Json.JsonProperty("version", Required = Newtonsoft.Json.Required.Always)]
+ public string Version { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.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)]
+ public string Message { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ ///
+ /// Mode representing the context of the relocalization information (AR device to WorldAnchor/Trackable or WorldAnchor/Trackable to AR device)
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum Mode_WorldStorage
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"TRACKABLES_TO_REQUEST")]
+ TRACKABLES_TO_REQUEST = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"REQUEST_TO_TRACKABLES")]
+ REQUEST_TO_TRACKABLES = 1,
+
+ }
+
+ ///
+ /// Size object in format {width, length, depth}.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Size : System.Collections.ObjectModel.Collection
+ {
+
+ }
+
+ ///
+ /// Coordinate reference system of the world anchor, a 4*4 matrix (rowmajor) represented by a float vector.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Transform3D : System.Collections.ObjectModel.Collection
+ {
+
+ }
+
+ ///
+ /// Trackable or Anchor
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum TypeWorldStorage
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"TRACKABLE")]
+ TRACKABLE = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"ANCHOR")]
+ ANCHOR = 1,
+
+ }
+
+ ///
+ /// Unit of length.
+ ///
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum UnitSystem
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"MM")]
+ MM = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"CM")]
+ CM = 1,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"DM")]
+ DM = 2,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"M")]
+ M = 3,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"DAM")]
+ DAM = 4,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"HM")]
+ HM = 5,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"KM")]
+ KM = 6,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"INCH")]
+ INCH = 7,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"FOOT")]
+ FOOT = 8,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"YARD")]
+ YARD = 9,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"MILE")]
+ MILE = 10,
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Anonymous
+ {
+ [Newtonsoft.Json.JsonProperty("uuid", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Guid Uuid { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("mode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public Mode_WorldStorage Mode { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class Response
+ {
+ [Newtonsoft.Json.JsonProperty("RelocInfo", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public System.Collections.Generic.ICollection RelocInfo { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class RelocObjects
+ {
+ [Newtonsoft.Json.JsonProperty("trackable", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public Trackable Trackable { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("Transform3D", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ public Transform3D Transform3D { get; set; }
+
+ [Newtonsoft.Json.JsonProperty("mode", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
+ [Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
+ public Mode_WorldStorage Mode { get; set; }
+
+ private System.Collections.Generic.IDictionary _additionalProperties;
+
+ [Newtonsoft.Json.JsonExtensionData]
+ public System.Collections.Generic.IDictionary AdditionalProperties
+ {
+ get { return _additionalProperties ?? (_additionalProperties = new System.Collections.Generic.Dictionary()); }
+ set { _additionalProperties = value; }
+ }
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum TrackableType
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"FIDUCIAL_MARKER")]
+ FIDUCIAL_MARKER = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"IMAGE_MARKER")]
+ IMAGE_MARKER = 1,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"MAP")]
+ MAP = 2,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"GEOPOSE")]
+ GEOPOSE = 3,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"OTHER")]
+ OTHER = 4,
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum CapabilityTrackableType
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"FIDUCIAL_MARKER")]
+ FIDUCIAL_MARKER = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"IMAGE_MARKER")]
+ IMAGE_MARKER = 1,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"MAP")]
+ MAP = 2,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"GEOPOSE")]
+ GEOPOSE = 3,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"OTHER")]
+ OTHER = 4,
+
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public enum EncodingInformationStructureDataFormat
+ {
+
+ [System.Runtime.Serialization.EnumMember(Value = @"HOLOLENS")]
+ HOLOLENS = 0,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"ARKIT")]
+ ARKIT = 1,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"ARCORE")]
+ ARCORE = 2,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"VUFORIA")]
+ VUFORIA = 3,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"ARUCO")]
+ ARUCO = 4,
+
+ [System.Runtime.Serialization.EnumMember(Value = @"OTHER")]
+ OTHER = 5,
+
+ }
+
+
+
+ [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class ApiException : System.Exception
+ {
+ public int StatusCode { get; private set; }
+
+ public string Response { get; private set; }
+
+ public System.Collections.Generic.IReadOnlyDictionary> Headers { get; private set; }
+
+ public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, System.Exception innerException)
+ : base(message + "\n\nStatus: " + statusCode + "\nResponse: \n" + ((response == null) ? "(null)" : response.Substring(0, response.Length >= 512 ? 512 : response.Length)), innerException)
+ {
+ StatusCode = statusCode;
+ Response = response;
+ Headers = headers;
+ }
+
+ public override string ToString()
+ {
+ return string.Format("HTTP Response: \n\n{0}\n\n{1}", Response, base.ToString());
+ }
+ }
+
+ [System.CodeDom.Compiler.GeneratedCode("NSwag", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
+ public partial class ApiException : ApiException
+ {
+ public TResult Result { get; private set; }
+
+ public ApiException(string message, int statusCode, string response, System.Collections.Generic.IReadOnlyDictionary> headers, TResult result, System.Exception innerException)
+ : base(message, statusCode, response, headers, innerException)
+ {
+ Result = result;
+ }
+ }
+
+}
+
+#pragma warning restore 108
+#pragma warning restore 114
+#pragma warning restore 472
+#pragma warning restore 612
+#pragma warning restore 1573
+#pragma warning restore 1591
+#pragma warning restore 8073
+#pragma warning restore 3016
+#pragma warning restore 8603
+#pragma warning restore 8604
+#pragma warning restore 8625
\ No newline at end of file
diff --git a/Assets/Runtime/OpenAPI/Generated/WorldStorageOpenAPI.cs.meta b/Assets/Runtime/OpenAPI/Generated/WorldStorageOpenAPI.cs.meta
new file mode 100644
index 0000000000000000000000000000000000000000..440047cfd07043e732f7eef7dd646c30e37ce17a
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/Generated/WorldStorageOpenAPI.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 30c641ff7728b7749a30c1076c101b4f
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/OpenAPI/ResponseObject.cs b/Assets/Runtime/OpenAPI/ResponseObject.cs
new file mode 100644
index 0000000000000000000000000000000000000000..4e6ffb7795ceea595d3262d53080a6b6a10ef7aa
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/ResponseObject.cs
@@ -0,0 +1,63 @@
+// The Fraunhofer HHI Unity Framework
+// ___________ .__ _____ ___ ___ ___ ___ .___
+// \_ _____/___________ __ __ ____ | |__ _____/ ____\___________ / | \ / | \| |
+// | __) \_ __ \__ \ | | \/ \| | \ / _ \ __\/ __ \_ __ \ / ~ \/ ~ \ |
+// | \ | | \// __ \| | / | \ Y ( <_> ) | \ ___/| | \/ \ Y /\ Y / |
+// \___ / |__| (____ /____/|___| /___| /\____/|__| \___ >__| \___|_ / \___|_ /|___|
+// \/ \/ \/ \/ \/ \/ \/
+// (C) Fraunhofer HHI, 2024
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Threading;
+using UnityEngine;
+
+namespace ETSI.ARF.OpenAPI
+{
+ public class ResponseObject
+ {
+ // Management stuffs
+ static int ID = 0;
+ public int transactionId = 0;
+ public string message = ""; // custom message, type of data...
+
+ // Time monitoring
+ public TimeSpan DeltaTime { get => responseTime - requestTime; }
+ public DateTime requestTime;
+ public DateTime responseTime;
+
+ // Incoming data
+ public T result;
+ public int payload; // size of data
+
+ //public string result = ""; // text result
+ //public object data = null; // custom result
+
+ // Callback
+ public Action> callback;
+
+ // Task cancelllation
+ public CancellationToken cancellationToken { get => ct; }
+ private CancellationTokenSource tokenSource;
+ private CancellationToken ct;
+
+
+ public ResponseObject(string msg, Action> func = null)
+ {
+ requestTime = DateTime.Now;
+ transactionId = ++ID;
+ message = msg;
+
+ callback = func;
+
+ tokenSource = new CancellationTokenSource();
+ ct = tokenSource.Token;
+ }
+
+ public void Cancel()
+ {
+ tokenSource.Cancel();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Runtime/OpenAPI/ResponseObject.cs.meta b/Assets/Runtime/OpenAPI/ResponseObject.cs.meta
new file mode 100644
index 0000000000000000000000000000000000000000..de0ee81cad532018e112632791e0b7cf68a47824
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/ResponseObject.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 05f85f41b6c493447aa7915699cae696
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/OpenAPI/UnityWebRequestHttpClient.cs b/Assets/Runtime/OpenAPI/UnityWebRequestHttpClient.cs
new file mode 100644
index 0000000000000000000000000000000000000000..b0a847cb9db90410f41118a0a1f466380adec98f
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/UnityWebRequestHttpClient.cs
@@ -0,0 +1,170 @@
+// Depends on UniTask to support cancellation token and GetAwaiter: https://github.com/Cysharp/UniTask
+// Otherwise, the code can be adapted using https://gist.github.com/krzys-h/9062552e33dd7bd7fe4a6c12db109a1a
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Net.Http.Headers;
+using System.Threading;
+using System.Threading.Tasks;
+//using Cysharp.Threading.Tasks;
+
+using UnityEngine;
+using UnityEngine.Networking;
+
+namespace ETSI.ARF.OpenAPI
+{
+ public interface IHttpClient
+ {
+ public Uri BaseAddress { get; set; }
+ public HttpRequestHeaders DefaultRequestHeaders { get; }
+
+ public Task SendAsync(HttpRequestMessage message, HttpCompletionOption option,
+ CancellationToken token);
+
+ public void Dispose();
+ }
+
+ public class UnityWebRequestHttpClient : IHttpClient
+ {
+ public UnityWebRequestHttpClient() { }
+
+ public UnityWebRequestHttpClient(string baseUri)
+ {
+ BaseAddress = new Uri(baseUri);
+ }
+
+ public UnityWebRequestHttpClient(Uri baseUri)
+ {
+ BaseAddress = baseUri;
+ }
+
+ public Uri BaseAddress { get; set; }
+ public HttpRequestHeaders DefaultRequestHeaders => _httpClient.DefaultRequestHeaders;
+
+ private readonly HttpClient _httpClient = new HttpClient();
+
+ public async Task SendAsync(HttpRequestMessage message, HttpCompletionOption option, CancellationToken token)
+ {
+ var content = await (message.Content?.ReadAsStringAsync() ?? Task.FromResult(""));
+ var webRequest = GetUnityWebRequest(message.Method.Method, message.RequestUri, content);
+
+ AppendHeaders(webRequest);
+
+ Debug.Log("[HTTP] Request " + webRequest.uri.ToString());
+ try
+ {
+ //SylR
+ webRequest.SendWebRequest();
+ while (!webRequest.isDone)
+ {
+ if (token.IsCancellationRequested)
+ {
+ Debug.Log($"Task '{ message.RequestUri }' cancelled");
+ token.ThrowIfCancellationRequested();
+ }
+ await Task.Yield();
+ }
+
+ //await webRequest
+ // .SendWebRequest()
+ // .WithCancellation(cancellationToken: token);
+ }
+ catch (Exception)
+ {
+ webRequest.Dispose();
+ throw;
+ }
+
+ Debug.Log("[HTTP] Result: " + webRequest.result.ToString());
+
+ var responseMessage = CreateHttpResponseMessage(webRequest);
+ webRequest.Dispose();
+
+ Debug.Log("[HTTP] Response len: " + responseMessage.Content.Headers.ContentLength);
+
+ return responseMessage;
+ }
+
+ public void Dispose()
+ {
+ _httpClient.Dispose();
+ DefaultRequestHeaders.Clear();
+ BaseAddress = null;
+ }
+
+ private UnityWebRequest GetUnityWebRequest(string method, Uri endpoint, string content = "")
+ {
+ var requestUri = BaseAddress.AbsoluteUri + endpoint;
+ var webRequest = UnityWebRequest.Get(requestUri);
+ webRequest.method = method;
+
+ webRequest.disposeUploadHandlerOnDispose = true;
+ webRequest.disposeDownloadHandlerOnDispose = true;
+
+ if (!string.IsNullOrEmpty(content))
+ {
+ var data = new System.Text.UTF8Encoding().GetBytes(content);
+ webRequest.uploadHandler = new UploadHandlerRaw(data);
+ webRequest.SetRequestHeader("Content-Type", "application/json");
+ //webRequest.SetRequestHeader("Content-Type", "image/jpeg");
+ }
+ return webRequest;
+ }
+
+ private void AppendHeaders(UnityWebRequest webRequest)
+ {
+ using var enumerator = DefaultRequestHeaders.GetEnumerator();
+
+ while (enumerator.MoveNext())
+ {
+ var (key, value) = enumerator.Current;
+ webRequest.SetRequestHeader(key, value.First());
+ }
+ }
+
+ private HttpResponseMessage CreateHttpResponseMessage(UnityWebRequest webRequest)
+ {
+ var responseContent = webRequest.downloadHandler?.text;
+
+ var response = new HttpResponseMessage();
+ response.Content = new StringContent(responseContent);
+ response.StatusCode = (HttpStatusCode)webRequest.responseCode;
+
+ Dictionary headers = webRequest.GetResponseHeaders();
+
+ if (headers != null)
+ {
+ Debug.Log("[HTTP] Header: " + headers.Count.ToString());
+ foreach (var h in headers)
+ {
+ switch (h.Key.ToLower().Trim())
+ {
+ case "content-type":
+ {
+ var trimmed = h.Value.ToLower().Split(";").FirstOrDefault();
+ response.Content.Headers.ContentType = new MediaTypeHeaderValue(trimmed);
+ break;
+ }
+ case "content-length":
+ response.Content.Headers.ContentLength = long.Parse(h.Value);
+ break;
+
+ default:
+ if (h.Value == "gzip")
+ {
+ // bug???
+ }
+ else
+ response.Headers.Add(h.Key, h.Value);
+ break;
+ }
+ }
+ }
+ return response;
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/Assets/Runtime/OpenAPI/UnityWebRequestHttpClient.cs.meta b/Assets/Runtime/OpenAPI/UnityWebRequestHttpClient.cs.meta
new file mode 100644
index 0000000000000000000000000000000000000000..47e0b46229f979b9b8232f4c0f048632706357fa
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/UnityWebRequestHttpClient.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 5ebca3dbe45f9b34bb21cbedd07084eb
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/OpenAPI/WorldStorageClient.cs b/Assets/Runtime/OpenAPI/WorldStorageClient.cs
new file mode 100644
index 0000000000000000000000000000000000000000..fd665702cc48024042328416b67a8bc5fec99adf
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/WorldStorageClient.cs
@@ -0,0 +1,52 @@
+//
+// ARF - Augmented Reality Framework (ETSI ISG ARF)
+//
+// Copyright 2024 ETSI
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Last change: March 2024
+//
+
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Networking;
+
+namespace ETSI.ARF.OpenAPI.WorldStorage
+{
+ // SylR
+ public partial class WorldStorageClient
+ {
+ public string lastJsonText;
+ public long lastPayload;
+
+ partial void PrepareRequest(IHttpClient client, System.Net.Http.HttpRequestMessage request, string url)
+ {
+ // If needed to make some special things !!!
+ }
+
+ partial void PrepareRequest(IHttpClient client, System.Net.Http.HttpRequestMessage request, System.Text.StringBuilder urlBuilder)
+ {
+ // do something...
+ }
+
+ partial void ProcessResponse(IHttpClient client, System.Net.Http.HttpResponseMessage response)
+ {
+ lastJsonText = response.Content.ReadAsStringAsync().Result.ToString();
+ lastPayload = response.Content.Headers.ContentLength.Value;
+
+ // If needed to make some special things !!!
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Runtime/OpenAPI/WorldStorageClient.cs.meta b/Assets/Runtime/OpenAPI/WorldStorageClient.cs.meta
new file mode 100644
index 0000000000000000000000000000000000000000..cf76ff91dbde591b3aaf1708e13eadf6004eeff9
--- /dev/null
+++ b/Assets/Runtime/OpenAPI/WorldStorageClient.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: dfde2d8d63991f04bb94b071252aba6d
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/REST/AdminRequest.cs b/Assets/Runtime/REST/AdminRequest.cs
index 9cfdb2d369d661b8bb331afa73e49f8bf6fdb3b7..26ae06d3ed0695c9a7b35e2a64b8e0916af61b0f 100644
--- a/Assets/Runtime/REST/AdminRequest.cs
+++ b/Assets/Runtime/REST/AdminRequest.cs
@@ -1,7 +1,7 @@
//
// ARF - Augmented Reality Framework (ETSI ISG ARF)
//
-// Copyright 2022 ETSI
+// Copyright 2024 ETSI
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -15,47 +15,67 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-// Last change: June 2022
+// Last change: March 2024
//
-#define USING_OPENAPI_GENERATOR // alt. is Swagger
-
+using System;
+using System.Threading.Tasks;
using UnityEngine;
-#if USING_OPENAPI_GENERATOR
-using Org.OpenAPITools.Api;
-#else
-using IO.Swagger.Api;
-using IO.Swagger.Model;
-#endif
-
-//#if UNITY_EDITOR
+using ETSI.ARF.OpenAPI;
+using ETSI.ARF.OpenAPI.WorldStorage;
+
namespace ETSI.ARF.WorldStorage.REST
{
- public class AdminRequest
+ public class AdminRequest : RequestBase
{
- static public string GetAdminInfo(WorldStorageServer ws)
- {
- DefaultApi api = new DefaultApi(ws.URI);
- string state = api.GetAdmin();
- Debug.Log("Server State: " + state);
- return state;
- }
-
- static public string GetVersion(WorldStorageServer ws)
- {
- DefaultApi api = new DefaultApi(ws.URI);
- string vers = api.GetVersion();
- Debug.Log("Using API Version: " + vers);
- return vers;
- }
-
- static public string Ping(WorldStorageServer ws)
- {
- DefaultApi api = new DefaultApi(ws.URI);
- api.GetPing();
- return "IsAlive";
- }
+ //
+ // Wrapper for the endpoints
+ //
+ static private string Ping(WorldStorageServer ws)
+ {
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ string response = apiClient.GetPing();
+ return response;
+ }
+
+ static public ResponseObject PingAsync(WorldStorageServer ws, Action> func)
+ {
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Request Ping...");
+ ResponseObject ro = new ResponseObject("Request Ping", func);
+ apiClient.GetPingAsync().ContinueWith(OnReceiveObject, ro);
+ return ro;
+ }
+
+ static public ResponseObject AdminAsync(WorldStorageServer ws, Action> func)
+ {
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Request Admin...");
+ ResponseObject ro = new ResponseObject("Request Admin", func);
+ apiClient.GetAdminAsync().ContinueWith(OnReceiveObject, ro);
+ return ro;
+ }
+
+ static public ResponseObject VersionAsync(WorldStorageServer ws, Action> func)
+ {
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Request Version...");
+ ResponseObject ro = new ResponseObject("Request Version", func);
+ apiClient.GetVersionAsync().ContinueWith(OnReceiveObject, ro);
+ return ro;
+ }
}
}
-//#endif
\ No newline at end of file
diff --git a/Assets/Runtime/REST/RequestBase.cs b/Assets/Runtime/REST/RequestBase.cs
new file mode 100644
index 0000000000000000000000000000000000000000..4d98fb29ac916fd877b8915987b978d791ce1e95
--- /dev/null
+++ b/Assets/Runtime/REST/RequestBase.cs
@@ -0,0 +1,79 @@
+//
+// ARF - Augmented Reality Framework (ETSI ISG ARF)
+//
+// Copyright 2024 ETSI
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+//
+// Last change: March 2024
+//
+
+using System;
+using System.Threading.Tasks;
+using System.Collections.Generic;
+using UnityEngine;
+
+using ETSI.ARF.OpenAPI;
+using ETSI.ARF.OpenAPI.WorldStorage;
+
+namespace ETSI.ARF.WorldStorage.REST
+{
+ public class RequestBase // where T : Trackable, WorldAnchor, WorldLink
+ {
+ static protected WorldStorageServer wsServer;
+ static protected WorldStorageClient apiClient;
+
+ static protected string token = "ARF_Permission";
+
+ // Cache the current list
+ static public Dictionary listOfObjects = new Dictionary();
+
+
+ //
+ // Helpers
+ //
+ static protected void OnReceiveObject(Task t, object id)
+ {
+ if (t.IsCompleted)
+ {
+ ResponseObject o = (ResponseObject)id;
+ o.responseTime = DateTime.Now;
+ o.result = t.Result;
+ Debug.Log($"Server Response = {o.result} (ID={o.transactionId}, Msg={o.message})");
+
+ o.callback?.Invoke(o);
+ }
+ else Debug.Log("OpenAPI Timeout!");
+ }
+
+ static protected void OnReceiveListOfObjects(Task> t, object id) where TObj : IModel
+ {
+ if (t.IsCompleted)
+ {
+ ResponseObject> o = (ResponseObject>)id;
+ o.responseTime = DateTime.Now;
+ o.result = t.Result;
+ Debug.Log($"[REST] Server Response = Got {o.result.Count} entrie(s) (ID={o.transactionId}, Msg={o.message})");
+
+ listOfObjects.Clear();
+ foreach (var i in o.result)
+ {
+ listOfObjects.Add(i.UUID, i);
+ }
+ o.callback?.Invoke(o);
+ }
+ else Debug.Log("[REST] OpenAPI Timeout!");
+ }
+
+ }
+}
diff --git a/Assets/Runtime/REST/RequestBase.cs.meta b/Assets/Runtime/REST/RequestBase.cs.meta
new file mode 100644
index 0000000000000000000000000000000000000000..69460e01eb26cb49ad2cc5d6b2b39a835bfd9489
--- /dev/null
+++ b/Assets/Runtime/REST/RequestBase.cs.meta
@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 8af6c871203090b4abea43ba03d69efd
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Runtime/REST/TrackableRequest.cs b/Assets/Runtime/REST/TrackableRequest.cs
index f55b4b1f956e4802b619d9b80e6770b2d33c1e0c..164176f129bf73e0e3be83af63c754aca7109797 100644
--- a/Assets/Runtime/REST/TrackableRequest.cs
+++ b/Assets/Runtime/REST/TrackableRequest.cs
@@ -1,7 +1,7 @@
//
// ARF - Augmented Reality Framework (ETSI ISG ARF)
//
-// Copyright 2022 ETSI
+// Copyright 2024 ETSI
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -15,66 +15,88 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-// Last change: June 2022
+// Last change: March 2024
//
#define USING_OPENAPI_GENERATOR // alt. is Swagger
+using System;
using System.Collections.Generic;
+using System.Threading.Tasks;
using UnityEngine;
-#if USING_OPENAPI_GENERATOR
-using Org.OpenAPITools.Api;
-using Org.OpenAPITools.Model;
-#else
-using IO.Swagger.Api;
-using IO.Swagger.Model;
-#endif
+using ETSI.ARF.OpenAPI.WorldStorage;
+using ETSI.ARF.OpenAPI;
-//#if UNITY_EDITOR
namespace ETSI.ARF.WorldStorage.REST
{
- public class TrackableRequest
+ public class TrackableRequest : RequestBase
{
- static public string AddTrackable(WorldStorageServer ws, Trackable trackable)
+ //
+ // Wrapper for the endpoints
+ //
+ static public ResponseObject GetTrackableAsync(WorldStorageServer ws, Guid UUID, Action> func)
{
- Debug.Log("Posting Add Trackable to Server");
- TrackablesApi api = new TrackablesApi(ws.URI);
- string result = api.AddTrackable(trackable);
- Debug.Log(result);
- return result;
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Request 1 Trackable...");
+ ResponseObject ro = new ResponseObject("Request Trackable " + UUID.ToString(), func);
+ apiClient.GetTrackableByIdAsync(token, UUID, ro.cancellationToken).ContinueWith(OnReceiveObject, ro);
+ return ro;
}
- static public string UpdateTrackable(WorldStorageServer ws, Trackable trackable)
+ static public ResponseObject> GetTrackablesAsync(WorldStorageServer ws, Action>> func)
{
- Debug.Log("Posting Add Trackable to Server");
- TrackablesApi api = new TrackablesApi(ws.URI);
- string result = api.ModifyTrackable(trackable);
- Debug.Log(result);
- return result;
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Request Trackables...");
+ ResponseObject> ro = new ResponseObject>("Request Trackables", func);
+ apiClient.GetTrackablesAsync(token, ro.cancellationToken).ContinueWith(OnReceiveListOfObjects, ro);
+ return ro;
}
- static public List GetAllTrackables(WorldStorageServer ws)
+ static public ResponseObject CreateTrackableAsync(WorldStorageServer ws, Trackable trackable, Action> func)
{
- TrackablesApi api = new TrackablesApi(ws.URI);
- List result = api.GetTrackables();
- return result;
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Create 1 Trackable...");
+
+ // Add some management stuffs
+ trackable.UUID = Guid.NewGuid();
+ trackable.CreatorUUID = Guid.Empty;
+
+ ResponseObject ro = new ResponseObject("Create Trackable " + trackable.Name + " (no UUID)", func);
+ apiClient.AddTrackableAsync(token, trackable, ro.cancellationToken).ContinueWith(OnReceiveObject, ro);
+ return ro;
}
- static public Trackable GetTrackable(WorldStorageServer ws, string uuid)
+ static public ResponseObject UpdateTrackableAsync(WorldStorageServer ws, Trackable trackable, Action> func)
{
- System.Guid _uuid = System.Guid.Parse(uuid);
- TrackablesApi api = new TrackablesApi(ws.URI);
- Trackable result = api.GetTrackableById(_uuid);
- return result;
- }
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
- static public void DeleteTrackable(WorldStorageServer ws, string uuid)
+ Debug.Log("Update Trackable...");
+ ResponseObject ro = new ResponseObject("Update Trackable " + trackable.UUID.ToString(), func);
+ apiClient.ModifyTrackableAsync(token, trackable,ro.cancellationToken).ContinueWith(OnReceiveObject, ro);
+ return ro;
+ }
+ static public ResponseObject DeleteTrackableAsync(WorldStorageServer ws, Guid UUID, Action> func)
{
- System.Guid _uuid = System.Guid.Parse(uuid);
- TrackablesApi api = new TrackablesApi(ws.URI);
- api.DeleteTrackable(_uuid);
+ wsServer = ws;
+ var httpClient = new UnityWebRequestHttpClient(ws.URI);
+ apiClient = new WorldStorageClient(httpClient);
+
+ Debug.Log("Delete 1 Trackable...");
+ ResponseObject ro = new ResponseObject("Delete Trackable " + UUID.ToString(), func);
+ apiClient.DeleteTrackableAsync(token, UUID, ro.cancellationToken).ContinueWith(OnReceiveObject, ro);
+ return ro;
}
}
-}
-//#endif
\ No newline at end of file
+}
\ No newline at end of file
diff --git a/Assets/Runtime/REST/WorldAnchorRequest.cs b/Assets/Runtime/REST/WorldAnchorRequest.cs
index 82faff86c4050acc9d47db461054f18c0c59c940..a67a807430448f4d98e1c54a78df06520c0cd3a1 100644
--- a/Assets/Runtime/REST/WorldAnchorRequest.cs
+++ b/Assets/Runtime/REST/WorldAnchorRequest.cs
@@ -1,7 +1,7 @@
//
// ARF - Augmented Reality Framework (ETSI ISG ARF)
//
-// Copyright 2022 ETSI
+// Copyright 2024 ETSI
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -15,66 +15,58 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-// Last change: June 2022
+// Last change: March 2024
//
-#define USING_OPENAPI_GENERATOR // alt. is Swagger
-
using System.Collections.Generic;
using UnityEngine;
-#if USING_OPENAPI_GENERATOR
-using Org.OpenAPITools.Api;
-using Org.OpenAPITools.Model;
-#else
-using IO.Swagger.Api;
-using IO.Swagger.Model;
-#endif
+using ETSI.ARF.OpenAPI.WorldStorage;
//#if UNITY_EDITOR
namespace ETSI.ARF.WorldStorage.REST
{
public class WorldAnchorRequest
{
- static public string AddWorldAnchor(WorldStorageServer ws, WorldAnchor anchor)
- {
- Debug.Log("Posting Add World Anchor to Server");
- WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
- string result = api.AddWorldAnchor(anchor);
- Debug.Log(result);
- return result;
- }
+ //static public string AddWorldAnchor(WorldStorageServer ws, WorldAnchor anchor)
+ //{
+ // Debug.Log("Posting Add World Anchor to Server");
+ // WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
+ // string result = api.AddWorldAnchor(anchor);
+ // Debug.Log(result);
+ // return result;
+ //}
- static public string UpdateWorldAnchor(WorldStorageServer ws, WorldAnchor anchor)
- {
- Debug.Log("Posting Add World Anchor to Server");
- WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
- string result = api.ModifyWorldAnchor(anchor);
- Debug.Log(result);
- return result;
- }
+ //static public string UpdateWorldAnchor(WorldStorageServer ws, WorldAnchor anchor)
+ //{
+ // Debug.Log("Posting Add World Anchor to Server");
+ // WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
+ // string result = api.ModifyWorldAnchor(anchor);
+ // Debug.Log(result);
+ // return result;
+ //}
- static public List GetAllWorldAnchors(WorldStorageServer ws)
- {
- WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
- List result = api.GetWorldAnchors();
- return result;
- }
+ //static public List GetAllWorldAnchors(WorldStorageServer ws)
+ //{
+ // WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
+ // List result = api.GetWorldAnchors();
+ // return result;
+ //}
- static public WorldAnchor GetWorldAnchor(WorldStorageServer ws, string uuid)
- {
- System.Guid _uuid = System.Guid.Parse(uuid);
- WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
- WorldAnchor result = api.GetWorldAnchorById(_uuid);
- return result;
- }
+ //static public WorldAnchor GetWorldAnchor(WorldStorageServer ws, string uuid)
+ //{
+ // System.Guid _uuid = System.Guid.Parse(uuid);
+ // WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
+ // WorldAnchor result = api.GetWorldAnchorById(_uuid);
+ // return result;
+ //}
- static public void DeleteWorldAnchor(WorldStorageServer ws, string uuid)
- {
- System.Guid _uuid = System.Guid.Parse(uuid);
- WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
- api.DeleteWorldAnchor(_uuid);
- }
+ //static public void DeleteWorldAnchor(WorldStorageServer ws, string uuid)
+ //{
+ // System.Guid _uuid = System.Guid.Parse(uuid);
+ // WorldAnchorsApi api = new WorldAnchorsApi(ws.URI);
+ // api.DeleteWorldAnchor(_uuid);
+ //}
}
}
//#endif
\ No newline at end of file
diff --git a/Assets/Runtime/REST/WorldLinkRequest.cs b/Assets/Runtime/REST/WorldLinkRequest.cs
index bb2790773bef68f9c1f5079acc3c710098acacf6..8057cf3854a0bcfd9038f349f53443597fa4c1ba 100644
--- a/Assets/Runtime/REST/WorldLinkRequest.cs
+++ b/Assets/Runtime/REST/WorldLinkRequest.cs
@@ -1,7 +1,7 @@
//
// ARF - Augmented Reality Framework (ETSI ISG ARF)
//
-// Copyright 2022 ETSI
+// Copyright 2024 ETSI
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -15,66 +15,58 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
-// Last change: June 2022
+// Last change: March 2024
//
-#define USING_OPENAPI_GENERATOR // alt. is Swagger
-
using System.Collections.Generic;
using UnityEngine;
-#if USING_OPENAPI_GENERATOR
-using Org.OpenAPITools.Api;
-using Org.OpenAPITools.Model;
-#else
-using IO.Swagger.Api;
-using IO.Swagger.Model;
-#endif
+using ETSI.ARF.OpenAPI.WorldStorage;
//#if UNITY_EDITOR
namespace ETSI.ARF.WorldStorage.REST
{
public class WorldLinkRequest
{
- static public string AddWorldLink(WorldStorageServer ws, WorldLink link)
- {
- Debug.Log("Posting Add Trackable to Server");
- WorldLinksApi api = new WorldLinksApi(ws.URI);
- string result = api.AddWorldLink(link);
- Debug.Log(result);
- return result;
- }
+ //static public string AddWorldLink(WorldStorageServer ws, WorldLink link)
+ //{
+ // Debug.Log("Posting Add Trackable to Server");
+ // WorldLinksApi api = new WorldLinksApi(ws.URI);
+ // string result = api.AddWorldLink(link);
+ // Debug.Log(result);
+ // return result;
+ //}
- static public string UpdateWorldLink(WorldStorageServer ws, WorldLink link)
- {
- Debug.Log("Posting Add Trackable to Server");
- WorldLinksApi api = new WorldLinksApi(ws.URI);
- string result = api.ModifyWorldLink(link);
- Debug.Log(result);
- return result;
- }
+ //static public string UpdateWorldLink(WorldStorageServer ws, WorldLink link)
+ //{
+ // Debug.Log("Posting Add Trackable to Server");
+ // WorldLinksApi api = new WorldLinksApi(ws.URI);
+ // string result = api.ModifyWorldLink(link);
+ // Debug.Log(result);
+ // return result;
+ //}
- static public List GetAllWorldLinks(WorldStorageServer ws)
- {
- WorldLinksApi api = new WorldLinksApi(ws.URI);
- List result = api.GetWorldLinks();
- return result;
- }
+ //static public List GetAllWorldLinks(WorldStorageServer ws)
+ //{
+ // WorldLinksApi api = new WorldLinksApi(ws.URI);
+ // List result = api.GetWorldLinks();
+ // return result;
+ //}
- static public WorldLink GetWorldLink(WorldStorageServer ws, string uuid)
- {
- System.Guid _uuid = System.Guid.Parse(uuid);
- WorldLinksApi api = new WorldLinksApi(ws.URI);
- WorldLink result = api.GetWorldLinkById(_uuid);
- return result;
- }
+ //static public WorldLink GetWorldLink(WorldStorageServer ws, string uuid)
+ //{
+ // System.Guid _uuid = System.Guid.Parse(uuid);
+ // WorldLinksApi api = new WorldLinksApi(ws.URI);
+ // WorldLink result = api.GetWorldLinkById(_uuid);
+ // return result;
+ //}
- static public void DeleteWorldLink(WorldStorageServer ws, string uuid)
- {
- System.Guid _uuid = System.Guid.Parse(uuid);
- WorldLinksApi api = new WorldLinksApi(ws.URI);
- api.DeleteWorldLink(_uuid);
- }
+ //static public void DeleteWorldLink(WorldStorageServer ws, string uuid)
+ //{
+ // System.Guid _uuid = System.Guid.Parse(uuid);
+ // WorldLinksApi api = new WorldLinksApi(ws.URI);
+ // api.DeleteWorldLink(_uuid);
+ //}
}
}
//#endif
\ No newline at end of file
diff --git a/Assets/Runtime/WorldStorageInfo.cs b/Assets/Runtime/WorldStorageInfo.cs
index f5e06ada580cef96b1c0d75f8868405fda8b35f3..83421b56e3a4d9647016f8b7ea28383a8c1de5ea 100644
--- a/Assets/Runtime/WorldStorageInfo.cs
+++ b/Assets/Runtime/WorldStorageInfo.cs
@@ -25,21 +25,21 @@ public class WorldStorageInfo : MonoBehaviour
{
public WorldStorageServer worldStorageServer;
- public bool isServerAlive()
- {
- if (worldStorageServer == null) return false;
- return !string.IsNullOrEmpty(ETSI.ARF.WorldStorage.REST.AdminRequest.Ping(worldStorageServer));
- }
+ //public bool isServerAlive()
+ //{
+ // if (worldStorageServer == null) return false;
+ // return !string.IsNullOrEmpty(ETSI.ARF.WorldStorage.REST.AdminRequest.Ping(worldStorageServer));
+ //}
- public string GetServerState()
- {
- if (worldStorageServer == null) return "No Server Defined!";
- return ETSI.ARF.WorldStorage.REST.AdminRequest.GetAdminInfo(worldStorageServer);
- }
+ //public string GetServerState()
+ //{
+ // if (worldStorageServer == null) return "No Server Defined!";
+ // return ETSI.ARF.WorldStorage.REST.AdminRequest.GetAdminInfo(worldStorageServer);
+ //}
- public string GetAPIVersion()
- {
- if (worldStorageServer == null) return "Unknown Version!";
- return ETSI.ARF.WorldStorage.REST.AdminRequest.GetVersion(worldStorageServer);
- }
+ //public string GetAPIVersion()
+ //{
+ // if (worldStorageServer == null) return "Unknown Version!";
+ // return ETSI.ARF.WorldStorage.REST.AdminRequest.GetVersion(worldStorageServer);
+ //}
}
diff --git a/Assets/Runtime/csc.rsp b/Assets/Runtime/csc.rsp
new file mode 100644
index 0000000000000000000000000000000000000000..42cb45b466677f7eff4e30a6ea8cce7f460421b9
--- /dev/null
+++ b/Assets/Runtime/csc.rsp
@@ -0,0 +1 @@
+-r:System.ComponentModel.DataAnnotations.dll
\ No newline at end of file
diff --git a/Assets/Runtime/csc.rsp.meta b/Assets/Runtime/csc.rsp.meta
new file mode 100644
index 0000000000000000000000000000000000000000..8c857945de052080f02c7f65a50f031fd8bea918
--- /dev/null
+++ b/Assets/Runtime/csc.rsp.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: a94d6effd437d7842907e9a5cfd2732f
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/ARFWorldStorageServer_HHI.asset b/Assets/Scenes/ARFWorldStorageServer_HHI.asset
new file mode 100644
index 0000000000000000000000000000000000000000..2ce1ede22d70111b306bf310753ef69b8caa50c6
--- /dev/null
+++ b/Assets/Scenes/ARFWorldStorageServer_HHI.asset
@@ -0,0 +1,19 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: e4b7be4c33f68d0418c3b4e1a7053d91, type: 3}
+ m_Name: ARFWorldStorageServer_HHI
+ m_EditorClassIdentifier:
+ serverName: ETSI STF
+ company: Fraunhofer HHI
+ basePath: https://etsi.hhi.fraunhofer.de
+ port: 0
+ currentUser: {fileID: 0}
diff --git a/Assets/Scenes/ARFWorldStorageServer_HHI.asset.meta b/Assets/Scenes/ARFWorldStorageServer_HHI.asset.meta
new file mode 100644
index 0000000000000000000000000000000000000000..64518ff6c7bbbf4687b7414bdcfc89a886261dfc
--- /dev/null
+++ b/Assets/Scenes/ARFWorldStorageServer_HHI.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e58ba3b536eb26a4d899273c538c88e7
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/ARFWorldStorageServer_Local.asset b/Assets/Scenes/ARFWorldStorageServer_Local.asset
new file mode 100644
index 0000000000000000000000000000000000000000..f44b121a3d62bfaee4d96e533c0013d9ef4e8f9f
--- /dev/null
+++ b/Assets/Scenes/ARFWorldStorageServer_Local.asset
@@ -0,0 +1,19 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 0
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: e4b7be4c33f68d0418c3b4e1a7053d91, type: 3}
+ m_Name: ARFWorldStorageServer_Local
+ m_EditorClassIdentifier:
+ serverName: VisualStudio IIS
+ company: Fraunhofer HHI
+ basePath: https://localhost
+ port: 44301
+ currentUser: {fileID: 0}
diff --git a/Assets/Scenes/ARFWorldStorageServer_Local.asset.meta b/Assets/Scenes/ARFWorldStorageServer_Local.asset.meta
new file mode 100644
index 0000000000000000000000000000000000000000..941e4b81567ae2f481a123724a7dcd095d9cf088
--- /dev/null
+++ b/Assets/Scenes/ARFWorldStorageServer_Local.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f9a60da7e2e6288438cdf1a6c0b1d74c
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Scenes/OpenAPITest.cs b/Assets/Scenes/OpenAPITest.cs
new file mode 100644
index 0000000000000000000000000000000000000000..a9f75a636b6caaf923b5867876a66d434f96be03
--- /dev/null
+++ b/Assets/Scenes/OpenAPITest.cs
@@ -0,0 +1,178 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using TMPro;
+using UnityEngine;
+
+using ETSI.ARF.OpenAPI;
+using ETSI.ARF.OpenAPI.WorldStorage;
+using ETSI.ARF.WorldStorage;
+using ETSI.ARF.WorldStorage.REST;
+
+public class OpenAPITest : MonoBehaviour
+{
+ public WorldStorageServer server;
+ public TMP_Text servername;
+ public TMP_Text output;
+
+ private string msg = null;
+ private Queue handleResponseQ = new Queue();
+
+ private Guid lastUUID = Guid.Empty;
+
+ // Start is called before the first frame update
+ void Start()
+ {
+ if (servername) servername.text = "ARF Server: " + server.basePath + "";
+ }
+
+ // Update is called once per frame
+ void Update()
+ {
+ if (msg != null)
+ {
+ output.text = msg;
+ msg = null;
+ }
+
+ if (handleResponseQ.Count > 0)
+ {
+ object o = handleResponseQ.Dequeue();
+ if (o is ResponseObject)
+ {
+ ResponseObject response = o as ResponseObject;
+ output.text = $"Request Time: { response.requestTime.ToLongTimeString() } / Total Time: { response.DeltaTime.TotalMilliseconds }ms\n\nContent:\n{ response.result }";
+ }
+ else if (o is ResponseObject)
+ {
+ ResponseObject response = o as ResponseObject;
+ output.text = $"Request Time: { response.requestTime.ToLongTimeString() } / Total Time: { response.DeltaTime.TotalMilliseconds }ms\n\nContent:\nUUID={ response.result.UUID}\nName={ response.result.Name }\nType={ response.result.TrackableType }";
+ }
+ else if (o is ResponseObject>)
+ {
+ ResponseObject> response = o as ResponseObject>;
+ output.text = $"Request Time: { response.requestTime.ToLongTimeString() } / Total Time: { response.DeltaTime.TotalMilliseconds }ms\n\nContent:\nNum of trackable objects={ response.result.Count }";
+ int i = 0;
+ foreach (var t in response.result)
+ {
+ output.text += $"\n{ i++ }: UUID={ t.UUID }";
+ lastUUID = t.UUID;
+ }
+ }
+ }
+ }
+
+ public void OnButtonClick_TestPing()
+ {
+ if (server == null)
+ {
+ output.text = "Error: No server defined!";
+ return;
+ }
+
+ ResponseObject token = AdminRequest.PingAsync(server, (response) =>
+ {
+ handleResponseQ.Enqueue(response);
+ });
+ output.text = "Starting request @ time: " + token.requestTime.ToLongTimeString() + "...";
+ }
+
+ public void OnButtonClick_GetLastTrackable()
+ {
+ if (server == null)
+ {
+ output.text = "Error: No server defined!";
+ return;
+ }
+
+ if (lastUUID == Guid.Empty)
+ {
+ output.text = "Error: Please, load first a list!";
+ return;
+ }
+
+ ResponseObject token = TrackableRequest.GetTrackableAsync(server, lastUUID, (response) =>
+ {
+ handleResponseQ.Enqueue(response);
+ });
+ output.text = "Starting request @ time: " + token.requestTime.ToLongTimeString() + "...";
+ }
+
+ public void OnButtonClick_GetAllTrackables()
+ {
+ if (server == null)
+ {
+ output.text = "Error: No server defined!";
+ return;
+ }
+
+ ResponseObject> token = TrackableRequest.GetTrackablesAsync(server, (response) =>
+ {
+ handleResponseQ.Enqueue(response);
+ });
+ output.text = "Starting request @ time: " + token.requestTime.ToLongTimeString() + "...";
+ }
+
+ public void OnButtonClick_CreateTrackable()
+ {
+ if (server == null)
+ {
+ output.text = "Error: No server defined!";
+ return;
+ }
+
+ Trackable tr = new Trackable(DateTime.Now.ToFileTime().ToString());
+ tr.TrackableType = TrackableType.OTHER;
+ ResponseObject token = TrackableRequest.CreateTrackableAsync(server, tr, (response) =>
+ {
+ lastUUID = Guid.Parse(response.result);
+ handleResponseQ.Enqueue(response);
+ });
+ lastUUID = Guid.Empty;
+ }
+
+ public void OnButtonClick_UpdateLastTrackable()
+ {
+ if (server == null)
+ {
+ output.text = "Error: No server defined!";
+ return;
+ }
+
+ if (lastUUID == Guid.Empty)
+ {
+ output.text = "Error: Please, load first a list!";
+ return;
+ }
+
+ ResponseObject