diff options
author | Wim <wim@42.be> | 2020-09-04 23:29:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-04 23:29:13 +0200 |
commit | 2f59abdda7a1072036ea1fdb4c859cccbb56efa6 (patch) | |
tree | e35393f23d12783ae92f0469085efc7dec953f82 /vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go | |
parent | 17747a5c8893fd47ba8eb61dd10477170640caf6 (diff) | |
download | matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.gz matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.bz2 matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.zip |
Update vendor (#1228)
Diffstat (limited to 'vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go')
-rw-r--r-- | vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go | 297 |
1 files changed, 193 insertions, 104 deletions
diff --git a/vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go b/vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go index 89fdddba..17886250 100644 --- a/vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go +++ b/vendor/github.com/yaegashi/msgraph.go/beta/GraphService.go @@ -1,4 +1,4 @@ -// Code generated by msgraph-generate.go DO NOT EDIT. +// Code generated by msgraph.go/gen DO NOT EDIT. package msgraph @@ -53,9 +53,9 @@ func (r *GraphServiceAccessPackageAssignmentPoliciesCollectionRequest) Paging(ct } var values []AccessPackageAssignmentPolicy for { - defer res.Body.Close() 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 { @@ -68,6 +68,7 @@ func (r *GraphServiceAccessPackageAssignmentPoliciesCollectionRequest) Paging(ct value []AccessPackageAssignmentPolicy ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -155,9 +156,9 @@ func (r *GraphServiceAccessPackageAssignmentRequestsCollectionRequest) Paging(ct } var values []AccessPackageAssignmentRequestObject for { - defer res.Body.Close() 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 { @@ -170,6 +171,7 @@ func (r *GraphServiceAccessPackageAssignmentRequestsCollectionRequest) Paging(ct value []AccessPackageAssignmentRequestObject ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -257,9 +259,9 @@ func (r *GraphServiceAccessPackageAssignmentResourceRolesCollectionRequest) Pagi } var values []AccessPackageAssignmentResourceRole for { - defer res.Body.Close() 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 { @@ -272,6 +274,7 @@ func (r *GraphServiceAccessPackageAssignmentResourceRolesCollectionRequest) Pagi value []AccessPackageAssignmentResourceRole ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -359,9 +362,9 @@ func (r *GraphServiceAccessPackageAssignmentsCollectionRequest) Paging(ctx conte } var values []AccessPackageAssignment for { - defer res.Body.Close() 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 { @@ -374,6 +377,7 @@ func (r *GraphServiceAccessPackageAssignmentsCollectionRequest) Paging(ctx conte value []AccessPackageAssignment ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -461,9 +465,9 @@ func (r *GraphServiceAccessPackageCatalogsCollectionRequest) Paging(ctx context. } var values []AccessPackageCatalog for { - defer res.Body.Close() 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 { @@ -476,6 +480,7 @@ func (r *GraphServiceAccessPackageCatalogsCollectionRequest) Paging(ctx context. value []AccessPackageCatalog ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -563,9 +568,9 @@ func (r *GraphServiceAccessPackageResourceRequestsCollectionRequest) Paging(ctx } var values []AccessPackageResourceRequestObject for { - defer res.Body.Close() 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 { @@ -578,6 +583,7 @@ func (r *GraphServiceAccessPackageResourceRequestsCollectionRequest) Paging(ctx value []AccessPackageResourceRequestObject ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -665,9 +671,9 @@ func (r *GraphServiceAccessPackageResourceRoleScopesCollectionRequest) Paging(ct } var values []AccessPackageResourceRoleScope for { - defer res.Body.Close() 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 { @@ -680,6 +686,7 @@ func (r *GraphServiceAccessPackageResourceRoleScopesCollectionRequest) Paging(ct value []AccessPackageResourceRoleScope ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -767,9 +774,9 @@ func (r *GraphServiceAccessPackageResourcesCollectionRequest) Paging(ctx context } var values []AccessPackageResource for { - defer res.Body.Close() 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 { @@ -782,6 +789,7 @@ func (r *GraphServiceAccessPackageResourcesCollectionRequest) Paging(ctx context value []AccessPackageResource ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -869,9 +877,9 @@ func (r *GraphServiceAccessPackagesCollectionRequest) Paging(ctx context.Context } var values []AccessPackage for { - defer res.Body.Close() 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 { @@ -884,6 +892,7 @@ func (r *GraphServiceAccessPackagesCollectionRequest) Paging(ctx context.Context value []AccessPackage ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -971,9 +980,9 @@ func (r *GraphServiceAccessReviewDecisionsCollectionRequest) Paging(ctx context. } var values []AccessReviewDecision for { - defer res.Body.Close() 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 { @@ -986,6 +995,7 @@ func (r *GraphServiceAccessReviewDecisionsCollectionRequest) Paging(ctx context. value []AccessReviewDecision ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1073,9 +1083,9 @@ func (r *GraphServiceAccessReviewsCollectionRequest) Paging(ctx context.Context, } var values []AccessReview for { - defer res.Body.Close() 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 { @@ -1088,6 +1098,7 @@ func (r *GraphServiceAccessReviewsCollectionRequest) Paging(ctx context.Context, value []AccessReview ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1175,9 +1186,9 @@ func (r *GraphServiceActivitystatisticsCollectionRequest) Paging(ctx context.Con } var values []ActivityStatistics for { - defer res.Body.Close() 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 { @@ -1190,6 +1201,7 @@ func (r *GraphServiceActivitystatisticsCollectionRequest) Paging(ctx context.Con value []ActivityStatistics ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1277,9 +1289,9 @@ func (r *GraphServiceAdministrativeUnitsCollectionRequest) Paging(ctx context.Co } var values []AdministrativeUnit for { - defer res.Body.Close() 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 { @@ -1292,6 +1304,7 @@ func (r *GraphServiceAdministrativeUnitsCollectionRequest) Paging(ctx context.Co value []AdministrativeUnit ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1379,9 +1392,9 @@ func (r *GraphServiceAgreementAcceptancesCollectionRequest) Paging(ctx context.C } var values []AgreementAcceptance for { - defer res.Body.Close() 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 { @@ -1394,6 +1407,7 @@ func (r *GraphServiceAgreementAcceptancesCollectionRequest) Paging(ctx context.C value []AgreementAcceptance ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1481,9 +1495,9 @@ func (r *GraphServiceAgreementsCollectionRequest) Paging(ctx context.Context, me } var values []Agreement for { - defer res.Body.Close() 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 { @@ -1496,6 +1510,7 @@ func (r *GraphServiceAgreementsCollectionRequest) Paging(ctx context.Context, me value []Agreement ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1583,9 +1598,9 @@ func (r *GraphServiceAllowedDataLocationsCollectionRequest) Paging(ctx context.C } var values []AllowedDataLocation for { - defer res.Body.Close() 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 { @@ -1598,6 +1613,7 @@ func (r *GraphServiceAllowedDataLocationsCollectionRequest) Paging(ctx context.C value []AllowedDataLocation ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1685,9 +1701,9 @@ func (r *GraphServiceAnonymousIPRiskEventsCollectionRequest) Paging(ctx context. } var values []AnonymousIPRiskEvent for { - defer res.Body.Close() 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 { @@ -1700,6 +1716,7 @@ func (r *GraphServiceAnonymousIPRiskEventsCollectionRequest) Paging(ctx context. value []AnonymousIPRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1787,9 +1804,9 @@ func (r *GraphServiceAppRoleAssignmentsCollectionRequest) Paging(ctx context.Con } var values []AppRoleAssignment for { - defer res.Body.Close() 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 { @@ -1802,6 +1819,7 @@ func (r *GraphServiceAppRoleAssignmentsCollectionRequest) Paging(ctx context.Con value []AppRoleAssignment ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1889,9 +1907,9 @@ func (r *GraphServiceApplicationTemplatesCollectionRequest) Paging(ctx context.C } var values []ApplicationTemplate for { - defer res.Body.Close() 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 { @@ -1904,6 +1922,7 @@ func (r *GraphServiceApplicationTemplatesCollectionRequest) Paging(ctx context.C value []ApplicationTemplate ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -1991,9 +2010,9 @@ func (r *GraphServiceApplicationsCollectionRequest) Paging(ctx context.Context, } var values []Application for { - defer res.Body.Close() 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 { @@ -2006,6 +2025,7 @@ func (r *GraphServiceApplicationsCollectionRequest) Paging(ctx context.Context, value []Application ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2093,9 +2113,9 @@ func (r *GraphServiceApprovalWorkflowProvidersCollectionRequest) Paging(ctx cont } var values []ApprovalWorkflowProvider for { - defer res.Body.Close() 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 { @@ -2108,6 +2128,7 @@ func (r *GraphServiceApprovalWorkflowProvidersCollectionRequest) Paging(ctx cont value []ApprovalWorkflowProvider ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2195,9 +2216,9 @@ func (r *GraphServiceBookingBusinessesCollectionRequest) Paging(ctx context.Cont } var values []BookingBusiness for { - defer res.Body.Close() 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 { @@ -2210,6 +2231,7 @@ func (r *GraphServiceBookingBusinessesCollectionRequest) Paging(ctx context.Cont value []BookingBusiness ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2297,9 +2319,9 @@ func (r *GraphServiceBookingCurrenciesCollectionRequest) Paging(ctx context.Cont } var values []BookingCurrency for { - defer res.Body.Close() 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 { @@ -2312,6 +2334,7 @@ func (r *GraphServiceBookingCurrenciesCollectionRequest) Paging(ctx context.Cont value []BookingCurrency ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2399,9 +2422,9 @@ func (r *GraphServiceBusinessFlowTemplatesCollectionRequest) Paging(ctx context. } var values []BusinessFlowTemplate for { - defer res.Body.Close() 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 { @@ -2414,6 +2437,7 @@ func (r *GraphServiceBusinessFlowTemplatesCollectionRequest) Paging(ctx context. value []BusinessFlowTemplate ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2501,9 +2525,9 @@ func (r *GraphServiceCertificateBasedAuthConfigurationCollectionRequest) Paging( } var values []CertificateBasedAuthConfiguration for { - defer res.Body.Close() 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 { @@ -2516,6 +2540,7 @@ func (r *GraphServiceCertificateBasedAuthConfigurationCollectionRequest) Paging( value []CertificateBasedAuthConfiguration ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2603,9 +2628,9 @@ func (r *GraphServiceChatsCollectionRequest) Paging(ctx context.Context, method, } var values []Chat for { - defer res.Body.Close() 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 { @@ -2618,6 +2643,7 @@ func (r *GraphServiceChatsCollectionRequest) Paging(ctx context.Context, method, value []Chat ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2705,9 +2731,9 @@ func (r *GraphServiceCommandsCollectionRequest) Paging(ctx context.Context, meth } var values []Command for { - defer res.Body.Close() 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 { @@ -2720,6 +2746,7 @@ func (r *GraphServiceCommandsCollectionRequest) Paging(ctx context.Context, meth value []Command ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2807,9 +2834,9 @@ func (r *GraphServiceConnectionsCollectionRequest) Paging(ctx context.Context, m } var values []ExternalConnection for { - defer res.Body.Close() 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 { @@ -2822,6 +2849,7 @@ func (r *GraphServiceConnectionsCollectionRequest) Paging(ctx context.Context, m value []ExternalConnection ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -2909,9 +2937,9 @@ func (r *GraphServiceContactsCollectionRequest) Paging(ctx context.Context, meth } var values []OrgContact for { - defer res.Body.Close() 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 { @@ -2924,6 +2952,7 @@ func (r *GraphServiceContactsCollectionRequest) Paging(ctx context.Context, meth value []OrgContact ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3011,9 +3040,9 @@ func (r *GraphServiceContractsCollectionRequest) Paging(ctx context.Context, met } var values []Contract for { - defer res.Body.Close() 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 { @@ -3026,6 +3055,7 @@ func (r *GraphServiceContractsCollectionRequest) Paging(ctx context.Context, met value []Contract ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3113,9 +3143,9 @@ func (r *GraphServiceDataPolicyOperationsCollectionRequest) Paging(ctx context.C } var values []DataPolicyOperation for { - defer res.Body.Close() 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 { @@ -3128,6 +3158,7 @@ func (r *GraphServiceDataPolicyOperationsCollectionRequest) Paging(ctx context.C value []DataPolicyOperation ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3215,9 +3246,9 @@ func (r *GraphServiceDevicesCollectionRequest) Paging(ctx context.Context, metho } var values []Device for { - defer res.Body.Close() 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 { @@ -3230,6 +3261,7 @@ func (r *GraphServiceDevicesCollectionRequest) Paging(ctx context.Context, metho value []Device ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3317,9 +3349,9 @@ func (r *GraphServiceDirectoriesCollectionRequest) Paging(ctx context.Context, m } var values []DirectoryDefinition for { - defer res.Body.Close() 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 { @@ -3332,6 +3364,7 @@ func (r *GraphServiceDirectoriesCollectionRequest) Paging(ctx context.Context, m value []DirectoryDefinition ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3419,9 +3452,9 @@ func (r *GraphServiceDirectoryObjectsCollectionRequest) Paging(ctx context.Conte } var values []DirectoryObject for { - defer res.Body.Close() 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 { @@ -3434,6 +3467,7 @@ func (r *GraphServiceDirectoryObjectsCollectionRequest) Paging(ctx context.Conte value []DirectoryObject ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3521,9 +3555,9 @@ func (r *GraphServiceDirectoryRoleTemplatesCollectionRequest) Paging(ctx context } var values []DirectoryRoleTemplate for { - defer res.Body.Close() 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 { @@ -3536,6 +3570,7 @@ func (r *GraphServiceDirectoryRoleTemplatesCollectionRequest) Paging(ctx context value []DirectoryRoleTemplate ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3623,9 +3658,9 @@ func (r *GraphServiceDirectoryRolesCollectionRequest) Paging(ctx context.Context } var values []DirectoryRole for { - defer res.Body.Close() 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 { @@ -3638,6 +3673,7 @@ func (r *GraphServiceDirectoryRolesCollectionRequest) Paging(ctx context.Context value []DirectoryRole ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3725,9 +3761,9 @@ func (r *GraphServiceDirectorySettingTemplatesCollectionRequest) Paging(ctx cont } var values []DirectorySettingTemplate for { - defer res.Body.Close() 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 { @@ -3740,6 +3776,7 @@ func (r *GraphServiceDirectorySettingTemplatesCollectionRequest) Paging(ctx cont value []DirectorySettingTemplate ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3827,9 +3864,9 @@ func (r *GraphServiceDomainDNSRecordsCollectionRequest) Paging(ctx context.Conte } var values []DomainDNSRecord for { - defer res.Body.Close() 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 { @@ -3842,6 +3879,7 @@ func (r *GraphServiceDomainDNSRecordsCollectionRequest) Paging(ctx context.Conte value []DomainDNSRecord ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -3929,9 +3967,9 @@ func (r *GraphServiceDomainsCollectionRequest) Paging(ctx context.Context, metho } var values []Domain for { - defer res.Body.Close() 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 { @@ -3944,6 +3982,7 @@ func (r *GraphServiceDomainsCollectionRequest) Paging(ctx context.Context, metho value []Domain ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4031,9 +4070,9 @@ func (r *GraphServiceDrivesCollectionRequest) Paging(ctx context.Context, method } var values []Drive for { - defer res.Body.Close() 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 { @@ -4046,6 +4085,7 @@ func (r *GraphServiceDrivesCollectionRequest) Paging(ctx context.Context, method value []Drive ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4133,9 +4173,9 @@ func (r *GraphServiceFilterOperatorsCollectionRequest) Paging(ctx context.Contex } var values []FilterOperatorSchema for { - defer res.Body.Close() 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 { @@ -4148,6 +4188,7 @@ func (r *GraphServiceFilterOperatorsCollectionRequest) Paging(ctx context.Contex value []FilterOperatorSchema ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4235,9 +4276,9 @@ func (r *GraphServiceFunctionsCollectionRequest) Paging(ctx context.Context, met } var values []AttributeMappingFunctionSchema for { - defer res.Body.Close() 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 { @@ -4250,6 +4291,7 @@ func (r *GraphServiceFunctionsCollectionRequest) Paging(ctx context.Context, met value []AttributeMappingFunctionSchema ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4337,9 +4379,9 @@ func (r *GraphServiceGovernanceResourcesCollectionRequest) Paging(ctx context.Co } var values []GovernanceResource for { - defer res.Body.Close() 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 { @@ -4352,6 +4394,7 @@ func (r *GraphServiceGovernanceResourcesCollectionRequest) Paging(ctx context.Co value []GovernanceResource ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4439,9 +4482,9 @@ func (r *GraphServiceGovernanceRoleAssignmentRequestsCollectionRequest) Paging(c } var values []GovernanceRoleAssignmentRequestObject for { - defer res.Body.Close() 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 { @@ -4454,6 +4497,7 @@ func (r *GraphServiceGovernanceRoleAssignmentRequestsCollectionRequest) Paging(c value []GovernanceRoleAssignmentRequestObject ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4541,9 +4585,9 @@ func (r *GraphServiceGovernanceRoleAssignmentsCollectionRequest) Paging(ctx cont } var values []GovernanceRoleAssignment for { - defer res.Body.Close() 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 { @@ -4556,6 +4600,7 @@ func (r *GraphServiceGovernanceRoleAssignmentsCollectionRequest) Paging(ctx cont value []GovernanceRoleAssignment ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4643,9 +4688,9 @@ func (r *GraphServiceGovernanceRoleDefinitionsCollectionRequest) Paging(ctx cont } var values []GovernanceRoleDefinition for { - defer res.Body.Close() 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 { @@ -4658,6 +4703,7 @@ func (r *GraphServiceGovernanceRoleDefinitionsCollectionRequest) Paging(ctx cont value []GovernanceRoleDefinition ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4745,9 +4791,9 @@ func (r *GraphServiceGovernanceRoleSettingsCollectionRequest) Paging(ctx context } var values []GovernanceRoleSetting for { - defer res.Body.Close() 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 { @@ -4760,6 +4806,7 @@ func (r *GraphServiceGovernanceRoleSettingsCollectionRequest) Paging(ctx context value []GovernanceRoleSetting ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4847,9 +4894,9 @@ func (r *GraphServiceGovernanceSubjectsCollectionRequest) Paging(ctx context.Con } var values []GovernanceSubject for { - defer res.Body.Close() 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 { @@ -4862,6 +4909,7 @@ func (r *GraphServiceGovernanceSubjectsCollectionRequest) Paging(ctx context.Con value []GovernanceSubject ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -4949,9 +4997,9 @@ func (r *GraphServiceGroupLifecyclePoliciesCollectionRequest) Paging(ctx context } var values []GroupLifecyclePolicy for { - defer res.Body.Close() 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 { @@ -4964,6 +5012,7 @@ func (r *GraphServiceGroupLifecyclePoliciesCollectionRequest) Paging(ctx context value []GroupLifecyclePolicy ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5051,9 +5100,9 @@ func (r *GraphServiceGroupsCollectionRequest) Paging(ctx context.Context, method } var values []Group for { - defer res.Body.Close() 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 { @@ -5066,6 +5115,7 @@ func (r *GraphServiceGroupsCollectionRequest) Paging(ctx context.Context, method value []Group ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5153,9 +5203,9 @@ func (r *GraphServiceIdentityProvidersCollectionRequest) Paging(ctx context.Cont } var values []IdentityProvider for { - defer res.Body.Close() 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 { @@ -5168,6 +5218,7 @@ func (r *GraphServiceIdentityProvidersCollectionRequest) Paging(ctx context.Cont value []IdentityProvider ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5255,9 +5306,9 @@ func (r *GraphServiceIdentityRiskEventsCollectionRequest) Paging(ctx context.Con } var values []IdentityRiskEvent for { - defer res.Body.Close() 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 { @@ -5270,6 +5321,7 @@ func (r *GraphServiceIdentityRiskEventsCollectionRequest) Paging(ctx context.Con value []IdentityRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5357,9 +5409,9 @@ func (r *GraphServiceImpossibleTravelRiskEventsCollectionRequest) Paging(ctx con } var values []ImpossibleTravelRiskEvent for { - defer res.Body.Close() 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 { @@ -5372,6 +5424,7 @@ func (r *GraphServiceImpossibleTravelRiskEventsCollectionRequest) Paging(ctx con value []ImpossibleTravelRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5459,9 +5512,9 @@ func (r *GraphServiceInvitationsCollectionRequest) Paging(ctx context.Context, m } var values []Invitation for { - defer res.Body.Close() 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 { @@ -5474,6 +5527,7 @@ func (r *GraphServiceInvitationsCollectionRequest) Paging(ctx context.Context, m value []Invitation ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5561,9 +5615,9 @@ func (r *GraphServiceLeakedCredentialsRiskEventsCollectionRequest) Paging(ctx co } var values []LeakedCredentialsRiskEvent for { - defer res.Body.Close() 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 { @@ -5576,6 +5630,7 @@ func (r *GraphServiceLeakedCredentialsRiskEventsCollectionRequest) Paging(ctx co value []LeakedCredentialsRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5663,9 +5718,9 @@ func (r *GraphServiceMalwareRiskEventsCollectionRequest) Paging(ctx context.Cont } var values []MalwareRiskEvent for { - defer res.Body.Close() 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 { @@ -5678,6 +5733,7 @@ func (r *GraphServiceMalwareRiskEventsCollectionRequest) Paging(ctx context.Cont value []MalwareRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5723,35 +5779,35 @@ func (r *GraphServiceMalwareRiskEventsCollectionRequest) Add(ctx context.Context return } -// Oauth2PermissionGrants returns request builder for OAuth2PermissionGrant collection -func (b *GraphServiceRequestBuilder) Oauth2PermissionGrants() *GraphServiceOauth2PermissionGrantsCollectionRequestBuilder { - bb := &GraphServiceOauth2PermissionGrantsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} +// OAuth2PermissionGrants returns request builder for OAuth2PermissionGrant collection +func (b *GraphServiceRequestBuilder) OAuth2PermissionGrants() *GraphServiceOAuth2PermissionGrantsCollectionRequestBuilder { + bb := &GraphServiceOAuth2PermissionGrantsCollectionRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} bb.baseURL += "/oauth2PermissionGrants" return bb } -// GraphServiceOauth2PermissionGrantsCollectionRequestBuilder is request builder for OAuth2PermissionGrant collection -type GraphServiceOauth2PermissionGrantsCollectionRequestBuilder struct{ BaseRequestBuilder } +// GraphServiceOAuth2PermissionGrantsCollectionRequestBuilder is request builder for OAuth2PermissionGrant collection +type GraphServiceOAuth2PermissionGrantsCollectionRequestBuilder struct{ BaseRequestBuilder } // Request returns request for OAuth2PermissionGrant collection -func (b *GraphServiceOauth2PermissionGrantsCollectionRequestBuilder) Request() *GraphServiceOauth2PermissionGrantsCollectionRequest { - return &GraphServiceOauth2PermissionGrantsCollectionRequest{ +func (b *GraphServiceOAuth2PermissionGrantsCollectionRequestBuilder) Request() *GraphServiceOAuth2PermissionGrantsCollectionRequest { + return &GraphServiceOAuth2PermissionGrantsCollectionRequest{ BaseRequest: BaseRequest{baseURL: b.baseURL, client: b.client}, } } // ID returns request builder for OAuth2PermissionGrant item -func (b *GraphServiceOauth2PermissionGrantsCollectionRequestBuilder) ID(id string) *OAuth2PermissionGrantRequestBuilder { +func (b *GraphServiceOAuth2PermissionGrantsCollectionRequestBuilder) ID(id string) *OAuth2PermissionGrantRequestBuilder { bb := &OAuth2PermissionGrantRequestBuilder{BaseRequestBuilder: b.BaseRequestBuilder} bb.baseURL += "/" + id return bb } -// GraphServiceOauth2PermissionGrantsCollectionRequest is request for OAuth2PermissionGrant collection -type GraphServiceOauth2PermissionGrantsCollectionRequest struct{ BaseRequest } +// GraphServiceOAuth2PermissionGrantsCollectionRequest is request for OAuth2PermissionGrant collection +type GraphServiceOAuth2PermissionGrantsCollectionRequest struct{ BaseRequest } // Paging perfoms paging operation for OAuth2PermissionGrant collection -func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]OAuth2PermissionGrant, error) { +func (r *GraphServiceOAuth2PermissionGrantsCollectionRequest) Paging(ctx context.Context, method, path string, obj interface{}, n int) ([]OAuth2PermissionGrant, error) { req, err := r.NewJSONRequest(method, path, obj) if err != nil { return nil, err @@ -5765,9 +5821,9 @@ func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) Paging(ctx context } var values []OAuth2PermissionGrant for { - defer res.Body.Close() 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 { @@ -5780,6 +5836,7 @@ func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) Paging(ctx context value []OAuth2PermissionGrant ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5806,7 +5863,7 @@ func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) Paging(ctx context } // GetN performs GET request for OAuth2PermissionGrant collection, max N pages -func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) GetN(ctx context.Context, n int) ([]OAuth2PermissionGrant, error) { +func (r *GraphServiceOAuth2PermissionGrantsCollectionRequest) GetN(ctx context.Context, n int) ([]OAuth2PermissionGrant, error) { var query string if r.query != nil { query = "?" + r.query.Encode() @@ -5815,12 +5872,12 @@ func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) GetN(ctx context.C } // Get performs GET request for OAuth2PermissionGrant collection -func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) Get(ctx context.Context) ([]OAuth2PermissionGrant, error) { +func (r *GraphServiceOAuth2PermissionGrantsCollectionRequest) Get(ctx context.Context) ([]OAuth2PermissionGrant, error) { return r.GetN(ctx, 0) } // Add performs POST request for OAuth2PermissionGrant collection -func (r *GraphServiceOauth2PermissionGrantsCollectionRequest) Add(ctx context.Context, reqObj *OAuth2PermissionGrant) (resObj *OAuth2PermissionGrant, err error) { +func (r *GraphServiceOAuth2PermissionGrantsCollectionRequest) Add(ctx context.Context, reqObj *OAuth2PermissionGrant) (resObj *OAuth2PermissionGrant, err error) { err = r.JSONRequest(ctx, "POST", "", reqObj, &resObj) return } @@ -5867,9 +5924,9 @@ func (r *GraphServiceOnPremisesPublishingProfilesCollectionRequest) Paging(ctx c } var values []OnPremisesPublishingProfile for { - defer res.Body.Close() 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 { @@ -5882,6 +5939,7 @@ func (r *GraphServiceOnPremisesPublishingProfilesCollectionRequest) Paging(ctx c value []OnPremisesPublishingProfile ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -5969,9 +6027,9 @@ func (r *GraphServiceOrganizationCollectionRequest) Paging(ctx context.Context, } var values []Organization for { - defer res.Body.Close() 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 { @@ -5984,6 +6042,7 @@ func (r *GraphServiceOrganizationCollectionRequest) Paging(ctx context.Context, value []Organization ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6071,9 +6130,9 @@ func (r *GraphServicePayloadResponseCollectionRequest) Paging(ctx context.Contex } var values []PayloadResponse for { - defer res.Body.Close() 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 { @@ -6086,6 +6145,7 @@ func (r *GraphServicePayloadResponseCollectionRequest) Paging(ctx context.Contex value []PayloadResponse ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6173,9 +6233,9 @@ func (r *GraphServicePermissionGrantsCollectionRequest) Paging(ctx context.Conte } var values []ResourceSpecificPermissionGrant for { - defer res.Body.Close() 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 { @@ -6188,6 +6248,7 @@ func (r *GraphServicePermissionGrantsCollectionRequest) Paging(ctx context.Conte value []ResourceSpecificPermissionGrant ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6275,9 +6336,9 @@ func (r *GraphServicePlacesCollectionRequest) Paging(ctx context.Context, method } var values []Place for { - defer res.Body.Close() 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 { @@ -6290,6 +6351,7 @@ func (r *GraphServicePlacesCollectionRequest) Paging(ctx context.Context, method value []Place ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6377,9 +6439,9 @@ func (r *GraphServicePoliciesCollectionRequest) Paging(ctx context.Context, meth } var values []Policy for { - defer res.Body.Close() 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 { @@ -6392,6 +6454,7 @@ func (r *GraphServicePoliciesCollectionRequest) Paging(ctx context.Context, meth value []Policy ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6479,9 +6542,9 @@ func (r *GraphServicePrivilegedAccessCollectionRequest) Paging(ctx context.Conte } var values []PrivilegedAccess for { - defer res.Body.Close() 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 { @@ -6494,6 +6557,7 @@ func (r *GraphServicePrivilegedAccessCollectionRequest) Paging(ctx context.Conte value []PrivilegedAccess ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6581,9 +6645,9 @@ func (r *GraphServicePrivilegedApprovalCollectionRequest) Paging(ctx context.Con } var values []PrivilegedApproval for { - defer res.Body.Close() 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 { @@ -6596,6 +6660,7 @@ func (r *GraphServicePrivilegedApprovalCollectionRequest) Paging(ctx context.Con value []PrivilegedApproval ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6683,9 +6748,9 @@ func (r *GraphServicePrivilegedOperationEventsCollectionRequest) Paging(ctx cont } var values []PrivilegedOperationEvent for { - defer res.Body.Close() 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 { @@ -6698,6 +6763,7 @@ func (r *GraphServicePrivilegedOperationEventsCollectionRequest) Paging(ctx cont value []PrivilegedOperationEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6785,9 +6851,9 @@ func (r *GraphServicePrivilegedRoleAssignmentRequestsCollectionRequest) Paging(c } var values []PrivilegedRoleAssignmentRequestObject for { - defer res.Body.Close() 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 { @@ -6800,6 +6866,7 @@ func (r *GraphServicePrivilegedRoleAssignmentRequestsCollectionRequest) Paging(c value []PrivilegedRoleAssignmentRequestObject ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6887,9 +6954,9 @@ func (r *GraphServicePrivilegedRoleAssignmentsCollectionRequest) Paging(ctx cont } var values []PrivilegedRoleAssignment for { - defer res.Body.Close() 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 { @@ -6902,6 +6969,7 @@ func (r *GraphServicePrivilegedRoleAssignmentsCollectionRequest) Paging(ctx cont value []PrivilegedRoleAssignment ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -6989,9 +7057,9 @@ func (r *GraphServicePrivilegedRolesCollectionRequest) Paging(ctx context.Contex } var values []PrivilegedRole for { - defer res.Body.Close() 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 { @@ -7004,6 +7072,7 @@ func (r *GraphServicePrivilegedRolesCollectionRequest) Paging(ctx context.Contex value []PrivilegedRole ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7091,9 +7160,9 @@ func (r *GraphServicePrivilegedSignupStatusCollectionRequest) Paging(ctx context } var values []PrivilegedSignupStatus for { - defer res.Body.Close() 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 { @@ -7106,6 +7175,7 @@ func (r *GraphServicePrivilegedSignupStatusCollectionRequest) Paging(ctx context value []PrivilegedSignupStatus ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7193,9 +7263,9 @@ func (r *GraphServiceProgramControlTypesCollectionRequest) Paging(ctx context.Co } var values []ProgramControlType for { - defer res.Body.Close() 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 { @@ -7208,6 +7278,7 @@ func (r *GraphServiceProgramControlTypesCollectionRequest) Paging(ctx context.Co value []ProgramControlType ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7295,9 +7366,9 @@ func (r *GraphServiceProgramControlsCollectionRequest) Paging(ctx context.Contex } var values []ProgramControl for { - defer res.Body.Close() 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 { @@ -7310,6 +7381,7 @@ func (r *GraphServiceProgramControlsCollectionRequest) Paging(ctx context.Contex value []ProgramControl ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7397,9 +7469,9 @@ func (r *GraphServiceProgramsCollectionRequest) Paging(ctx context.Context, meth } var values []Program for { - defer res.Body.Close() 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 { @@ -7412,6 +7484,7 @@ func (r *GraphServiceProgramsCollectionRequest) Paging(ctx context.Context, meth value []Program ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7499,9 +7572,9 @@ func (r *GraphServiceRiskDetectionsCollectionRequest) Paging(ctx context.Context } var values []RiskDetection for { - defer res.Body.Close() 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 { @@ -7514,6 +7587,7 @@ func (r *GraphServiceRiskDetectionsCollectionRequest) Paging(ctx context.Context value []RiskDetection ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7601,9 +7675,9 @@ func (r *GraphServiceRiskyUsersCollectionRequest) Paging(ctx context.Context, me } var values []RiskyUser for { - defer res.Body.Close() 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 { @@ -7616,6 +7690,7 @@ func (r *GraphServiceRiskyUsersCollectionRequest) Paging(ctx context.Context, me value []RiskyUser ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7703,9 +7778,9 @@ func (r *GraphServiceSchemaExtensionsCollectionRequest) Paging(ctx context.Conte } var values []SchemaExtension for { - defer res.Body.Close() 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 { @@ -7718,6 +7793,7 @@ func (r *GraphServiceSchemaExtensionsCollectionRequest) Paging(ctx context.Conte value []SchemaExtension ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7805,9 +7881,9 @@ func (r *GraphServiceScopedRoleMembershipsCollectionRequest) Paging(ctx context. } var values []ScopedRoleMembership for { - defer res.Body.Close() 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 { @@ -7820,6 +7896,7 @@ func (r *GraphServiceScopedRoleMembershipsCollectionRequest) Paging(ctx context. value []ScopedRoleMembership ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -7907,9 +7984,9 @@ func (r *GraphServiceServicePrincipalsCollectionRequest) Paging(ctx context.Cont } var values []ServicePrincipal for { - defer res.Body.Close() 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 { @@ -7922,6 +7999,7 @@ func (r *GraphServiceServicePrincipalsCollectionRequest) Paging(ctx context.Cont value []ServicePrincipal ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8009,9 +8087,9 @@ func (r *GraphServiceSettingsCollectionRequest) Paging(ctx context.Context, meth } var values []DirectorySetting for { - defer res.Body.Close() 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 { @@ -8024,6 +8102,7 @@ func (r *GraphServiceSettingsCollectionRequest) Paging(ctx context.Context, meth value []DirectorySetting ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8111,9 +8190,9 @@ func (r *GraphServiceSharesCollectionRequest) Paging(ctx context.Context, method } var values []SharedDriveItem for { - defer res.Body.Close() 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 { @@ -8126,6 +8205,7 @@ func (r *GraphServiceSharesCollectionRequest) Paging(ctx context.Context, method value []SharedDriveItem ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8213,9 +8293,9 @@ func (r *GraphServiceSitesCollectionRequest) Paging(ctx context.Context, method, } var values []Site for { - defer res.Body.Close() 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 { @@ -8228,6 +8308,7 @@ func (r *GraphServiceSitesCollectionRequest) Paging(ctx context.Context, method, value []Site ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8315,9 +8396,9 @@ func (r *GraphServiceSubscribedSKUsCollectionRequest) Paging(ctx context.Context } var values []SubscribedSKU for { - defer res.Body.Close() 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 { @@ -8330,6 +8411,7 @@ func (r *GraphServiceSubscribedSKUsCollectionRequest) Paging(ctx context.Context value []SubscribedSKU ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8417,9 +8499,9 @@ func (r *GraphServiceSubscriptionsCollectionRequest) Paging(ctx context.Context, } var values []Subscription for { - defer res.Body.Close() 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 { @@ -8432,6 +8514,7 @@ func (r *GraphServiceSubscriptionsCollectionRequest) Paging(ctx context.Context, value []Subscription ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8519,9 +8602,9 @@ func (r *GraphServiceSuspiciousIPRiskEventsCollectionRequest) Paging(ctx context } var values []SuspiciousIPRiskEvent for { - defer res.Body.Close() 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 { @@ -8534,6 +8617,7 @@ func (r *GraphServiceSuspiciousIPRiskEventsCollectionRequest) Paging(ctx context value []SuspiciousIPRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8621,9 +8705,9 @@ func (r *GraphServiceTeamsCollectionRequest) Paging(ctx context.Context, method, } var values []Team for { - defer res.Body.Close() 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 { @@ -8636,6 +8720,7 @@ func (r *GraphServiceTeamsCollectionRequest) Paging(ctx context.Context, method, value []Team ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8723,9 +8808,9 @@ func (r *GraphServiceTeamsTemplatesCollectionRequest) Paging(ctx context.Context } var values []TeamsTemplate for { - defer res.Body.Close() 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 { @@ -8738,6 +8823,7 @@ func (r *GraphServiceTeamsTemplatesCollectionRequest) Paging(ctx context.Context value []TeamsTemplate ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8825,9 +8911,9 @@ func (r *GraphServiceUnfamiliarLocationRiskEventsCollectionRequest) Paging(ctx c } var values []UnfamiliarLocationRiskEvent for { - defer res.Body.Close() 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 { @@ -8840,6 +8926,7 @@ func (r *GraphServiceUnfamiliarLocationRiskEventsCollectionRequest) Paging(ctx c value []UnfamiliarLocationRiskEvent ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -8927,9 +9014,9 @@ func (r *GraphServiceUsersCollectionRequest) Paging(ctx context.Context, method, } var values []User for { - defer res.Body.Close() 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 { @@ -8942,6 +9029,7 @@ func (r *GraphServiceUsersCollectionRequest) Paging(ctx context.Context, method, value []User ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } @@ -9029,9 +9117,9 @@ func (r *GraphServiceWorkbooksCollectionRequest) Paging(ctx context.Context, met } var values []DriveItem for { - defer res.Body.Close() 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 { @@ -9044,6 +9132,7 @@ func (r *GraphServiceWorkbooksCollectionRequest) Paging(ctx context.Context, met value []DriveItem ) err := jsonx.NewDecoder(res.Body).Decode(&paging) + res.Body.Close() if err != nil { return nil, err } |