diff --git a/src/cloud_discovery/README.md b/src/cloud_discovery/README.md index e88017f..684e75b 100644 --- a/src/cloud_discovery/README.md +++ b/src/cloud_discovery/README.md @@ -110,6 +110,7 @@ Class | Method | HTTP request | Description - [SubAccountListResponseV2](cloud_discovery/docs/SubAccountListResponseV2.md) - [SubAccountProvCredConfig](cloud_discovery/docs/SubAccountProvCredConfig.md) - [SubAccountV2](cloud_discovery/docs/SubAccountV2.md) + - [ZoneFilter](cloud_discovery/docs/ZoneFilter.md) diff --git a/src/cloud_discovery/__init__.py b/src/cloud_discovery/__init__.py index 35dc0b4..ce1b663 100644 --- a/src/cloud_discovery/__init__.py +++ b/src/cloud_discovery/__init__.py @@ -45,3 +45,4 @@ from cloud_discovery.models.sub_account_list_response_v2 import SubAccountListResponseV2 from cloud_discovery.models.sub_account_prov_cred_config import SubAccountProvCredConfig from cloud_discovery.models.sub_account_v2 import SubAccountV2 +from cloud_discovery.models.zone_filter import ZoneFilter diff --git a/src/cloud_discovery/docs/DNSConfig.md b/src/cloud_discovery/docs/DNSConfig.md index 9faa968..8b80fbf 100644 --- a/src/cloud_discovery/docs/DNSConfig.md +++ b/src/cloud_discovery/docs/DNSConfig.md @@ -6,10 +6,12 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **consolidated_zone_data_enabled** | **bool** | | [optional] +**resolver_endpoints_sync_enabled** | **bool** | resolver_endpoints_sync_enabled enables discovery of inbound and outbound endpoints from third party providers. | [optional] **split_view_enabled** | **bool** | split_view_enabled consolidates private zones into a single view, which is separate from the public zone view. | [optional] **sync_type** | **str** | | [optional] **view_id** | **str** | | [optional] **view_name** | **str** | | [optional] +**zone_filters** | [**List[ZoneFilter]**](ZoneFilter.md) | | [optional] ## Example diff --git a/src/cloud_discovery/docs/DiscoveryConfig.md b/src/cloud_discovery/docs/DiscoveryConfig.md index f82e210..5b887f6 100644 --- a/src/cloud_discovery/docs/DiscoveryConfig.md +++ b/src/cloud_discovery/docs/DiscoveryConfig.md @@ -16,6 +16,8 @@ Name | Type | Description | Notes **destination_types_enabled** | **List[str]** | Destinations types enabled: Ex.: DNS, IPAM and ACCOUNT. | [optional] **destinations** | [**List[Destination]**](Destination.md) | Destinations. | [optional] **id** | **str** | Auto-generated unique discovery config ID. Format BloxID. | [optional] [readonly] +**is_disabled** | **bool** | is_disabled. Enables/Disables provider. Newer version of desired_state. | [optional] +**labs_provider** | **bool** | labs_provider. Indicates if a provider is enabled through Infoblox Labs. | [optional] **last_sync** | **datetime** | Last sync timestamp. | [optional] [readonly] **name** | **str** | Name of the discovery config. | **provider_type** | **str** | Provider type. Ex.: Amazon Web Services, Google Cloud Platform, Microsoft Azure. | diff --git a/src/cloud_discovery/docs/SourceConfig.md b/src/cloud_discovery/docs/SourceConfig.md index 646eac9..dd6abcf 100644 --- a/src/cloud_discovery/docs/SourceConfig.md +++ b/src/cloud_discovery/docs/SourceConfig.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **created_at** | **datetime** | Timestamp when the object has been created. | [optional] [readonly] **credential_config** | [**CredentialConfig**](CredentialConfig.md) | Credential configuration. Ex.: '{ \"access_identifier\": \"arn:aws:iam::1234:role/access_for_discovery\", \"region\": \"us-east-1\", \"enclave\": \"commercial/gov\" }'. | [optional] **deleted_at** | **datetime** | Timestamp when the object has been deleted. | [optional] [readonly] -**id** | **str** | Auto-generated unique source config ID. Format BloxID. | [optional] +**id** | **str** | Auto-generated unique source config ID. Format BloxID. | [optional] [readonly] **restricted_to_accounts** | **List[str]** | Provider account IDs such as accountID/ SubscriptionID to be restricted for a given source_config. | [optional] **updated_at** | **datetime** | Timestamp when the object has been updated. | [optional] [readonly] diff --git a/src/cloud_discovery/docs/ZoneFilter.md b/src/cloud_discovery/docs/ZoneFilter.md new file mode 100644 index 0000000..f91ae95 --- /dev/null +++ b/src/cloud_discovery/docs/ZoneFilter.md @@ -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) + + diff --git a/src/cloud_discovery/models/__init__.py b/src/cloud_discovery/models/__init__.py index 8239a10..e60ccc9 100644 --- a/src/cloud_discovery/models/__init__.py +++ b/src/cloud_discovery/models/__init__.py @@ -37,3 +37,4 @@ from cloud_discovery.models.sub_account_list_response_v2 import SubAccountListResponseV2 from cloud_discovery.models.sub_account_prov_cred_config import SubAccountProvCredConfig from cloud_discovery.models.sub_account_v2 import SubAccountV2 +from cloud_discovery.models.zone_filter import ZoneFilter diff --git a/src/cloud_discovery/models/discovery_config.py b/src/cloud_discovery/models/discovery_config.py index b42b44e..6023241 100644 --- a/src/cloud_discovery/models/discovery_config.py +++ b/src/cloud_discovery/models/discovery_config.py @@ -17,7 +17,7 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, Field, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from cloud_discovery.models.additional_config import AdditionalConfig from cloud_discovery.models.credential_preference import CredentialPreference @@ -67,6 +67,16 @@ class DiscoveryConfig(BaseModel): default=None, description="Auto-generated unique discovery config ID. Format BloxID." ) + is_disabled: Optional[StrictBool] = Field( + default=None, + description= + "is_disabled. Enables/Disables provider. Newer version of desired_state." + ) + labs_provider: Optional[StrictBool] = Field( + default=None, + description= + "labs_provider. Indicates if a provider is enabled through Infoblox Labs." + ) last_sync: Optional[datetime] = Field(default=None, description="Last sync timestamp.") name: StrictStr = Field(description="Name of the discovery config.") @@ -94,9 +104,10 @@ class DiscoveryConfig(BaseModel): __properties: ClassVar[List[str]] = [ "account_preference", "additional_config", "created_at", "credential_preference", "deleted_at", "description", "desired_state", - "destination_types_enabled", "destinations", "id", "last_sync", "name", - "provider_type", "source_configs", "status", "status_message", - "sync_interval", "tags", "updated_at" + "destination_types_enabled", "destinations", "id", "is_disabled", + "labs_provider", "last_sync", "name", "provider_type", + "source_configs", "status", "status_message", "sync_interval", "tags", + "updated_at" ] model_config = ConfigDict( @@ -215,6 +226,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: if obj.get("destinations") is not None else None, "id": obj.get("id"), + "is_disabled": + obj.get("is_disabled"), + "labs_provider": + obj.get("labs_provider"), "last_sync": obj.get("last_sync"), "name": diff --git a/src/cloud_discovery/models/dns_config.py b/src/cloud_discovery/models/dns_config.py index d2f0a62..9fdad5a 100644 --- a/src/cloud_discovery/models/dns_config.py +++ b/src/cloud_discovery/models/dns_config.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional +from cloud_discovery.models.zone_filter import ZoneFilter from typing import Optional, Set from typing_extensions import Self @@ -29,6 +30,11 @@ class DNSConfig(BaseModel): # noqa: E501 consolidated_zone_data_enabled: Optional[StrictBool] = None + resolver_endpoints_sync_enabled: Optional[StrictBool] = Field( + default=None, + description= + "resolver_endpoints_sync_enabled enables discovery of inbound and outbound endpoints from third party providers." + ) split_view_enabled: Optional[StrictBool] = Field( default=None, description= @@ -37,10 +43,12 @@ class DNSConfig(BaseModel): sync_type: Optional[StrictStr] = None view_id: Optional[StrictStr] = None view_name: Optional[StrictStr] = None + zone_filters: Optional[List[ZoneFilter]] = None additional_properties: Dict[str, Any] = {} __properties: ClassVar[List[str]] = [ - "consolidated_zone_data_enabled", "split_view_enabled", "sync_type", - "view_id", "view_name" + "consolidated_zone_data_enabled", "resolver_endpoints_sync_enabled", + "split_view_enabled", "sync_type", "view_id", "view_name", + "zone_filters" ] model_config = ConfigDict( @@ -83,6 +91,13 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # override the default output from pydantic by calling `to_dict()` of each item in zone_filters (list) + _items = [] + if self.zone_filters: + for _item in self.zone_filters: + if _item: + _items.append(_item.to_dict()) + _dict['zone_filters'] = _items # 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(): @@ -102,6 +117,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "consolidated_zone_data_enabled": obj.get("consolidated_zone_data_enabled"), + "resolver_endpoints_sync_enabled": + obj.get("resolver_endpoints_sync_enabled"), "split_view_enabled": obj.get("split_view_enabled"), "sync_type": @@ -109,7 +126,10 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "view_id": obj.get("view_id"), "view_name": - obj.get("view_name") + obj.get("view_name"), + "zone_filters": + [ZoneFilter.from_dict(_item) for _item in obj["zone_filters"]] + if obj.get("zone_filters") is not None else None }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/src/cloud_discovery/models/source_config.py b/src/cloud_discovery/models/source_config.py index 6a1ced8..8b225b4 100644 --- a/src/cloud_discovery/models/source_config.py +++ b/src/cloud_discovery/models/source_config.py @@ -98,12 +98,14 @@ def to_dict(self) -> Dict[str, Any]: * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. * Fields in `self.additional_properties` are added to the output dict. """ excluded_fields: Set[str] = set([ "account_schedule_id", "created_at", "deleted_at", + "id", "updated_at", "additional_properties", ]) diff --git a/src/cloud_discovery/models/zone_filter.py b/src/cloud_discovery/models/zone_filter.py new file mode 100644 index 0000000..28a9233 --- /dev/null +++ b/src/cloud_discovery/models/zone_filter.py @@ -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 +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