5
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2024-11-25 15:41:37 +00:00
matterbridge/vendor/github.com/yaegashi/msgraph.go/beta/RequestProfile.go
2020-09-04 23:29:13 +02:00

72 lines
2.1 KiB
Go

// Code generated by msgraph.go/gen DO NOT EDIT.
package msgraph
import "context"
// ProfileRequestBuilder is request builder for Profile
type ProfileRequestBuilder struct{ BaseRequestBuilder }
// Request returns ProfileRequest
func (b *ProfileRequestBuilder) Request() *ProfileRequest {
return &ProfileRequest{
BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
}
}
// ProfileRequest is request for Profile
type ProfileRequest struct{ BaseRequest }
// Get performs GET request for Profile
func (r *ProfileRequest) Get(ctx context.Context) (resObj *Profile, 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 Profile
func (r *ProfileRequest) Update(ctx context.Context, reqObj *Profile) error {
return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}
// Delete performs DELETE request for Profile
func (r *ProfileRequest) Delete(ctx context.Context) error {
return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}
// ProfilePhotoRequestBuilder is request builder for ProfilePhoto
type ProfilePhotoRequestBuilder struct{ BaseRequestBuilder }
// Request returns ProfilePhotoRequest
func (b *ProfilePhotoRequestBuilder) Request() *ProfilePhotoRequest {
return &ProfilePhotoRequest{
BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client},
}
}
// ProfilePhotoRequest is request for ProfilePhoto
type ProfilePhotoRequest struct{ BaseRequest }
// Get performs GET request for ProfilePhoto
func (r *ProfilePhotoRequest) Get(ctx context.Context) (resObj *ProfilePhoto, 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 ProfilePhoto
func (r *ProfilePhotoRequest) Update(ctx context.Context, reqObj *ProfilePhoto) error {
return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}
// Delete performs DELETE request for ProfilePhoto
func (r *ProfilePhotoRequest) Delete(ctx context.Context) error {
return r.JSONRequest(ctx, "DELETE", "", nil, nil)
}