azure.communication.email package

class azure.communication.email.EmailAddress(*, email: str, display_name: Optional[str] = None, **kwargs)[source]

An object representing the email address and its display name.

All required parameters must be populated in order to send to Azure.

Variables
  • email (str) – Email address. Required.

  • display_name (str) – Email display name.

Keyword Arguments
  • email (str) – Email address. Required.

  • display_name (str) – Email display name.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.EmailAttachment(*, name: str, attachment_type: Union[str, _models.EmailAttachmentType], content_bytes_base64: str, **kwargs)[source]

Attachment to the email.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – Name of the attachment. Required.

  • attachment_type (str or EmailAttachmentType) – The type of attachment file. Required. Known values are: “avi”, “bmp”, “doc”, “docm”, “docx”, “gif”, “jpeg”, “mp3”, “one”, “pdf”, “png”, “ppsm”, “ppsx”, “ppt”, “pptm”, “pptx”, “pub”, “rpmsg”, “rtf”, “tif”, “txt”, “vsd”, “wav”, “wma”, “xls”, “xlsb”, “xlsm”, and “xlsx”.

  • content_bytes_base64 (str) – Base64 encoded contents of the attachment. Required.

Keyword Arguments
  • name (str) – Name of the attachment. Required.

  • attachment_type (str or EmailAttachmentType) – The type of attachment file. Required. Known values are: “avi”, “bmp”, “doc”, “docm”, “docx”, “gif”, “jpeg”, “mp3”, “one”, “pdf”, “png”, “ppsm”, “ppsx”, “ppt”, “pptm”, “pptx”, “pub”, “rpmsg”, “rtf”, “tif”, “txt”, “vsd”, “wav”, “wma”, “xls”, “xlsb”, “xlsm”, and “xlsx”.

  • content_bytes_base64 (str) – Base64 encoded contents of the attachment. Required.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.EmailAttachmentType(value)[source]

The type of attachment file.

AVI = 'avi'
BMP = 'bmp'
DOC = 'doc'
DOCM = 'docm'
DOCX = 'docx'
GIF = 'gif'
JPEG = 'jpeg'
MP3 = 'mp3'
ONE = 'one'
PDF = 'pdf'
PNG = 'png'
PPSM = 'ppsm'
PPSX = 'ppsx'
PPT = 'ppt'
PPTM = 'pptm'
PPTX = 'pptx'
PUB = 'pub'
RPMSG = 'rpmsg'
RTF = 'rtf'
TIF = 'tif'
TXT = 'txt'
VSD = 'vsd'
WAV = 'wav'
WMA = 'wma'
XLS = 'xls'
XLSB = 'xlsb'
XLSM = 'xlsm'
XLSX = 'xlsx'
class azure.communication.email.EmailClient(endpoint: str, credential: Union[azure.core.credentials.TokenCredential, azure.core.credentials.AzureKeyCredential], **kwargs)[source]

A client to interact with the AzureCommunicationService Email gateway.

This client provides operations to send an email and monitor its status.

