|
| 1 | +""" Code is generated by ucloud-model, DO NOT EDIT IT. """ |
| 2 | + |
| 3 | +from ucloud.core.typesystem import schema, fields |
| 4 | +from ucloud.services.ses.schemas import models |
| 5 | + |
| 6 | +""" SES API Schema |
| 7 | +""" |
| 8 | + |
| 9 | + |
| 10 | +""" |
| 11 | +API: SendSESEmail |
| 12 | +
|
| 13 | +直接发送邮件,无需创建发送任务和模版,支持 HTML/纯文本内容、主题、抄送/密送、附件和邮件头,单次最多 100 个收件人。 |
| 14 | +""" |
| 15 | + |
| 16 | + |
| 17 | +class SendSESEmailParamAttachmentsSchema(schema.RequestSchema): |
| 18 | + """SendSESEmailParamAttachments -""" |
| 19 | + |
| 20 | + fields = { |
| 21 | + "ContentType": fields.Str(required=False, dump_to="ContentType"), |
| 22 | + "Data": fields.Str(required=False, dump_to="Data"), |
| 23 | + "Filename": fields.Str(required=False, dump_to="Filename"), |
| 24 | + } |
| 25 | + |
| 26 | + |
| 27 | +class SendSESEmailParamHeadersSchema(schema.RequestSchema): |
| 28 | + """SendSESEmailParamHeaders -""" |
| 29 | + |
| 30 | + fields = { |
| 31 | + "Name": fields.Str(required=False, dump_to="Name"), |
| 32 | + "Value": fields.Str(required=False, dump_to="Value"), |
| 33 | + } |
| 34 | + |
| 35 | + |
| 36 | +class SendSESEmailRequestSchema(schema.RequestSchema): |
| 37 | + """SendSESEmail - 直接发送邮件,无需创建发送任务和模版,支持 HTML/纯文本内容、主题、抄送/密送、附件和邮件头,单次最多 100 个收件人。""" |
| 38 | + |
| 39 | + fields = { |
| 40 | + "Attachments": fields.List(SendSESEmailParamAttachmentsSchema()), |
| 41 | + "Bcc": fields.List(fields.Str()), |
| 42 | + "Cc": fields.List(fields.Str()), |
| 43 | + "From": fields.Str(required=True, dump_to="From"), |
| 44 | + "FromName": fields.Str(required=False, dump_to="FromName"), |
| 45 | + "Headers": fields.List(SendSESEmailParamHeadersSchema()), |
| 46 | + "Html": fields.Str(required=False, dump_to="Html"), |
| 47 | + "PreHeader": fields.Str(required=False, dump_to="PreHeader"), |
| 48 | + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), |
| 49 | + "Region": fields.Str(required=False, dump_to="Region"), |
| 50 | + "Subject": fields.Str(required=True, dump_to="Subject"), |
| 51 | + "Text": fields.Str(required=False, dump_to="Text"), |
| 52 | + "To": fields.List(fields.Str()), |
| 53 | + "Zone": fields.Str(required=False, dump_to="Zone"), |
| 54 | + } |
| 55 | + |
| 56 | + |
| 57 | +class SendSESEmailResponseSchema(schema.ResponseSchema): |
| 58 | + """SendSESEmail - 直接发送邮件,无需创建发送任务和模版,支持 HTML/纯文本内容、主题、抄送/密送、附件和邮件头,单次最多 100 个收件人。""" |
| 59 | + |
| 60 | + fields = { |
| 61 | + "FailContent": fields.List( |
| 62 | + models.FailedTargetEmailSchema(), |
| 63 | + required=True, |
| 64 | + load_from="FailContent", |
| 65 | + ), |
| 66 | + "SessionNo": fields.Str(required=True, load_from="SessionNo"), |
| 67 | + "SuccessCount": fields.Int(required=True, load_from="SuccessCount"), |
| 68 | + } |
| 69 | + |
| 70 | + |
| 71 | +""" |
| 72 | +API: SendSESEmailTemplate |
| 73 | +
|
| 74 | +通过模版发送邮件,无需创建发送任务。支持自定义主题、摘要、预览文本、抄送/密送、附件和邮件头,单次最多 100 个收件人。 |
| 75 | +""" |
| 76 | + |
| 77 | + |
| 78 | +class SendSESEmailTemplateParamAttachmentsSchema(schema.RequestSchema): |
| 79 | + """SendSESEmailTemplateParamAttachments -""" |
| 80 | + |
| 81 | + fields = { |
| 82 | + "ContentType": fields.Str(required=False, dump_to="ContentType"), |
| 83 | + "Data": fields.Str(required=False, dump_to="Data"), |
| 84 | + "Filename": fields.Str(required=False, dump_to="Filename"), |
| 85 | + } |
| 86 | + |
| 87 | + |
| 88 | +class SendSESEmailTemplateParamEmailContentSchema(schema.RequestSchema): |
| 89 | + """SendSESEmailTemplateParamEmailContent -""" |
| 90 | + |
| 91 | + fields = { |
| 92 | + "Bcc": fields.List(fields.Str()), |
| 93 | + "Cc": fields.List(fields.Str()), |
| 94 | + "TemplateVariableParams": fields.List(fields.Str()), |
| 95 | + "To": fields.Str(required=False, dump_to="To"), |
| 96 | + } |
| 97 | + |
| 98 | + |
| 99 | +class SendSESEmailTemplateParamHeadersSchema(schema.RequestSchema): |
| 100 | + """SendSESEmailTemplateParamHeaders -""" |
| 101 | + |
| 102 | + fields = { |
| 103 | + "Name": fields.Str(required=False, dump_to="Name"), |
| 104 | + "Value": fields.Str(required=False, dump_to="Value"), |
| 105 | + } |
| 106 | + |
| 107 | + |
| 108 | +class SendSESEmailTemplateRequestSchema(schema.RequestSchema): |
| 109 | + """SendSESEmailTemplate - 通过模版发送邮件,无需创建发送任务。支持自定义主题、摘要、预览文本、抄送/密送、附件和邮件头,单次最多 100 个收件人。""" |
| 110 | + |
| 111 | + fields = { |
| 112 | + "Attachments": fields.List( |
| 113 | + SendSESEmailTemplateParamAttachmentsSchema() |
| 114 | + ), |
| 115 | + "EmailContent": fields.List( |
| 116 | + SendSESEmailTemplateParamEmailContentSchema() |
| 117 | + ), |
| 118 | + "From": fields.Str(required=True, dump_to="From"), |
| 119 | + "FromName": fields.Str(required=False, dump_to="FromName"), |
| 120 | + "Headers": fields.List(SendSESEmailTemplateParamHeadersSchema()), |
| 121 | + "PreHeader": fields.Str(required=False, dump_to="PreHeader"), |
| 122 | + "ProjectId": fields.Str(required=False, dump_to="ProjectId"), |
| 123 | + "Region": fields.Str(required=False, dump_to="Region"), |
| 124 | + "Subject": fields.Str(required=True, dump_to="Subject"), |
| 125 | + "TemplateId": fields.Str(required=True, dump_to="TemplateId"), |
| 126 | + "Zone": fields.Str(required=False, dump_to="Zone"), |
| 127 | + } |
| 128 | + |
| 129 | + |
| 130 | +class SendSESEmailTemplateResponseSchema(schema.ResponseSchema): |
| 131 | + """SendSESEmailTemplate - 通过模版发送邮件,无需创建发送任务。支持自定义主题、摘要、预览文本、抄送/密送、附件和邮件头,单次最多 100 个收件人。""" |
| 132 | + |
| 133 | + fields = { |
| 134 | + "FailContent": fields.List( |
| 135 | + models.FailedTargetEmailSchema(), |
| 136 | + required=True, |
| 137 | + load_from="FailContent", |
| 138 | + ), |
| 139 | + "SessionNo": fields.Str(required=True, load_from="SessionNo"), |
| 140 | + "SuccessCount": fields.Int(required=True, load_from="SuccessCount"), |
| 141 | + } |
0 commit comments