-
Notifications
You must be signed in to change notification settings - Fork 3
update openapi-client #31
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
Merged
Merged
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
81 changes: 81 additions & 0 deletions
81
python/geoengine_openapi_client/models/ml_model_resource.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # coding: utf-8 | ||
|
|
||
| """ | ||
| Geo Engine API | ||
|
|
||
| No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
|
|
||
| The version of the OpenAPI document: 0.8.0 | ||
| Contact: [email protected] | ||
| 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 | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| # coding: utf-8 | ||
|
|
||
| """ | ||
| Geo Engine API | ||
|
|
||
| No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
|
|
||
| The version of the OpenAPI document: 0.8.0 | ||
| Contact: [email protected] | ||
| 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() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| /** | ||
| * Geo Engine API | ||
| * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) | ||
| * | ||
| * The version of the OpenAPI document: 0.8.0 | ||
| * Contact: [email protected] | ||
| * | ||
| * 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; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.