summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/yaegashi/msgraph.go/beta/RequestPerson.go
blob: 25b6756c170be02ea8438de4c408d4f5e40ef34a (plain) (blame)
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
// Code generated by msgraph.go/gen DO NOT EDIT.

package msgraph

import "context"

// PersonRequestBuilder is request builder for Person
type PersonRequestBuilder struct{ BaseRequestBuilder }

// Request returns PersonRequest
func (b *PersonRequestBuilder) Request() *PersonRequest {
	return &PersonRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// PersonRequest is request for Person
type PersonRequest struct{ BaseRequest }

// Get performs GET request for Person
func (r *PersonRequest) Get(ctx context.Context) (resObj *Person, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for Person
func (r *PersonRequest) Update(ctx context.Context, reqObj *Person) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for Person
func (r *PersonRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

// PersonAnniversaryRequestBuilder is request builder for PersonAnniversary
type PersonAnniversaryRequestBuilder struct{ BaseRequestBuilder }

// Request returns PersonAnniversaryRequest
func (b *PersonAnniversaryRequestBuilder) Request() *PersonAnniversaryRequest {
	return &PersonAnniversaryRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// PersonAnniversaryRequest is request for PersonAnniversary
type PersonAnniversaryRequest struct{ BaseRequest }

// Get performs GET request for PersonAnniversary
func (r *PersonAnniversaryRequest) Get(ctx context.Context) (resObj *PersonAnniversary, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for PersonAnniversary
func (r *PersonAnniversaryRequest) Update(ctx context.Context, reqObj *PersonAnniversary) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for PersonAnniversary
func (r *PersonAnniversaryRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

// PersonInterestRequestBuilder is request builder for PersonInterest
type PersonInterestRequestBuilder struct{ BaseRequestBuilder }

// Request returns PersonInterestRequest
func (b *PersonInterestRequestBuilder) Request() *PersonInterestRequest {
	return &PersonInterestRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// PersonInterestRequest is request for PersonInterest
type PersonInterestRequest struct{ BaseRequest }

// Get performs GET request for PersonInterest
func (r *PersonInterestRequest) Get(ctx context.Context) (resObj *PersonInterest, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for PersonInterest
func (r *PersonInterestRequest) Update(ctx context.Context, reqObj *PersonInterest) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for PersonInterest
func (r *PersonInterestRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

// PersonNameRequestBuilder is request builder for PersonName
type PersonNameRequestBuilder struct{ BaseRequestBuilder }

// Request returns PersonNameRequest
func (b *PersonNameRequestBuilder) Request() *PersonNameRequest {
	return &PersonNameRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// PersonNameRequest is request for PersonName
type PersonNameRequest struct{ BaseRequest }

// Get performs GET request for PersonName
func (r *PersonNameRequest) Get(ctx context.Context) (resObj *PersonName, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for PersonName
func (r *PersonNameRequest) Update(ctx context.Context, reqObj *PersonName) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for PersonName
func (r *PersonNameRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}

// PersonWebsiteRequestBuilder is request builder for PersonWebsite
type PersonWebsiteRequestBuilder struct{ BaseRequestBuilder }

// Request returns PersonWebsiteRequest
func (b *PersonWebsiteRequestBuilder) Request() *PersonWebsiteRequest {
	return &PersonWebsiteRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
	}
}

// PersonWebsiteRequest is request for PersonWebsite
type PersonWebsiteRequest struct{ BaseRequest }

// Get performs GET request for PersonWebsite
func (r *PersonWebsiteRequest) Get(ctx context.Context) (resObj *PersonWebsite, err error) {
	var query string
	if r.query != nil {
		query = "?" + r.query.Encode()
	}
	err = r.JSONRequest(ctx, "GET", query, nil, &resObj)
	return
}

// Update performs PATCH request for PersonWebsite
func (r *PersonWebsiteRequest) Update(ctx context.Context, reqObj *PersonWebsite) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

// Delete performs DELETE request for PersonWebsite
func (r *PersonWebsiteRequest) Delete(ctx context.Context) error {
	return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}