Skip to content
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
4 changes: 2 additions & 2 deletions docs/EmailDomain.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**display_name** | **str** | |
**user_name** | **str** | |
**brand_id** | **str** | |
**domain** | **str** | |
**validation_subdomain** | **str** | Subdomain for the email sender's custom mail domain. Specify your subdomain when you configure a custom mail domain. | [optional] [default to 'mail']
**display_name** | **str** | |
**user_name** | **str** | |

## Example

Expand Down
4 changes: 2 additions & 2 deletions docs/EmailDomainResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**display_name** | **str** | |
**user_name** | **str** | |
**dns_validation_records** | [**List[EmailDomainDNSRecord]**](EmailDomainDNSRecord.md) | | [optional]
**domain** | **str** | | [optional]
**id** | **str** | | [optional]
**validation_status** | [**EmailDomainStatus**](EmailDomainStatus.md) | | [optional]
**validation_subdomain** | **str** | The subdomain for the email sender's custom mail domain | [optional] [default to 'mail']
**display_name** | **str** | |
**user_name** | **str** | |

## Example

Expand Down
6 changes: 3 additions & 3 deletions docs/EmailDomainResponseWithEmbedded.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**embedded** | **object** | | [optional] [readonly]
**display_name** | **str** | |
**user_name** | **str** | |
**dns_validation_records** | [**List[EmailDomainDNSRecord]**](EmailDomainDNSRecord.md) | | [optional]
**domain** | **str** | | [optional]
**id** | **str** | | [optional]
**validation_status** | [**EmailDomainStatus**](EmailDomainStatus.md) | | [optional]
**validation_subdomain** | **str** | The subdomain for the email sender's custom mail domain | [optional] [default to 'mail']
**display_name** | **str** | |
**user_name** | **str** | |
**embedded** | [**EmailDomainResponseWithEmbeddedAllOfEmbedded**](EmailDomainResponseWithEmbeddedAllOfEmbedded.md) | | [optional]

## Example

Expand Down
29 changes: 29 additions & 0 deletions docs/EmailDomainResponseWithEmbeddedAllOfEmbedded.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# EmailDomainResponseWithEmbeddedAllOfEmbedded


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**brands** | [**List[Brand]**](Brand.md) | | [optional]

## Example

