diff --git a/.generation/config.ini b/.generation/config.ini index 2624d952..a9672535 100644 --- a/.generation/config.ini +++ b/.generation/config.ini @@ -1,14 +1,14 @@ [input] -backendTag = pro-nightly-2024-11-09 +backendTag = pro-nightly-2024-11-21 [general] githubUrl = https://github.com/geo-engine/openapi-client [python] name = geoengine_openapi_client -version = 0.0.17 +version = 0.0.18 [typescript] name = @geoengine/openapi-client -version = 0.0.17 +version = 0.0.18 diff --git a/.generation/input/openapi.json b/.generation/input/openapi.json index 1e26644b..f5aee18e 100644 --- a/.generation/input/openapi.json +++ b/.generation/input/openapi.json @@ -15,7 +15,7 @@ }, "servers": [ { - "url": "http://localhost:3030/api" + "url": "http://0.0.0.0:3030/api" } ], "paths": { @@ -6755,6 +6755,25 @@ "MlModelName": { "type": "string" }, + "MlModelResource": { + "type": "object", + "title": "MlModelResource", + "required": [ + "type", + "id" + ], + "properties": { + "id": { + "$ref": "#/components/schemas/MlModelId" + }, + "type": { + "type": "string", + "enum": [ + "mlModel" + ] + } + } + }, "MockDatasetDataSourceLoadingInfo": { "type": "object", "required": [ @@ -8184,6 +8203,9 @@ }, { "$ref": "#/components/schemas/DatasetResource" + }, + { + "$ref": "#/components/schemas/MlModelResource" } ], "discriminator": { @@ -8192,6 +8214,7 @@ "dataset": "#/components/schemas/DatasetResource", "layer": "#/components/schemas/LayerResource", "layerCollection": "#/components/schemas/LayerCollectionResource", + "mlModel": "#/components/schemas/MlModelResource", "project": "#/components/schemas/ProjectResource" } } diff --git a/python/.openapi-generator/FILES b/python/.openapi-generator/FILES index e4e2e0cc..b824f32e 100644 --- a/python/.openapi-generator/FILES +++ b/python/.openapi-generator/FILES @@ -85,6 +85,7 @@ docs/MetaDataDefinition.md docs/MetaDataSuggestion.md docs/MlModel.md docs/MlModelMetadata.md +docs/MlModelResource.md docs/MockDatasetDataSourceLoadingInfo.md docs/MockMetaData.md docs/MultiBandRasterColorizer.md @@ -337,6 +338,7 @@ geoengine_openapi_client/models/meta_data_definition.py geoengine_openapi_client/models/meta_data_suggestion.py geoengine_openapi_client/models/ml_model.py geoengine_openapi_client/models/ml_model_metadata.py +geoengine_openapi_client/models/ml_model_resource.py geoengine_openapi_client/models/mock_dataset_data_source_loading_info.py geoengine_openapi_client/models/mock_meta_data.py geoengine_openapi_client/models/multi_band_raster_colorizer.py @@ -567,6 +569,7 @@ test/test_meta_data_suggestion.py test/test_ml_api.py test/test_ml_model.py test/test_ml_model_metadata.py +test/test_ml_model_resource.py test/test_mock_dataset_data_source_loading_info.py test/test_mock_meta_data.py test/test_multi_band_raster_colorizer.py diff --git a/python/README.md b/python/README.md index 330eba85..c9fa401b 100644 --- a/python/README.md +++ b/python/README.md @@ -55,10 +55,10 @@ import geoengine_openapi_client from geoengine_openapi_client.rest import ApiException from pprint import pprint -# Defining the host is optional and defaults to http://localhost:3030/api +# Defining the host is optional and defaults to http://0.0.0.0:3030/api # See configuration.py for a list of all supported configuration parameters. configuration = geoengine_openapi_client.Configuration( - host = "http://localhost:3030/api" + host = "http://0.0.0.0:3030/api" ) # The client must configure the authentication and authorization parameters @@ -90,7 +90,7 @@ with geoengine_openapi_client.ApiClient(configuration) as api_client: ## Documentation for API Endpoints -All URIs are relative to *http://localhost:3030/api* +All URIs are relative to *http://0.0.0.0:3030/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- @@ -261,6 +261,7 @@ Class | Method | HTTP request | Description - [MetaDataSuggestion](docs/MetaDataSuggestion.md) - [MlModel](docs/MlModel.md) - [MlModelMetadata](docs/MlModelMetadata.md) + - [MlModelResource](docs/MlModelResource.md) - [MockDatasetDataSourceLoadingInfo](docs/MockDatasetDataSourceLoadingInfo.md) - [MockMetaData](docs/MockMetaData.md) - [MultiBandRasterColorizer](docs/MultiBandRasterColorizer.md) diff --git a/python/geoengine_openapi_client/__init__.py b/python/geoengine_openapi_client/__init__.py index d815c259..c67482e2 100644 --- a/python/geoengine_openapi_client/__init__.py +++ b/python/geoengine_openapi_client/__init__.py @@ -125,6 +125,7 @@ from geoengine_openapi_client.models.meta_data_suggestion import MetaDataSuggestion from geoengine_openapi_client.models.ml_model import MlModel from geoengine_openapi_client.models.ml_model_metadata import MlModelMetadata +from geoengine_openapi_client.models.ml_model_resource import MlModelResource from geoengine_openapi_client.models.mock_dataset_data_source_loading_info import MockDatasetDataSourceLoadingInfo from geoengine_openapi_client.models.mock_meta_data import MockMetaData from geoengine_openapi_client.models.multi_band_raster_colorizer import MultiBandRasterColorizer diff --git a/python/geoengine_openapi_client/configuration.py b/python/geoengine_openapi_client/configuration.py index a16193e4..72850d68 100644 --- a/python/geoengine_openapi_client/configuration.py +++ b/python/geoengine_openapi_client/configuration.py @@ -69,7 +69,7 @@ def __init__(self, host=None, ) -> None: """Constructor """ - self._base_path = "http://localhost:3030/api" if host is None else host + self._base_path = "http://0.0.0.0:3030/api" if host is None else host """Default Base url """ self.server_index = 0 if server_index is None and host is None else server_index @@ -388,7 +388,7 @@ def get_host_settings(self): """ return [ { - 'url': "http://localhost:3030/api", + 'url': "http://0.0.0.0:3030/api", 'description': "No description provided", } ] diff --git a/python/geoengine_openapi_client/models/__init__.py b/python/geoengine_openapi_client/models/__init__.py index f591aeb1..5b9c2f5e 100644 --- a/python/geoengine_openapi_client/models/__init__.py +++ b/python/geoengine_openapi_client/models/__init__.py @@ -93,6 +93,7 @@ from geoengine_openapi_client.models.meta_data_suggestion import MetaDataSuggestion from geoengine_openapi_client.models.ml_model import MlModel from geoengine_openapi_client.models.ml_model_metadata import MlModelMetadata +from geoengine_openapi_client.models.ml_model_resource import MlModelResource from geoengine_openapi_client.models.mock_dataset_data_source_loading_info import MockDatasetDataSourceLoadingInfo from geoengine_openapi_client.models.mock_meta_data import MockMetaData from geoengine_openapi_client.models.multi_band_raster_colorizer import MultiBandRasterColorizer diff --git a/python/geoengine_openapi_client/models/layer_resource.py b/python/geoengine_openapi_client/models/layer_resource.py index 2f0abb3b..4172636c 100644 --- a/python/geoengine_openapi_client/models/layer_resource.py +++ b/python/geoengine_openapi_client/models/layer_resource.py @@ -33,8 +33,8 @@ class LayerResource(BaseModel): @validator('type') def type_validate_enum(cls, value): """Validates the enum""" - if value not in ('layer', 'layerCollection', 'project', 'dataset'): - raise ValueError("must be one of enum values ('layer', 'layerCollection', 'project', 'dataset')") + if value not in ('layer', 'layerCollection', 'project', 'dataset', 'mlModel'): + raise ValueError("must be one of enum values ('layer', 'layerCollection', 'project', 'dataset', 'mlModel')") return value class Config: diff --git a/python/geoengine_openapi_client/models/ml_model_resource.py b/python/geoengine_openapi_client/models/ml_model_resource.py new file mode 100644 index 00000000..f565f301 --- /dev/null +++ b/python/geoengine_openapi_client/models/ml_model_resource.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + + +from pydantic import BaseModel, Field, StrictStr, validator + +class MlModelResource(BaseModel): + """ + MlModelResource + """ + id: StrictStr = Field(...) + type: StrictStr = Field(...) + __properties = ["id", "type"] + + @validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in ('mlModel'): + raise ValueError("must be one of enum values ('mlModel')") + return value + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MlModelResource: + """Create an instance of MlModelResource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MlModelResource: + """Create an instance of MlModelResource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MlModelResource.parse_obj(obj) + + _obj = MlModelResource.parse_obj({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/python/geoengine_openapi_client/models/ml_model_ressource.py b/python/geoengine_openapi_client/models/ml_model_ressource.py new file mode 100644 index 00000000..5c82dab4 --- /dev/null +++ b/python/geoengine_openapi_client/models/ml_model_ressource.py @@ -0,0 +1,81 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + + + +from pydantic import BaseModel, Field, StrictStr, validator + +class MlModelRessource(BaseModel): + """ + MlModelRessource + """ + id: StrictStr = Field(...) + type: StrictStr = Field(...) + __properties = ["id", "type"] + + @validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in ('mlModel'): + raise ValueError("must be one of enum values ('mlModel')") + return value + + class Config: + """Pydantic configuration""" + allow_population_by_field_name = True + validate_assignment = True + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.dict(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> MlModelRessource: + """Create an instance of MlModelRessource from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self): + """Returns the dictionary representation of the model using alias""" + _dict = self.dict(by_alias=True, + exclude={ + }, + exclude_none=True) + return _dict + + @classmethod + def from_dict(cls, obj: dict) -> MlModelRessource: + """Create an instance of MlModelRessource from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return MlModelRessource.parse_obj(obj) + + _obj = MlModelRessource.parse_obj({ + "id": obj.get("id"), + "type": obj.get("type") + }) + return _obj + + diff --git a/python/geoengine_openapi_client/models/resource.py b/python/geoengine_openapi_client/models/resource.py index b376d474..67fb6995 100644 --- a/python/geoengine_openapi_client/models/resource.py +++ b/python/geoengine_openapi_client/models/resource.py @@ -24,11 +24,12 @@ from geoengine_openapi_client.models.dataset_resource import DatasetResource from geoengine_openapi_client.models.layer_collection_resource import LayerCollectionResource from geoengine_openapi_client.models.layer_resource import LayerResource +from geoengine_openapi_client.models.ml_model_resource import MlModelResource from geoengine_openapi_client.models.project_resource import ProjectResource from typing import Union, Any, List, TYPE_CHECKING from pydantic import StrictStr, Field -RESOURCE_ONE_OF_SCHEMAS = ["DatasetResource", "LayerCollectionResource", "LayerResource", "ProjectResource"] +RESOURCE_ONE_OF_SCHEMAS = ["DatasetResource", "LayerCollectionResource", "LayerResource", "MlModelResource", "ProjectResource"] class Resource(BaseModel): """ @@ -42,8 +43,10 @@ class Resource(BaseModel): oneof_schema_3_validator: Optional[ProjectResource] = None # data type: DatasetResource oneof_schema_4_validator: Optional[DatasetResource] = None + # data type: MlModelResource + oneof_schema_5_validator: Optional[MlModelResource] = None if TYPE_CHECKING: - actual_instance: Union[DatasetResource, LayerCollectionResource, LayerResource, ProjectResource] + actual_instance: Union[DatasetResource, LayerCollectionResource, LayerResource, MlModelResource, ProjectResource] else: actual_instance: Any one_of_schemas: List[str] = Field(RESOURCE_ONE_OF_SCHEMAS, const=True) @@ -89,12 +92,17 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `DatasetResource`") else: match += 1 + # validate data type: MlModelResource + if not isinstance(v, MlModelResource): + error_messages.append(f"Error! Input type `{type(v)}` is not `MlModelResource`") + else: + match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, ProjectResource. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, MlModelResource, ProjectResource. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, ProjectResource. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, MlModelResource, ProjectResource. Details: " + ", ".join(error_messages)) else: return v @@ -129,6 +137,11 @@ def from_json(cls, json_str: str) -> Resource: instance.actual_instance = LayerResource.from_json(json_str) return instance + # check if data type is `MlModelResource` + if _data_type == "MlModelResource": + instance.actual_instance = MlModelResource.from_json(json_str) + return instance + # check if data type is `ProjectResource` if _data_type == "ProjectResource": instance.actual_instance = ProjectResource.from_json(json_str) @@ -149,6 +162,11 @@ def from_json(cls, json_str: str) -> Resource: instance.actual_instance = LayerCollectionResource.from_json(json_str) return instance + # check if data type is `MlModelResource` + if _data_type == "mlModel": + instance.actual_instance = MlModelResource.from_json(json_str) + return instance + # check if data type is `ProjectResource` if _data_type == "project": instance.actual_instance = ProjectResource.from_json(json_str) @@ -178,13 +196,19 @@ def from_json(cls, json_str: str) -> Resource: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into MlModelResource + try: + instance.actual_instance = MlModelResource.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, ProjectResource. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, MlModelResource, ProjectResource. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, ProjectResource. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into Resource with oneOf schemas: DatasetResource, LayerCollectionResource, LayerResource, MlModelResource, ProjectResource. Details: " + ", ".join(error_messages)) else: return instance diff --git a/python/test/test_ml_model_resource.py b/python/test/test_ml_model_resource.py new file mode 100644 index 00000000..2476906b --- /dev/null +++ b/python/test/test_ml_model_resource.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Geo Engine Pro API + + No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + + The version of the OpenAPI document: 0.8.0 + Contact: dev@geoengine.de + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest +import datetime + +from geoengine_openapi_client.models.ml_model_resource import MlModelResource # noqa: E501 + +class TestMlModelResource(unittest.TestCase): + """MlModelResource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MlModelResource: + """Test MlModelResource + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `MlModelResource` + """ + model = MlModelResource() # noqa: E501 + if include_optional: + return MlModelResource( + id = '', + type = 'mlModel' + ) + else: + return MlModelResource( + id = '', + type = 'mlModel', + ) + """ + + def testMlModelResource(self): + """Test MlModelResource""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/typescript/dist/esm/models/MlModelResource.d.ts b/typescript/dist/esm/models/MlModelResource.d.ts new file mode 100644 index 00000000..b57234a4 --- /dev/null +++ b/typescript/dist/esm/models/MlModelResource.d.ts @@ -0,0 +1,44 @@ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** + * + * @export + * @interface MlModelResource + */ +export interface MlModelResource { + /** + * + * @type {string} + * @memberof MlModelResource + */ + id: string; + /** + * + * @type {string} + * @memberof MlModelResource + */ + type: MlModelResourceTypeEnum; +} +/** + * @export + */ +export declare const MlModelResourceTypeEnum: { + readonly MlModel: "mlModel"; +}; +export type MlModelResourceTypeEnum = typeof MlModelResourceTypeEnum[keyof typeof MlModelResourceTypeEnum]; +/** + * Check if a given object implements the MlModelResource interface. + */ +export declare function instanceOfMlModelResource(value: object): boolean; +export declare function MlModelResourceFromJSON(json: any): MlModelResource; +export declare function MlModelResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): MlModelResource; +export declare function MlModelResourceToJSON(value?: MlModelResource | null): any; diff --git a/typescript/dist/esm/models/MlModelResource.js b/typescript/dist/esm/models/MlModelResource.js new file mode 100644 index 00000000..374e9025 --- /dev/null +++ b/typescript/dist/esm/models/MlModelResource.js @@ -0,0 +1,52 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** + * @export + */ +export const MlModelResourceTypeEnum = { + MlModel: 'mlModel' +}; +/** + * Check if a given object implements the MlModelResource interface. + */ +export function instanceOfMlModelResource(value) { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "type" in value; + return isInstance; +} +export function MlModelResourceFromJSON(json) { + return MlModelResourceFromJSONTyped(json, false); +} +export function MlModelResourceFromJSONTyped(json, ignoreDiscriminator) { + if ((json === undefined) || (json === null)) { + return json; + } + return { + 'id': json['id'], + 'type': json['type'], + }; +} +export function MlModelResourceToJSON(value) { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + 'id': value.id, + 'type': value.type, + }; +} diff --git a/typescript/dist/esm/models/Resource.d.ts b/typescript/dist/esm/models/Resource.d.ts index f9c81c0e..58a3ac4b 100644 --- a/typescript/dist/esm/models/Resource.d.ts +++ b/typescript/dist/esm/models/Resource.d.ts @@ -12,6 +12,7 @@ import { DatasetResource } from './DatasetResource'; import { LayerCollectionResource } from './LayerCollectionResource'; import { LayerResource } from './LayerResource'; +import { MlModelResource } from './MlModelResource'; import { ProjectResource } from './ProjectResource'; /** * @type Resource @@ -25,6 +26,8 @@ export type Resource = { } & LayerResource | { type: 'layerCollection'; } & LayerCollectionResource | { + type: 'mlModel'; +} & MlModelResource | { type: 'project'; } & ProjectResource; export declare function ResourceFromJSON(json: any): Resource; diff --git a/typescript/dist/esm/models/Resource.js b/typescript/dist/esm/models/Resource.js index 36349af0..fdf0ba1f 100644 --- a/typescript/dist/esm/models/Resource.js +++ b/typescript/dist/esm/models/Resource.js @@ -14,6 +14,7 @@ import { DatasetResourceFromJSONTyped, DatasetResourceToJSON, } from './DatasetResource'; import { LayerCollectionResourceFromJSONTyped, LayerCollectionResourceToJSON, } from './LayerCollectionResource'; import { LayerResourceFromJSONTyped, LayerResourceToJSON, } from './LayerResource'; +import { MlModelResourceFromJSONTyped, MlModelResourceToJSON, } from './MlModelResource'; import { ProjectResourceFromJSONTyped, ProjectResourceToJSON, } from './ProjectResource'; export function ResourceFromJSON(json) { return ResourceFromJSONTyped(json, false); @@ -29,6 +30,8 @@ export function ResourceFromJSONTyped(json, ignoreDiscriminator) { return Object.assign(Object.assign({}, LayerResourceFromJSONTyped(json, true)), { type: 'layer' }); case 'layerCollection': return Object.assign(Object.assign({}, LayerCollectionResourceFromJSONTyped(json, true)), { type: 'layerCollection' }); + case 'mlModel': + return Object.assign(Object.assign({}, MlModelResourceFromJSONTyped(json, true)), { type: 'mlModel' }); case 'project': return Object.assign(Object.assign({}, ProjectResourceFromJSONTyped(json, true)), { type: 'project' }); default: @@ -49,6 +52,8 @@ export function ResourceToJSON(value) { return LayerResourceToJSON(value); case 'layerCollection': return LayerCollectionResourceToJSON(value); + case 'mlModel': + return MlModelResourceToJSON(value); case 'project': return ProjectResourceToJSON(value); default: diff --git a/typescript/dist/esm/models/index.d.ts b/typescript/dist/esm/models/index.d.ts index 947d1bb6..c89e0bd3 100644 --- a/typescript/dist/esm/models/index.d.ts +++ b/typescript/dist/esm/models/index.d.ts @@ -76,6 +76,7 @@ export * from './MetaDataDefinition'; export * from './MetaDataSuggestion'; export * from './MlModel'; export * from './MlModelMetadata'; +export * from './MlModelResource'; export * from './MockDatasetDataSourceLoadingInfo'; export * from './MockMetaData'; export * from './MultiBandRasterColorizer'; diff --git a/typescript/dist/esm/models/index.js b/typescript/dist/esm/models/index.js index 17e41c39..aae71b2e 100644 --- a/typescript/dist/esm/models/index.js +++ b/typescript/dist/esm/models/index.js @@ -78,6 +78,7 @@ export * from './MetaDataDefinition'; export * from './MetaDataSuggestion'; export * from './MlModel'; export * from './MlModelMetadata'; +export * from './MlModelResource'; export * from './MockDatasetDataSourceLoadingInfo'; export * from './MockMetaData'; export * from './MultiBandRasterColorizer'; diff --git a/typescript/dist/esm/runtime.js b/typescript/dist/esm/runtime.js index 306920e3..7e00da23 100644 --- a/typescript/dist/esm/runtime.js +++ b/typescript/dist/esm/runtime.js @@ -20,7 +20,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; -export const BASE_PATH = "http://localhost:3030/api".replace(/\/+$/, ""); +export const BASE_PATH = "http://0.0.0.0:3030/api".replace(/\/+$/, ""); export class Configuration { constructor(configuration = {}) { this.configuration = configuration; diff --git a/typescript/dist/models/MlModelResource.d.ts b/typescript/dist/models/MlModelResource.d.ts new file mode 100644 index 00000000..b57234a4 --- /dev/null +++ b/typescript/dist/models/MlModelResource.d.ts @@ -0,0 +1,44 @@ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/** + * + * @export + * @interface MlModelResource + */ +export interface MlModelResource { + /** + * + * @type {string} + * @memberof MlModelResource + */ + id: string; + /** + * + * @type {string} + * @memberof MlModelResource + */ + type: MlModelResourceTypeEnum; +} +/** + * @export + */ +export declare const MlModelResourceTypeEnum: { + readonly MlModel: "mlModel"; +}; +export type MlModelResourceTypeEnum = typeof MlModelResourceTypeEnum[keyof typeof MlModelResourceTypeEnum]; +/** + * Check if a given object implements the MlModelResource interface. + */ +export declare function instanceOfMlModelResource(value: object): boolean; +export declare function MlModelResourceFromJSON(json: any): MlModelResource; +export declare function MlModelResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): MlModelResource; +export declare function MlModelResourceToJSON(value?: MlModelResource | null): any; diff --git a/typescript/dist/models/MlModelResource.js b/typescript/dist/models/MlModelResource.js new file mode 100644 index 00000000..9dc5eeea --- /dev/null +++ b/typescript/dist/models/MlModelResource.js @@ -0,0 +1,59 @@ +"use strict"; +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +Object.defineProperty(exports, "__esModule", { value: true }); +exports.MlModelResourceToJSON = exports.MlModelResourceFromJSONTyped = exports.MlModelResourceFromJSON = exports.instanceOfMlModelResource = exports.MlModelResourceTypeEnum = void 0; +/** + * @export + */ +exports.MlModelResourceTypeEnum = { + MlModel: 'mlModel' +}; +/** + * Check if a given object implements the MlModelResource interface. + */ +function instanceOfMlModelResource(value) { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "type" in value; + return isInstance; +} +exports.instanceOfMlModelResource = instanceOfMlModelResource; +function MlModelResourceFromJSON(json) { + return MlModelResourceFromJSONTyped(json, false); +} +exports.MlModelResourceFromJSON = MlModelResourceFromJSON; +function MlModelResourceFromJSONTyped(json, ignoreDiscriminator) { + if ((json === undefined) || (json === null)) { + return json; + } + return { + 'id': json['id'], + 'type': json['type'], + }; +} +exports.MlModelResourceFromJSONTyped = MlModelResourceFromJSONTyped; +function MlModelResourceToJSON(value) { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + 'id': value.id, + 'type': value.type, + }; +} +exports.MlModelResourceToJSON = MlModelResourceToJSON; diff --git a/typescript/dist/models/Resource.d.ts b/typescript/dist/models/Resource.d.ts index f9c81c0e..58a3ac4b 100644 --- a/typescript/dist/models/Resource.d.ts +++ b/typescript/dist/models/Resource.d.ts @@ -12,6 +12,7 @@ import { DatasetResource } from './DatasetResource'; import { LayerCollectionResource } from './LayerCollectionResource'; import { LayerResource } from './LayerResource'; +import { MlModelResource } from './MlModelResource'; import { ProjectResource } from './ProjectResource'; /** * @type Resource @@ -25,6 +26,8 @@ export type Resource = { } & LayerResource | { type: 'layerCollection'; } & LayerCollectionResource | { + type: 'mlModel'; +} & MlModelResource | { type: 'project'; } & ProjectResource; export declare function ResourceFromJSON(json: any): Resource; diff --git a/typescript/dist/models/Resource.js b/typescript/dist/models/Resource.js index f391ed1e..d1f94e21 100644 --- a/typescript/dist/models/Resource.js +++ b/typescript/dist/models/Resource.js @@ -17,6 +17,7 @@ exports.ResourceToJSON = exports.ResourceFromJSONTyped = exports.ResourceFromJSO const DatasetResource_1 = require("./DatasetResource"); const LayerCollectionResource_1 = require("./LayerCollectionResource"); const LayerResource_1 = require("./LayerResource"); +const MlModelResource_1 = require("./MlModelResource"); const ProjectResource_1 = require("./ProjectResource"); function ResourceFromJSON(json) { return ResourceFromJSONTyped(json, false); @@ -33,6 +34,8 @@ function ResourceFromJSONTyped(json, ignoreDiscriminator) { return Object.assign(Object.assign({}, (0, LayerResource_1.LayerResourceFromJSONTyped)(json, true)), { type: 'layer' }); case 'layerCollection': return Object.assign(Object.assign({}, (0, LayerCollectionResource_1.LayerCollectionResourceFromJSONTyped)(json, true)), { type: 'layerCollection' }); + case 'mlModel': + return Object.assign(Object.assign({}, (0, MlModelResource_1.MlModelResourceFromJSONTyped)(json, true)), { type: 'mlModel' }); case 'project': return Object.assign(Object.assign({}, (0, ProjectResource_1.ProjectResourceFromJSONTyped)(json, true)), { type: 'project' }); default: @@ -54,6 +57,8 @@ function ResourceToJSON(value) { return (0, LayerResource_1.LayerResourceToJSON)(value); case 'layerCollection': return (0, LayerCollectionResource_1.LayerCollectionResourceToJSON)(value); + case 'mlModel': + return (0, MlModelResource_1.MlModelResourceToJSON)(value); case 'project': return (0, ProjectResource_1.ProjectResourceToJSON)(value); default: diff --git a/typescript/dist/models/index.d.ts b/typescript/dist/models/index.d.ts index 947d1bb6..c89e0bd3 100644 --- a/typescript/dist/models/index.d.ts +++ b/typescript/dist/models/index.d.ts @@ -76,6 +76,7 @@ export * from './MetaDataDefinition'; export * from './MetaDataSuggestion'; export * from './MlModel'; export * from './MlModelMetadata'; +export * from './MlModelResource'; export * from './MockDatasetDataSourceLoadingInfo'; export * from './MockMetaData'; export * from './MultiBandRasterColorizer'; diff --git a/typescript/dist/models/index.js b/typescript/dist/models/index.js index 89c525af..45cff9df 100644 --- a/typescript/dist/models/index.js +++ b/typescript/dist/models/index.js @@ -94,6 +94,7 @@ __exportStar(require("./MetaDataDefinition"), exports); __exportStar(require("./MetaDataSuggestion"), exports); __exportStar(require("./MlModel"), exports); __exportStar(require("./MlModelMetadata"), exports); +__exportStar(require("./MlModelResource"), exports); __exportStar(require("./MockDatasetDataSourceLoadingInfo"), exports); __exportStar(require("./MockMetaData"), exports); __exportStar(require("./MultiBandRasterColorizer"), exports); diff --git a/typescript/dist/runtime.js b/typescript/dist/runtime.js index db6ec937..5b315ac1 100644 --- a/typescript/dist/runtime.js +++ b/typescript/dist/runtime.js @@ -23,7 +23,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); exports.TextApiResponse = exports.BlobApiResponse = exports.VoidApiResponse = exports.JSONApiResponse = exports.canConsumeForm = exports.mapValues = exports.querystring = exports.exists = exports.COLLECTION_FORMATS = exports.RequiredError = exports.FetchError = exports.ResponseError = exports.BaseAPI = exports.DefaultConfig = exports.Configuration = exports.BASE_PATH = void 0; -exports.BASE_PATH = "http://localhost:3030/api".replace(/\/+$/, ""); +exports.BASE_PATH = "http://0.0.0.0:3030/api".replace(/\/+$/, ""); class Configuration { constructor(configuration = {}) { this.configuration = configuration; diff --git a/typescript/src/models/MlModelResource.ts b/typescript/src/models/MlModelResource.ts new file mode 100644 index 00000000..7058fe88 --- /dev/null +++ b/typescript/src/models/MlModelResource.ts @@ -0,0 +1,85 @@ +/* tslint:disable */ +/* eslint-disable */ +/** + * Geo Engine Pro API + * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) + * + * The version of the OpenAPI document: 0.8.0 + * Contact: dev@geoengine.de + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + +import { exists, mapValues } from '../runtime'; +/** + * + * @export + * @interface MlModelResource + */ +export interface MlModelResource { + /** + * + * @type {string} + * @memberof MlModelResource + */ + id: string; + /** + * + * @type {string} + * @memberof MlModelResource + */ + type: MlModelResourceTypeEnum; +} + + +/** + * @export + */ +export const MlModelResourceTypeEnum = { + MlModel: 'mlModel' +} as const; +export type MlModelResourceTypeEnum = typeof MlModelResourceTypeEnum[keyof typeof MlModelResourceTypeEnum]; + + +/** + * Check if a given object implements the MlModelResource interface. + */ +export function instanceOfMlModelResource(value: object): boolean { + let isInstance = true; + isInstance = isInstance && "id" in value; + isInstance = isInstance && "type" in value; + + return isInstance; +} + +export function MlModelResourceFromJSON(json: any): MlModelResource { + return MlModelResourceFromJSONTyped(json, false); +} + +export function MlModelResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): MlModelResource { + if ((json === undefined) || (json === null)) { + return json; + } + return { + + 'id': json['id'], + 'type': json['type'], + }; +} + +export function MlModelResourceToJSON(value?: MlModelResource | null): any { + if (value === undefined) { + return undefined; + } + if (value === null) { + return null; + } + return { + + 'id': value.id, + 'type': value.type, + }; +} + diff --git a/typescript/src/models/Resource.ts b/typescript/src/models/Resource.ts index 5b1a46e2..16d4f728 100644 --- a/typescript/src/models/Resource.ts +++ b/typescript/src/models/Resource.ts @@ -33,6 +33,13 @@ import { LayerResourceFromJSONTyped, LayerResourceToJSON, } from './LayerResource'; +import { + MlModelResource, + instanceOfMlModelResource, + MlModelResourceFromJSON, + MlModelResourceFromJSONTyped, + MlModelResourceToJSON, +} from './MlModelResource'; import { ProjectResource, instanceOfProjectResource, @@ -46,7 +53,7 @@ import { * * @export */ -export type Resource = { type: 'dataset' } & DatasetResource | { type: 'layer' } & LayerResource | { type: 'layerCollection' } & LayerCollectionResource | { type: 'project' } & ProjectResource; +export type Resource = { type: 'dataset' } & DatasetResource | { type: 'layer' } & LayerResource | { type: 'layerCollection' } & LayerCollectionResource | { type: 'mlModel' } & MlModelResource | { type: 'project' } & ProjectResource; export function ResourceFromJSON(json: any): Resource { return ResourceFromJSONTyped(json, false); @@ -63,6 +70,8 @@ export function ResourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): return {...LayerResourceFromJSONTyped(json, true), type: 'layer'}; case 'layerCollection': return {...LayerCollectionResourceFromJSONTyped(json, true), type: 'layerCollection'}; + case 'mlModel': + return {...MlModelResourceFromJSONTyped(json, true), type: 'mlModel'}; case 'project': return {...ProjectResourceFromJSONTyped(json, true), type: 'project'}; default: @@ -84,6 +93,8 @@ export function ResourceToJSON(value?: Resource | null): any { return LayerResourceToJSON(value); case 'layerCollection': return LayerCollectionResourceToJSON(value); + case 'mlModel': + return MlModelResourceToJSON(value); case 'project': return ProjectResourceToJSON(value); default: diff --git a/typescript/src/models/index.ts b/typescript/src/models/index.ts index 17e41c39..aae71b2e 100644 --- a/typescript/src/models/index.ts +++ b/typescript/src/models/index.ts @@ -78,6 +78,7 @@ export * from './MetaDataDefinition'; export * from './MetaDataSuggestion'; export * from './MlModel'; export * from './MlModelMetadata'; +export * from './MlModelResource'; export * from './MockDatasetDataSourceLoadingInfo'; export * from './MockMetaData'; export * from './MultiBandRasterColorizer'; diff --git a/typescript/src/runtime.ts b/typescript/src/runtime.ts index 0e2362ad..d1e59d34 100644 --- a/typescript/src/runtime.ts +++ b/typescript/src/runtime.ts @@ -13,7 +13,7 @@ */ -export const BASE_PATH = "http://localhost:3030/api".replace(/\/+$/, ""); +export const BASE_PATH = "http://0.0.0.0:3030/api".replace(/\/+$/, ""); export interface ConfigurationParameters { basePath?: string; // override base path