Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbology manager #9

Merged
merged 8 commits into from
Feb 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .generation/config.ini
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[input]
backendTag = pro-nightly-2024-02-08
backendTag = pro-nightly-2024-02-21

[general]
githubUrl = https://github.com/geo-engine/openapi-client

[python]
name = geoengine_openapi_client
version = 0.0.5
version = 0.0.6

[typescript]
name = @geoengine/openapi-client
version = 0.0.5
version = 0.0.6

89 changes: 74 additions & 15 deletions .generation/input/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,61 @@
]
}
},
"/dataset/{dataset}/symbology": {
"put": {
"tags": [
"Datasets"
],
"summary": "Updates the dataset's symbology",
"description": "Updates the dataset's symbology",
"operationId": "update_dataset_symbology_handler",
"parameters": [
{
"name": "dataset",
"in": "path",
"description": "Dataset Name",
"required": true,
"schema": {
"$ref": "#/components/schemas/DatasetName"
}
}
],
"requestBody": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Symbology"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "OK"
},
"400": {
"description": "Bad request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"401": {
"$ref": "#/components/responses/UnauthorizedUserResponse"
}
},
"security": [
{
"session_token": []
}
]
}
},
"/datasetFromWorkflow/{id}": {
"post": {
"tags": [
Expand Down Expand Up @@ -3229,7 +3284,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UploadFilesResponse"
"$ref": "#/components/schemas/UploadFileLayersResponse"
},
"example": {
"layers": [
Expand Down Expand Up @@ -3711,8 +3766,8 @@
},
{
"name": "version",
"in": "query",
"required": false,
"in": "path",
"required": true,
"schema": {
"allOf": [
{
Expand All @@ -3724,15 +3779,15 @@
},
{
"name": "service",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/WfsService"
}
},
{
"name": "request",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/GetCapabilitiesRequest"
Expand Down Expand Up @@ -4047,8 +4102,8 @@
},
{
"name": "version",
"in": "query",
"required": false,
"in": "path",
"required": true,
"schema": {
"allOf": [
{
Expand All @@ -4060,24 +4115,24 @@
},
{
"name": "service",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/WmsService"
}
},
{
"name": "request",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/GetCapabilitiesRequest"
}
},
{
"name": "format",
"in": "query",
"required": false,
"in": "path",
"required": true,
"schema": {
"allOf": [
{
Expand Down Expand Up @@ -4127,31 +4182,31 @@
},
{
"name": "version",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/WmsVersion"
}
},
{
"name": "service",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/WmsService"
}
},
{
"name": "request",
"in": "query",
"in": "path",
"required": true,
"schema": {
"$ref": "#/components/schemas/GetLegendGraphicRequest"
}
},
{
"name": "layer",
"in": "query",
"in": "path",
"required": true,
"schema": {
"type": "string"
Expand Down Expand Up @@ -4971,6 +5026,10 @@
},
"Breakpoint": {
"type": "object",
"required": [
"value",
"color"
],
"properties": {
"color": {
"$ref": "#/components/schemas/RgbaColor"
Expand Down
1 change: 1 addition & 0 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ Class | Method | HTTP request | Description
*DatasetsApi* | [**list_datasets_handler**](docs/DatasetsApi.md#list_datasets_handler) | **GET** /datasets | Lists available datasets.
*DatasetsApi* | [**list_volumes_handler**](docs/DatasetsApi.md#list_volumes_handler) | **GET** /dataset/volumes | Lists available volumes.
*DatasetsApi* | [**suggest_meta_data_handler**](docs/DatasetsApi.md#suggest_meta_data_handler) | **GET** /dataset/suggest | Inspects an upload and suggests metadata that can be used when creating a new dataset based on it.
*DatasetsApi* | [**update_dataset_symbology_handler**](docs/DatasetsApi.md#update_dataset_symbology_handler) | **PUT** /dataset/{dataset}/symbology | Updates the dataset's symbology
*GeneralApi* | [**available_handler**](docs/GeneralApi.md#available_handler) | **GET** /available | Server availablity check.
*GeneralApi* | [**server_info_handler**](docs/GeneralApi.md#server_info_handler) | **GET** /info | Shows information about the server software version.
*LayersApi* | [**add_collection**](docs/LayersApi.md#add_collection) | **POST** /layerDb/collections/{collection}/collections | Add a new collection to an existing collection
Expand Down
154 changes: 154 additions & 0 deletions python/geoengine_openapi_client/api/datasets_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from geoengine_openapi_client.models.meta_data_definition import MetaDataDefinition
from geoengine_openapi_client.models.meta_data_suggestion import MetaDataSuggestion
from geoengine_openapi_client.models.order_by import OrderBy
from geoengine_openapi_client.models.symbology import Symbology
from geoengine_openapi_client.models.volume import Volume

from geoengine_openapi_client.api_client import ApiClient
Expand Down Expand Up @@ -1242,3 +1243,156 @@ def suggest_meta_data_handler_with_http_info(self, upload : StrictStr, main_file
_request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))

@validate_arguments
def update_dataset_symbology_handler(self, dataset : Annotated[StrictStr, Field(..., description="Dataset Name")], symbology : Symbology, **kwargs) -> None: # noqa: E501
"""Updates the dataset's symbology # noqa: E501

Updates the dataset's symbology # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_dataset_symbology_handler(dataset, symbology, async_req=True)
>>> result = thread.get()

:param dataset: Dataset Name (required)
:type dataset: str
:param symbology: (required)
:type symbology: Symbology
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _request_timeout: timeout setting for this request.
If one number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""
kwargs['_return_http_data_only'] = True
if '_preload_content' in kwargs:
message = "Error! Please call the update_dataset_symbology_handler_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
raise ValueError(message)
return self.update_dataset_symbology_handler_with_http_info(dataset, symbology, **kwargs) # noqa: E501

@validate_arguments
def update_dataset_symbology_handler_with_http_info(self, dataset : Annotated[StrictStr, Field(..., description="Dataset Name")], symbology : Symbology, **kwargs) -> ApiResponse: # noqa: E501
"""Updates the dataset's symbology # noqa: E501

Updates the dataset's symbology # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True

>>> thread = api.update_dataset_symbology_handler_with_http_info(dataset, symbology, async_req=True)
>>> result = thread.get()

:param dataset: Dataset Name (required)
:type dataset: str
:param symbology: (required)
:type symbology: Symbology
:param async_req: Whether to execute the request asynchronously.
:type async_req: bool, optional
:param _preload_content: if False, the ApiResponse.data will
be set to none and raw_data will store the
HTTP response body without reading/decoding.
Default is True.
:type _preload_content: bool, optional
:param _return_http_data_only: response data instead of ApiResponse
object with status code, headers, etc
:type _return_http_data_only: bool, optional
:param _request_timeout: timeout setting for this request. If one
number provided, it will be total request
timeout. It can also be a pair (tuple) of
(connection, read) timeouts.
:param _request_auth: set to override the auth_settings for an a single
request; this effectively ignores the authentication
in the spec for a single request.
:type _request_auth: dict, optional
:type _content_type: string, optional: force content-type for the request
:return: Returns the result object.
If the method is called asynchronously,
returns the request thread.
:rtype: None
"""

_params = locals()

_all_params = [
'dataset',
'symbology'
]
_all_params.extend(
[
'async_req',
'_return_http_data_only',
'_preload_content',
'_request_timeout',
'_request_auth',
'_content_type',
'_headers'
]
)

# validate the arguments
for _key, _val in _params['kwargs'].items():
if _key not in _all_params:
raise ApiTypeError(
"Got an unexpected keyword argument '%s'"
" to method update_dataset_symbology_handler" % _key
)
_params[_key] = _val
del _params['kwargs']

_collection_formats = {}

# process the path parameters
_path_params = {}
if _params['dataset']:
_path_params['dataset'] = _params['dataset']


# process the query parameters
_query_params = []
# process the header parameters
_header_params = dict(_params.get('_headers', {}))
# process the form parameters
_form_params = []
_files = {}
# process the body parameter
_body_params = None
if _params['symbology'] is not None:
_body_params = _params['symbology']

# set the HTTP header `Accept`
_header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501

# set the HTTP header `Content-Type`
_content_types_list = _params.get('_content_type',
self.api_client.select_header_content_type(
['application/json']))
if _content_types_list:
_header_params['Content-Type'] = _content_types_list

# authentication setting
_auth_settings = ['session_token'] # noqa: E501

_response_types_map = {}

return self.api_client.call_api(
'/dataset/{dataset}/symbology', 'PUT',
_path_params,
_query_params,
_header_params,
body=_body_params,
post_params=_form_params,
files=_files,
response_types_map=_response_types_map,
auth_settings=_auth_settings,
async_req=_params.get('async_req'),
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
_preload_content=_params.get('_preload_content', True),
_request_timeout=_params.get('_request_timeout'),
collection_formats=_collection_formats,
_request_auth=_params.get('_request_auth'))
Loading
Loading