summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/yaegashi/msgraph.go/beta/RequestTime.go
blob: ef3a04c945b00f5700fb4995d27159e780ee43fb (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
// Code generated by msgraph-generate.go DO NOT EDIT.

package msgraph

import "context"

// TimeOffRequestBuilder is request builder for TimeOff
type TimeOffRequestBuilder struct{ BaseRequestBuilder }

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

// TimeOffRequest is request for TimeOff
type TimeOffRequest struct{ BaseRequest }

// Get performs GET request for TimeOff
func (r *TimeOffRequest) Get(ctx context.Context) (resObj *TimeOff, 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 TimeOff
func (r *TimeOffRequest) Update(ctx context.Context, reqObj *TimeOff) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

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

// TimeOffReasonRequestBuilder is request builder for TimeOffReason
type TimeOffReasonRequestBuilder struct{ BaseRequestBuilder }

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

// TimeOffReasonRequest is request for TimeOffReason
type TimeOffReasonRequest struct{ BaseRequest }

// Get performs GET request for TimeOffReason
func (r *TimeOffReasonRequest) Get(ctx context.Context) (resObj *TimeOffReason, 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 TimeOffReason
func (r *TimeOffReasonRequest) Update(ctx context.Context, reqObj *TimeOffReason) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

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

// TimeOffRequestObjectRequestBuilder is request builder for TimeOffRequestObject
type TimeOffRequestObjectRequestBuilder struct{ BaseRequestBuilder }

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

// TimeOffRequestObjectRequest is request for TimeOffRequestObject
type TimeOffRequestObjectRequest struct{ BaseRequest }

// Get performs GET request for TimeOffRequestObject
func (r *TimeOffRequestObjectRequest) Get(ctx context.Context) (resObj *TimeOffRequestObject, 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 TimeOffRequestObject
func (r *TimeOffRequestObjectRequest) Update(ctx context.Context, reqObj *TimeOffRequestObject) error {
	return r.JSONRequest(ctx, "PATCH", "", reqObj, nil)
}

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