EmailResponse Class
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
Constructor
EmailResponse(*, type: Literal['emailResponse'] = 'emailResponse', htmlBody: str = '', **extra_data: Any)
Keyword-Only Parameters
| Name | Description |
|---|---|
|
type
|
Default value: emailResponse
|
|
htmlBody
|
|
Methods
| create_email_response_activity |
Create a new Activity with an EmailResponse entity. |
create_email_response_activity
Create a new Activity with an EmailResponse entity.
static create_email_response_activity(email_response_html_body: str) -> Activity
Parameters
| Name | Description |
|---|---|
|
email_response_html_body
Required
|
The HTML content for the email response. |
Returns
| Type | Description |
|---|---|
|
A new Activity instance with type='message' and the EmailResponse entity attached. |
Attributes
model_config
@model_serializer def _serialize(self):
omit_if_empty = { k for k, v in self if isinstance(v, list) and not v
}
return {k: v for k, v in self if k not in omit_if_empty and v is not None}
model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'extra': 'allow', 'populate_by_name': True, 'validate_by_alias': True, 'validate_by_name': True}
html_body
html_body: str
type
type: Literal['emailResponse']