-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodel.go
82 lines (69 loc) · 2.59 KB
/
model.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package msgraph
// ContentType represents the content type of an email message
type ContentType string
const (
ContentTypeText ContentType = "text"
ContentTypeHTML ContentType = "html"
)
func (enum ContentType) String() string {
return string(enum)
}
type AttachContentType string
const (
AttachContentTypePDF AttachContentType = "application/pdf"
AttachContentTypePNG AttachContentType = "image/png"
AttachContentTypeJPEG AttachContentType = "image/jpeg"
AttachContentTypeTXT AttachContentType = "text/plain"
AttachContentTypeDOCX AttachContentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
AttachContentTypeXLSX AttachContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
AttachContentTypeZIP AttachContentType = "application/zip"
AttachContentTypeHTML AttachContentType = "text/html"
AttachContentTypeJSON AttachContentType = "application/json"
AttachContentTypeXML AttachContentType = "application/xml"
)
func (enum AttachContentType) String() string {
return string(enum)
}
type EmailAddress struct {
Address string `json:"address"`
}
type Recipient struct {
EmailAddress EmailAddress `json:"emailAddress"`
}
type Body struct {
ContentType string `json:"contentType"`
Content string `json:"content"`
}
type Attachment struct {
ODataType string `json:"@odata.type"`
Name string `json:"name"`
ContentType string `json:"contentType"`
ContentBytes string `json:"contentBytes"`
}
type Message struct {
Subject string `json:"subject"`
Body Body `json:"body"`
ToRecipients []Recipient `json:"toRecipients,omitempty"`
CcRecipients []Recipient `json:"ccRecipients,omitempty"`
BccRecipients []Recipient `json:"bccRecipients,omitempty"`
Attachments []Attachment `json:"attachments,omitempty"`
}
type SendMailRequest struct {
Message Message `json:"message"`
SaveToSentItems bool `json:"saveToSentItems"`
}
type UserInfo struct {
OdataContext string `json:"@odata.context"`
MicrosoftGraphTips string `json:"@microsoft.graph.tips"`
UserPrincipalName string `json:"userPrincipalName"`
ID string `json:"id"`
DisplayName string `json:"displayName"`
Surname string `json:"surname"`
GivenName string `json:"givenName"`
PreferredLanguage string `json:"preferredLanguage"`
Mail string `json:"mail"`
MobilePhone *string `json:"mobilePhone"`
JobTitle *string `json:"jobTitle"`
OfficeLocation *string `json:"officeLocation"`
BusinessPhones []string `json:"businessPhones"`
}