```python
from okta.models.email_domain_response_with_embedded_all_of_embedded import EmailDomainResponseWithEmbeddedAllOfEmbedded

# TODO update the JSON string below
json = "{}"
# create an instance of EmailDomainResponseWithEmbeddedAllOfEmbedded from a JSON string
email_domain_response_with_embedded_all_of_embedded_instance = EmailDomainResponseWithEmbeddedAllOfEmbedded.from_json(json)
# print the JSON string representation of the object
print(EmailDomainResponseWithEmbeddedAllOfEmbedded.to_json())

# convert the object into a dict
email_domain_response_with_embedded_all_of_embedded_dict = email_domain_response_with_embedded_all_of_embedded_instance.to_dict()
# create an instance of EmailDomainResponseWithEmbeddedAllOfEmbedded from a dict
email_domain_response_with_embedded_all_of_embedded_from_dict = EmailDomainResponseWithEmbeddedAllOfEmbedded.from_dict(email_domain_response_with_embedded_all_of_embedded_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)


1 change: 1 addition & 0 deletions okta/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,7 @@
"EmailDomainDNSRecordType": "okta.models.email_domain_dns_record_type",
"EmailDomainResponse": "okta.models.email_domain_response",
"EmailDomainResponseWithEmbedded": "okta.models.email_domain_response_with_embedded",
"EmailDomainResponseWithEmbeddedAllOfEmbedded": "okta.models.email_domain_response_with_embedded_all_of_embedded",
"EmailDomainStatus": "okta.models.email_domain_status",
"EmailPreview": "okta.models.email_preview",
"EmailPreviewLinks": "okta.models.email_preview_links",
Expand Down
1 change: 1 addition & 0 deletions okta/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,6 +852,7 @@
"EmailDomainDNSRecordType": "okta.models.email_domain_dns_record_type",
"EmailDomainResponse": "okta.models.email_domain_response",
"EmailDomainResponseWithEmbedded": "okta.models.email_domain_response_with_embedded",
"EmailDomainResponseWithEmbeddedAllOfEmbedded": "okta.models.email_domain_response_with_embedded_all_of_embedded",
"EmailDomainStatus": "okta.models.email_domain_status",
"EmailPreview": "okta.models.email_preview",
"EmailPreviewLinks": "okta.models.email_preview_links",
Expand Down
24 changes: 20 additions & 4 deletions okta/models/email_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class EmailDomain(BaseModel):
EmailDomain
""" # noqa: E501

display_name: StrictStr = Field(alias="displayName")
user_name: StrictStr = Field(alias="userName")
brand_id: StrictStr = Field(alias="brandId")
domain: StrictStr
validation_subdomain: Optional[StrictStr] = Field(
Expand All @@ -45,9 +47,13 @@ class EmailDomain(BaseModel):
"mail domain.",
alias="validationSubdomain",
)
display_name: StrictStr = Field(alias="displayName")
user_name: StrictStr = Field(alias="userName")
__properties: ClassVar[List[str]] = ["displayName", "userName"]
__properties: ClassVar[List[str]] = [
"displayName",
"userName",
"brandId",
"domain",
"validationSubdomain",
]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -98,6 +104,16 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate(
{"displayName": obj.get("displayName"), "userName": obj.get("userName")}
{
"displayName": obj.get("displayName"),
"userName": obj.get("userName"),
"brandId": obj.get("brandId"),
"domain": obj.get("domain"),
"validationSubdomain": (
obj.get("validationSubdomain")
if obj.get("validationSubdomain") is not None
else "mail"
),
}
)
return _obj
42 changes: 38 additions & 4 deletions okta/models/email_domain_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ class EmailDomainResponse(BaseModel):
EmailDomainResponse
""" # noqa: E501

display_name: StrictStr = Field(alias="displayName")
user_name: StrictStr = Field(alias="userName")
dns_validation_records: Optional[List[EmailDomainDNSRecord]] = Field(
default=None, alias="dnsValidationRecords"
)
Expand All @@ -53,9 +55,15 @@ class EmailDomainResponse(BaseModel):
description="The subdomain for the email sender's custom mail domain",
alias="validationSubdomain",
)
display_name: StrictStr = Field(alias="displayName")
user_name: StrictStr = Field(alias="userName")
__properties: ClassVar[List[str]] = ["displayName", "userName"]
__properties: ClassVar[List[str]] = [
"displayName",
"userName",
"dnsValidationRecords",
"domain",
"id",
"validationStatus",
"validationSubdomain",
]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -94,6 +102,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 dns_validation_records (list)
_items = []
if self.dns_validation_records:
for _item in self.dns_validation_records:
if _item:
_items.append(_item.to_dict())
_dict["dnsValidationRecords"] = _items
return _dict

@classmethod
Expand All @@ -106,6 +121,25 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
return cls.model_validate(obj)

_obj = cls.model_validate(
{"displayName": obj.get("displayName"), "userName": obj.get("userName")}
{
"displayName": obj.get("displayName"),
"userName": obj.get("userName"),
"dnsValidationRecords": (
[
EmailDomainDNSRecord.from_dict(_item)
for _item in obj["dnsValidationRecords"]
]
if obj.get("dnsValidationRecords") is not None
else None
),
"domain": obj.get("domain"),
"id": obj.get("id"),
"validationStatus": obj.get("validationStatus"),
"validationSubdomain": (
obj.get("validationSubdomain")
if obj.get("validationSubdomain") is not None
else "mail"
),
}
)
return _obj
41 changes: 28 additions & 13 deletions okta/models/email_domain_response_with_embedded.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
from typing_extensions import Self

from okta.models.email_domain_dns_record import EmailDomainDNSRecord
from okta.models.email_domain_response_with_embedded_all_of_embedded import (
EmailDomainResponseWithEmbeddedAllOfEmbedded,
)
from okta.models.email_domain_status import EmailDomainStatus


Expand All @@ -40,7 +43,8 @@ class EmailDomainResponseWithEmbedded(BaseModel):
EmailDomainResponseWithEmbedded
""" # noqa: E501

embedded: Optional[object] = Field(default=None, alias="_embedded")
display_name: StrictStr = Field(alias="displayName")
user_name: StrictStr = Field(alias="userName")
dns_validation_records: Optional[List[EmailDomainDNSRecord]] = Field(
default=None, alias="dnsValidationRecords"
)
Expand All @@ -54,16 +58,18 @@ class EmailDomainResponseWithEmbedded(BaseModel):
description="The subdomain for the email sender's custom mail domain",
alias="validationSubdomain",
)
display_name: StrictStr = Field(alias="displayName")
user_name: StrictStr = Field(alias="userName")
embedded: Optional[EmailDomainResponseWithEmbeddedAllOfEmbedded] = Field(
default=None, alias="_embedded"
)
__properties: ClassVar[List[str]] = [
"displayName",
"userName",
"dnsValidationRecords",
"domain",
"id",
"validationStatus",
"validationSubdomain",
"displayName",
"userName",
"_embedded",
]

model_config = ConfigDict(
Expand Down Expand Up @@ -95,13 +101,8 @@ def to_dict(self) -> Dict[str, Any]:
* `None` is only added to the output dict for nullable fields that
were set at model initialization. Other fields with value `None`
are ignored.
* OpenAPI `readOnly` fields are excluded.
"""
excluded_fields: Set[str] = set(
[
"embedded",
]
)
excluded_fields: Set[str] = set([])

_dict = self.model_dump(
by_alias=True,
Expand All @@ -115,6 +116,13 @@ def to_dict(self) -> Dict[str, Any]:
if _item:
_items.append(_item.to_dict())
_dict["dnsValidationRecords"] = _items
# override the default output from pydantic by calling `to_dict()` of embedded
if self.embedded:
if not isinstance(self.embedded, dict):
_dict["_embedded"] = self.embedded.to_dict()
else:
_dict["_embedded"] = self.embedded

return _dict

@classmethod
Expand All @@ -128,6 +136,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:

_obj = cls.model_validate(
{
"displayName": obj.get("displayName"),
"userName": obj.get("userName"),
"dnsValidationRecords": (
[
EmailDomainDNSRecord.from_dict(_item)
Expand All @@ -144,8 +154,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
if obj.get("validationSubdomain") is not None
else "mail"
),
"displayName": obj.get("displayName"),
"userName": obj.get("userName"),
"_embedded": (
EmailDomainResponseWithEmbeddedAllOfEmbedded.from_dict(
obj["_embedded"]
)
if obj.get("_embedded") is not None
else None
),
}
)
return _obj
Loading
Loading