github.com/yaegashi/msgraph.go@v0.1.4/beta/ActionWindows.go (about) 1 // Code generated by msgraph.go/gen DO NOT EDIT. 2 3 package msgraph 4 5 import ( 6 "context" 7 "fmt" 8 "io/ioutil" 9 "net/http" 10 11 "github.com/yaegashi/msgraph.go/jsonx" 12 ) 13 14 // WindowsAutopilotDeploymentProfileCollectionHasPayloadLinksRequestParameter undocumented 15 type WindowsAutopilotDeploymentProfileCollectionHasPayloadLinksRequestParameter struct { 16 // PayloadIDs undocumented 17 PayloadIDs []string `json:"payloadIds,omitempty"` 18 } 19 20 // WindowsAutopilotDeploymentProfileAssignRequestParameter undocumented 21 type WindowsAutopilotDeploymentProfileAssignRequestParameter struct { 22 // DeviceIDs undocumented 23 DeviceIDs []string `json:"deviceIds,omitempty"` 24 } 25 26 // WindowsAutopilotDeviceIdentityAssignUserToDeviceRequestParameter undocumented 27 type WindowsAutopilotDeviceIdentityAssignUserToDeviceRequestParameter struct { 28 // UserPrincipalName undocumented 29 UserPrincipalName *string `json:"userPrincipalName,omitempty"` 30 // AddressableUserName undocumented 31 AddressableUserName *string `json:"addressableUserName,omitempty"` 32 } 33 34 // WindowsAutopilotDeviceIdentityUnassignUserFromDeviceRequestParameter undocumented 35 type WindowsAutopilotDeviceIdentityUnassignUserFromDeviceRequestParameter struct { 36 } 37 38 // WindowsAutopilotDeviceIdentityUpdateDevicePropertiesRequestParameter undocumented 39 type WindowsAutopilotDeviceIdentityUpdateDevicePropertiesRequestParameter struct { 40 // UserPrincipalName undocumented 41 UserPrincipalName *string `json:"userPrincipalName,omitempty"` 42 // AddressableUserName undocumented 43 AddressableUserName *string `json:"addressableUserName,omitempty"` 44 // GroupTag undocumented 45 GroupTag *string `json:"groupTag,omitempty"` 46 // DisplayName undocumented 47 DisplayName *string `json:"displayName,omitempty"` 48 } 49 50 // WindowsAutopilotDeviceIdentityAssignResourceAccountToDeviceRequestParameter undocumented 51 type WindowsAutopilotDeviceIdentityAssignResourceAccountToDeviceRequestParameter struct { 52 // UserPrincipalName undocumented 53 UserPrincipalName *string `json:"userPrincipalName,omitempty"` 54 // AddressableUserName undocumented 55 AddressableUserName *string `json:"addressableUserName,omitempty"` 56 // ResourceAccountName undocumented 57 ResourceAccountName *string `json:"resourceAccountName,omitempty"` 58 } 59 60 // WindowsAutopilotDeviceIdentityUnassignResourceAccountFromDeviceRequestParameter undocumented 61 type WindowsAutopilotDeviceIdentityUnassignResourceAccountFromDeviceRequestParameter struct { 62 } 63 64 // WindowsAutopilotSettingsSyncRequestParameter undocumented 65 type WindowsAutopilotSettingsSyncRequestParameter struct { 66 } 67 68 // WindowsDefenderApplicationControlSupplementalPolicyAssignRequestParameter undocumented 69 type WindowsDefenderApplicationControlSupplementalPolicyAssignRequestParameter struct { 70 // WdacPolicyAssignments undocumented 71 WdacPolicyAssignments []WindowsDefenderApplicationControlSupplementalPolicyAssignment `json:"wdacPolicyAssignments,omitempty"` 72 } 73 74 // WindowsFeatureUpdateProfileAssignRequestParameter undocumented 75 type WindowsFeatureUpdateProfileAssignRequestParameter struct { 76 // Assignments undocumented 77 Assignments []WindowsFeatureUpdateProfileAssignment `json:"assignments,omitempty"` 78 } 79 80 // WindowsInformationProtectionAssignRequestParameter undocumented 81 type WindowsInformationProtectionAssignRequestParameter struct { 82 // Assignments undocumented 83 Assignments []TargetedManagedAppPolicyAssignment `json:"assignments,omitempty"` 84 } 85 86 // WindowsInformationProtectionDeviceRegistrationWipeRequestParameter undocumented 87 type WindowsInformationProtectionDeviceRegistrationWipeRequestParameter struct { 88 } 89 90 // WindowsUpdateForBusinessConfigurationExtendFeatureUpdatesPauseRequestParameter undocumented 91 type WindowsUpdateForBusinessConfigurationExtendFeatureUpdatesPauseRequestParameter struct { 92 } 93 94 // WindowsUpdateForBusinessConfigurationExtendQualityUpdatesPauseRequestParameter undocumented 95 type WindowsUpdateForBusinessConfigurationExtendQualityUpdatesPauseRequestParameter struct { 96 } 97 98 // AssignedDevices returns request builder for WindowsAutopilotDeviceIdentity collection 99 func (b *WindowsAutopilotDeploymentProfileRequestBuilder) AssignedDevices() *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequestBuilder { 100 bb := &WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 101 bb.baseURL += "/assignedDevices" 102 return bb 103 } 104 105 // WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequestBuilder is request builder for WindowsAutopilotDeviceIdentity collection 106 type WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequestBuilder struct{ BaseRequestBuilder } 107 108 // Request returns request for WindowsAutopilotDeviceIdentity collection 109 func (b *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequestBuilder) Request() *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest { 110 return &WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest{ 111 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 112 } 113 } 114 115 // ID returns request builder for WindowsAutopilotDeviceIdentity item 116 func (b *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequestBuilder) ID(id string) *WindowsAutopilotDeviceIdentityRequestBuilder { 117 bb := &WindowsAutopilotDeviceIdentityRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 118 bb.baseURL += "/" + id 119 return bb 120 } 121 122 // WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest is request for WindowsAutopilotDeviceIdentity collection 123 type WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest struct{ BaseRequest } 124 125 // Paging perfoms paging operation for WindowsAutopilotDeviceIdentity collection 126 func (r *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsAutopilotDeviceIdentity, error) { 127 req, err := r.NewJSONRequest(method, path, obj) 128 if err != nil { 129 return nil, err 130 } 131 if ctx != nil { 132 req = req.WithContext(ctx) 133 } 134 res, err := r.client.Do(req) 135 if err != nil { 136 return nil, err 137 } 138 var values []WindowsAutopilotDeviceIdentity 139 for { 140 if res.StatusCode != http.StatusOK { 141 b, _ := ioutil.ReadAll(res.Body) 142 res.Body.Close() 143 errRes := &ErrorResponse{Response: res} 144 err := jsonx.Unmarshal(b, errRes) 145 if err != nil { 146 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 147 } 148 return nil, errRes 149 } 150 var ( 151 paging Paging 152 value []WindowsAutopilotDeviceIdentity 153 ) 154 err := jsonx.NewDecoder(res.Body).Decode(&paging) 155 res.Body.Close() 156 if err != nil { 157 return nil, err 158 } 159 err = jsonx.Unmarshal(paging.Value, &value) 160 if err != nil { 161 return nil, err 162 } 163 values = append(values, value...) 164 if n >= 0 { 165 n-- 166 } 167 if n == 0 || len(paging.NextLink) == 0 { 168 return values, nil 169 } 170 req, err = http.NewRequest("GET", paging.NextLink, nil) 171 if ctx != nil { 172 req = req.WithContext(ctx) 173 } 174 res, err = r.client.Do(req) 175 if err != nil { 176 return nil, err 177 } 178 } 179 } 180 181 // GetN performs GET request for WindowsAutopilotDeviceIdentity collection, max N pages 182 func (r *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsAutopilotDeviceIdentity, error) { 183 var query string 184 if r.query != nil { 185 query = "?" + r.query.Encode() 186 } 187 return r.Paging(ctx, "GET", query, nil, n) 188 } 189 190 // Get performs GET request for WindowsAutopilotDeviceIdentity collection 191 func (r *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest) Get(ctx context.Context) ([]WindowsAutopilotDeviceIdentity, error) { 192 return r.GetN(ctx, 0) 193 } 194 195 // Add performs POST request for WindowsAutopilotDeviceIdentity collection 196 func (r *WindowsAutopilotDeploymentProfileAssignedDevicesCollectionRequest) Add(ctx context.Context, reqObj *WindowsAutopilotDeviceIdentity) (resObj *WindowsAutopilotDeviceIdentity, err error) { 197 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 198 return 199 } 200 201 // Assignments returns request builder for WindowsAutopilotDeploymentProfileAssignment collection 202 func (b *WindowsAutopilotDeploymentProfileRequestBuilder) Assignments() *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequestBuilder { 203 bb := &WindowsAutopilotDeploymentProfileAssignmentsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 204 bb.baseURL += "/assignments" 205 return bb 206 } 207 208 // WindowsAutopilotDeploymentProfileAssignmentsCollectionRequestBuilder is request builder for WindowsAutopilotDeploymentProfileAssignment collection 209 type WindowsAutopilotDeploymentProfileAssignmentsCollectionRequestBuilder struct{ BaseRequestBuilder } 210 211 // Request returns request for WindowsAutopilotDeploymentProfileAssignment collection 212 func (b *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequestBuilder) Request() *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest { 213 return &WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest{ 214 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 215 } 216 } 217 218 // ID returns request builder for WindowsAutopilotDeploymentProfileAssignment item 219 func (b *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequestBuilder) ID(id string) *WindowsAutopilotDeploymentProfileAssignmentRequestBuilder { 220 bb := &WindowsAutopilotDeploymentProfileAssignmentRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 221 bb.baseURL += "/" + id 222 return bb 223 } 224 225 // WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest is request for WindowsAutopilotDeploymentProfileAssignment collection 226 type WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest struct{ BaseRequest } 227 228 // Paging perfoms paging operation for WindowsAutopilotDeploymentProfileAssignment collection 229 func (r *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsAutopilotDeploymentProfileAssignment, error) { 230 req, err := r.NewJSONRequest(method, path, obj) 231 if err != nil { 232 return nil, err 233 } 234 if ctx != nil { 235 req = req.WithContext(ctx) 236 } 237 res, err := r.client.Do(req) 238 if err != nil { 239 return nil, err 240 } 241 var values []WindowsAutopilotDeploymentProfileAssignment 242 for { 243 if res.StatusCode != http.StatusOK { 244 b, _ := ioutil.ReadAll(res.Body) 245 res.Body.Close() 246 errRes := &ErrorResponse{Response: res} 247 err := jsonx.Unmarshal(b, errRes) 248 if err != nil { 249 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 250 } 251 return nil, errRes 252 } 253 var ( 254 paging Paging 255 value []WindowsAutopilotDeploymentProfileAssignment 256 ) 257 err := jsonx.NewDecoder(res.Body).Decode(&paging) 258 res.Body.Close() 259 if err != nil { 260 return nil, err 261 } 262 err = jsonx.Unmarshal(paging.Value, &value) 263 if err != nil { 264 return nil, err 265 } 266 values = append(values, value...) 267 if n >= 0 { 268 n-- 269 } 270 if n == 0 || len(paging.NextLink) == 0 { 271 return values, nil 272 } 273 req, err = http.NewRequest("GET", paging.NextLink, nil) 274 if ctx != nil { 275 req = req.WithContext(ctx) 276 } 277 res, err = r.client.Do(req) 278 if err != nil { 279 return nil, err 280 } 281 } 282 } 283 284 // GetN performs GET request for WindowsAutopilotDeploymentProfileAssignment collection, max N pages 285 func (r *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsAutopilotDeploymentProfileAssignment, error) { 286 var query string 287 if r.query != nil { 288 query = "?" + r.query.Encode() 289 } 290 return r.Paging(ctx, "GET", query, nil, n) 291 } 292 293 // Get performs GET request for WindowsAutopilotDeploymentProfileAssignment collection 294 func (r *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest) Get(ctx context.Context) ([]WindowsAutopilotDeploymentProfileAssignment, error) { 295 return r.GetN(ctx, 0) 296 } 297 298 // Add performs POST request for WindowsAutopilotDeploymentProfileAssignment collection 299 func (r *WindowsAutopilotDeploymentProfileAssignmentsCollectionRequest) Add(ctx context.Context, reqObj *WindowsAutopilotDeploymentProfileAssignment) (resObj *WindowsAutopilotDeploymentProfileAssignment, err error) { 300 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 301 return 302 } 303 304 // DeploymentProfile is navigation property 305 func (b *WindowsAutopilotDeviceIdentityRequestBuilder) DeploymentProfile() *WindowsAutopilotDeploymentProfileRequestBuilder { 306 bb := &WindowsAutopilotDeploymentProfileRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 307 bb.baseURL += "/deploymentProfile" 308 return bb 309 } 310 311 // IntendedDeploymentProfile is navigation property 312 func (b *WindowsAutopilotDeviceIdentityRequestBuilder) IntendedDeploymentProfile() *WindowsAutopilotDeploymentProfileRequestBuilder { 313 bb := &WindowsAutopilotDeploymentProfileRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 314 bb.baseURL += "/intendedDeploymentProfile" 315 return bb 316 } 317 318 // Assignments returns request builder for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 319 func (b *WindowsDefenderApplicationControlSupplementalPolicyRequestBuilder) Assignments() *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequestBuilder { 320 bb := &WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 321 bb.baseURL += "/assignments" 322 return bb 323 } 324 325 // WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequestBuilder is request builder for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 326 type WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequestBuilder struct{ BaseRequestBuilder } 327 328 // Request returns request for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 329 func (b *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequestBuilder) Request() *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest { 330 return &WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest{ 331 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 332 } 333 } 334 335 // ID returns request builder for WindowsDefenderApplicationControlSupplementalPolicyAssignment item 336 func (b *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequestBuilder) ID(id string) *WindowsDefenderApplicationControlSupplementalPolicyAssignmentRequestBuilder { 337 bb := &WindowsDefenderApplicationControlSupplementalPolicyAssignmentRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 338 bb.baseURL += "/" + id 339 return bb 340 } 341 342 // WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest is request for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 343 type WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest struct{ BaseRequest } 344 345 // Paging perfoms paging operation for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 346 func (r *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsDefenderApplicationControlSupplementalPolicyAssignment, error) { 347 req, err := r.NewJSONRequest(method, path, obj) 348 if err != nil { 349 return nil, err 350 } 351 if ctx != nil { 352 req = req.WithContext(ctx) 353 } 354 res, err := r.client.Do(req) 355 if err != nil { 356 return nil, err 357 } 358 var values []WindowsDefenderApplicationControlSupplementalPolicyAssignment 359 for { 360 if res.StatusCode != http.StatusOK { 361 b, _ := ioutil.ReadAll(res.Body) 362 res.Body.Close() 363 errRes := &ErrorResponse{Response: res} 364 err := jsonx.Unmarshal(b, errRes) 365 if err != nil { 366 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 367 } 368 return nil, errRes 369 } 370 var ( 371 paging Paging 372 value []WindowsDefenderApplicationControlSupplementalPolicyAssignment 373 ) 374 err := jsonx.NewDecoder(res.Body).Decode(&paging) 375 res.Body.Close() 376 if err != nil { 377 return nil, err 378 } 379 err = jsonx.Unmarshal(paging.Value, &value) 380 if err != nil { 381 return nil, err 382 } 383 values = append(values, value...) 384 if n >= 0 { 385 n-- 386 } 387 if n == 0 || len(paging.NextLink) == 0 { 388 return values, nil 389 } 390 req, err = http.NewRequest("GET", paging.NextLink, nil) 391 if ctx != nil { 392 req = req.WithContext(ctx) 393 } 394 res, err = r.client.Do(req) 395 if err != nil { 396 return nil, err 397 } 398 } 399 } 400 401 // GetN performs GET request for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection, max N pages 402 func (r *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsDefenderApplicationControlSupplementalPolicyAssignment, error) { 403 var query string 404 if r.query != nil { 405 query = "?" + r.query.Encode() 406 } 407 return r.Paging(ctx, "GET", query, nil, n) 408 } 409 410 // Get performs GET request for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 411 func (r *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest) Get(ctx context.Context) ([]WindowsDefenderApplicationControlSupplementalPolicyAssignment, error) { 412 return r.GetN(ctx, 0) 413 } 414 415 // Add performs POST request for WindowsDefenderApplicationControlSupplementalPolicyAssignment collection 416 func (r *WindowsDefenderApplicationControlSupplementalPolicyAssignmentsCollectionRequest) Add(ctx context.Context, reqObj *WindowsDefenderApplicationControlSupplementalPolicyAssignment) (resObj *WindowsDefenderApplicationControlSupplementalPolicyAssignment, err error) { 417 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 418 return 419 } 420 421 // DeploySummary is navigation property 422 func (b *WindowsDefenderApplicationControlSupplementalPolicyRequestBuilder) DeploySummary() *WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummaryRequestBuilder { 423 bb := &WindowsDefenderApplicationControlSupplementalPolicyDeploymentSummaryRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 424 bb.baseURL += "/deploySummary" 425 return bb 426 } 427 428 // DeviceStatuses returns request builder for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 429 func (b *WindowsDefenderApplicationControlSupplementalPolicyRequestBuilder) DeviceStatuses() *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequestBuilder { 430 bb := &WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 431 bb.baseURL += "/deviceStatuses" 432 return bb 433 } 434 435 // WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequestBuilder is request builder for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 436 type WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequestBuilder struct{ BaseRequestBuilder } 437 438 // Request returns request for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 439 func (b *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequestBuilder) Request() *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest { 440 return &WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest{ 441 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 442 } 443 } 444 445 // ID returns request builder for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus item 446 func (b *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequestBuilder) ID(id string) *WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusRequestBuilder { 447 bb := &WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 448 bb.baseURL += "/" + id 449 return bb 450 } 451 452 // WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest is request for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 453 type WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest struct{ BaseRequest } 454 455 // Paging perfoms paging operation for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 456 func (r *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus, error) { 457 req, err := r.NewJSONRequest(method, path, obj) 458 if err != nil { 459 return nil, err 460 } 461 if ctx != nil { 462 req = req.WithContext(ctx) 463 } 464 res, err := r.client.Do(req) 465 if err != nil { 466 return nil, err 467 } 468 var values []WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus 469 for { 470 if res.StatusCode != http.StatusOK { 471 b, _ := ioutil.ReadAll(res.Body) 472 res.Body.Close() 473 errRes := &ErrorResponse{Response: res} 474 err := jsonx.Unmarshal(b, errRes) 475 if err != nil { 476 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 477 } 478 return nil, errRes 479 } 480 var ( 481 paging Paging 482 value []WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus 483 ) 484 err := jsonx.NewDecoder(res.Body).Decode(&paging) 485 res.Body.Close() 486 if err != nil { 487 return nil, err 488 } 489 err = jsonx.Unmarshal(paging.Value, &value) 490 if err != nil { 491 return nil, err 492 } 493 values = append(values, value...) 494 if n >= 0 { 495 n-- 496 } 497 if n == 0 || len(paging.NextLink) == 0 { 498 return values, nil 499 } 500 req, err = http.NewRequest("GET", paging.NextLink, nil) 501 if ctx != nil { 502 req = req.WithContext(ctx) 503 } 504 res, err = r.client.Do(req) 505 if err != nil { 506 return nil, err 507 } 508 } 509 } 510 511 // GetN performs GET request for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection, max N pages 512 func (r *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus, error) { 513 var query string 514 if r.query != nil { 515 query = "?" + r.query.Encode() 516 } 517 return r.Paging(ctx, "GET", query, nil, n) 518 } 519 520 // Get performs GET request for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 521 func (r *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest) Get(ctx context.Context) ([]WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus, error) { 522 return r.GetN(ctx, 0) 523 } 524 525 // Add performs POST request for WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus collection 526 func (r *WindowsDefenderApplicationControlSupplementalPolicyDeviceStatusesCollectionRequest) Add(ctx context.Context, reqObj *WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus) (resObj *WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus, err error) { 527 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 528 return 529 } 530 531 // Policy is navigation property 532 func (b *WindowsDefenderApplicationControlSupplementalPolicyDeploymentStatusRequestBuilder) Policy() *WindowsDefenderApplicationControlSupplementalPolicyRequestBuilder { 533 bb := &WindowsDefenderApplicationControlSupplementalPolicyRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 534 bb.baseURL += "/policy" 535 return bb 536 } 537 538 // NetworkAccessConfigurations returns request builder for DeviceConfiguration collection 539 func (b *WindowsDomainJoinConfigurationRequestBuilder) NetworkAccessConfigurations() *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequestBuilder { 540 bb := &WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 541 bb.baseURL += "/networkAccessConfigurations" 542 return bb 543 } 544 545 // WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequestBuilder is request builder for DeviceConfiguration collection 546 type WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequestBuilder struct{ BaseRequestBuilder } 547 548 // Request returns request for DeviceConfiguration collection 549 func (b *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequestBuilder) Request() *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest { 550 return &WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest{ 551 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 552 } 553 } 554 555 // ID returns request builder for DeviceConfiguration item 556 func (b *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequestBuilder) ID(id string) *DeviceConfigurationRequestBuilder { 557 bb := &DeviceConfigurationRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 558 bb.baseURL += "/" + id 559 return bb 560 } 561 562 // WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest is request for DeviceConfiguration collection 563 type WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest struct{ BaseRequest } 564 565 // Paging perfoms paging operation for DeviceConfiguration collection 566 func (r *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]DeviceConfiguration, error) { 567 req, err := r.NewJSONRequest(method, path, obj) 568 if err != nil { 569 return nil, err 570 } 571 if ctx != nil { 572 req = req.WithContext(ctx) 573 } 574 res, err := r.client.Do(req) 575 if err != nil { 576 return nil, err 577 } 578 var values []DeviceConfiguration 579 for { 580 if res.StatusCode != http.StatusOK { 581 b, _ := ioutil.ReadAll(res.Body) 582 res.Body.Close() 583 errRes := &ErrorResponse{Response: res} 584 err := jsonx.Unmarshal(b, errRes) 585 if err != nil { 586 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 587 } 588 return nil, errRes 589 } 590 var ( 591 paging Paging 592 value []DeviceConfiguration 593 ) 594 err := jsonx.NewDecoder(res.Body).Decode(&paging) 595 res.Body.Close() 596 if err != nil { 597 return nil, err 598 } 599 err = jsonx.Unmarshal(paging.Value, &value) 600 if err != nil { 601 return nil, err 602 } 603 values = append(values, value...) 604 if n >= 0 { 605 n-- 606 } 607 if n == 0 || len(paging.NextLink) == 0 { 608 return values, nil 609 } 610 req, err = http.NewRequest("GET", paging.NextLink, nil) 611 if ctx != nil { 612 req = req.WithContext(ctx) 613 } 614 res, err = r.client.Do(req) 615 if err != nil { 616 return nil, err 617 } 618 } 619 } 620 621 // GetN performs GET request for DeviceConfiguration collection, max N pages 622 func (r *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest) GetN(ctx context.Context, n int) ([]DeviceConfiguration, error) { 623 var query string 624 if r.query != nil { 625 query = "?" + r.query.Encode() 626 } 627 return r.Paging(ctx, "GET", query, nil, n) 628 } 629 630 // Get performs GET request for DeviceConfiguration collection 631 func (r *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest) Get(ctx context.Context) ([]DeviceConfiguration, error) { 632 return r.GetN(ctx, 0) 633 } 634 635 // Add performs POST request for DeviceConfiguration collection 636 func (r *WindowsDomainJoinConfigurationNetworkAccessConfigurationsCollectionRequest) Add(ctx context.Context, reqObj *DeviceConfiguration) (resObj *DeviceConfiguration, err error) { 637 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 638 return 639 } 640 641 // Assignments returns request builder for WindowsFeatureUpdateProfileAssignment collection 642 func (b *WindowsFeatureUpdateProfileRequestBuilder) Assignments() *WindowsFeatureUpdateProfileAssignmentsCollectionRequestBuilder { 643 bb := &WindowsFeatureUpdateProfileAssignmentsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 644 bb.baseURL += "/assignments" 645 return bb 646 } 647 648 // WindowsFeatureUpdateProfileAssignmentsCollectionRequestBuilder is request builder for WindowsFeatureUpdateProfileAssignment collection 649 type WindowsFeatureUpdateProfileAssignmentsCollectionRequestBuilder struct{ BaseRequestBuilder } 650 651 // Request returns request for WindowsFeatureUpdateProfileAssignment collection 652 func (b *WindowsFeatureUpdateProfileAssignmentsCollectionRequestBuilder) Request() *WindowsFeatureUpdateProfileAssignmentsCollectionRequest { 653 return &WindowsFeatureUpdateProfileAssignmentsCollectionRequest{ 654 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 655 } 656 } 657 658 // ID returns request builder for WindowsFeatureUpdateProfileAssignment item 659 func (b *WindowsFeatureUpdateProfileAssignmentsCollectionRequestBuilder) ID(id string) *WindowsFeatureUpdateProfileAssignmentRequestBuilder { 660 bb := &WindowsFeatureUpdateProfileAssignmentRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 661 bb.baseURL += "/" + id 662 return bb 663 } 664 665 // WindowsFeatureUpdateProfileAssignmentsCollectionRequest is request for WindowsFeatureUpdateProfileAssignment collection 666 type WindowsFeatureUpdateProfileAssignmentsCollectionRequest struct{ BaseRequest } 667 668 // Paging perfoms paging operation for WindowsFeatureUpdateProfileAssignment collection 669 func (r *WindowsFeatureUpdateProfileAssignmentsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsFeatureUpdateProfileAssignment, error) { 670 req, err := r.NewJSONRequest(method, path, obj) 671 if err != nil { 672 return nil, err 673 } 674 if ctx != nil { 675 req = req.WithContext(ctx) 676 } 677 res, err := r.client.Do(req) 678 if err != nil { 679 return nil, err 680 } 681 var values []WindowsFeatureUpdateProfileAssignment 682 for { 683 if res.StatusCode != http.StatusOK { 684 b, _ := ioutil.ReadAll(res.Body) 685 res.Body.Close() 686 errRes := &ErrorResponse{Response: res} 687 err := jsonx.Unmarshal(b, errRes) 688 if err != nil { 689 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 690 } 691 return nil, errRes 692 } 693 var ( 694 paging Paging 695 value []WindowsFeatureUpdateProfileAssignment 696 ) 697 err := jsonx.NewDecoder(res.Body).Decode(&paging) 698 res.Body.Close() 699 if err != nil { 700 return nil, err 701 } 702 err = jsonx.Unmarshal(paging.Value, &value) 703 if err != nil { 704 return nil, err 705 } 706 values = append(values, value...) 707 if n >= 0 { 708 n-- 709 } 710 if n == 0 || len(paging.NextLink) == 0 { 711 return values, nil 712 } 713 req, err = http.NewRequest("GET", paging.NextLink, nil) 714 if ctx != nil { 715 req = req.WithContext(ctx) 716 } 717 res, err = r.client.Do(req) 718 if err != nil { 719 return nil, err 720 } 721 } 722 } 723 724 // GetN performs GET request for WindowsFeatureUpdateProfileAssignment collection, max N pages 725 func (r *WindowsFeatureUpdateProfileAssignmentsCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsFeatureUpdateProfileAssignment, error) { 726 var query string 727 if r.query != nil { 728 query = "?" + r.query.Encode() 729 } 730 return r.Paging(ctx, "GET", query, nil, n) 731 } 732 733 // Get performs GET request for WindowsFeatureUpdateProfileAssignment collection 734 func (r *WindowsFeatureUpdateProfileAssignmentsCollectionRequest) Get(ctx context.Context) ([]WindowsFeatureUpdateProfileAssignment, error) { 735 return r.GetN(ctx, 0) 736 } 737 738 // Add performs POST request for WindowsFeatureUpdateProfileAssignment collection 739 func (r *WindowsFeatureUpdateProfileAssignmentsCollectionRequest) Add(ctx context.Context, reqObj *WindowsFeatureUpdateProfileAssignment) (resObj *WindowsFeatureUpdateProfileAssignment, err error) { 740 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 741 return 742 } 743 744 // DeviceUpdateStates returns request builder for WindowsUpdateState collection 745 func (b *WindowsFeatureUpdateProfileRequestBuilder) DeviceUpdateStates() *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequestBuilder { 746 bb := &WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 747 bb.baseURL += "/deviceUpdateStates" 748 return bb 749 } 750 751 // WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequestBuilder is request builder for WindowsUpdateState collection 752 type WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequestBuilder struct{ BaseRequestBuilder } 753 754 // Request returns request for WindowsUpdateState collection 755 func (b *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequestBuilder) Request() *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest { 756 return &WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest{ 757 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 758 } 759 } 760 761 // ID returns request builder for WindowsUpdateState item 762 func (b *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequestBuilder) ID(id string) *WindowsUpdateStateRequestBuilder { 763 bb := &WindowsUpdateStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 764 bb.baseURL += "/" + id 765 return bb 766 } 767 768 // WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest is request for WindowsUpdateState collection 769 type WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest struct{ BaseRequest } 770 771 // Paging perfoms paging operation for WindowsUpdateState collection 772 func (r *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsUpdateState, error) { 773 req, err := r.NewJSONRequest(method, path, obj) 774 if err != nil { 775 return nil, err 776 } 777 if ctx != nil { 778 req = req.WithContext(ctx) 779 } 780 res, err := r.client.Do(req) 781 if err != nil { 782 return nil, err 783 } 784 var values []WindowsUpdateState 785 for { 786 if res.StatusCode != http.StatusOK { 787 b, _ := ioutil.ReadAll(res.Body) 788 res.Body.Close() 789 errRes := &ErrorResponse{Response: res} 790 err := jsonx.Unmarshal(b, errRes) 791 if err != nil { 792 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 793 } 794 return nil, errRes 795 } 796 var ( 797 paging Paging 798 value []WindowsUpdateState 799 ) 800 err := jsonx.NewDecoder(res.Body).Decode(&paging) 801 res.Body.Close() 802 if err != nil { 803 return nil, err 804 } 805 err = jsonx.Unmarshal(paging.Value, &value) 806 if err != nil { 807 return nil, err 808 } 809 values = append(values, value...) 810 if n >= 0 { 811 n-- 812 } 813 if n == 0 || len(paging.NextLink) == 0 { 814 return values, nil 815 } 816 req, err = http.NewRequest("GET", paging.NextLink, nil) 817 if ctx != nil { 818 req = req.WithContext(ctx) 819 } 820 res, err = r.client.Do(req) 821 if err != nil { 822 return nil, err 823 } 824 } 825 } 826 827 // GetN performs GET request for WindowsUpdateState collection, max N pages 828 func (r *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsUpdateState, error) { 829 var query string 830 if r.query != nil { 831 query = "?" + r.query.Encode() 832 } 833 return r.Paging(ctx, "GET", query, nil, n) 834 } 835 836 // Get performs GET request for WindowsUpdateState collection 837 func (r *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest) Get(ctx context.Context) ([]WindowsUpdateState, error) { 838 return r.GetN(ctx, 0) 839 } 840 841 // Add performs POST request for WindowsUpdateState collection 842 func (r *WindowsFeatureUpdateProfileDeviceUpdateStatesCollectionRequest) Add(ctx context.Context, reqObj *WindowsUpdateState) (resObj *WindowsUpdateState, err error) { 843 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 844 return 845 } 846 847 // Assignments returns request builder for TargetedManagedAppPolicyAssignment collection 848 func (b *WindowsInformationProtectionRequestBuilder) Assignments() *WindowsInformationProtectionAssignmentsCollectionRequestBuilder { 849 bb := &WindowsInformationProtectionAssignmentsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 850 bb.baseURL += "/assignments" 851 return bb 852 } 853 854 // WindowsInformationProtectionAssignmentsCollectionRequestBuilder is request builder for TargetedManagedAppPolicyAssignment collection 855 type WindowsInformationProtectionAssignmentsCollectionRequestBuilder struct{ BaseRequestBuilder } 856 857 // Request returns request for TargetedManagedAppPolicyAssignment collection 858 func (b *WindowsInformationProtectionAssignmentsCollectionRequestBuilder) Request() *WindowsInformationProtectionAssignmentsCollectionRequest { 859 return &WindowsInformationProtectionAssignmentsCollectionRequest{ 860 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 861 } 862 } 863 864 // ID returns request builder for TargetedManagedAppPolicyAssignment item 865 func (b *WindowsInformationProtectionAssignmentsCollectionRequestBuilder) ID(id string) *TargetedManagedAppPolicyAssignmentRequestBuilder { 866 bb := &TargetedManagedAppPolicyAssignmentRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 867 bb.baseURL += "/" + id 868 return bb 869 } 870 871 // WindowsInformationProtectionAssignmentsCollectionRequest is request for TargetedManagedAppPolicyAssignment collection 872 type WindowsInformationProtectionAssignmentsCollectionRequest struct{ BaseRequest } 873 874 // Paging perfoms paging operation for TargetedManagedAppPolicyAssignment collection 875 func (r *WindowsInformationProtectionAssignmentsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]TargetedManagedAppPolicyAssignment, error) { 876 req, err := r.NewJSONRequest(method, path, obj) 877 if err != nil { 878 return nil, err 879 } 880 if ctx != nil { 881 req = req.WithContext(ctx) 882 } 883 res, err := r.client.Do(req) 884 if err != nil { 885 return nil, err 886 } 887 var values []TargetedManagedAppPolicyAssignment 888 for { 889 if res.StatusCode != http.StatusOK { 890 b, _ := ioutil.ReadAll(res.Body) 891 res.Body.Close() 892 errRes := &ErrorResponse{Response: res} 893 err := jsonx.Unmarshal(b, errRes) 894 if err != nil { 895 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 896 } 897 return nil, errRes 898 } 899 var ( 900 paging Paging 901 value []TargetedManagedAppPolicyAssignment 902 ) 903 err := jsonx.NewDecoder(res.Body).Decode(&paging) 904 res.Body.Close() 905 if err != nil { 906 return nil, err 907 } 908 err = jsonx.Unmarshal(paging.Value, &value) 909 if err != nil { 910 return nil, err 911 } 912 values = append(values, value...) 913 if n >= 0 { 914 n-- 915 } 916 if n == 0 || len(paging.NextLink) == 0 { 917 return values, nil 918 } 919 req, err = http.NewRequest("GET", paging.NextLink, nil) 920 if ctx != nil { 921 req = req.WithContext(ctx) 922 } 923 res, err = r.client.Do(req) 924 if err != nil { 925 return nil, err 926 } 927 } 928 } 929 930 // GetN performs GET request for TargetedManagedAppPolicyAssignment collection, max N pages 931 func (r *WindowsInformationProtectionAssignmentsCollectionRequest) GetN(ctx context.Context, n int) ([]TargetedManagedAppPolicyAssignment, error) { 932 var query string 933 if r.query != nil { 934 query = "?" + r.query.Encode() 935 } 936 return r.Paging(ctx, "GET", query, nil, n) 937 } 938 939 // Get performs GET request for TargetedManagedAppPolicyAssignment collection 940 func (r *WindowsInformationProtectionAssignmentsCollectionRequest) Get(ctx context.Context) ([]TargetedManagedAppPolicyAssignment, error) { 941 return r.GetN(ctx, 0) 942 } 943 944 // Add performs POST request for TargetedManagedAppPolicyAssignment collection 945 func (r *WindowsInformationProtectionAssignmentsCollectionRequest) Add(ctx context.Context, reqObj *TargetedManagedAppPolicyAssignment) (resObj *TargetedManagedAppPolicyAssignment, err error) { 946 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 947 return 948 } 949 950 // ExemptAppLockerFiles returns request builder for WindowsInformationProtectionAppLockerFile collection 951 func (b *WindowsInformationProtectionRequestBuilder) ExemptAppLockerFiles() *WindowsInformationProtectionExemptAppLockerFilesCollectionRequestBuilder { 952 bb := &WindowsInformationProtectionExemptAppLockerFilesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 953 bb.baseURL += "/exemptAppLockerFiles" 954 return bb 955 } 956 957 // WindowsInformationProtectionExemptAppLockerFilesCollectionRequestBuilder is request builder for WindowsInformationProtectionAppLockerFile collection 958 type WindowsInformationProtectionExemptAppLockerFilesCollectionRequestBuilder struct{ BaseRequestBuilder } 959 960 // Request returns request for WindowsInformationProtectionAppLockerFile collection 961 func (b *WindowsInformationProtectionExemptAppLockerFilesCollectionRequestBuilder) Request() *WindowsInformationProtectionExemptAppLockerFilesCollectionRequest { 962 return &WindowsInformationProtectionExemptAppLockerFilesCollectionRequest{ 963 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 964 } 965 } 966 967 // ID returns request builder for WindowsInformationProtectionAppLockerFile item 968 func (b *WindowsInformationProtectionExemptAppLockerFilesCollectionRequestBuilder) ID(id string) *WindowsInformationProtectionAppLockerFileRequestBuilder { 969 bb := &WindowsInformationProtectionAppLockerFileRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 970 bb.baseURL += "/" + id 971 return bb 972 } 973 974 // WindowsInformationProtectionExemptAppLockerFilesCollectionRequest is request for WindowsInformationProtectionAppLockerFile collection 975 type WindowsInformationProtectionExemptAppLockerFilesCollectionRequest struct{ BaseRequest } 976 977 // Paging perfoms paging operation for WindowsInformationProtectionAppLockerFile collection 978 func (r *WindowsInformationProtectionExemptAppLockerFilesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsInformationProtectionAppLockerFile, error) { 979 req, err := r.NewJSONRequest(method, path, obj) 980 if err != nil { 981 return nil, err 982 } 983 if ctx != nil { 984 req = req.WithContext(ctx) 985 } 986 res, err := r.client.Do(req) 987 if err != nil { 988 return nil, err 989 } 990 var values []WindowsInformationProtectionAppLockerFile 991 for { 992 if res.StatusCode != http.StatusOK { 993 b, _ := ioutil.ReadAll(res.Body) 994 res.Body.Close() 995 errRes := &ErrorResponse{Response: res} 996 err := jsonx.Unmarshal(b, errRes) 997 if err != nil { 998 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 999 } 1000 return nil, errRes 1001 } 1002 var ( 1003 paging Paging 1004 value []WindowsInformationProtectionAppLockerFile 1005 ) 1006 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1007 res.Body.Close() 1008 if err != nil { 1009 return nil, err 1010 } 1011 err = jsonx.Unmarshal(paging.Value, &value) 1012 if err != nil { 1013 return nil, err 1014 } 1015 values = append(values, value...) 1016 if n >= 0 { 1017 n-- 1018 } 1019 if n == 0 || len(paging.NextLink) == 0 { 1020 return values, nil 1021 } 1022 req, err = http.NewRequest("GET", paging.NextLink, nil) 1023 if ctx != nil { 1024 req = req.WithContext(ctx) 1025 } 1026 res, err = r.client.Do(req) 1027 if err != nil { 1028 return nil, err 1029 } 1030 } 1031 } 1032 1033 // GetN performs GET request for WindowsInformationProtectionAppLockerFile collection, max N pages 1034 func (r *WindowsInformationProtectionExemptAppLockerFilesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsInformationProtectionAppLockerFile, error) { 1035 var query string 1036 if r.query != nil { 1037 query = "?" + r.query.Encode() 1038 } 1039 return r.Paging(ctx, "GET", query, nil, n) 1040 } 1041 1042 // Get performs GET request for WindowsInformationProtectionAppLockerFile collection 1043 func (r *WindowsInformationProtectionExemptAppLockerFilesCollectionRequest) Get(ctx context.Context) ([]WindowsInformationProtectionAppLockerFile, error) { 1044 return r.GetN(ctx, 0) 1045 } 1046 1047 // Add performs POST request for WindowsInformationProtectionAppLockerFile collection 1048 func (r *WindowsInformationProtectionExemptAppLockerFilesCollectionRequest) Add(ctx context.Context, reqObj *WindowsInformationProtectionAppLockerFile) (resObj *WindowsInformationProtectionAppLockerFile, err error) { 1049 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1050 return 1051 } 1052 1053 // ProtectedAppLockerFiles returns request builder for WindowsInformationProtectionAppLockerFile collection 1054 func (b *WindowsInformationProtectionRequestBuilder) ProtectedAppLockerFiles() *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequestBuilder { 1055 bb := &WindowsInformationProtectionProtectedAppLockerFilesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1056 bb.baseURL += "/protectedAppLockerFiles" 1057 return bb 1058 } 1059 1060 // WindowsInformationProtectionProtectedAppLockerFilesCollectionRequestBuilder is request builder for WindowsInformationProtectionAppLockerFile collection 1061 type WindowsInformationProtectionProtectedAppLockerFilesCollectionRequestBuilder struct{ BaseRequestBuilder } 1062 1063 // Request returns request for WindowsInformationProtectionAppLockerFile collection 1064 func (b *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequestBuilder) Request() *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest { 1065 return &WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest{ 1066 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1067 } 1068 } 1069 1070 // ID returns request builder for WindowsInformationProtectionAppLockerFile item 1071 func (b *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequestBuilder) ID(id string) *WindowsInformationProtectionAppLockerFileRequestBuilder { 1072 bb := &WindowsInformationProtectionAppLockerFileRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1073 bb.baseURL += "/" + id 1074 return bb 1075 } 1076 1077 // WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest is request for WindowsInformationProtectionAppLockerFile collection 1078 type WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest struct{ BaseRequest } 1079 1080 // Paging perfoms paging operation for WindowsInformationProtectionAppLockerFile collection 1081 func (r *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsInformationProtectionAppLockerFile, error) { 1082 req, err := r.NewJSONRequest(method, path, obj) 1083 if err != nil { 1084 return nil, err 1085 } 1086 if ctx != nil { 1087 req = req.WithContext(ctx) 1088 } 1089 res, err := r.client.Do(req) 1090 if err != nil { 1091 return nil, err 1092 } 1093 var values []WindowsInformationProtectionAppLockerFile 1094 for { 1095 if res.StatusCode != http.StatusOK { 1096 b, _ := ioutil.ReadAll(res.Body) 1097 res.Body.Close() 1098 errRes := &ErrorResponse{Response: res} 1099 err := jsonx.Unmarshal(b, errRes) 1100 if err != nil { 1101 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1102 } 1103 return nil, errRes 1104 } 1105 var ( 1106 paging Paging 1107 value []WindowsInformationProtectionAppLockerFile 1108 ) 1109 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1110 res.Body.Close() 1111 if err != nil { 1112 return nil, err 1113 } 1114 err = jsonx.Unmarshal(paging.Value, &value) 1115 if err != nil { 1116 return nil, err 1117 } 1118 values = append(values, value...) 1119 if n >= 0 { 1120 n-- 1121 } 1122 if n == 0 || len(paging.NextLink) == 0 { 1123 return values, nil 1124 } 1125 req, err = http.NewRequest("GET", paging.NextLink, nil) 1126 if ctx != nil { 1127 req = req.WithContext(ctx) 1128 } 1129 res, err = r.client.Do(req) 1130 if err != nil { 1131 return nil, err 1132 } 1133 } 1134 } 1135 1136 // GetN performs GET request for WindowsInformationProtectionAppLockerFile collection, max N pages 1137 func (r *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsInformationProtectionAppLockerFile, error) { 1138 var query string 1139 if r.query != nil { 1140 query = "?" + r.query.Encode() 1141 } 1142 return r.Paging(ctx, "GET", query, nil, n) 1143 } 1144 1145 // Get performs GET request for WindowsInformationProtectionAppLockerFile collection 1146 func (r *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest) Get(ctx context.Context) ([]WindowsInformationProtectionAppLockerFile, error) { 1147 return r.GetN(ctx, 0) 1148 } 1149 1150 // Add performs POST request for WindowsInformationProtectionAppLockerFile collection 1151 func (r *WindowsInformationProtectionProtectedAppLockerFilesCollectionRequest) Add(ctx context.Context, reqObj *WindowsInformationProtectionAppLockerFile) (resObj *WindowsInformationProtectionAppLockerFile, err error) { 1152 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1153 return 1154 } 1155 1156 // WindowsDevicesProtectionState returns request builder for WindowsProtectionState collection 1157 func (b *WindowsMalwareInformationRequestBuilder) WindowsDevicesProtectionState() *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequestBuilder { 1158 bb := &WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1159 bb.baseURL += "/windowsDevicesProtectionState" 1160 return bb 1161 } 1162 1163 // WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequestBuilder is request builder for WindowsProtectionState collection 1164 type WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequestBuilder struct{ BaseRequestBuilder } 1165 1166 // Request returns request for WindowsProtectionState collection 1167 func (b *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequestBuilder) Request() *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest { 1168 return &WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest{ 1169 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1170 } 1171 } 1172 1173 // ID returns request builder for WindowsProtectionState item 1174 func (b *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequestBuilder) ID(id string) *WindowsProtectionStateRequestBuilder { 1175 bb := &WindowsProtectionStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1176 bb.baseURL += "/" + id 1177 return bb 1178 } 1179 1180 // WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest is request for WindowsProtectionState collection 1181 type WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest struct{ BaseRequest } 1182 1183 // Paging perfoms paging operation for WindowsProtectionState collection 1184 func (r *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsProtectionState, error) { 1185 req, err := r.NewJSONRequest(method, path, obj) 1186 if err != nil { 1187 return nil, err 1188 } 1189 if ctx != nil { 1190 req = req.WithContext(ctx) 1191 } 1192 res, err := r.client.Do(req) 1193 if err != nil { 1194 return nil, err 1195 } 1196 var values []WindowsProtectionState 1197 for { 1198 if res.StatusCode != http.StatusOK { 1199 b, _ := ioutil.ReadAll(res.Body) 1200 res.Body.Close() 1201 errRes := &ErrorResponse{Response: res} 1202 err := jsonx.Unmarshal(b, errRes) 1203 if err != nil { 1204 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1205 } 1206 return nil, errRes 1207 } 1208 var ( 1209 paging Paging 1210 value []WindowsProtectionState 1211 ) 1212 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1213 res.Body.Close() 1214 if err != nil { 1215 return nil, err 1216 } 1217 err = jsonx.Unmarshal(paging.Value, &value) 1218 if err != nil { 1219 return nil, err 1220 } 1221 values = append(values, value...) 1222 if n >= 0 { 1223 n-- 1224 } 1225 if n == 0 || len(paging.NextLink) == 0 { 1226 return values, nil 1227 } 1228 req, err = http.NewRequest("GET", paging.NextLink, nil) 1229 if ctx != nil { 1230 req = req.WithContext(ctx) 1231 } 1232 res, err = r.client.Do(req) 1233 if err != nil { 1234 return nil, err 1235 } 1236 } 1237 } 1238 1239 // GetN performs GET request for WindowsProtectionState collection, max N pages 1240 func (r *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsProtectionState, error) { 1241 var query string 1242 if r.query != nil { 1243 query = "?" + r.query.Encode() 1244 } 1245 return r.Paging(ctx, "GET", query, nil, n) 1246 } 1247 1248 // Get performs GET request for WindowsProtectionState collection 1249 func (r *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest) Get(ctx context.Context) ([]WindowsProtectionState, error) { 1250 return r.GetN(ctx, 0) 1251 } 1252 1253 // Add performs POST request for WindowsProtectionState collection 1254 func (r *WindowsMalwareInformationWindowsDevicesProtectionStateCollectionRequest) Add(ctx context.Context, reqObj *WindowsProtectionState) (resObj *WindowsProtectionState, err error) { 1255 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1256 return 1257 } 1258 1259 // HealthStates returns request builder for WindowsManagementAppHealthState collection 1260 func (b *WindowsManagementAppRequestBuilder) HealthStates() *WindowsManagementAppHealthStatesCollectionRequestBuilder { 1261 bb := &WindowsManagementAppHealthStatesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1262 bb.baseURL += "/healthStates" 1263 return bb 1264 } 1265 1266 // WindowsManagementAppHealthStatesCollectionRequestBuilder is request builder for WindowsManagementAppHealthState collection 1267 type WindowsManagementAppHealthStatesCollectionRequestBuilder struct{ BaseRequestBuilder } 1268 1269 // Request returns request for WindowsManagementAppHealthState collection 1270 func (b *WindowsManagementAppHealthStatesCollectionRequestBuilder) Request() *WindowsManagementAppHealthStatesCollectionRequest { 1271 return &WindowsManagementAppHealthStatesCollectionRequest{ 1272 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1273 } 1274 } 1275 1276 // ID returns request builder for WindowsManagementAppHealthState item 1277 func (b *WindowsManagementAppHealthStatesCollectionRequestBuilder) ID(id string) *WindowsManagementAppHealthStateRequestBuilder { 1278 bb := &WindowsManagementAppHealthStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1279 bb.baseURL += "/" + id 1280 return bb 1281 } 1282 1283 // WindowsManagementAppHealthStatesCollectionRequest is request for WindowsManagementAppHealthState collection 1284 type WindowsManagementAppHealthStatesCollectionRequest struct{ BaseRequest } 1285 1286 // Paging perfoms paging operation for WindowsManagementAppHealthState collection 1287 func (r *WindowsManagementAppHealthStatesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsManagementAppHealthState, error) { 1288 req, err := r.NewJSONRequest(method, path, obj) 1289 if err != nil { 1290 return nil, err 1291 } 1292 if ctx != nil { 1293 req = req.WithContext(ctx) 1294 } 1295 res, err := r.client.Do(req) 1296 if err != nil { 1297 return nil, err 1298 } 1299 var values []WindowsManagementAppHealthState 1300 for { 1301 if res.StatusCode != http.StatusOK { 1302 b, _ := ioutil.ReadAll(res.Body) 1303 res.Body.Close() 1304 errRes := &ErrorResponse{Response: res} 1305 err := jsonx.Unmarshal(b, errRes) 1306 if err != nil { 1307 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1308 } 1309 return nil, errRes 1310 } 1311 var ( 1312 paging Paging 1313 value []WindowsManagementAppHealthState 1314 ) 1315 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1316 res.Body.Close() 1317 if err != nil { 1318 return nil, err 1319 } 1320 err = jsonx.Unmarshal(paging.Value, &value) 1321 if err != nil { 1322 return nil, err 1323 } 1324 values = append(values, value...) 1325 if n >= 0 { 1326 n-- 1327 } 1328 if n == 0 || len(paging.NextLink) == 0 { 1329 return values, nil 1330 } 1331 req, err = http.NewRequest("GET", paging.NextLink, nil) 1332 if ctx != nil { 1333 req = req.WithContext(ctx) 1334 } 1335 res, err = r.client.Do(req) 1336 if err != nil { 1337 return nil, err 1338 } 1339 } 1340 } 1341 1342 // GetN performs GET request for WindowsManagementAppHealthState collection, max N pages 1343 func (r *WindowsManagementAppHealthStatesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsManagementAppHealthState, error) { 1344 var query string 1345 if r.query != nil { 1346 query = "?" + r.query.Encode() 1347 } 1348 return r.Paging(ctx, "GET", query, nil, n) 1349 } 1350 1351 // Get performs GET request for WindowsManagementAppHealthState collection 1352 func (r *WindowsManagementAppHealthStatesCollectionRequest) Get(ctx context.Context) ([]WindowsManagementAppHealthState, error) { 1353 return r.GetN(ctx, 0) 1354 } 1355 1356 // Add performs POST request for WindowsManagementAppHealthState collection 1357 func (r *WindowsManagementAppHealthStatesCollectionRequest) Add(ctx context.Context, reqObj *WindowsManagementAppHealthState) (resObj *WindowsManagementAppHealthState, err error) { 1358 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1359 return 1360 } 1361 1362 // ManagedDeviceCertificateStates returns request builder for ManagedDeviceCertificateState collection 1363 func (b *WindowsPhone81ImportedPFXCertificateProfileRequestBuilder) ManagedDeviceCertificateStates() *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder { 1364 bb := &WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1365 bb.baseURL += "/managedDeviceCertificateStates" 1366 return bb 1367 } 1368 1369 // WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder is request builder for ManagedDeviceCertificateState collection 1370 type WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder struct{ BaseRequestBuilder } 1371 1372 // Request returns request for ManagedDeviceCertificateState collection 1373 func (b *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder) Request() *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest { 1374 return &WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest{ 1375 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1376 } 1377 } 1378 1379 // ID returns request builder for ManagedDeviceCertificateState item 1380 func (b *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder) ID(id string) *ManagedDeviceCertificateStateRequestBuilder { 1381 bb := &ManagedDeviceCertificateStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1382 bb.baseURL += "/" + id 1383 return bb 1384 } 1385 1386 // WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest is request for ManagedDeviceCertificateState collection 1387 type WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest struct{ BaseRequest } 1388 1389 // Paging perfoms paging operation for ManagedDeviceCertificateState collection 1390 func (r *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]ManagedDeviceCertificateState, error) { 1391 req, err := r.NewJSONRequest(method, path, obj) 1392 if err != nil { 1393 return nil, err 1394 } 1395 if ctx != nil { 1396 req = req.WithContext(ctx) 1397 } 1398 res, err := r.client.Do(req) 1399 if err != nil { 1400 return nil, err 1401 } 1402 var values []ManagedDeviceCertificateState 1403 for { 1404 if res.StatusCode != http.StatusOK { 1405 b, _ := ioutil.ReadAll(res.Body) 1406 res.Body.Close() 1407 errRes := &ErrorResponse{Response: res} 1408 err := jsonx.Unmarshal(b, errRes) 1409 if err != nil { 1410 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1411 } 1412 return nil, errRes 1413 } 1414 var ( 1415 paging Paging 1416 value []ManagedDeviceCertificateState 1417 ) 1418 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1419 res.Body.Close() 1420 if err != nil { 1421 return nil, err 1422 } 1423 err = jsonx.Unmarshal(paging.Value, &value) 1424 if err != nil { 1425 return nil, err 1426 } 1427 values = append(values, value...) 1428 if n >= 0 { 1429 n-- 1430 } 1431 if n == 0 || len(paging.NextLink) == 0 { 1432 return values, nil 1433 } 1434 req, err = http.NewRequest("GET", paging.NextLink, nil) 1435 if ctx != nil { 1436 req = req.WithContext(ctx) 1437 } 1438 res, err = r.client.Do(req) 1439 if err != nil { 1440 return nil, err 1441 } 1442 } 1443 } 1444 1445 // GetN performs GET request for ManagedDeviceCertificateState collection, max N pages 1446 func (r *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest) GetN(ctx context.Context, n int) ([]ManagedDeviceCertificateState, error) { 1447 var query string 1448 if r.query != nil { 1449 query = "?" + r.query.Encode() 1450 } 1451 return r.Paging(ctx, "GET", query, nil, n) 1452 } 1453 1454 // Get performs GET request for ManagedDeviceCertificateState collection 1455 func (r *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest) Get(ctx context.Context) ([]ManagedDeviceCertificateState, error) { 1456 return r.GetN(ctx, 0) 1457 } 1458 1459 // Add performs POST request for ManagedDeviceCertificateState collection 1460 func (r *WindowsPhone81ImportedPFXCertificateProfileManagedDeviceCertificateStatesCollectionRequest) Add(ctx context.Context, reqObj *ManagedDeviceCertificateState) (resObj *ManagedDeviceCertificateState, err error) { 1461 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1462 return 1463 } 1464 1465 // ManagedDeviceCertificateStates returns request builder for ManagedDeviceCertificateState collection 1466 func (b *WindowsPhone81SCEPCertificateProfileRequestBuilder) ManagedDeviceCertificateStates() *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder { 1467 bb := &WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1468 bb.baseURL += "/managedDeviceCertificateStates" 1469 return bb 1470 } 1471 1472 // WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder is request builder for ManagedDeviceCertificateState collection 1473 type WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder struct{ BaseRequestBuilder } 1474 1475 // Request returns request for ManagedDeviceCertificateState collection 1476 func (b *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder) Request() *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest { 1477 return &WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest{ 1478 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1479 } 1480 } 1481 1482 // ID returns request builder for ManagedDeviceCertificateState item 1483 func (b *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequestBuilder) ID(id string) *ManagedDeviceCertificateStateRequestBuilder { 1484 bb := &ManagedDeviceCertificateStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1485 bb.baseURL += "/" + id 1486 return bb 1487 } 1488 1489 // WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest is request for ManagedDeviceCertificateState collection 1490 type WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest struct{ BaseRequest } 1491 1492 // Paging perfoms paging operation for ManagedDeviceCertificateState collection 1493 func (r *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]ManagedDeviceCertificateState, error) { 1494 req, err := r.NewJSONRequest(method, path, obj) 1495 if err != nil { 1496 return nil, err 1497 } 1498 if ctx != nil { 1499 req = req.WithContext(ctx) 1500 } 1501 res, err := r.client.Do(req) 1502 if err != nil { 1503 return nil, err 1504 } 1505 var values []ManagedDeviceCertificateState 1506 for { 1507 if res.StatusCode != http.StatusOK { 1508 b, _ := ioutil.ReadAll(res.Body) 1509 res.Body.Close() 1510 errRes := &ErrorResponse{Response: res} 1511 err := jsonx.Unmarshal(b, errRes) 1512 if err != nil { 1513 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1514 } 1515 return nil, errRes 1516 } 1517 var ( 1518 paging Paging 1519 value []ManagedDeviceCertificateState 1520 ) 1521 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1522 res.Body.Close() 1523 if err != nil { 1524 return nil, err 1525 } 1526 err = jsonx.Unmarshal(paging.Value, &value) 1527 if err != nil { 1528 return nil, err 1529 } 1530 values = append(values, value...) 1531 if n >= 0 { 1532 n-- 1533 } 1534 if n == 0 || len(paging.NextLink) == 0 { 1535 return values, nil 1536 } 1537 req, err = http.NewRequest("GET", paging.NextLink, nil) 1538 if ctx != nil { 1539 req = req.WithContext(ctx) 1540 } 1541 res, err = r.client.Do(req) 1542 if err != nil { 1543 return nil, err 1544 } 1545 } 1546 } 1547 1548 // GetN performs GET request for ManagedDeviceCertificateState collection, max N pages 1549 func (r *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest) GetN(ctx context.Context, n int) ([]ManagedDeviceCertificateState, error) { 1550 var query string 1551 if r.query != nil { 1552 query = "?" + r.query.Encode() 1553 } 1554 return r.Paging(ctx, "GET", query, nil, n) 1555 } 1556 1557 // Get performs GET request for ManagedDeviceCertificateState collection 1558 func (r *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest) Get(ctx context.Context) ([]ManagedDeviceCertificateState, error) { 1559 return r.GetN(ctx, 0) 1560 } 1561 1562 // Add performs POST request for ManagedDeviceCertificateState collection 1563 func (r *WindowsPhone81SCEPCertificateProfileManagedDeviceCertificateStatesCollectionRequest) Add(ctx context.Context, reqObj *ManagedDeviceCertificateState) (resObj *ManagedDeviceCertificateState, err error) { 1564 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1565 return 1566 } 1567 1568 // RootCertificate is navigation property 1569 func (b *WindowsPhone81SCEPCertificateProfileRequestBuilder) RootCertificate() *WindowsPhone81TrustedRootCertificateRequestBuilder { 1570 bb := &WindowsPhone81TrustedRootCertificateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1571 bb.baseURL += "/rootCertificate" 1572 return bb 1573 } 1574 1575 // IdentityCertificate is navigation property 1576 func (b *WindowsPhone81VpnConfigurationRequestBuilder) IdentityCertificate() *WindowsPhone81CertificateProfileBaseRequestBuilder { 1577 bb := &WindowsPhone81CertificateProfileBaseRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1578 bb.baseURL += "/identityCertificate" 1579 return bb 1580 } 1581 1582 // DetectedMalwareState returns request builder for WindowsDeviceMalwareState collection 1583 func (b *WindowsProtectionStateRequestBuilder) DetectedMalwareState() *WindowsProtectionStateDetectedMalwareStateCollectionRequestBuilder { 1584 bb := &WindowsProtectionStateDetectedMalwareStateCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1585 bb.baseURL += "/detectedMalwareState" 1586 return bb 1587 } 1588 1589 // WindowsProtectionStateDetectedMalwareStateCollectionRequestBuilder is request builder for WindowsDeviceMalwareState collection 1590 type WindowsProtectionStateDetectedMalwareStateCollectionRequestBuilder struct{ BaseRequestBuilder } 1591 1592 // Request returns request for WindowsDeviceMalwareState collection 1593 func (b *WindowsProtectionStateDetectedMalwareStateCollectionRequestBuilder) Request() *WindowsProtectionStateDetectedMalwareStateCollectionRequest { 1594 return &WindowsProtectionStateDetectedMalwareStateCollectionRequest{ 1595 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1596 } 1597 } 1598 1599 // ID returns request builder for WindowsDeviceMalwareState item 1600 func (b *WindowsProtectionStateDetectedMalwareStateCollectionRequestBuilder) ID(id string) *WindowsDeviceMalwareStateRequestBuilder { 1601 bb := &WindowsDeviceMalwareStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1602 bb.baseURL += "/" + id 1603 return bb 1604 } 1605 1606 // WindowsProtectionStateDetectedMalwareStateCollectionRequest is request for WindowsDeviceMalwareState collection 1607 type WindowsProtectionStateDetectedMalwareStateCollectionRequest struct{ BaseRequest } 1608 1609 // Paging perfoms paging operation for WindowsDeviceMalwareState collection 1610 func (r *WindowsProtectionStateDetectedMalwareStateCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsDeviceMalwareState, error) { 1611 req, err := r.NewJSONRequest(method, path, obj) 1612 if err != nil { 1613 return nil, err 1614 } 1615 if ctx != nil { 1616 req = req.WithContext(ctx) 1617 } 1618 res, err := r.client.Do(req) 1619 if err != nil { 1620 return nil, err 1621 } 1622 var values []WindowsDeviceMalwareState 1623 for { 1624 if res.StatusCode != http.StatusOK { 1625 b, _ := ioutil.ReadAll(res.Body) 1626 res.Body.Close() 1627 errRes := &ErrorResponse{Response: res} 1628 err := jsonx.Unmarshal(b, errRes) 1629 if err != nil { 1630 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1631 } 1632 return nil, errRes 1633 } 1634 var ( 1635 paging Paging 1636 value []WindowsDeviceMalwareState 1637 ) 1638 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1639 res.Body.Close() 1640 if err != nil { 1641 return nil, err 1642 } 1643 err = jsonx.Unmarshal(paging.Value, &value) 1644 if err != nil { 1645 return nil, err 1646 } 1647 values = append(values, value...) 1648 if n >= 0 { 1649 n-- 1650 } 1651 if n == 0 || len(paging.NextLink) == 0 { 1652 return values, nil 1653 } 1654 req, err = http.NewRequest("GET", paging.NextLink, nil) 1655 if ctx != nil { 1656 req = req.WithContext(ctx) 1657 } 1658 res, err = r.client.Do(req) 1659 if err != nil { 1660 return nil, err 1661 } 1662 } 1663 } 1664 1665 // GetN performs GET request for WindowsDeviceMalwareState collection, max N pages 1666 func (r *WindowsProtectionStateDetectedMalwareStateCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsDeviceMalwareState, error) { 1667 var query string 1668 if r.query != nil { 1669 query = "?" + r.query.Encode() 1670 } 1671 return r.Paging(ctx, "GET", query, nil, n) 1672 } 1673 1674 // Get performs GET request for WindowsDeviceMalwareState collection 1675 func (r *WindowsProtectionStateDetectedMalwareStateCollectionRequest) Get(ctx context.Context) ([]WindowsDeviceMalwareState, error) { 1676 return r.GetN(ctx, 0) 1677 } 1678 1679 // Add performs POST request for WindowsDeviceMalwareState collection 1680 func (r *WindowsProtectionStateDetectedMalwareStateCollectionRequest) Add(ctx context.Context, reqObj *WindowsDeviceMalwareState) (resObj *WindowsDeviceMalwareState, err error) { 1681 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1682 return 1683 } 1684 1685 // CommittedContainedApps returns request builder for MobileContainedApp collection 1686 func (b *WindowsUniversalAppXRequestBuilder) CommittedContainedApps() *WindowsUniversalAppXCommittedContainedAppsCollectionRequestBuilder { 1687 bb := &WindowsUniversalAppXCommittedContainedAppsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1688 bb.baseURL += "/committedContainedApps" 1689 return bb 1690 } 1691 1692 // WindowsUniversalAppXCommittedContainedAppsCollectionRequestBuilder is request builder for MobileContainedApp collection 1693 type WindowsUniversalAppXCommittedContainedAppsCollectionRequestBuilder struct{ BaseRequestBuilder } 1694 1695 // Request returns request for MobileContainedApp collection 1696 func (b *WindowsUniversalAppXCommittedContainedAppsCollectionRequestBuilder) Request() *WindowsUniversalAppXCommittedContainedAppsCollectionRequest { 1697 return &WindowsUniversalAppXCommittedContainedAppsCollectionRequest{ 1698 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1699 } 1700 } 1701 1702 // ID returns request builder for MobileContainedApp item 1703 func (b *WindowsUniversalAppXCommittedContainedAppsCollectionRequestBuilder) ID(id string) *MobileContainedAppRequestBuilder { 1704 bb := &MobileContainedAppRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1705 bb.baseURL += "/" + id 1706 return bb 1707 } 1708 1709 // WindowsUniversalAppXCommittedContainedAppsCollectionRequest is request for MobileContainedApp collection 1710 type WindowsUniversalAppXCommittedContainedAppsCollectionRequest struct{ BaseRequest } 1711 1712 // Paging perfoms paging operation for MobileContainedApp collection 1713 func (r *WindowsUniversalAppXCommittedContainedAppsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]MobileContainedApp, error) { 1714 req, err := r.NewJSONRequest(method, path, obj) 1715 if err != nil { 1716 return nil, err 1717 } 1718 if ctx != nil { 1719 req = req.WithContext(ctx) 1720 } 1721 res, err := r.client.Do(req) 1722 if err != nil { 1723 return nil, err 1724 } 1725 var values []MobileContainedApp 1726 for { 1727 if res.StatusCode != http.StatusOK { 1728 b, _ := ioutil.ReadAll(res.Body) 1729 res.Body.Close() 1730 errRes := &ErrorResponse{Response: res} 1731 err := jsonx.Unmarshal(b, errRes) 1732 if err != nil { 1733 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1734 } 1735 return nil, errRes 1736 } 1737 var ( 1738 paging Paging 1739 value []MobileContainedApp 1740 ) 1741 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1742 res.Body.Close() 1743 if err != nil { 1744 return nil, err 1745 } 1746 err = jsonx.Unmarshal(paging.Value, &value) 1747 if err != nil { 1748 return nil, err 1749 } 1750 values = append(values, value...) 1751 if n >= 0 { 1752 n-- 1753 } 1754 if n == 0 || len(paging.NextLink) == 0 { 1755 return values, nil 1756 } 1757 req, err = http.NewRequest("GET", paging.NextLink, nil) 1758 if ctx != nil { 1759 req = req.WithContext(ctx) 1760 } 1761 res, err = r.client.Do(req) 1762 if err != nil { 1763 return nil, err 1764 } 1765 } 1766 } 1767 1768 // GetN performs GET request for MobileContainedApp collection, max N pages 1769 func (r *WindowsUniversalAppXCommittedContainedAppsCollectionRequest) GetN(ctx context.Context, n int) ([]MobileContainedApp, error) { 1770 var query string 1771 if r.query != nil { 1772 query = "?" + r.query.Encode() 1773 } 1774 return r.Paging(ctx, "GET", query, nil, n) 1775 } 1776 1777 // Get performs GET request for MobileContainedApp collection 1778 func (r *WindowsUniversalAppXCommittedContainedAppsCollectionRequest) Get(ctx context.Context) ([]MobileContainedApp, error) { 1779 return r.GetN(ctx, 0) 1780 } 1781 1782 // Add performs POST request for MobileContainedApp collection 1783 func (r *WindowsUniversalAppXCommittedContainedAppsCollectionRequest) Add(ctx context.Context, reqObj *MobileContainedApp) (resObj *MobileContainedApp, err error) { 1784 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1785 return 1786 } 1787 1788 // DeviceUpdateStates returns request builder for WindowsUpdateState collection 1789 func (b *WindowsUpdateForBusinessConfigurationRequestBuilder) DeviceUpdateStates() *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequestBuilder { 1790 bb := &WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1791 bb.baseURL += "/deviceUpdateStates" 1792 return bb 1793 } 1794 1795 // WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequestBuilder is request builder for WindowsUpdateState collection 1796 type WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequestBuilder struct{ BaseRequestBuilder } 1797 1798 // Request returns request for WindowsUpdateState collection 1799 func (b *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequestBuilder) Request() *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest { 1800 return &WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest{ 1801 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1802 } 1803 } 1804 1805 // ID returns request builder for WindowsUpdateState item 1806 func (b *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequestBuilder) ID(id string) *WindowsUpdateStateRequestBuilder { 1807 bb := &WindowsUpdateStateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1808 bb.baseURL += "/" + id 1809 return bb 1810 } 1811 1812 // WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest is request for WindowsUpdateState collection 1813 type WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest struct{ BaseRequest } 1814 1815 // Paging perfoms paging operation for WindowsUpdateState collection 1816 func (r *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]WindowsUpdateState, error) { 1817 req, err := r.NewJSONRequest(method, path, obj) 1818 if err != nil { 1819 return nil, err 1820 } 1821 if ctx != nil { 1822 req = req.WithContext(ctx) 1823 } 1824 res, err := r.client.Do(req) 1825 if err != nil { 1826 return nil, err 1827 } 1828 var values []WindowsUpdateState 1829 for { 1830 if res.StatusCode != http.StatusOK { 1831 b, _ := ioutil.ReadAll(res.Body) 1832 res.Body.Close() 1833 errRes := &ErrorResponse{Response: res} 1834 err := jsonx.Unmarshal(b, errRes) 1835 if err != nil { 1836 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1837 } 1838 return nil, errRes 1839 } 1840 var ( 1841 paging Paging 1842 value []WindowsUpdateState 1843 ) 1844 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1845 res.Body.Close() 1846 if err != nil { 1847 return nil, err 1848 } 1849 err = jsonx.Unmarshal(paging.Value, &value) 1850 if err != nil { 1851 return nil, err 1852 } 1853 values = append(values, value...) 1854 if n >= 0 { 1855 n-- 1856 } 1857 if n == 0 || len(paging.NextLink) == 0 { 1858 return values, nil 1859 } 1860 req, err = http.NewRequest("GET", paging.NextLink, nil) 1861 if ctx != nil { 1862 req = req.WithContext(ctx) 1863 } 1864 res, err = r.client.Do(req) 1865 if err != nil { 1866 return nil, err 1867 } 1868 } 1869 } 1870 1871 // GetN performs GET request for WindowsUpdateState collection, max N pages 1872 func (r *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest) GetN(ctx context.Context, n int) ([]WindowsUpdateState, error) { 1873 var query string 1874 if r.query != nil { 1875 query = "?" + r.query.Encode() 1876 } 1877 return r.Paging(ctx, "GET", query, nil, n) 1878 } 1879 1880 // Get performs GET request for WindowsUpdateState collection 1881 func (r *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest) Get(ctx context.Context) ([]WindowsUpdateState, error) { 1882 return r.GetN(ctx, 0) 1883 } 1884 1885 // Add performs POST request for WindowsUpdateState collection 1886 func (r *WindowsUpdateForBusinessConfigurationDeviceUpdateStatesCollectionRequest) Add(ctx context.Context, reqObj *WindowsUpdateState) (resObj *WindowsUpdateState, err error) { 1887 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1888 return 1889 } 1890 1891 // IdentityCertificateForClientAuthentication is navigation property 1892 func (b *WindowsWiFiEnterpriseEAPConfigurationRequestBuilder) IdentityCertificateForClientAuthentication() *WindowsCertificateProfileBaseRequestBuilder { 1893 bb := &WindowsCertificateProfileBaseRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1894 bb.baseURL += "/identityCertificateForClientAuthentication" 1895 return bb 1896 } 1897 1898 // RootCertificatesForServerValidation returns request builder for Windows81TrustedRootCertificate collection 1899 func (b *WindowsWiFiEnterpriseEAPConfigurationRequestBuilder) RootCertificatesForServerValidation() *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequestBuilder { 1900 bb := &WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1901 bb.baseURL += "/rootCertificatesForServerValidation" 1902 return bb 1903 } 1904 1905 // WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequestBuilder is request builder for Windows81TrustedRootCertificate collection 1906 type WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequestBuilder struct{ BaseRequestBuilder } 1907 1908 // Request returns request for Windows81TrustedRootCertificate collection 1909 func (b *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequestBuilder) Request() *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest { 1910 return &WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest{ 1911 BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, 1912 } 1913 } 1914 1915 // ID returns request builder for Windows81TrustedRootCertificate item 1916 func (b *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequestBuilder) ID(id string) *Windows81TrustedRootCertificateRequestBuilder { 1917 bb := &Windows81TrustedRootCertificateRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} 1918 bb.baseURL += "/" + id 1919 return bb 1920 } 1921 1922 // WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest is request for Windows81TrustedRootCertificate collection 1923 type WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest struct{ BaseRequest } 1924 1925 // Paging perfoms paging operation for Windows81TrustedRootCertificate collection 1926 func (r *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]Windows81TrustedRootCertificate, error) { 1927 req, err := r.NewJSONRequest(method, path, obj) 1928 if err != nil { 1929 return nil, err 1930 } 1931 if ctx != nil { 1932 req = req.WithContext(ctx) 1933 } 1934 res, err := r.client.Do(req) 1935 if err != nil { 1936 return nil, err 1937 } 1938 var values []Windows81TrustedRootCertificate 1939 for { 1940 if res.StatusCode != http.StatusOK { 1941 b, _ := ioutil.ReadAll(res.Body) 1942 res.Body.Close() 1943 errRes := &ErrorResponse{Response: res} 1944 err := jsonx.Unmarshal(b, errRes) 1945 if err != nil { 1946 return nil, fmt.Errorf("%s: %s", res.Status, string(b)) 1947 } 1948 return nil, errRes 1949 } 1950 var ( 1951 paging Paging 1952 value []Windows81TrustedRootCertificate 1953 ) 1954 err := jsonx.NewDecoder(res.Body).Decode(&paging) 1955 res.Body.Close() 1956 if err != nil { 1957 return nil, err 1958 } 1959 err = jsonx.Unmarshal(paging.Value, &value) 1960 if err != nil { 1961 return nil, err 1962 } 1963 values = append(values, value...) 1964 if n >= 0 { 1965 n-- 1966 } 1967 if n == 0 || len(paging.NextLink) == 0 { 1968 return values, nil 1969 } 1970 req, err = http.NewRequest("GET", paging.NextLink, nil) 1971 if ctx != nil { 1972 req = req.WithContext(ctx) 1973 } 1974 res, err = r.client.Do(req) 1975 if err != nil { 1976 return nil, err 1977 } 1978 } 1979 } 1980 1981 // GetN performs GET request for Windows81TrustedRootCertificate collection, max N pages 1982 func (r *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest) GetN(ctx context.Context, n int) ([]Windows81TrustedRootCertificate, error) { 1983 var query string 1984 if r.query != nil { 1985 query = "?" + r.query.Encode() 1986 } 1987 return r.Paging(ctx, "GET", query, nil, n) 1988 } 1989 1990 // Get performs GET request for Windows81TrustedRootCertificate collection 1991 func (r *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest) Get(ctx context.Context) ([]Windows81TrustedRootCertificate, error) { 1992 return r.GetN(ctx, 0) 1993 } 1994 1995 // Add performs POST request for Windows81TrustedRootCertificate collection 1996 func (r *WindowsWiFiEnterpriseEAPConfigurationRootCertificatesForServerValidationCollectionRequest) Add(ctx context.Context, reqObj *Windows81TrustedRootCertificate) (resObj *Windows81TrustedRootCertificate, err error) { 1997 err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) 1998 return 1999 }