summaryrefslogblamecommitdiffstats
path: root/vendor/github.com/yaegashi/msgraph.go/beta/RequestGroup.go
blob: d14666824f0d0e08825885e9299e6417c545bc43 (plain) (tree)
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
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
                                                




































































































































































































































































































































































































































































































































                                                                                                                                                                                                                                                                 
                                                        
                                        










                                                                                       
                                













































































































































































































































































































































                                                                                                                                                                        
                                                        
                                        










                                                                                       
                                


























































                                                                                                                                                                                                               
// Code generated by msgraph.go/gen DO NOT EDIT.

package msgraph

import (
	"context"
	"fmt"
	"io/ioutil"
	"net/http"

	"github.com/yaegashi/msgraph.go/jsonx"
)

// GroupRequestBuilder is request builder for Group
type GroupRequestBuilder struct{ BaseRequestBuilder }

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

// GroupRequest is request for Group
type GroupRequest struct{ BaseRequest }

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

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

// GroupLifecyclePolicyRequestBuilder is request builder for GroupLifecyclePolicy
type GroupLifecyclePolicyRequestBuilder struct{ BaseRequestBuilder }

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

// GroupLifecyclePolicyRequest is request for GroupLifecyclePolicy
type GroupLifecyclePolicyRequest struct{ BaseRequest }

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

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

// GroupPolicyConfigurationRequestBuilder is request builder for GroupPolicyConfiguration
type GroupPolicyConfigurationRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyConfigurationRequest is request for GroupPolicyConfiguration
type GroupPolicyConfigurationRequest struct{ BaseRequest }

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

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

// GroupPolicyConfigurationAssignmentRequestBuilder is request builder for GroupPolicyConfigurationAssignment
type GroupPolicyConfigurationAssignmentRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyConfigurationAssignmentRequest is request for GroupPolicyConfigurationAssignment
type GroupPolicyConfigurationAssignmentRequest struct{ BaseRequest }

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

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

// GroupPolicyDefinitionRequestBuilder is request builder for GroupPolicyDefinition
type GroupPolicyDefinitionRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyDefinitionRequest is request for GroupPolicyDefinition
type GroupPolicyDefinitionRequest struct{ BaseRequest }

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

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

// GroupPolicyDefinitionFileRequestBuilder is request builder for GroupPolicyDefinitionFile
type GroupPolicyDefinitionFileRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyDefinitionFileRequest is request for GroupPolicyDefinitionFile
type GroupPolicyDefinitionFileRequest struct{ BaseRequest }

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

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

// GroupPolicyDefinitionValueRequestBuilder is request builder for GroupPolicyDefinitionValue
type GroupPolicyDefinitionValueRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyDefinitionValueRequest is request for GroupPolicyDefinitionValue
type GroupPolicyDefinitionValueRequest struct{ BaseRequest }

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

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

// GroupPolicyMigrationReportRequestBuilder is request builder for GroupPolicyMigrationReport
type GroupPolicyMigrationReportRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyMigrationReportRequest is request for GroupPolicyMigrationReport
type GroupPolicyMigrationReportRequest struct{ BaseRequest }

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

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

// GroupPolicyPresentationRequestBuilder is request builder for GroupPolicyPresentation
type GroupPolicyPresentationRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyPresentationRequest is request for GroupPolicyPresentation
type GroupPolicyPresentationRequest struct{ BaseRequest }

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

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

// GroupPolicyPresentationValueRequestBuilder is request builder for GroupPolicyPresentationValue
type GroupPolicyPresentationValueRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicyPresentationValueRequest is request for GroupPolicyPresentationValue
type GroupPolicyPresentationValueRequest struct{ BaseRequest }

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

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

// GroupPolicySettingMappingRequestBuilder is request builder for GroupPolicySettingMapping
type GroupPolicySettingMappingRequestBuilder struct{ BaseRequestBuilder }

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

// GroupPolicySettingMappingRequest is request for GroupPolicySettingMapping
type GroupPolicySettingMappingRequest struct{ BaseRequest }

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

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

//
type GroupCollectionEvaluateDynamicMembershipRequestBuilder struct{ BaseRequestBuilder }