Parameters
  • endpoint (str) – The endpoint url for Azure Communication Service resource.

  • AzureKeyCredential] credential (Union[TokenCredential,) – The credential we use to authenticate against the service.

classmethod from_connection_string(conn_str: str, **kwargs)azure.communication.email._email_client.EmailClient[source]

Create EmailClient from a Connection String.

Parameters

conn_str (str) – A connection string to an Azure Communication Service resource.

Returns

Instance of EmailClient.

Return type

EmailClient

get_send_status(message_id: str, **kwargs)azure.communication.email._generated.models._models_py3.SendStatusResult[source]

Gets the status of a message sent previously.

Parameters

message_id (str) – System generated message id (GUID) returned from a previous call to send email

Returns

SendStatusResult

Return type

SendStatusResult

send(email_message: azure.communication.email._generated.models._models_py3.EmailMessage, **kwargs)azure.communication.email._generated.models._patch.SendEmailResult[source]

Queues an email message to be sent to one or more recipients.

Parameters

email_message (EmailMessage) – The message payload for sending an email.

Returns

SendEmailResult

Return type

SendEmailResult

class azure.communication.email.EmailContent(*, subject: str, plain_text: Optional[str] = None, html: Optional[str] = None, **kwargs)[source]

Content of the email.

All required parameters must be populated in order to send to Azure.

Variables
  • subject (str) – Subject of the email message. Required.

  • plain_text (str) – Plain text version of the email message.

  • html (str) – Html version of the email message.

Keyword Arguments
  • subject (str) – Subject of the email message. Required.

  • plain_text (str) – Plain text version of the email message.

  • html (str) – Html version of the email message.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.EmailCustomHeader(*, name: str, value: str, **kwargs)[source]

Custom header for email.

All required parameters must be populated in order to send to Azure.

Variables
  • name (str) – Header name. Required.

  • value (str) – Header value. Required.

Keyword Arguments
  • name (str) – Header name. Required.

  • value (str) – Header value. Required.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.EmailImportance(value)[source]

The importance type for the email.

HIGH = 'high'
LOW = 'low'
NORMAL = 'normal'
class azure.communication.email.EmailMessage(*, sender: str, content: _models.EmailContent, recipients: _models.EmailRecipients, custom_headers: Optional[List[_models.EmailCustomHeader]] = None, importance: Union[str, _models.EmailImportance] = 'normal', attachments: Optional[List[_models.EmailAttachment]] = None, reply_to: Optional[List[_models.EmailAddress]] = None, disable_user_engagement_tracking: Optional[bool] = None, **kwargs)[source]

Message payload for sending an email.

All required parameters must be populated in order to send to Azure.

Variables
  • custom_headers (list[EmailCustomHeader]) – Custom email headers to be passed.

  • sender (str) – Sender email address from a verified domain. Required.

  • content (EmailContent) – Email content to be sent. Required.

  • importance (str or EmailImportance) – The importance type for the email. Known values are: “high”, “normal”, and “low”.

  • recipients (EmailRecipients) – Recipients for the email. Required.

  • attachments (list[EmailAttachment]) – list of attachments.

  • reply_to (list[EmailAddress]) – Email addresses where recipients’ replies will be sent to.

  • disable_user_engagement_tracking (bool) – Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane.

Keyword Arguments
  • custom_headers (list[EmailCustomHeader]) – Custom email headers to be passed.

  • sender (str) – Sender email address from a verified domain. Required.

  • content (EmailContent) – Email content to be sent. Required.

  • importance (str or EmailImportance) – The importance type for the email. Known values are: “high”, “normal”, and “low”.

  • recipients (EmailRecipients) – Recipients for the email. Required.

  • attachments (list[EmailAttachment]) – list of attachments.

  • reply_to (list[EmailAddress]) – Email addresses where recipients’ replies will be sent to.

  • disable_user_engagement_tracking (bool) – Indicates whether user engagement tracking should be disabled for this request if the resource-level user engagement tracking setting was already enabled in the control plane.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.EmailRecipients(*, to: List[_models.EmailAddress], cc: Optional[List[_models.EmailAddress]] = None, bcc: Optional[List[_models.EmailAddress]] = None, **kwargs)[source]

Recipients of the email.

All required parameters must be populated in order to send to Azure.

Variables
  • to (list[EmailAddress]) – Email To recipients. Required.

  • cc (list[EmailAddress]) – Email CC recipients.

  • bcc (list[EmailAddress]) – Email BCC recipients.

Keyword Arguments
  • to (list[EmailAddress]) – Email To recipients. Required.

  • cc (list[EmailAddress]) – Email CC recipients.

  • bcc (list[EmailAddress]) – Email BCC recipients.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.SendEmailResult(**kwargs)[source]

Results of a sent email.

All required parameters must be populated in order to send to Azure.

Variables

message_id (str) – System generated id of an email message sent. Required.

Keyword Arguments

message_id (str) – System generated id of an email message sent. Required.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list

class azure.communication.email.SendStatus(value)[source]

The type indicating the status of a request.

DROPPED = 'dropped'

The message could not be processed and was dropped.

OUT_FOR_DELIVERY = 'outForDelivery'

The message has been processed and is now out for delivery.

QUEUED = 'queued'

The message has passed basic validations and has been queued to be processed further.

class azure.communication.email.SendStatusResult(*, message_id: str, status: Union[str, _models.SendStatus], **kwargs)[source]

Status of an email message that was sent previously.

All required parameters must be populated in order to send to Azure.

Variables
  • message_id (str) – System generated id of an email message sent. Required.

  • status (str or SendStatus) – The type indicating the status of a request. Required. Known values are: “queued”, “outForDelivery”, and “dropped”.

Keyword Arguments
  • message_id (str) – System generated id of an email message sent. Required.

  • status (str or SendStatus) – The type indicating the status of a request. Required. Known values are: “queued”, “outForDelivery”, and “dropped”.

as_dict(keep_readonly=True, key_transformer=<function attribute_transformer>, **kwargs)

Return a dict that can be JSONify using json.dump.

Advanced usage might optionally use a callback as parameter:

Key is the attribute name used in Python. Attr_desc is a dict of metadata. Currently contains ‘type’ with the msrest type and ‘key’ with the RestAPI encoded key. Value is the current value in this object.

The string returned will be used to serialize the key. If the return type is a list, this is considered hierarchical result dict.

See the three examples in this file:

  • attribute_transformer

  • full_restapi_key_transformer

  • last_restapi_key_transformer

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

key_transformer (function) – A key transformer function.

Returns

A dict JSON compatible object

Return type

dict

classmethod deserialize(data, content_type=None)

Parse a str using the RestAPI syntax and return a model.

Parameters
  • data (str) – A str using RestAPI structure. JSON by default.

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod enable_additional_properties_sending()
classmethod from_dict(data, key_extractors=None, content_type=None)

Parse a dict using given key extractor return a model.

By default consider key extractors (rest_key_case_insensitive_extractor, attribute_key_case_insensitive_extractor and last_rest_key_case_insensitive_extractor)

Parameters
  • data (dict) – A dict using RestAPI structure

  • content_type (str) – JSON by default, set application/xml if XML.

Returns

An instance of this model

Raises

DeserializationError if something went wrong

classmethod is_xml_model()
serialize(keep_readonly=False, **kwargs)

Return the JSON that would be sent to azure from this model.

This is an alias to as_dict(full_restapi_key_transformer, keep_readonly=False).

If you want XML serialization, you can pass the kwargs is_xml=True.

Parameters

keep_readonly (bool) – If you want to serialize the readonly attributes

Returns

A dict JSON compatible object

Return type

dict

validate()

Validate this model recursively and return a list of ValidationError.

Returns

A list of validation error

Return type

list