-
Notifications
You must be signed in to change notification settings - Fork 8
Update Cloud Discovery Schemas to add Zone filters and Other Correspondent Field Changes #51
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 all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
1e0e190
Update Reclaimed Time for DHCP Config as ReadOnly Fields
AnilGadiyarHJ c0b5302
Merge branch 'main' of github.com:AnilGadiyarHJ/universal-ddi-python-…
AnilGadiyarHJ faf2ccf
Initial commit
AnilGadiyarHJ 6e6cf77
cloud discovery changes
AnilGadiyarHJ 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
Some comments aren't visible on the classic Files Changed page.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| # ZoneFilter | ||
|
|
||
|
|
||
| ## Properties | ||
|
|
||
| Name | Type | Description | Notes | ||
| ------------ | ------------- | ------------- | ------------- | ||
| **action** | **str** | | [optional] | ||
| **wildcards** | **List[str]** | | [optional] | ||
|
|
||
| ## Example | ||
|
|
||
| ```python | ||
| from cloud_discovery.models.zone_filter import ZoneFilter | ||
|
|
||
| # TODO update the JSON string below | ||
| json = "{}" | ||
| # create an instance of ZoneFilter from a JSON string | ||
| zone_filter_instance = ZoneFilter.from_json(json) | ||
| # print the JSON string representation of the object | ||
| print(ZoneFilter.to_json()) | ||
|
|
||
| # convert the object into a dict | ||
| zone_filter_dict = zone_filter_instance.to_dict() | ||
| # create an instance of ZoneFilter from a dict | ||
| zone_filter_from_dict = ZoneFilter.from_dict(zone_filter_dict) | ||
| ``` | ||
| [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) | ||
|
|
||
|
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| # coding: utf-8 | ||
|
|
||
| """ | ||
| Discovery Configuration API V2 | ||
|
|
||
| The Discovery configuration service is a Universal DDI Service that provides configuration for accessing and syncing the Cloud assets Base Paths: 1. provider: **/api/cloud_discovery/v2/** | ||
|
|
||
| The version of the OpenAPI document: v2 | ||
| 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, ConfigDict, StrictStr | ||
| from typing import Any, ClassVar, Dict, List, Optional | ||
| from typing import Optional, Set | ||
|
unasra marked this conversation as resolved.
|
||
| from typing_extensions import Self | ||
|
|
||
|
|
||
| class ZoneFilter(BaseModel): | ||
| """ | ||
| ZoneFilter | ||
| """ | ||
|
|
||
| # noqa: E501 | ||
| action: Optional[StrictStr] = None | ||
| wildcards: Optional[List[StrictStr]] = None | ||
| additional_properties: Dict[str, Any] = {} | ||
| __properties: ClassVar[List[str]] = ["action", "wildcards"] | ||
|
|
||
| model_config = ConfigDict( | ||
| populate_by_name=True, | ||
| validate_assignment=True, | ||
| protected_namespaces=(), | ||
| ) | ||
|
|
||
| def to_str(self) -> str: | ||
| """Returns the string representation of the model using alias""" | ||
| return pprint.pformat(self.model_dump(by_alias=True)) | ||
|
|
||
| def to_json(self) -> str: | ||
| """Returns the JSON representation of the model using alias""" | ||
| # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead | ||
| return json.dumps(self.to_dict()) | ||
|
|
||
| @classmethod | ||
| def from_json(cls, json_str: str) -> Optional[Self]: | ||
| """Create an instance of ZoneFilter from a JSON string""" | ||
| return cls.from_dict(json.loads(json_str)) | ||
|
|
||
| def to_dict(self) -> Dict[str, Any]: | ||
| """Return the dictionary representation of the model using alias. | ||
|
|
||
| This has the following differences from calling pydantic's | ||
| `self.model_dump(by_alias=True)`: | ||
|
|
||
| * `None` is only added to the output dict for nullable fields that | ||
| were set at model initialization. Other fields with value `None` | ||
| are ignored. | ||
| * Fields in `self.additional_properties` are added to the output dict. | ||
| """ | ||
| excluded_fields: Set[str] = set([ | ||
| "additional_properties", | ||
| ]) | ||
|
|
||
| _dict = self.model_dump( | ||
| by_alias=True, | ||
| exclude=excluded_fields, | ||
| exclude_none=True, | ||
| ) | ||
| # puts key-value pairs in additional_properties in the top level | ||
| if self.additional_properties is not None: | ||
| for _key, _value in self.additional_properties.items(): | ||
| _dict[_key] = _value | ||
|
|
||
| return _dict | ||
|
|
||
| @classmethod | ||
| def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: | ||
| """Create an instance of ZoneFilter from a dict""" | ||
| if obj is None: | ||
| return None | ||
|
|
||
| if not isinstance(obj, dict): | ||
| return cls.model_validate(obj) | ||
|
|
||
| _obj = cls.model_validate({ | ||
| "action": obj.get("action"), | ||
| "wildcards": obj.get("wildcards") | ||
| }) | ||
| # store additional fields in additional_properties | ||
| for _key in obj.keys(): | ||
| if _key not in cls.__properties: | ||
| _obj.additional_properties[_key] = obj.get(_key) | ||
|
|
||
| return _obj | ||
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.