// EvaluateDynamicMembership action undocumented
func (b *UserJoinedGroupsCollectionRequestBuilder) EvaluateDynamicMembership(reqObj *GroupCollectionEvaluateDynamicMembershipRequestParameter) *GroupCollectionEvaluateDynamicMembershipRequestBuilder {
	bb := &GroupCollectionEvaluateDynamicMembershipRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/evaluateDynamicMembership"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupCollectionEvaluateDynamicMembershipRequest struct{ BaseRequest }

//
func (b *GroupCollectionEvaluateDynamicMembershipRequestBuilder) Request() *GroupCollectionEvaluateDynamicMembershipRequest {
	return &GroupCollectionEvaluateDynamicMembershipRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupCollectionEvaluateDynamicMembershipRequest) Post(ctx context.Context) (resObj *EvaluateDynamicMembershipResult, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupLifecyclePolicyCollectionRenewGroupRequestBuilder struct{ BaseRequestBuilder }

// RenewGroup action undocumented
func (b *GroupGroupLifecyclePoliciesCollectionRequestBuilder) RenewGroup(reqObj *GroupLifecyclePolicyCollectionRenewGroupRequestParameter) *GroupLifecyclePolicyCollectionRenewGroupRequestBuilder {
	bb := &GroupLifecyclePolicyCollectionRenewGroupRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/renewGroup"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupLifecyclePolicyCollectionRenewGroupRequest struct{ BaseRequest }

//
func (b *GroupLifecyclePolicyCollectionRenewGroupRequestBuilder) Request() *GroupLifecyclePolicyCollectionRenewGroupRequest {
	return &GroupLifecyclePolicyCollectionRenewGroupRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupLifecyclePolicyCollectionRenewGroupRequest) Post(ctx context.Context) (resObj *bool, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupPolicyMigrationReportCollectionCreateMigrationReportRequestBuilder struct{ BaseRequestBuilder }

// CreateMigrationReport action undocumented
func (b *DeviceManagementGroupPolicyMigrationReportsCollectionRequestBuilder) CreateMigrationReport(reqObj *GroupPolicyMigrationReportCollectionCreateMigrationReportRequestParameter) *GroupPolicyMigrationReportCollectionCreateMigrationReportRequestBuilder {
	bb := &GroupPolicyMigrationReportCollectionCreateMigrationReportRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/createMigrationReport"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupPolicyMigrationReportCollectionCreateMigrationReportRequest struct{ BaseRequest }

//
func (b *GroupPolicyMigrationReportCollectionCreateMigrationReportRequestBuilder) Request() *GroupPolicyMigrationReportCollectionCreateMigrationReportRequest {
	return &GroupPolicyMigrationReportCollectionCreateMigrationReportRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupPolicyMigrationReportCollectionCreateMigrationReportRequest) Post(ctx context.Context) (resObj *string, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupValidatePropertiesRequestBuilder struct{ BaseRequestBuilder }

// ValidateProperties action undocumented
func (b *GroupRequestBuilder) ValidateProperties(reqObj *GroupValidatePropertiesRequestParameter) *GroupValidatePropertiesRequestBuilder {
	bb := &GroupValidatePropertiesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/validateProperties"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupValidatePropertiesRequest struct{ BaseRequest }

//
func (b *GroupValidatePropertiesRequestBuilder) Request() *GroupValidatePropertiesRequest {
	return &GroupValidatePropertiesRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupValidatePropertiesRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupCheckGrantedPermissionsForAppRequestBuilder struct{ BaseRequestBuilder }

// CheckGrantedPermissionsForApp action undocumented
func (b *GroupRequestBuilder) CheckGrantedPermissionsForApp(reqObj *GroupCheckGrantedPermissionsForAppRequestParameter) *GroupCheckGrantedPermissionsForAppRequestBuilder {
	bb := &GroupCheckGrantedPermissionsForAppRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/checkGrantedPermissionsForApp"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupCheckGrantedPermissionsForAppRequest struct{ BaseRequest }

//
func (b *GroupCheckGrantedPermissionsForAppRequestBuilder) Request() *GroupCheckGrantedPermissionsForAppRequest {
	return &GroupCheckGrantedPermissionsForAppRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupCheckGrantedPermissionsForAppRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]ResourceSpecificPermissionGrant, error) {
	req, err := r.NewJSONRequest(method, path, obj)
	if err != nil {
		return nil, err
	}
	if ctx != nil {
		req = req.WithContext(ctx)
	}
	res, err := r.client.Do(req)
	if err != nil {
		return nil, err
	}
	var values []ResourceSpecificPermissionGrant
	for {
		if res.StatusCode != http.StatusOK {
			b, _ := ioutil.ReadAll(res.Body)
			res.Body.Close()
			errRes := &ErrorResponse{Response: res}
			err := jsonx.Unmarshal(b, errRes)
			if err != nil {
				return nil, fmt.Errorf("%s: %s", res.Status, string(b))
			}
			return nil, errRes
		}
		var (
			paging Paging
			value  []ResourceSpecificPermissionGrant
		)
		err := jsonx.NewDecoder(res.Body).Decode(&paging)
		res.Body.Close()
		if err != nil {
			return nil, err
		}
		err = jsonx.Unmarshal(paging.Value, &value)
		if err != nil {
			return nil, err
		}
		values = append(values, value...)
		if n >= 0 {
			n--
		}
		if n == 0 || len(paging.NextLink) == 0 {
			return values, nil
		}
		req, err = http.NewRequest("GET", paging.NextLink, nil)
		if ctx != nil {
			req = req.WithContext(ctx)
		}
		res, err = r.client.Do(req)
		if err != nil {
			return nil, err
		}
	}
}

//
func (r *GroupCheckGrantedPermissionsForAppRequest) PostN(ctx context.Context, n int) ([]ResourceSpecificPermissionGrant, error) {
	return r.Paging(ctx, "POST", "", r.requestObject, n)
}

//
func (r *GroupCheckGrantedPermissionsForAppRequest) Post(ctx context.Context) ([]ResourceSpecificPermissionGrant, error) {
	return r.Paging(ctx, "POST", "", r.requestObject, 0)
}

//
type GroupAssignLicenseRequestBuilder struct{ BaseRequestBuilder }

// AssignLicense action undocumented
func (b *GroupRequestBuilder) AssignLicense(reqObj *GroupAssignLicenseRequestParameter) *GroupAssignLicenseRequestBuilder {
	bb := &GroupAssignLicenseRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/assignLicense"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupAssignLicenseRequest struct{ BaseRequest }

//
func (b *GroupAssignLicenseRequestBuilder) Request() *GroupAssignLicenseRequest {
	return &GroupAssignLicenseRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupAssignLicenseRequest) Post(ctx context.Context) (resObj *Group, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupSubscribeByMailRequestBuilder struct{ BaseRequestBuilder }

// SubscribeByMail action undocumented
func (b *GroupRequestBuilder) SubscribeByMail(reqObj *GroupSubscribeByMailRequestParameter) *GroupSubscribeByMailRequestBuilder {
	bb := &GroupSubscribeByMailRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/subscribeByMail"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupSubscribeByMailRequest struct{ BaseRequest }

//
func (b *GroupSubscribeByMailRequestBuilder) Request() *GroupSubscribeByMailRequest {
	return &GroupSubscribeByMailRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupSubscribeByMailRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupUnsubscribeByMailRequestBuilder struct{ BaseRequestBuilder }

// UnsubscribeByMail action undocumented
func (b *GroupRequestBuilder) UnsubscribeByMail(reqObj *GroupUnsubscribeByMailRequestParameter) *GroupUnsubscribeByMailRequestBuilder {
	bb := &GroupUnsubscribeByMailRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/unsubscribeByMail"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupUnsubscribeByMailRequest struct{ BaseRequest }

//
func (b *GroupUnsubscribeByMailRequestBuilder) Request() *GroupUnsubscribeByMailRequest {
	return &GroupUnsubscribeByMailRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupUnsubscribeByMailRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupAddFavoriteRequestBuilder struct{ BaseRequestBuilder }

// AddFavorite action undocumented
func (b *GroupRequestBuilder) AddFavorite(reqObj *GroupAddFavoriteRequestParameter) *GroupAddFavoriteRequestBuilder {
	bb := &GroupAddFavoriteRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/addFavorite"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupAddFavoriteRequest struct{ BaseRequest }

//
func (b *GroupAddFavoriteRequestBuilder) Request() *GroupAddFavoriteRequest {
	return &GroupAddFavoriteRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupAddFavoriteRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupRemoveFavoriteRequestBuilder struct{ BaseRequestBuilder }

// RemoveFavorite action undocumented
func (b *GroupRequestBuilder) RemoveFavorite(reqObj *GroupRemoveFavoriteRequestParameter) *GroupRemoveFavoriteRequestBuilder {
	bb := &GroupRemoveFavoriteRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/removeFavorite"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupRemoveFavoriteRequest struct{ BaseRequest }

//
func (b *GroupRemoveFavoriteRequestBuilder) Request() *GroupRemoveFavoriteRequest {
	return &GroupRemoveFavoriteRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupRemoveFavoriteRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupResetUnseenCountRequestBuilder struct{ BaseRequestBuilder }

// ResetUnseenCount action undocumented
func (b *GroupRequestBuilder) ResetUnseenCount(reqObj *GroupResetUnseenCountRequestParameter) *GroupResetUnseenCountRequestBuilder {
	bb := &GroupResetUnseenCountRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/resetUnseenCount"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupResetUnseenCountRequest struct{ BaseRequest }

//
func (b *GroupResetUnseenCountRequestBuilder) Request() *GroupResetUnseenCountRequest {
	return &GroupResetUnseenCountRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupResetUnseenCountRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupRenewRequestBuilder struct{ BaseRequestBuilder }

// Renew action undocumented
func (b *GroupRequestBuilder) Renew(reqObj *GroupRenewRequestParameter) *GroupRenewRequestBuilder {
	bb := &GroupRenewRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/renew"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupRenewRequest struct{ BaseRequest }

//
func (b *GroupRenewRequestBuilder) Request() *GroupRenewRequest {
	return &GroupRenewRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupRenewRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}

//
type GroupEvaluateDynamicMembershipRequestBuilder struct{ BaseRequestBuilder }

// EvaluateDynamicMembership action undocumented
func (b *GroupRequestBuilder) EvaluateDynamicMembership(reqObj *GroupEvaluateDynamicMembershipRequestParameter) *GroupEvaluateDynamicMembershipRequestBuilder {
	bb := &GroupEvaluateDynamicMembershipRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/evaluateDynamicMembership"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupEvaluateDynamicMembershipRequest struct{ BaseRequest }

//
func (b *GroupEvaluateDynamicMembershipRequestBuilder) Request() *GroupEvaluateDynamicMembershipRequest {
	return &GroupEvaluateDynamicMembershipRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupEvaluateDynamicMembershipRequest) Post(ctx context.Context) (resObj *EvaluateDynamicMembershipResult, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupLifecyclePolicyAddGroupRequestBuilder struct{ BaseRequestBuilder }

// AddGroup action undocumented
func (b *GroupLifecyclePolicyRequestBuilder) AddGroup(reqObj *GroupLifecyclePolicyAddGroupRequestParameter) *GroupLifecyclePolicyAddGroupRequestBuilder {
	bb := &GroupLifecyclePolicyAddGroupRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/addGroup"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupLifecyclePolicyAddGroupRequest struct{ BaseRequest }

//
func (b *GroupLifecyclePolicyAddGroupRequestBuilder) Request() *GroupLifecyclePolicyAddGroupRequest {
	return &GroupLifecyclePolicyAddGroupRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupLifecyclePolicyAddGroupRequest) Post(ctx context.Context) (resObj *bool, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupLifecyclePolicyRemoveGroupRequestBuilder struct{ BaseRequestBuilder }

// RemoveGroup action undocumented
func (b *GroupLifecyclePolicyRequestBuilder) RemoveGroup(reqObj *GroupLifecyclePolicyRemoveGroupRequestParameter) *GroupLifecyclePolicyRemoveGroupRequestBuilder {
	bb := &GroupLifecyclePolicyRemoveGroupRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/removeGroup"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupLifecyclePolicyRemoveGroupRequest struct{ BaseRequest }

//
func (b *GroupLifecyclePolicyRemoveGroupRequestBuilder) Request() *GroupLifecyclePolicyRemoveGroupRequest {
	return &GroupLifecyclePolicyRemoveGroupRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupLifecyclePolicyRemoveGroupRequest) Post(ctx context.Context) (resObj *bool, err error) {
	err = r.JSONRequest(ctx, "POST", "", r.requestObject, &resObj)
	return
}

//
type GroupPolicyConfigurationAssignRequestBuilder struct{ BaseRequestBuilder }

// Assign action undocumented
func (b *GroupPolicyConfigurationRequestBuilder) Assign(reqObj *GroupPolicyConfigurationAssignRequestParameter) *GroupPolicyConfigurationAssignRequestBuilder {
	bb := &GroupPolicyConfigurationAssignRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/assign"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupPolicyConfigurationAssignRequest struct{ BaseRequest }

//
func (b *GroupPolicyConfigurationAssignRequestBuilder) Request() *GroupPolicyConfigurationAssignRequest {
	return &GroupPolicyConfigurationAssignRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupPolicyConfigurationAssignRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]GroupPolicyConfigurationAssignment, error) {
	req, err := r.NewJSONRequest(method, path, obj)
	if err != nil {
		return nil, err
	}
	if ctx != nil {
		req = req.WithContext(ctx)
	}
	res, err := r.client.Do(req)
	if err != nil {
		return nil, err
	}
	var values []GroupPolicyConfigurationAssignment
	for {
		if res.StatusCode != http.StatusOK {
			b, _ := ioutil.ReadAll(res.Body)
			res.Body.Close()
			errRes := &ErrorResponse{Response: res}
			err := jsonx.Unmarshal(b, errRes)
			if err != nil {
				return nil, fmt.Errorf("%s: %s", res.Status, string(b))
			}
			return nil, errRes
		}
		var (
			paging Paging
			value  []GroupPolicyConfigurationAssignment
		)
		err := jsonx.NewDecoder(res.Body).Decode(&paging)
		res.Body.Close()
		if err != nil {
			return nil, err
		}
		err = jsonx.Unmarshal(paging.Value, &value)
		if err != nil {
			return nil, err
		}
		values = append(values, value...)
		if n >= 0 {
			n--
		}
		if n == 0 || len(paging.NextLink) == 0 {
			return values, nil
		}
		req, err = http.NewRequest("GET", paging.NextLink, nil)
		if ctx != nil {
			req = req.WithContext(ctx)
		}
		res, err = r.client.Do(req)
		if err != nil {
			return nil, err
		}
	}
}

//
func (r *GroupPolicyConfigurationAssignRequest) PostN(ctx context.Context, n int) ([]GroupPolicyConfigurationAssignment, error) {
	return r.Paging(ctx, "POST", "", r.requestObject, n)
}

//
func (r *GroupPolicyConfigurationAssignRequest) Post(ctx context.Context) ([]GroupPolicyConfigurationAssignment, error) {
	return r.Paging(ctx, "POST", "", r.requestObject, 0)
}

//
type GroupPolicyConfigurationUpdateDefinitionValuesRequestBuilder struct{ BaseRequestBuilder }

// UpdateDefinitionValues action undocumented
func (b *GroupPolicyConfigurationRequestBuilder) UpdateDefinitionValues(reqObj *GroupPolicyConfigurationUpdateDefinitionValuesRequestParameter) *GroupPolicyConfigurationUpdateDefinitionValuesRequestBuilder {
	bb := &GroupPolicyConfigurationUpdateDefinitionValuesRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder}
	bb.BaseRequestBuilder.baseURL += "/updateDefinitionValues"
	bb.BaseRequestBuilder.requestObject = reqObj
	return bb
}

//
type GroupPolicyConfigurationUpdateDefinitionValuesRequest struct{ BaseRequest }

//
func (b *GroupPolicyConfigurationUpdateDefinitionValuesRequestBuilder) Request() *GroupPolicyConfigurationUpdateDefinitionValuesRequest {
	return &GroupPolicyConfigurationUpdateDefinitionValuesRequest{
		BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client, requestObject: b.requestObject},
	}
}

//
func (r *GroupPolicyConfigurationUpdateDefinitionValuesRequest) Post(ctx context.Context) error {
	return r.JSONRequest(ctx, "POST", "", r.requestObject, nil)
}