Skip to content
Open
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
2 changes: 1 addition & 1 deletion services/dns/oas_commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7db6460b25eee93a646427ec41a08f06d75615d3
08b95d7f2e3b9c288a1b5d1f1f6d13b0632b7ad0
20 changes: 20 additions & 0 deletions services/dns/src/stackit/dns/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,19 @@
"DomainObservabilityExtension",
"ErrorMessage",
"ExportRecordSetsPayload",
"FlushDomainPayload",
"FlushDomainResponse",
"ImportRecordSetsPayload",
"ImportRecordSetsResponse",
"ImportSummary",
"Label",
"ListLabelsResponse",
"ListRecordSetsResponse",
"ListZonesResponse",
"LookupDomainPayload",
"LookupDomainResponse",
"LookupRecord",
"LookupResult",
"Message",
"MoveCodeResponse",
"MoveZonePayload",
Expand Down Expand Up @@ -109,6 +115,12 @@
from stackit.dns.models.export_record_sets_payload import (
ExportRecordSetsPayload as ExportRecordSetsPayload,
)
from stackit.dns.models.flush_domain_payload import (
FlushDomainPayload as FlushDomainPayload,
)
from stackit.dns.models.flush_domain_response import (
FlushDomainResponse as FlushDomainResponse,
)
from stackit.dns.models.import_record_sets_payload import (
ImportRecordSetsPayload as ImportRecordSetsPayload,
)
Expand All @@ -126,6 +138,14 @@
from stackit.dns.models.list_zones_response import (
ListZonesResponse as ListZonesResponse,
)
from stackit.dns.models.lookup_domain_payload import (
LookupDomainPayload as LookupDomainPayload,
)
from stackit.dns.models.lookup_domain_response import (
LookupDomainResponse as LookupDomainResponse,
)
from stackit.dns.models.lookup_record import LookupRecord as LookupRecord
from stackit.dns.models.lookup_result import LookupResult as LookupResult
from stackit.dns.models.message import Message as Message
from stackit.dns.models.move_code_response import MoveCodeResponse as MoveCodeResponse
from stackit.dns.models.move_zone_payload import MoveZonePayload as MoveZonePayload
Expand Down
490 changes: 490 additions & 0 deletions services/dns/src/stackit/dns/api/default_api.py

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions services/dns/src/stackit/dns/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,19 @@
)
from stackit.dns.models.error_message import ErrorMessage
from stackit.dns.models.export_record_sets_payload import ExportRecordSetsPayload
from stackit.dns.models.flush_domain_payload import FlushDomainPayload
from stackit.dns.models.flush_domain_response import FlushDomainResponse
from stackit.dns.models.import_record_sets_payload import ImportRecordSetsPayload
from stackit.dns.models.import_record_sets_response import ImportRecordSetsResponse
from stackit.dns.models.import_summary import ImportSummary
from stackit.dns.models.label import Label
from stackit.dns.models.list_labels_response import ListLabelsResponse
from stackit.dns.models.list_record_sets_response import ListRecordSetsResponse
from stackit.dns.models.list_zones_response import ListZonesResponse
from stackit.dns.models.lookup_domain_payload import LookupDomainPayload
from stackit.dns.models.lookup_domain_response import LookupDomainResponse
from stackit.dns.models.lookup_record import LookupRecord
from stackit.dns.models.lookup_result import LookupResult
from stackit.dns.models.message import Message
from stackit.dns.models.move_code_response import MoveCodeResponse
from stackit.dns.models.move_zone_payload import MoveZonePayload
Expand Down
122 changes: 122 additions & 0 deletions services/dns/src/stackit/dns/models/flush_domain_payload.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
# coding: utf-8

"""
STACKIT DNS API

This api provides dns

The version of the OpenAPI document: 1.0
Contact: dns@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, StrictStr, field_validator
from pydantic_core import to_jsonable_python
from typing_extensions import Self


class FlushDomainPayload(BaseModel):
"""
FlushDomainPayload
""" # noqa: E501

domain: StrictStr
type: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["domain", "type"]

@field_validator("type")
def type_validate_enum(cls, value):
"""Validates the enum"""
if value is None:
return value

if value not in set(
[
"A",
"AAAA",
"SOA",
"CNAME",
"NS",
"MX",
"TXT",
"SRV",
"PTR",
"DNAME",
"CAA",
"DNSKEY",
"DS",
"LOC",
"NAPTR",
"SSHFP",
"TLSA",
"URI",
"CERT",
"SVCB",
"CSYNC",
"HINFO",
"HTTPS",
]
):
raise ValueError(
"must be one of enum values ('A', 'AAAA', 'SOA', 'CNAME', 'NS', 'MX', 'TXT', 'SRV', 'PTR', 'DNAME', 'CAA', 'DNSKEY', 'DS', 'LOC', 'NAPTR', 'SSHFP', 'TLSA', 'URI', 'CERT', 'SVCB', 'CSYNC', 'HINFO', 'HTTPS')"
)
return value

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=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"""
return json.dumps(to_jsonable_python(self.to_dict()))

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FlushDomainPayload 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.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FlushDomainPayload from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"domain": obj.get("domain"), "type": obj.get("type")})
return _obj
83 changes: 83 additions & 0 deletions services/dns/src/stackit/dns/models/flush_domain_response.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# coding: utf-8

"""
STACKIT DNS API

This api provides dns

The version of the OpenAPI document: 1.0
Contact: dns@stackit.cloud
Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.
""" # noqa: E501

from __future__ import annotations

import json
import pprint
from typing import Any, ClassVar, Dict, List, Optional, Set

from pydantic import BaseModel, ConfigDict, StrictStr
from pydantic_core import to_jsonable_python
from typing_extensions import Self


class FlushDomainResponse(BaseModel):
"""
FlushDomainResponse
""" # noqa: E501

message: Optional[StrictStr] = None
__properties: ClassVar[List[str]] = ["message"]

model_config = ConfigDict(
validate_by_name=True,
validate_by_alias=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"""
return json.dumps(to_jsonable_python(self.to_dict()))

@classmethod
def from_json(cls, json_str: str) -> Optional[Self]:
"""Create an instance of FlushDomainResponse 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.
"""
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
exclude=excluded_fields,
exclude_none=True,
)
return _dict

@classmethod
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"""Create an instance of FlushDomainResponse from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({"message": obj.get("message")})
return _obj
Loading
Loading